Block chain performance test method, device and equipment based on rule tree configuration alignment
Through the configuration alignment method based on the rule tree, the problem of unfair test results caused by default configuration differences in existing blockchain performance tests is solved, and the accuracy and comparability of blockchain performance tests are achieved.
Patent Information
- Application Number
- CN202510383194.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-27
AI Technical Summary
The existing blockchain performance testing methods rely on the system default configuration, resulting in a lack of comparability in the test results, affecting the fairness of the evaluation, and making it difficult to objectively evaluate the true performance of each system.
The method based on rule tree configuration alignment is adopted, by building a rule tree, filtering performance-independent configuration items, semantic matching is performed, and the mapping relationship between performance configuration items and benchmark configuration items is established, so as to achieve semantic alignment and data alignment of performance configuration items between different blockchain systems.
Through configuration alignment, the accuracy and fairness of the test are improved, the comparability of the test results is ensured, and a reliable basis for the performance evaluation of blockchain systems.
Smart Images

Figure CN120223570A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular, to a blockchain performance testing method, apparatus, and device based on rule tree configuration alignment. Background Art
[0002] As a decentralized and immutable distributed ledger technology, blockchain technology has been widely applied in many fields such as asset management, finance, healthcare, distributed storage, and supply chain management. With the continuous expansion of application scenarios, the performance issue of blockchain systems has gradually become a key factor restricting their large-scale implementation. Taking Bitcoin as an example, it can only process about seven transactions per second, and the confirmation time for a single transaction may be as long as 60 minutes, making it difficult to meet the application requirements of high concurrency and low latency. To solve the performance bottleneck, the industry has proposed various optimization solutions, such as cross-chain technology, asynchronous consensus, sharding technology, and directed acyclic graph. The introduction of these technologies has given birth to many new blockchain systems, and at the same time, has put forward higher requirements for performance testing.
[0003] However, existing blockchain performance testing mainly relies on the system default configuration. Due to the significant differences in the default configurations of different systems, the test results lack comparability, which affects the fairness of evaluation and makes it difficult to objectively evaluate the true performance of each system. Summary of the Invention
[0004] In view of the above problems, embodiments of this application provide a blockchain performance testing method, apparatus, and device based on rule tree configuration alignment to overcome or at least partially solve the above problems.
[0005] In the first aspect of the embodiments of this application, a blockchain performance testing method based on rule tree configuration alignment is disclosed. The method includes: Construct a rule tree according to the architecture of the blockchain system. The rule tree includes: a text branch representing the text rules of configuration items, and a semantic branch representing the reference configuration items; Obtain the configuration items of multiple blockchain systems, where the configuration items represent the configuration content of the blockchain systems; Filter the configuration items irrelevant to performance in the configuration items according to the configuration item text rules corresponding to the text branch to obtain the performance configuration items of each blockchain system. The configuration item text rules represent the descriptions of the configuration items irrelevant to performance; Establish a mapping relationship between each performance configuration item and the reference configuration item according to the semantic matching result between the performance configuration item and the reference configuration item corresponding to the semantic branch to obtain an alignment list. The reference configuration item represents the reference benchmark for configuration alignment, and multiple performance configuration items from different blockchain systems that have a mapping relationship with the same reference configuration item represent the same configuration content; Set a configuration value for each performance configuration item in the alignment list to obtain an aligned configuration, where the configuration values of multiple performance configuration items from different blockchain systems representing the same configuration content are the same; Test the multiple blockchain systems according to the aligned configuration to obtain performance test results.
[0006] Optionally, the configuration item text rules include a port filter, a type validator, and an ID filter; according to the configuration item text rules corresponding to the text branch, filter the configuration items unrelated to performance in the configuration items to obtain the performance configuration items of each blockchain system, including: According to the port filter, filter out the term port configuration items unrelated to performance in the configuration items; According to the type validator, filter out the boolean type configuration items and string type configuration items unrelated to performance in the configuration items; According to the ID filter, filter out the term ID configuration items unrelated to performance in the configuration items; Take the remaining configuration items after filtering out the term port configuration items, the boolean type configuration items, the string type configuration items, and the unrelated term ID configuration items as the performance configuration items of the blockchain system.
[0007] Optionally, according to the semantic matching result between the performance configuration item and the benchmark configuration item corresponding to the semantic branch, establish a mapping relationship between each performance configuration item and the benchmark configuration item to obtain an alignment list, including: Flatten the names of each performance configuration item and each benchmark configuration item. The names of the flattened performance configuration items and benchmark configuration items include: the name of the configuration item itself and the name of the superior configuration item; Map the names of the performance configuration items and the benchmark configuration items to the word vector space to obtain a word embedding list, where the word embedding list includes: a first word embedding vector corresponding to the name of the performance configuration item and a second word embedding vector corresponding to the name of the benchmark configuration item; Calculate the semantic similarity between the first word embedding vector and each second word embedding vector, and determine the first word embedding vector and the second word embedding vector corresponding to the maximum semantic similarity as the embedding vectors with semantic matching; Establish a mapping relationship between the performance configuration item and the benchmark configuration item corresponding to the embedding vectors with semantic matching to obtain an alignment list.
[0008] Optionally, the method further includes: Determine whether to retain the embedding vectors with semantic matching according to the magnitude relationship between the semantic similarity of the embedding vectors with semantic matching and the semantic similarity threshold. Establish a mapping relationship between the performance configuration items and the benchmark configuration items corresponding to the semantically matched embedding vectors to obtain an alignment list, including: Establish a mapping relationship between the performance configuration items and the benchmark configuration items corresponding to the reserved semantically matched embedding vectors to obtain an alignment list.
[0009] Optionally, the benchmark configuration items include: storage configuration items, consensus configuration items, network configuration items, and contract configuration items; Among them, the storage configuration items include cache size, transaction pool size, and the transaction retention time of transactions in the transaction pool; The consensus configuration items include block size, block generation time, confirmation time, and consensus mechanism; The network configuration items include the maximum number of connected nodes of P2P, the request limit and maximum response size of batch requests, the request time and request interval of the heartbeat mechanism; The contract configuration items include execution time, installation time, and startup time.
[0010] Optionally, set configuration values for each performance configuration item in the alignment list to obtain aligned configurations, including: Determine the priority order of the multiple blockchain systems; For each target performance configuration item, when the blockchain system with the highest priority in the priority order has the target performance configuration item, use the configuration value of the blockchain system with the highest priority as the configuration value of the performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item, where the target performance configuration item is any one of the performance configuration items in the alignment list; When the blockchain system with the highest priority in the priority order does not have the target performance configuration item, use the configuration value of the blockchain system with the second highest priority in the priority order as the configuration value of the performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item.
[0011] Optionally, the performance test results include the transaction volume per second and latency after configuration alignment; the method further includes: Obtain the transaction volume per second and latency time of the blockchain system before configuration alignment; Calculate a performance volatility index based on the transaction volume per second and latency time before configuration alignment, and the transaction volume per second and latency after configuration alignment; Determine the performance fluctuation situation of the blockchain system before and after configuration alignment based on the performance volatility index.
[0012] Optionally, obtaining the configuration items of multiple blockchain systems includes: Collect multiple configuration files of each blockchain system; Parse the multiple configuration files to obtain initial configuration items in different formats; Process the initial configuration items in different formats into the same format to obtain the configuration items.
[0013] In the second aspect of the embodiments of the present application, a blockchain performance testing device based on rule tree configuration alignment is disclosed. The device includes: A construction module for constructing a rule tree according to the architecture of the blockchain system. The rule tree includes: a text branch representing the text rules of the configuration items and a semantic branch representing the reference configuration items; An acquisition module for acquiring the configuration items of multiple blockchain systems, where the configuration items represent the configuration content of the blockchain systems; A filtering module for filtering out the configuration items irrelevant to performance in the configuration items according to the configuration item text rules corresponding to the text branch, to obtain the performance configuration items of each blockchain system. The configuration item text rules represent the descriptions of the configuration items irrelevant to performance; An alignment module for establishing a mapping relationship between each performance configuration item and the reference configuration item corresponding to the semantic branch according to the semantic matching result between the performance configuration item and the reference configuration item, to obtain an alignment list. The reference configuration item represents the reference benchmark for configuration alignment, and the multiple performance configuration items from different blockchain systems that have a mapping relationship with the same reference configuration item in the alignment list represent the same configuration content; A setting module for setting configuration values for each performance configuration item in the alignment list to obtain the aligned configuration. Among them, the configuration values of the multiple performance configuration items from different blockchain systems that represent the same configuration content are the same; A testing module for testing the multiple blockchain systems according to the aligned configuration to obtain performance test results.
[0014] In the third aspect of the embodiments of the present application, an electronic device is disclosed, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the blockchain performance testing method based on rule tree configuration alignment described in the first aspect of the embodiments of the present application are implemented.
[0015] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is disclosed, on which a computer program is stored. When the computer program is executed by a processor, the steps of the blockchain performance testing method based on rule tree configuration alignment described in the first aspect of the embodiments of the present application are implemented.
[0016] In a fifth aspect of the embodiments of the present application, a computer program product is disclosed, including a computer program which, when executed by a processor, implements the steps of the blockchain performance testing method based on rule tree configuration alignment described in the first aspect of the embodiments of the present application.
[0017] The embodiments of the present application have the following advantages: In the embodiments of the present application, the performance configuration of the blockchain system is comprehensively described based on the rule tree. By obtaining the configuration items of multiple blockchain systems and filtering the configuration items irrelevant to performance in the configuration items according to the configuration item text rules corresponding to the text branches of the rule tree, the overhead of alignment configuration is reduced, and at the same time, the interference of irrelevant factors is avoided, improving the pertinence of the test; according to the semantic matching result between the performance configuration item and the benchmark configuration item corresponding to the text semantics of the rule tree, a mapping relationship is established between each performance configuration item and the benchmark configuration item to obtain an alignment list. Multiple performance configuration items from different blockchain systems that have a mapping relationship with the same benchmark configuration item in the alignment list represent the same configuration content, thus realizing the semantic alignment of performance configuration items between different blockchain systems; by setting the same configuration values for multiple performance configuration items representing the same configuration content, the data alignment of performance configuration items between different blockchain systems is realized; through semantic alignment and data alignment, the configurations of different blockchain systems are aligned, and multiple blockchain systems are tested according to the aligned configurations, ensuring the accuracy and fairness of the test results and providing a reliable basis for the performance evaluation of the blockchain system.
[0018] In this way, the blockchain performance testing method based on rule tree configuration alignment in the embodiments of the present application, through an innovative configuration alignment mechanism, solves the problem of unfair performance evaluation caused by configuration differences in the existing testing solutions, significantly improves the accuracy and reliability of blockchain performance testing, and provides important technical support for the further development of blockchain technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0020] Figure 1 is a flowchart of the steps of a blockchain performance testing method based on rule tree configuration alignment provided by the embodiments of the present application; Figure 2 is a schematic diagram of a rule tree provided by the embodiments of the present application; Figure 3It is the overall flowchart of a blockchain performance testing method based on rule tree configuration alignment provided by an embodiment of this application; Figure 4 It is the structural schematic diagram of a blockchain performance testing device based on rule tree configuration alignment provided by an embodiment of this application; Figure 5 It is the structural schematic diagram of an electronic device provided by an embodiment of this application. Detailed implementation manners
[0021] To make the above objects, features, and advantages of this application more obvious and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0022] To better understand the technical solutions of this application, the technical concepts involved in this application will be described first.
[0023] Blockchain: A typical implementation of a distributed ledger system, whose underlying ledger adopts a chain structure, and each block (non-genesis block) can only reference one previous block.
[0024] Word embedding: Word embedding is a method of mapping lexical items to a continuous vector space, aiming to capture the semantic and syntactic features of vocabulary through low-dimensional real-valued vectors, so as to reflect the complex relationships and structures between words in this vector space.
[0025] Configuration alignment: Configuration alignment refers to the process of ensuring that key configuration items are as consistent and synchronized as possible among multiple systems. This involves configuration management across different systems to ensure that they are as consistent as possible in terms of operation behavior, performance parameters, security policies, etc.
[0026] In the related art, blockchain system performance testing methods include two categories, namely simulator-based and real-system-based testing. 1) Simulator-based performance testing is to simulate different heterogeneous systems by constructing a basic environment and conduct tests on these simulated systems. For example, one testing method is to simulate a Directed Acyclic Graph (DAG) ledger and analyze the behavior of the IOTA (a distributed ledger designed for the Internet of Things) system by modeling honest and semi-honest nodes. Another testing method is to construct a blockchain network simulator and illustrate the impact of neighbor node selection algorithms and relay networks on block propagation time by changing the behavior of nodes. Although simulator-based performance testing reduces the dependence on hardware and resource costs, its accuracy in the simulation environment depends on the quality of the simulator, which requires a large amount of development and design work.
[0027] 2) System-based performance testing is to evaluate the actual performance of a real system under simulated load conditions. For example, one testing method is to test blockchains such as Ethereum, Fabric (an open-source distributed ledger platform based on Hyperledger technology), and CITA (Cryptape Inter-enterprise Trust Automation, a blockchain framework for enterprise-level applications supporting smart contracts) by designing overall and detailed metrics and a monitoring architecture. Another testing method is a blockchain performance benchmark framework that uses predefined use cases to test Besu, Ethereum, and Hyperledger Fabric. The above research mainly focuses on designing unified metrics and test cases to ensure the fairness of testing, but these methods control variables by restricting the number of nodes and hardware and still rely on default system configurations, without considering the impact of configuration items. Since the default configurations of different systems vary significantly, this leads to a lack of comparability in test results, thus affecting the fairness of evaluation and making it difficult to objectively evaluate the true performance of each system.
[0028] To overcome the limitations of the related art, the embodiments of the present application provide a blockchain performance testing method based on rule tree configuration alignment. This method ensures the accuracy and fairness of test results by aligning the configurations of different blockchain systems, providing a reliable basis for the performance evaluation of blockchain systems.
[0029] Refer to Figure 1 As shown Figure 1 is a flowchart of the steps of a blockchain performance testing method based on rule tree configuration alignment provided by the embodiments of the present application. As Figure 1 shown, the blockchain performance testing method based on rule tree configuration alignment may include steps S110 to S160: Step S110: Construct a rule tree according to the architecture of the blockchain system. The rule tree includes: a text branch representing the text rules of configuration items, and a semantic branch representing the benchmark configuration items.
[0030] To comprehensively describe the performance configuration of the blockchain system, a rule tree is constructed according to the architecture of the blockchain system. Among them, the architecture of the blockchain system includes configuration information such as storage, consensus, network, and contract information. The rule tree is used to analyze, classify, and align configuration items. Through the rule tree, configuration items irrelevant to performance can be determined, and semantic alignment can be performed on each performance configuration item.
[0031] As Figure 2 shown, Figure 2 FIG. 1 is a schematic diagram of a rule tree provided by an embodiment of the present application. Among them, the text branch is used to filter and analyze the names and values of configuration items, and coarsely delete configuration items irrelevant to performance, reducing the overhead of subsequent alignment. Specifically, a port filter, a type validator, and an ID filter are defined in the text branch. The port filter checks whether the configuration item name contains the term "port" irrelevant to performance and filters out these configuration items. The type validator removes any boolean or string type configuration items to ensure that the value associated with the configuration item is numeric. The ID filter checks whether the term "ID" exists in the configuration item name and excludes these configuration items irrelevant to performance.
[0032] The semantic branch is used to perform fine-grained semantic alignment on the configuration item names. The semantic branch includes important parameter nodes related to performance in aspects such as storage, consensus, network, and contract. Among them, storage mainly involves the storage size of the database and the transaction pool, as well as the retention time of transactions in the transaction pool; consensus mainly includes block size, block generation time, and confirmation time, etc.; the network part can be divided into three parts of configuration: P2P (Peer-to-Peer), batch requests, and heartbeat mechanism according to the type of network requests; the contract mainly involves the maximum time for contract execution, installation, and startup.
[0033] Step S120: Obtain configuration items of multiple blockchain systems, where the configuration items represent the configuration content of the blockchain systems.
[0034] Among them, each blockchain system includes multiple configuration items, and one configuration item represents a type of configuration information (configuration content) of the blockchain system. For example, the configuration item can be configuration information related to the database, configuration information related to consensus, etc. For each blockchain system, configuration items can be obtained from the configuration files, command lines, and API parameters in the blockchain system.
[0035] In some embodiments, obtaining the configuration items of multiple blockchain systems specifically includes: collecting multiple configuration files of each blockchain system; parsing the multiple configuration files to obtain initial configuration items in different formats; and processing the initial configuration items in different formats into the same format to obtain the configuration items.
[0036] The configuration files of blockchain systems usually use different formats. For example, the configuration files can be in formats such as JSON (JavaScript Object Notation, a lightweight data interchange format), TOML (Tom's Obvious Minimal Language, a markup language designed specifically for configuration files), XML (eXtensible Markup Language, an extensible markup language), and YAML (YAML Ain't Markup Language, a human-readable configuration file format). Therefore, after collecting multiple configuration files of each blockchain system, the configuration files are parsed to extract relevant configuration items (i.e., initial configuration items), and the initial configuration items are organized into a unified format. For example, all initial configuration items can be processed into the JSON format.
[0037] In this way, by processing all configuration items into the same format, it is ensured that subsequent unified processing of the configuration items can be carried out, avoiding the problem of difficult alignment of configurations due to format differences.
[0038] Step S130: Filter the configuration items unrelated to performance in the configuration items according to the configuration item text rules corresponding to the text branch, to obtain the performance configuration items of each blockchain system, where the configuration item text rules represent the descriptions of the configuration items unrelated to performance.
[0039] Specifically, according to the text branch of the rule tree, the corresponding configuration item text rules are determined. For each blockchain system, the configuration item text rules are used to filter the configuration items of the blockchain system to filter out the configuration items unrelated to performance in the configuration items, to obtain the performance configuration items of the blockchain system, where the performance configuration items refer to the configuration items related to performance.
[0040] In some embodiments, the configuration item text rules include a port filter, a type validator, and an ID filter; in the above step S130, "filter the configuration items unrelated to performance in the configuration items according to the configuration item text rules corresponding to the text branch to obtain the performance configuration items of each blockchain system", which specifically includes: according to the port filter, filter out the term port configuration items unrelated to performance in the configuration items; according to the type validator, filter out the boolean type configuration items and string type configuration items unrelated to performance in the configuration items; according to the ID filter, filter out the term ID configuration items unrelated to performance in the configuration items; the remaining configuration items after filtering out the term port configuration items, the boolean type configuration items, the string type configuration items, and the unrelated term ID configuration items are used as the performance configuration items of the blockchain system.
[0041] In this way, various configuration descriptions unrelated to performance are defined as text branches. When performing configuration alignment, filtering the configuration items unrelated to performance in the configuration items according to the configuration item text rules can coarsely delete the configuration unrelated to performance, reduce the overhead of aligning configurations, avoid interference from irrelevant factors at the same time, and improve the pertinence of testing.
[0042] Step S140: Establish a mapping relationship between each performance configuration item and the reference configuration item according to the semantic matching result between the performance configuration item and the reference configuration item corresponding to the semantic branch to obtain an alignment list. The reference configuration item represents a reference benchmark for configuration alignment, and multiple performance configuration items from different blockchain systems that have a mapping relationship with the same reference configuration item in the alignment list represent the same configuration content.
[0043] Specifically, according to the semantic branch of the rule tree, the reference configuration item is determined; the reference configuration item includes: a storage configuration item, a consensus configuration item, a network configuration item, and a contract configuration item; among them, the storage configuration item includes the cache size, the transaction pool size, and the transaction retention time of the transaction in the transaction pool; the consensus configuration item includes the block size, the block generation time, the confirmation time, and the consensus mechanism; the network configuration item includes the maximum number of connected nodes of P2P, the request limit and the maximum response size of the batch request, the request time and the request interval of the heartbeat mechanism; the contract configuration item includes the execution time, the installation time, and the startup time.
[0044] Since the reference configuration item represents a reference benchmark for configuration alignment, semantic alignment of performance configuration items between different blockchain systems is achieved by performing semantic matching between the performance configuration items of each blockchain system.
[0045] In some embodiments, the performance configuration items of each blockchain system are semantically matched with the performance configuration items, and a mapping relationship is established between each performance configuration item and the reference configuration item. The specific process is as follows: Each performance configuration item of each blockchain system is sequentially semantically matched with the performance configuration item, and according to the semantic matching result, the reference configuration item and the performance configuration item representing the same configuration content are established with a mapping relationship. Finally, a mapping relationship is established between the performance configuration items of each blockchain system and the reference configuration item to obtain an alignment list.
[0046] In the alignment list, one reference configuration item corresponds to the performance configuration items of multiple blockchain systems respectively, that is, the performance configuration items from different blockchain systems that have a mapping relationship with the same reference configuration item in the alignment list represent the same configuration content. For example, if there are 2 blockchain systems, the reference configuration item A may correspond to the performance configuration item 1 in blockchain system 1 and the performance configuration item 2 in blockchain system 2, that is, the reference configuration item A, the performance configuration item 1, and the performance configuration item 2 all represent the same configuration content.
[0047] In this way, by defining the configuration related to performance as a semantic branch, when performing configuration alignment, the reference configuration item is obtained according to the semantic branch, and then the performance configuration items of multiple different blockchain systems are semantically aligned with the reference configuration item according to the reference configuration item, so as to realize the semantic alignment of the performance configuration items of each multiple blockchain systems.
[0048] Step S150: Set configuration values for each performance configuration item in the alignment list to obtain an aligned configuration, where the configuration values of multiple performance configuration items from different blockchain systems representing the same configuration content are the same.
[0049] In order to keep the configuration values of the performance configuration items consistent among multiple blockchain systems, a unified configuration value is established for each performance configuration item representing the same configuration content, and the configuration values of multiple performance configuration items representing the same configuration content are all set to this configuration value. For example, if the performance configuration item 1 in blockchain system 1 and the performance configuration item 2 in blockchain system 2 represent the same configuration content, the configuration values of the performance configuration item 1 and the performance configuration item 2 are the same.
[0050] Step S160: Test the multiple blockchain systems according to the aligned configuration to obtain performance test results.
[0051] In the testing phase, multiple blockchain systems are tested using aligned configurations to determine the fairness of testing under various scenarios. Specifically, the testing can be divided into three parts, namely load design, controlled environment setup, and test monitoring. First, load design is carried out to create a transaction workload to reproduce the requests of actual applications. Next, a controlled environment is set up by establishing a controlled test environment, that is, controlling the aligned configuration items and the number of nodes to maintain the consistency of test conditions. Finally, multiple blockchain systems are tested based on the transaction workload and the controlled environment, and test monitoring is carried out during the testing phase to collect key performance indicators, such as TPS (Transactions Per Second) and latency, to provide an overall view of the performance of the blockchain system.
[0052] By adopting the technical solution implemented in this application, the performance configuration of the blockchain system is comprehensively described based on the rule tree. By obtaining the configuration items of multiple blockchain systems and filtering the configuration items unrelated to performance in the configuration items according to the configuration item text rules corresponding to the text branches of the rule tree, the overhead of alignment configuration is reduced, and at the same time, the interference of irrelevant factors is avoided, improving the pertinence of testing. According to the semantic matching results between the performance configuration items and the benchmark configuration items corresponding to the text semantics of the rule tree, a mapping relationship is established between each performance configuration item and the benchmark configuration item to obtain an alignment list. The multiple performance configuration items from different blockchain systems that have a mapping relationship with the same benchmark configuration item in the alignment list represent the same configuration content, thus realizing the semantic alignment of performance configuration items between different blockchain systems. By setting the same configuration values for multiple performance configuration items representing the same configuration content, the data alignment of performance configuration items between different blockchain systems is realized. Through semantic alignment and data alignment, the configurations of different blockchain systems are aligned, and multiple blockchain systems are tested according to the aligned configurations, ensuring the accuracy and fairness of the test results and providing a reliable basis for the performance evaluation of the blockchain system.
[0053] In this way, the blockchain performance testing method based on rule tree configuration alignment in the embodiments of this application solves the problem of unfair performance evaluation caused by configuration differences in the existing testing solutions through an innovative configuration alignment mechanism, significantly improving the accuracy and reliability of blockchain performance testing and providing important technical support for the further development of blockchain technology.
[0054] Combined with the above embodiments, in one implementation manner, the embodiments of this application also provide a blockchain performance testing method based on rule tree configuration alignment. In this method, the step "According to the semantic matching results between the performance configuration items and the benchmark configuration items corresponding to the semantic branches, establish a mapping relationship between each performance configuration item and the benchmark configuration item to obtain an alignment list" in the above step S140 specifically includes sub-steps S140-1 to step S140-4: Step S140-1: Flatten the names of each performance configuration item and each benchmark configuration item. The flattened names of the performance configuration items and the benchmark configuration items include: the name of the configuration item itself and the name of the superior configuration item.
[0055] Among them, the configuration items include configuration items (sub-nodes) under different nodes (such as storage, consensus, network, contract). For example, for the storage node, the configuration item can be the cache size of the database storage. The cache size is the name of the configuration item itself, and the database storage is the name of the superior configuration item. Another example, for the network node, the configuration item can be the maximum number of connected nodes under P2P. The maximum number of connected nodes is the name of the configuration item itself, and P2P is the name of the superior configuration item.
[0056] Specifically, flattening the names of each performance configuration item and each benchmark configuration item includes: determining the name of the configuration item (performance configuration item or benchmark configuration item) and the name of the previous configuration item of this configuration item, and then taking the name of the configuration item and the name of the superior configuration item together as the name of the configuration item.
[0057] In this way, by flattening the names of each performance configuration item and each benchmark configuration item, it is ensured that the configuration item names used for alignment include not only their own names but also the superior names of each configuration item, thus ensuring the accuracy of semantic alignment.
[0058] Step S140-2: Map the names of the performance configuration items and the names of the benchmark configuration items to the word vector space to obtain a word embedding list. The word embedding list includes: the first word embedding vector corresponding to the name of the performance configuration item and the second word embedding vector corresponding to the name of the benchmark configuration item.
[0059] Specifically, each flattened configuration item name is converted into a word embedding vector through an embedding model (such as Word2Vec, GloVe, or BERT model, etc.), that is, the name of the performance configuration item is converted into the first word embedding vector, and the name of the benchmark configuration item is converted into the second word embedding vector to obtain a word embedding list.
[0060] Step S140-3: Calculate the semantic similarity between the first word embedding vector and each of the second word embedding vectors, and determine the first word embedding vector and the second word embedding vector corresponding to the maximum semantic similarity as the semantically matching embedding vectors.
[0061] Among them, the semantic similarity between the first word embedding vector and each second word embedding vector can be characterized by the cosine similarity; for each performance configuration item, the most matching aligned benchmark configuration item can be identified according to the maximum semantic similarity, that is, it is considered that the first word embedding vector and the second word embedding vector corresponding to the maximum semantic similarity are determined as the semantically matching embedding vectors.
[0062] For example, if the semantic similarities between the first word embedding vector 1 and the second word embedding vectors 1, 2, 3, and 4 are 0.5, 0.95, 0.2, and 0.6 respectively, then the first word embedding vector 1 and the second word embedding vector 2 can be determined as semantically matching embedding vectors.
[0063] Step S140-4: Establish a mapping relationship between the performance configuration items and the benchmark configuration items corresponding to the semantically matching embedding vectors to obtain an alignment list.
[0064] In the embodiment of the present application, if the first word embedding vector and the second word embedding vector are semantically matching embedding vectors, it indicates that the names of the performance configuration items corresponding to the first word embedding vector and the names of the benchmark configuration items corresponding to the second word embedding vector are similar, and the corresponding performance configuration items and benchmark configuration items may represent the same configuration content. Therefore, a mapping relationship is established between the performance configuration items and the benchmark configuration items corresponding to each semantically matching embedding vector, and finally, an alignment list is obtained based on all the mapping relationships. In this alignment list, multiple performance configuration items from different blockchain systems that have a mapping relationship with the same benchmark configuration item represent the same configuration content.
[0065] In this way, by flattening the names of each performance configuration item and each benchmark configuration item, and using word embedding for semantic analysis to determine the meaning of the configuration items, the semantics of multiple performance configuration items with the same configuration content are aligned.
[0066] In some embodiments, before performing the above step S140-4, the following steps are further included: determining whether to retain the semantically matching embedding vectors according to the size relationship between the semantic similarity of the semantically matching embedding vectors and the semantic similarity threshold.
[0067] In the embodiment of the present application, a semantic similarity threshold is introduced to ensure that only significant alignments are retained, thereby improving the accuracy of the semantic matching process. Among them, the semantic similarity threshold is flexibly set according to the actual situation. For example, the semantic similarity threshold can be set according to the accuracy requirements of the test, or the semantic similarity threshold can be set according to the architecture of the tested blockchain system.
[0068] For example, if the semantic similarity threshold is 0.8, then for the semantically matching embedding vectors determined according to step S130-3, the semantically matching embedding vectors with a semantic similarity greater than 0.8 are retained. In this way, non-significant semantic matches that may lead to inaccurate mapping relationships are avoided.
[0069] Further, the step of "establishing a mapping relationship between the performance configuration items and the benchmark configuration items corresponding to the semantically matched embedding vectors in step S140-4 to obtain an alignment list" specifically includes: establishing a mapping relationship between the performance configuration items and the benchmark configuration items corresponding to the reserved semantically matched embedding vectors to obtain an alignment list.
[0070] In this way, when performing configuration alignment, semantic alignment is carried out according to the semantic similarity between the names of the performance configuration items and the names of the benchmark configuration items; and when aligning, significant alignments are retained through a semantic similarity threshold, thereby improving the accuracy of the semantic matching process and avoiding inaccurate mapping relationships caused by non-significant semantic matching.
[0071] Combined with the above embodiments, in one implementation, the embodiments of the present application further provide a blockchain performance testing method based on rule tree configuration alignment. In this method, the step of "setting configuration values for each performance configuration item in the alignment list to obtain aligned configurations" in step S150 specifically includes sub-steps S150-1 to step S150-3: Step S150-1: Determine the priority order of the multiple blockchain systems.
[0072] Step S150-2: For each target performance configuration item, when the blockchain system with the highest priority in the priority order has the target performance configuration item, use the configuration value of the blockchain system with the highest priority as the configuration value of the performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item, where the target performance configuration item is any one of the performance configuration items in the alignment list.
[0073] Step S150-3: When the blockchain system with the highest priority in the priority order does not have the target performance configuration item, use the configuration value of the blockchain system with the second highest priority in the priority order as the configuration value of the performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item.
[0074] In the embodiments of the present application, in order to keep the configuration values of the performance configuration items consistent among multiple blockchain systems, it is very important to establish a unified configuration value and determine the system value to be synchronized. For example, when aligning the configuration files of three blockchain systems (B1, B2, and B3 respectively), if each blockchain system has a configuration item for transaction timeout setting, the timeout value of B1 can be synchronized with B2 and B3; however, if blockchain systems B2 and B3 have configuration for transaction timeout and system B1 does not, then alignment becomes difficult. It can be seen that designating the configuration of a single blockchain system as a benchmark is impractical.
[0075] Therefore, the embodiments of the present application provide a data alignment mechanism based on the priorities of blockchain systems to determine a unified configuration value according to the priority order of multiple blockchain systems as the configuration value of performance configuration items from different blockchain systems representing the same configuration content. Specifically, determining the priority order of multiple blockchain systems may be based on the matching situation between the performance configuration items of each blockchain system and the benchmark configuration items. The higher the number of performance configuration items that match the benchmark configuration items, the higher the priority of the blockchain system.
[0076] When setting the configuration value, for each performance configuration item, the configuration value with a higher priority is used as the reference value for the corresponding performance configuration items in the remaining blockchain systems. For example, the priority order of three blockchain systems (B1, B2, B3, and B4) is sorted as: B2, B1, B3, B4. For performance configuration item 1, if there is a performance configuration item 1 in B2, then the configuration value of performance configuration item 1 in B2 (with the highest priority) is used as the configuration value of performance configuration item 1 in B1, B3, and B4; for performance configuration item 2, if there is no performance configuration item 1 in B2, then the configuration value of performance configuration item 2 in B1 (with the second highest priority) is used as the configuration value of performance configuration item 2 in B3 and B4.
[0077] By adopting the technical solution of the embodiments of the present application, priorities are assigned to each blockchain system to determine the configuration values of performance configuration items from different blockchain systems representing the same configuration content according to the priority order of multiple blockchain systems, ensuring that the configuration values of blockchain systems with higher priorities are used as reference standards during the configuration alignment process, thereby effectively solving the problem of inconsistent configuration values between different blockchain systems.
[0078] Combined with the above embodiments, in one implementation, the embodiments of the present application further provide a blockchain performance testing method based on rule tree configuration alignment. In this method, the performance test results include the transaction volume per second and latency after configuration alignment. After the above step S160, the method further includes the following steps: Step S170: Obtain the transaction volume per second and latency time of the blockchain system before configuration alignment; calculate the performance volatility index based on the transaction volume per second and latency time before configuration alignment, and the transaction volume per second and latency after configuration alignment; determine the performance fluctuation situation of the blockchain system before and after configuration alignment according to the performance volatility index.
[0079] In the embodiments of the present application, by monitoring the testing process, key performance indicators, that is, the transaction volume per second and latency time after configuration alignment, are obtained, and then the performance fluctuations of the blockchain system before and after configuration alignment are analyzed based on these key performance indicators.
[0080] The performance volatility index is used to measure the performance fluctuations of the blockchain system before and after configuration alignment. The performance volatility index is determined based on the ratio of the number of transactions per second after configuration alignment to the number of transactions per second before configuration alignment, and the ratio of the latency after configuration alignment to the latency before configuration alignment.
[0081] Exemplarily, the performance volatility index can be expressed as:
[0082] where represents the number of transactions per second (TPS) of the blockchain system before configuration alignment (default configuration) under workload i, and the range of workload i is from 1 to n; represents the number of transactions per second of the blockchain system after configuration under workload i; represents the latency of the blockchain system before configuration alignment under workload i; represents the latency of the blockchain system after configuration alignment under workload i.
[0083] By adopting the technical solution of the embodiment of the present application and calculating the performance volatility index of the blockchain system, testers can understand the performance fluctuations of the blockchain system during the configuration alignment process, so as to evaluate the impact of configuration alignment on the performance of the blockchain system.
[0084] As Figure 3 shown, Figure 3 is the overall flowchart of a blockchain performance testing method based on rule tree configuration alignment provided by the embodiment of the present application. Specifically, the blockchain performance testing process can be divided into three parts, namely preprocessing, configuration alignment, and performance evaluation.
[0085] The first part, preprocessing: collect multiple configuration files of each blockchain system. The configuration files can be in different formats (for example, TOML, XML, and YAML), parse the multiple configuration files to obtain initial configuration items in different formats, and process the initial configuration items in different formats into the same format to obtain the configuration items.
[0086] The second part, configuration alignment, includes configuration filtering, semantic alignment, and data alignment. Among them, the process of configuration alignment is: determine the configuration item text rules according to the text branches of the rule tree, and filter the configuration items irrelevant to performance in the configuration items according to the configuration item text rules to obtain the performance configuration items of each blockchain system.
[0087] The process of semantic alignment is as follows: Based on the semantic branches of the rule tree, determine the baseline configuration items to serve as the reference benchmark for configuration alignment; then flatten the names of each performance configuration item and each baseline configuration item, map the names of the performance configuration items and the baseline configuration items to the word vector space, and obtain a list of word embeddings, which includes: the first word embedding vector corresponding to the name of the performance configuration item and the second word embedding vector corresponding to the name of the baseline configuration item; further calculate the semantic similarity between the first word embedding vector and each second word embedding vector, and determine the first word embedding vector and the second word embedding vector corresponding to the maximum semantic similarity as the embedding vectors that are semantically matched; finally, establish a mapping relationship between the performance configuration items and the baseline configuration items corresponding to the semantically matched embedding vectors to obtain an alignment list, where multiple performance configuration items from different blockchain systems that have a mapping relationship with the same baseline configuration item represent the same configuration content.
[0088] The process of data alignment is as follows: Determine the priority order of multiple blockchain systems, and set configuration values for each performance configuration item in the alignment list according to the priority order to obtain the aligned configuration. Specifically, for each target performance configuration item, when the blockchain system with the highest priority in the priority order has the target performance configuration item, use the configuration value of the blockchain system with the highest priority as the configuration value of multiple performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item; when the blockchain system with the highest priority in the priority order does not have the target performance configuration item, use the configuration value of the blockchain system with the second highest priority in the priority order as the configuration value of multiple performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item.
[0089] The third part, performance evaluation, includes three parts: load design, controlled environment setting, and test monitoring. First, conduct load design to create a transaction workload to reproduce the requests of the actual application; then, conduct controlled environment setting to establish a controlled test environment, that is, control the aligned configuration items and the number of nodes to maintain the consistency of test conditions. Finally, test multiple blockchain systems based on the transaction workload and the controlled environment, and conduct test monitoring during the test phase to collect key performance indicators, such as TPS (transactions per second) and latency, and calculate the performance volatility index based on the transaction volume per second and latency time before configuration alignment, as well as the transaction volume per second and latency after configuration alignment. Determine the performance fluctuation of the blockchain system before and after configuration alignment based on the performance volatility index.
[0090] Thus, the blockchain performance testing method based on rule tree configuration alignment in the embodiments of the present application solves the problem of unfair performance evaluation caused by configuration differences in existing testing solutions through an innovative configuration alignment mechanism, significantly improving the accuracy and reliability of blockchain performance testing and providing important technical support for the further development of blockchain technology.
[0091] The embodiments of the present application also provide a blockchain performance testing device based on rule tree configuration alignment. Referring to Figure 4 as shown in Figure 4 FIG. is a schematic structural diagram of a blockchain performance testing device based on rule tree configuration alignment provided by the embodiments of the present application. The device includes: A construction module 410, configured to construct a rule tree according to the architecture of the blockchain system. The rule tree includes: a text branch representing the text rules of configuration items and a semantic branch representing the reference configuration items. An acquisition module 420, configured to acquire the configuration items of multiple blockchain systems, where the configuration items represent the configuration content of the blockchain systems. A filtering module 430, configured to filter out the configuration items irrelevant to performance in the configuration items according to the configuration item text rules corresponding to the text branch, to obtain the performance configuration items of each blockchain system. The configuration item text rules represent the descriptions of the configuration items irrelevant to performance. An alignment module 440, configured to establish a mapping relationship between each performance configuration item and the reference configuration item according to the semantic matching result between the performance configuration item and the reference configuration item corresponding to the semantic branch, to obtain an alignment list. The reference configuration item represents the reference benchmark for configuration alignment. Multiple performance configuration items from different blockchain systems that have a mapping relationship with the same reference configuration item in the alignment list represent the same configuration content. A setting module 450, configured to set configuration values for each performance configuration item in the alignment list, to obtain the aligned configuration. Among them, the configuration values of multiple performance configuration items from different blockchain systems that represent the same configuration content are the same. A testing module 460, configured to test the multiple blockchain systems according to the aligned configuration, to obtain the performance test results.
[0092] In an alternative embodiment, the configuration item text rules include a port filter, a type validator, and an ID filter; the filtering module is specifically configured to: filter out the port configuration items of terms unrelated to performance in the configuration item according to the port filter; filter out the Boolean type configuration items and string type configuration items unrelated to performance in the configuration item according to the type validator; filter out the ID configuration items of terms unrelated to performance in the configuration item according to the ID filter; and use the remaining configuration items after filtering out the term port configuration items, the Boolean type configuration items, the string type configuration items, and the unrelated term ID configuration items as the performance configuration items of the blockchain system.
[0093] In an alternative embodiment, the alignment module includes: A flattening module, configured to flatten the names of each performance configuration item and each benchmark configuration item. The names of the flattened performance configuration items and benchmark configuration items include: the name of the configuration item itself and the name of the superior configuration item; A mapping module, configured to map the names of the performance configuration items and the names of the benchmark configuration items into a word vector space to obtain a word embedding list, where the word embedding list includes: a first word embedding vector corresponding to the name of the performance configuration item and a second word embedding vector corresponding to the name of the benchmark configuration item; A calculation module, configured to calculate the semantic similarity between the first word embedding vector and each of the second word embedding vectors, and determine the first word embedding vector and the second word embedding vector corresponding to the maximum semantic similarity as the embedding vectors with semantic matching; A mapping establishment module, configured to establish a mapping relationship between the performance configuration item and the benchmark configuration item corresponding to the embedding vectors with semantic matching to obtain an alignment list.
[0094] In an alternative embodiment, the apparatus further includes: A retention module, configured to determine whether to retain the embedding vectors with semantic matching according to the magnitude relationship between the semantic similarity of the embedding vectors with semantic matching and a semantic similarity threshold; The mapping establishment module is further configured to establish a mapping relationship between the performance configuration item and the benchmark configuration item corresponding to the retained embedding vectors with semantic matching to obtain an alignment list.
[0095] In an alternative embodiment, the reference configuration items include: storage configuration items, consensus configuration items, network configuration items, and contract configuration items; wherein, the storage configuration items include cache size, transaction pool size, and transaction retention time of transactions in the transaction pool; the consensus configuration items include block size, block generation time, confirmation time, and consensus mechanism; the network configuration items include the maximum number of connected nodes in P2P, request limit for batch requests and maximum response size, request time and request interval of the heartbeat mechanism; the contract configuration items include execution time, installation time, and startup time.
[0096] In an alternative embodiment, the setting module includes: A priority determination module, configured to determine the priority order of the multiple blockchain systems; A first setting sub-module, configured to, for each target performance configuration item, when the blockchain system with the highest priority in the priority order has the target performance configuration item, use the configuration value of the blockchain system with the highest priority as the configuration values of multiple performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item, where the target performance configuration item is any one of the performance configuration items in the alignment list; A second setting sub-module, configured to, when the blockchain system with the highest priority in the priority order does not have the target performance configuration item, use the configuration value of the blockchain system with the second highest priority in the priority order as the configuration values of multiple performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item.
[0097] In an alternative embodiment, the performance test results include the transaction volume per second and latency after configuration alignment; the apparatus further includes: A performance evaluation module, configured to obtain the transaction volume per second and latency time of the blockchain system before configuration alignment; calculate a performance volatility index based on the transaction volume per second and latency time before configuration alignment, and the transaction volume per second and latency after configuration alignment; and determine the performance fluctuation of the blockchain system before and after configuration alignment according to the performance volatility index.
[0098] In an alternative embodiment, the obtaining module includes: A collection module, configured to collect multiple configuration files of each blockchain system; An analysis module, configured to analyze the multiple configuration files to obtain initial configuration items in different formats; A processing module, configured to process the initial configuration items in different formats into the same format to obtain the configuration items.
[0099] The embodiment of the present application further provides an electronic device. Refer toFigure 5 , Figure 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 5 shown, the electronic device 500 includes: a memory 510 and a processor 520. The memory 510 and the processor 520 are communicatively connected via a bus. A computer program is stored in the memory 510, and the computer program can run on the processor 520, thereby implementing the steps of the blockchain performance testing method based on rule tree configuration alignment described in the embodiments of the present application.
[0100] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the blockchain performance testing method based on rule tree configuration alignment described in the embodiments of the present application are implemented.
[0101] The embodiment of the present application also provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the blockchain performance testing method based on rule tree configuration alignment described in the embodiments of the present application are implemented.
[0102] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other.
[0103] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods and devices according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing terminal devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0104] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0105] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one process or multiple processes and / or blocks. Figure 1 one process or multiple processes and / or blocks Figure 1 steps for implementing the functions specified in one block or multiple blocks.
[0106] Although the preferred embodiments of the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0107] Finally, it should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or terminal device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or terminal device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising the element.
[0108] The above has introduced in detail a blockchain performance testing method, device and equipment based on rule tree configuration alignment provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A blockchain performance testing method based on rule tree configuration alignment, characterized in that: The method comprises: According to the architecture of the blockchain system, a rule tree is constructed, wherein the rule tree includes: a text branch representing the text rules of the configuration item and a semantic branch representing the benchmark configuration item; Obtain configuration items of multiple blockchain systems, where the configuration items represent configuration content of the blockchain systems; According to the configuration item text rule corresponding to the text branch, the configuration items that are not related to performance are filtered out to obtain the performance configuration items of each blockchain system, wherein the configuration item text rule represents the description of the configuration items that are not related to performance; According to the semantic matching result between the performance configuration item and the benchmark configuration item corresponding to the semantic branch, a mapping relationship between each performance configuration item and the benchmark configuration item is established to obtain an alignment list, wherein the benchmark configuration item represents a reference benchmark for configuration alignment, and multiple performance configuration items from different blockchain systems in the alignment list that have a mapping relationship with the same benchmark configuration item represent the same configuration content; Setting a configuration value for each performance configuration item in the alignment list to obtain an aligned configuration, wherein the configuration values of multiple performance configuration items from different blockchain systems representing the same configuration content are the same; The multiple blockchain systems are tested according to the aligned configurations to obtain performance test results.
2. The method according to claim 1, characterized in that The configuration item text rules include a port filter, a type validator, and an ID filter; according to the configuration item text rules corresponding to the text branches, the configuration items that are not related to performance in the configuration items are filtered to obtain the performance configuration items of each blockchain system, including: According to the port filter, filtering out term port configuration items that are not related to performance in the configuration items; According to the type validator, filtering out Boolean type configuration items and string type configuration items that are not related to performance from the configuration items; According to the ID filter, filtering out term ID configuration items irrelevant to performance in the configuration items; The remaining configuration items after filtering out the term port configuration item, the Boolean type configuration item, the string type configuration item, and the irrelevant term ID configuration item are used as performance configuration items of the blockchain system.
3. The method according to claim 1, characterized in that According to the semantic matching result between the performance configuration item and the benchmark configuration item corresponding to the semantic branch, a mapping relationship between each performance configuration item and the benchmark configuration item is established to obtain an alignment list, including: Flatten the name of each performance configuration item and each baseline configuration item. The flattened names of the performance configuration items and the baseline configuration items include: the name of the configuration item itself and the name of the parent configuration item; Mapping the name of the performance configuration item and the name of the benchmark configuration item to a word vector space to obtain a word embedding list, wherein the word embedding list includes: a first word embedding vector corresponding to the name of the performance configuration item and a second word embedding vector corresponding to the name of the benchmark configuration item; Calculate the semantic similarity between the first word embedding vector and each of the second word embedding vectors, and determine the first word embedding vector and the second word embedding vector corresponding to the maximum semantic similarity as semantically matched embedding vectors; A mapping relationship is established between the performance configuration items and the benchmark configuration items corresponding to the semantically matched embedding vectors to obtain an alignment list.
4. The method according to claim 3, characterized in that The method further comprises: Determining whether to retain the semantically matched embedding vector according to the relationship between the semantic similarity of the semantically matched embedding vector and the semantic similarity threshold; A mapping relationship is established between the performance configuration items and the benchmark configuration items corresponding to the embedding vector of the semantic match, and an alignment list is obtained, including: A mapping relationship is established between the performance configuration items and the benchmark configuration items corresponding to the retained embedding vectors of the semantic match to obtain an alignment list.
5. The method according to claim 3, characterized in that: The benchmark configuration items include: storage configuration items, consensus configuration items, network configuration items and contract configuration items; Wherein, the storage configuration items include cache size, transaction pool size, and transaction retention time of transactions in the transaction pool; The consensus configuration items include block size, block time, confirmation time and consensus mechanism; The network configuration items include the maximum number of P2P connection nodes, the request limit and maximum response size of batch requests, the request time and request interval of the heartbeat mechanism; The contract configuration items include execution time, installation time, and startup time.
6. The method according to claim 1, characterized in that Setting a configuration value for each performance configuration item in the alignment list to obtain an aligned configuration includes: Determining a priority order of the multiple blockchain systems; For each target performance configuration item, if the blockchain system with the highest priority in the priority order has the target performance configuration item, the configuration value of the blockchain system with the highest priority is used as the configuration value of multiple performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item, and the target performance configuration item is any performance configuration item in the alignment list; In the case that the blockchain system with the highest priority in the priority order does not have the target performance configuration item, the configuration value of the blockchain system with the second highest priority in the priority order is used as the configuration value of multiple performance configuration items from different blockchain systems that represent the same configuration content as the target performance configuration item.
7. The method according to any one of claims 1 to 6, characterized in that: The performance test results include the transaction volume per second and latency after configuration alignment; the method further includes: Get the transactions per second and latency of the blockchain system before configuration alignment; Calculating a performance volatility index based on the transactions per second and latency before the configuration alignment and the transactions per second and latency after the configuration alignment; According to the performance volatility index, the performance fluctuation of the blockchain system before and after the configuration alignment is determined.
8. The method according to any one of claims 1 to 6, characterized in that: Get configuration items of multiple blockchain systems, including: Collect multiple configuration files for each blockchain system; Parsing the multiple configuration files to obtain initial configuration items in different formats; The initial configuration items in different formats are processed into the same format to obtain the configuration items.
9. A blockchain performance testing device based on rule tree configuration alignment, characterized in that: The device comprises: A construction module, used to construct a rule tree according to the architecture of the blockchain system, wherein the rule tree includes: a text branch representing a configuration item text rule and a semantic branch representing a benchmark configuration item; An acquisition module, used to acquire configuration items of multiple blockchain systems, wherein the configuration items represent configuration contents of the blockchain systems; A filtering module, configured to filter the configuration items that are not related to performance among the configuration items according to the configuration item text rules corresponding to the text branches, to obtain performance configuration items of each blockchain system, wherein the configuration item text rules represent descriptions of configuration items that are not related to performance; An alignment module, configured to establish a mapping relationship between each performance configuration item and the benchmark configuration item according to a semantic matching result between the performance configuration item and the benchmark configuration item corresponding to the semantic branch, and obtain an alignment list, wherein the benchmark configuration item represents a reference benchmark for configuration alignment, and multiple performance configuration items from different blockchain systems in the alignment list that have a mapping relationship with the same benchmark configuration item represent the same configuration content; A setting module, configured to set a configuration value for each performance configuration item in the alignment list to obtain an aligned configuration, wherein the configuration values of multiple performance configuration items from different blockchain systems representing the same configuration content are the same; A testing module is used to test the multiple blockchain systems according to the aligned configuration to obtain performance test results.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the blockchain performance testing method based on rule tree configuration alignment according to any one of claims 1 to 8 are implemented.