Self-adaptive block chain network configuration and intelligent verification test method and system

Through adaptive blockchain network configuration and intelligent verification testing methods and systems, the problems of inefficient testing and error prone in the existing technology are solved, and efficient and accurate blockchain network performance testing is achieved.

CN119652786APending Publication Date: 2025-03-18HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411804138.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing blockchain network performance testing system relies on manual configuration, resulting in inefficient testing and error-proneness, and lack of effective solutions.

Method used

Provides adaptive blockchain network configuration and intelligent verification testing methods and systems. By configuring the configuration information required for blockchain performance testing, specifying the network model configuration information of the blockchain to be tested, automatically starting the node, performing intelligent verification and stress testing, and generating a test report.

Benefits of technology

It improves the testing efficiency and ensures the accuracy of the test. Through automatic configuration and intelligent verification, human errors are reduced, and the accuracy of the test is ensured while improving the testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119652786A_ABST
    Figure CN119652786A_ABST
Patent Text Reader

Abstract

The invention relates to a self-adaptive block chain network configuration and intelligent verification test method and system, and the method comprises the steps: configuring configuration information needed by a block chain performance test; specifying network model configuration information of the to-be-tested block chain in the configuration information to determine a corresponding first network model; starting a node of the to-be-tested block chain based on specified network model configuration information to obtain a second network model; verifying the second network model based on the first network model; and performing a pressure test on the successfully verified second network model to obtain a test report. Through the method and the device, the problems of low test efficiency and easy test error in related technologies are solved, the second network model is automatically configured, and the first network model is utilized to verify the second network model to ensure the accuracy of configuration of the second network model, so that the test accuracy is ensured while the test efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain technology, and in particular to an adaptive blockchain network configuration and intelligent verification test method and system. Background Art

[0002] With the widespread application of blockchain technology, different network models have been designed to adapt to different application scenarios and performance requirements. The network model of blockchain is a distributed database system composed of multiple nodes, which realizes data synchronization and verification through a consensus mechanism. These network models make the connection between nodes in the network model different according to factors such as the degree of decentralization, the identity and authority of the participants. Common network models can be divided into star network models, linear network models, ring network models, tree network models, etc. Different network models are designed according to different application scenarios and requirements. Traditional network model performance testing systems often rely on manual configuration of network models, resulting in low test efficiency and easy testing errors.

[0003] There is currently no effective solution to the problems of low testing efficiency and easy testing errors in related technologies. Summary of the invention

[0004] In this embodiment, an adaptive blockchain network configuration and intelligent verification test method and system are provided to solve the problems of low testing efficiency and easy testing errors in related technologies.

[0005] In the first aspect, a method for adapting blockchain network configuration and intelligent verification testing is provided in this embodiment, and the method includes:

[0006] Configure the configuration information required for blockchain performance testing;

[0007] Specify the network model configuration information of the blockchain to be tested in the configuration information to determine the corresponding first network model;

[0008] Based on the specified network model configuration information, the node of the blockchain to be tested is started to obtain a second network model; the second network model is verified based on the first network model; a stress test is performed on the second network model that succeeds in verification to obtain a test report.

[0009] In some embodiments, the method further comprises:

[0010] When verification fails, verification information and failure times are obtained;

[0011] When the number of failures is less than or equal to a preset number threshold, adjusting the second network model according to a preset adjustment strategy and the verification information, and re-verifying the adjusted second network model;

[0012] When the number of failures is greater than a preset threshold, the blockchain to be tested is terminated and the nodes of the blockchain to be tested that have been started are destroyed.

[0013] In some embodiments, adjusting the second network model according to a preset adjustment strategy and the verification information includes:

[0014] According to the third connection type information and the third network information in the verification information, select the corresponding adjustment strategy to adjust the second network model; the third connection type information is the node connection type that is inconsistent between the first network model and the second network model; the third network information is the network status that is inconsistent between the first network model and the second network model; the adjustment strategy includes adding a node strategy, adding a connection strategy, modifying a node attribute strategy, and resetting a network strategy.

[0015] In some embodiments, verifying the second network model based on the first network model includes:

[0016] Constructing a query interface for the second network model, and acquiring second connection type information and second network information of the second network model based on the query interface;

[0017] Acquire the first connection type information and the first network information of the first network model from the specified network model configuration information;

[0018] The first connection type information and the first network information of the first network model are verified with the second connection type information and the second network information of the second network model to obtain verification information.

[0019] In some embodiments, a stress test is performed on the second network model that has been successfully verified to obtain a test report, including:

[0020] Deploy a corresponding press based on the press configuration information of the configuration information;

[0021] Under the pressure machine, the second network model that has been successfully verified is subjected to pressure testing to obtain a test report.

[0022] In some embodiments, the method further comprises:

[0023] Analyze the test report and generate a visual test report;

[0024] The performance results are presented according to the visual test report.

[0025] In the second aspect, a system for adapting blockchain network configuration and intelligent verification testing is provided in this embodiment, including: a configuration management module, a network model management module, and an execution module;

[0026] The configuration management module is connected to the network model management module and is used to configure the configuration information required for the blockchain performance test;

[0027] The network model management module is connected to the execution module and is used to obtain the configuration information, specify the network model configuration information of the blockchain to be tested in the configuration information, and determine the corresponding first network model; transmit the configuration information and the first network model to the execution module;

[0028] The execution module is used to start the node of the blockchain to be tested based on the specified network model configuration information to obtain a second network model; verify the second network model based on the first network model; perform stress testing on the second network model that has successfully been verified to obtain a test report.

[0029] In a second aspect, in this embodiment, there is provided a system further comprising: a test report management module;

[0030] The test report management module is connected to the execution module and is used to analyze the test report and generate a visual test report;

[0031] The performance results are presented according to the visual test report.

[0032] In the third aspect, a computer device is provided in this embodiment, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the adaptive blockchain network configuration and intelligent verification test method described in the first aspect is implemented.

[0033] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the adaptive blockchain network configuration and intelligent verification test method described in the first aspect is implemented.

[0034] Compared with the related art, the adaptive blockchain network configuration and intelligent verification test method and system provided in this embodiment configure the configuration information required for the blockchain performance test; specify the network model configuration information of the blockchain to be tested in the configuration information to determine the corresponding first network model; based on the specified network model configuration information, start the node of the blockchain to be tested to obtain the second network model; verify the second network model based on the first network model; perform stress testing on the second network model that has been successfully verified to obtain a test report, which solves the problems of low testing efficiency and easy testing errors in the related art. The present application automatically configures the second network model, and uses the first network model to verify the second network model to ensure the accuracy of the second network model configuration, thereby achieving the goal of improving the test efficiency while ensuring the accuracy of the test.

[0035] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0037] Figure 1 It is a hardware structure block diagram of a terminal device of an adaptive blockchain network configuration and intelligent verification test method provided in an embodiment of the present application;

[0038] Figure 2 This is a flow chart of an adaptive blockchain network configuration and intelligent verification test method provided by an embodiment of the present application;

[0039] Figure 3 is a flow chart of verification provided by an embodiment of the present application;

[0040] Figure 4 is a flow chart of a stress test provided by an embodiment of the present application;

[0041] Figure 5 It is a structural block diagram of an adaptive blockchain network configuration and intelligent verification test device provided by an embodiment of the present application;

[0042] Figure 6 It is a structural block diagram of an adaptive blockchain network configuration and intelligent verification test device provided in another embodiment of the present application.

[0043] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 210, configuration management module; 220, network model management module; 230, execution module; 240, test report management module. DETAILED DESCRIPTION

[0044] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the", "these" and the like in this application do not represent quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. Usually, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0046] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 : is a hardware structure diagram of the terminal of the adaptive blockchain network configuration and intelligent verification test method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 and memory 104 for storing data, wherein processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0047] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the adaptive blockchain network configuration and intelligent verification test method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0048] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by the communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0049] In this embodiment, a method for adapting to blockchain network configuration and intelligent verification testing is provided. Figure 2 is a flowchart of the blockchain network configuration and intelligent verification test method of this embodiment. Figure 2 As shown, the process includes the following steps:

[0050] Step S210, configuring the configuration information required for blockchain performance testing;

[0051] Step S220, specifying the network model configuration information of the blockchain to be tested in the configuration information to determine the corresponding first network model;

[0052] Step S230: based on the specified network model configuration information, start the node of the blockchain to be tested to obtain a second network model; verify the second network model based on the first network model; perform stress testing on the successfully verified second network model to obtain a test report.

[0053] Specifically, configuration information refers to various types of information required for the performance test of the configured blockchain, including but not limited to node configuration information, network model configuration information, etc. Among them, the node configuration information is mainly the specific settings of each node in the blockchain network and is the basis for the startup and operation of the blockchain. The node configuration information includes the IP / port of the started node, the number of nodes, the node type, and the public and private keys of the node. Among them, the network model configuration information defines the topological structure of the blockchain network, affecting the connection mode and communication path between nodes. The network model configuration information includes the network model type, connection rules, and routing strategies. The network model types are star, ring, mesh, tree, and other network types. The connection rules are whether the nodes are directly connected or indirectly connected, the priority of the connection, etc. The routing strategy is the priority and optimization strategy of the path selection for data transmission between nodes; the priority can be set according to the conditions of the shortest path, the least number of jumps, and the fastest transmission speed, and there is no restriction on this. The optimization strategy sets different priorities according to different scenarios. For example: Node 1 is directly connected to Node 3; Node 1 and Node 3 are forwarded through Node 1 or Node 4. If the priority of Node 2 is high, the connection mode is Node 1 to Node 2 to Node 3.

[0054] Among them, each blockchain to be tested has a corresponding network model configuration information, which can be specified in the configuration information to determine the corresponding first network model based on the specified network model configuration information, so as to realize the deployment of a highly personalized blockchain network. For example: the network model configuration information of the blockchain to be tested is a star network of 4 nodes, including nodes a1 to a4, where node a1 is the center; the connection mode is direct connection; then the first network model is node a1 to node a2; node a1 to node a3; node a1 to node a4. Among them, the first network model can be considered as the test blockchain required in theory. The second network model can be considered as the test blockchain that is actually automatically configured and generated. It starts the nodes of the blockchain to be tested according to the specified network model configuration information to establish connections between the nodes and obtain the corresponding second network model.

[0055] Affected by various factors (such as network stability), the second network model generated by automatic configuration is prone to errors. Therefore, the second network model is verified based on the first network model to verify the inconsistencies. For example, node a1 in the second network model is connected to node a4 through node a5, which is inconsistent with the direct connection from node a1 to node a4 in the first network model. Corresponding verification information will be generated; if they are consistent, it means that the second network model is accurate, and the verification is successful, ensuring the accuracy of the second network model configuration; perform stress testing on the successfully verified second network model to obtain a test report, complete the verification of the second network model before testing, reduce repeated stress testing, and improve test efficiency.

[0056] In the related art, the network model performance testing system often relies on manually configuring the network model, resulting in low test efficiency and easy test errors. However, this application configures the configuration information required for blockchain performance testing through the above steps; specifies the network model configuration information of the blockchain to be tested in the configuration information to determine the corresponding first network model; based on the specified network model configuration information, starts the node of the blockchain to be tested to obtain the second network model; verifies the second network model based on the first network model; performs stress testing on the second network model that has been successfully verified to obtain a test report, which solves the problem of low test efficiency and easy test errors in the related art. This application automatically configures the second network model, and uses the first network model to verify the second network model to ensure the accuracy of the second network model configuration, thereby achieving the goal of improving test efficiency while ensuring test accuracy.

[0057] In some of the embodiments, the blockchain network configuration and intelligent verification test method also includes the following steps:

[0058] Step S240, when the verification fails, obtaining verification information and the number of failures;

[0059] Step S250, when the number of failures is less than or equal to a preset number threshold, adjusting the second network model according to a preset adjustment strategy and verification information, and re-verifying the adjusted second network model;

[0060] Step S260: When the number of failures is greater than a preset number threshold, the blockchain to be tested is terminated and the nodes of the started blockchain to be tested are destroyed.

[0061] Specifically, there are multiple ways to determine verification failure. For example, if at least one of the following is true: inconsistent node connection and inconsistent node network status, verification is considered to have failed. At this time, verification information and the number of failures are obtained. The verification information is information indicating the reason for the verification failure, which may be specific information about inconsistent node connection and inconsistent node network status. The number of failures is the number of verification failures.

[0062] Then, when the number of failures is less than or equal to the preset number threshold, the second network model is adjusted according to the preset adjustment strategy and verification information to solve the error of the current automatic configuration of the second network model; after the adjustment is completed, the adjusted second network model is re-verified based on the first network model; when the number of failures is greater than the preset number threshold, it is considered that the maximum number of retries has been reached, and the startup of the blockchain to be tested is terminated, and the nodes of the started blockchain to be tested are destroyed. Among them, the number threshold is the maximum number of retries, which can be 3 times, which can be set according to the usage scenario, and the specific value of the number threshold is not limited.

[0063] Through this embodiment, the verification information and the number of failures obtained from the verification failure are used in combination with the number threshold to control the number of re-verifications to balance the impact of repeated verifications on test efficiency; and the problem of inaccurate configuration caused by node network fluctuations and other reasons can be automatically repaired; and the correctness and integrity of the deployment of the second network model are guaranteed.

[0064] In some embodiments, the step S250 of adjusting the second network model according to the preset adjustment strategy and verification information includes the following steps:

[0065] According to the third connection type information and the third network information in the verification information, select a corresponding adjustment strategy to adjust the second network model; the third connection type information is a node connection type that is inconsistent between the first network model and the second network model; the third network information is a network status that is inconsistent between the first network model and the second network model; the adjustment strategy includes adding a node strategy, adding a connection strategy, modifying a node attribute strategy, and resetting a network strategy.

[0066] Specifically, the third connection type information is the node connection type that is inconsistent between the first network model and the second network model. The third network information is the network state that is inconsistent between the first network model and the second network model, including but not limited to inconsistencies in IP addresses, port numbers, etc. In this embodiment, a corresponding adjustment strategy is selected based on the third connection type information and the third network information in the verification information to adjust the second network model.

[0067] Among them, the adjustment strategy includes adding node strategy, adding connection strategy, modifying node attribute strategy and resetting network strategy. The adding node strategy is: triggered when it is found that the node defined in the configuration information is missing in the network. Mobilize the node management service to create and start a new node. The adding connection strategy is triggered when the connection defined in the configuration information is missing in the network. Mobilize the node management service to establish a node connection. The modifying node attribute strategy is to automatically modify the node attributes when it is found that the attributes of the node (such as IP address, port number, etc.) do not match the configuration information. The resetting network strategy is to automatically reset the entire network to make it consistent with the configuration information when the configuration information in the second network model is significantly different from that in the first network model.

[0068] It should be noted that one or more of the following can be selected to implement adding node strategy, adding connection strategy, and modifying node attribute strategy. For example: Node a4 of the first network model is connected to node a1, and the network status of node a4 is IP address 163xxx; point a4 of the second network model is connected to node a5, and then connected to node a1, and the network status of node a4 is IP address 132xxx. Then the third connection type information is that node a4 is connected to node a1; the network status of the third network information node a4 is enabled. At this time, you can choose to add connection strategy, modify node attribute strategy; modify the connection between a4 and a1 in the second network model, and the network status of a4.

[0069] Through this embodiment, a corresponding adjustment strategy is selected according to the third connection type information and the third network information in the verification information to quickly and accurately adjust the second network model, thereby reducing the complexity of human intervention and further improving test efficiency.

[0070] In some of the embodiments, Figure 3 As shown, the verification of the second network model based on the first network model in step S230 includes the following steps:

[0071] Step S231, constructing a query interface for the second network model, and acquiring second connection type information and second network information of the second network model based on the query interface;

[0072] Step S232, obtaining first connection type information and first network information of the first network model from the specified network model configuration information;

[0073] Step S233: Verify the first connection type information and the first network information of the first network model with the second connection type information and the second network information of the second network model to obtain verification information.

[0074] Specifically, the verification of the second network model can be considered as evaluating whether the node connection type and network information of the second network model meet expectations.

[0075] Step S231 and step S232 can be considered as the acquisition and recording of the second connection type information and the second network information. The process is: construct an API query interface for the second network model, which takes the node ID (second network information) as an input parameter to return detailed information on the physical and logical connections between the current node and other nodes. Using network crawler technology, starting from the starting node, recursively query its directly connected neighbor nodes through the API query interface, record the connection path between each node, and obtain the second connection type information. In other embodiments, the second connection type information and the second network information are stored in the form of a data structure (such as an adjacency list, an adjacency matrix) for subsequent comparison and verification.

[0076] Step S233 can be considered as the analysis and comparison of the network model. The process is: read the first network model of the blockchain to be tested defined in the configuration information, analyze the configuration information, and convert the node connection path in the first network model into the first connection type information and the first network information; the data results of the first connection type information and the first network information are the same as the second connection type information and the second network information. Use a matching algorithm (such as depth-first search, breadth-first search, etc.) to verify the first connection type information and the first network information of the first network model with the second connection type information and the second network information of the second network model to obtain verification information. The verification information includes the third connection type information and the third network information. The third connection type information can be key information such as the connection relationship between nodes, path length, and connection direction.

[0077] Through this embodiment, the second network model is verified based on the first network model, the accuracy of the verification is improved, and inconsistencies are quickly discovered to facilitate subsequent adjustments to the second network model.

[0078] In some embodiments, starting the node of the blockchain to be tested based on the specified network model configuration information in step S230 to obtain the second network model includes the following steps:

[0079] According to the network topology and connection rules in the specified network model configuration information, the nodes of the blockchain to be tested are started to obtain the second network model.

[0080] Specifically, the second network model is automatically generated after starting the node of the blockchain to be tested according to the network topology and connection rules in the specified network model configuration information. The network topology is determined by the network model type configuration information.

[0081] The file structure of the network model type configuration information includes: 1.network_model: specifies the network type, such as star, tree, ring, or linear. 2.type: In a tree network, this field is used to distinguish whether the node is a parent or a child. 3.children: a list of child nodes, used in a tree network, representing all direct child nodes under a parent node. 4.target_ips: a list of target node IPs. Depending on the network model, this list will contain the IP addresses of other nodes that the node needs to connect to. 5.node_id: a unique identifier for a node, used to distinguish different nodes in the network. 6.ip: the IP address of the node, used for network communication. 7.port: the port number used for node communication. 8.neighbors: a list of adjacent nodes, used in ring and linear networks, representing nodes directly connected to the current node.

[0082] The network model type configuration information determines the implementation of the network topology as follows: 1. Star network model: In a star network, there is a central node (such as a hub or switch), and all other non-central nodes are directly connected to the central node. The target_ips field of the non-central node should only contain the IP address of the central node, because they only communicate with the central node. The central node is responsible for listening to the specified port and managing connections from non-central nodes. 2. Tree network model: A tree network consists of parent nodes and child nodes, and each node can communicate with its parent node and child node. The parent node and child node are distinguished by the type field, and the target_ips field of the child node should contain the IP address of its parent node. The parent node is responsible for listening to connections from its child nodes and managing these connections. 3. Ring network model; In a ring network, each node is connected to its two adjacent nodes to form a closed ring. The neighbors field of a node should contain the identifiers of its left and right adjacent nodes. The target_ips field is configured as the IP address of the adjacent node according to the neighbors field. The target_ips of the last node of the ring should contain the IP addresses of the first node and the previous node to ensure the closure of the ring. 4. Linear network model: The nodes in a linear network are connected by a common bus, and each node must be connected to the bus. The neighbors field of a node contains the identifier of its next node (for the last node, there may be no next node or it may return to the first node to form a logical closed loop, but it is still linear physically). The target_ips field is configured to the IP address of the next node according to the neighbors field. The target_ips of the last node (no physical closed loop is formed) should only contain the IP address of its previous node.

[0083] Through this embodiment, the network topology is determined by the network model type configuration information, and then the node of the blockchain to be tested is started according to the network topology and connection rules in the specified network model configuration information. Any configuration that needs to be changed can be specified in the configuration information. Only the configuration information to be modified needs to be provided to replace the configuration without manual change, which has the effect of convenient and flexible configuration; and it can adapt to various types of network models without manual intervention.

[0084] In some of the embodiments, Figure 4 As shown, the step S230 performs a stress test on the second network model that has been successfully verified to obtain a test report, including the following steps:

[0085] Step S234, deploying a corresponding press based on the press configuration information of the configuration information;

[0086] Step S235: Perform a stress test on the successfully verified second network model under a stress machine to obtain a test report.

[0087] Specifically, the stress tester configuration information defines the stress tester's IP, account password, stress tester mode (distributed stress test, stand-alone mode) and specific stress parameters, such as the number of concurrent transactions, transaction types (transfers, contract calls, etc.), data size (the size and complexity of the test data, such as the complexity of the contract), test duration, and performance indicators (such as TPS, transaction delay, success rate, resource usage, etc.). Different blockchain products need to be adapted first.

[0088] The distributed deployment of the press machine will be carried out according to the press machine configuration information, which can avoid the situation where the performance test results are not as expected due to insufficient pressure on a single press machine. Furthermore, multiple press machines can be equipped to support distributed stress testing. Before the stress test, install the test data collection tool, such as node_exporter, which will automatically record various data during the test, including requests, responses, timestamps, etc. And monitor various indicators during the test, including TPS, latency, response time, error rate, etc. The collected data is integrated to remove invalid data and merge duplicate data, and classified according to request type and time period, and key performance indicators (KPIs) are calculated, such as query rate per second (QPS), response time (RT), throughput, etc. In the stress test, the press machine will perform initialization work such as contract compilation and deployment, and then drive all press machines to perform contract call operations under a certain pressure. After the stress test, the performance test results will be collected, including transaction throughput (Transaction PerSecond, referred to as TPS), block throughput (bps), response time, error rate and other information, and a test report will be obtained.

[0089] Among them, TPS refers to the number of system processing per second. If the TPS concurrency per second is too low, it will easily cause serious network congestion, thus affecting the performance of the blockchain.

[0090] Through this embodiment, based on the configuration information, the node to be stress tested can be set by oneself, that is, the node in the blockchain can be arbitrarily selected for stress testing as needed. By default, all blockchain nodes are stress tested, which has the effect of flexible selection of stress testing nodes.

[0091] In other embodiments, in order to test the stability of the method, the configuration information may also include chain type configuration information and version control parameter configuration information. The chain type configuration information includes parameters such as chain type and consensus mechanism. The version control parameter configuration information is used to manage the version and change history of the configuration information, including version number (unique identifier), change record, version compatibility (ensuring the adaptation of new and old versions); and to test different versions of blockchain.

[0092] In some of the embodiments, the blockchain network configuration and intelligent verification test method also includes the following steps:

[0093] Analyze the test report and generate a visual test report;

[0094] Performance results are presented based on visual test reports.

[0095] Specifically, the test results are analyzed to generate a visual test report; and the visual test report is combined with a visual test report tool to display the performance results; so that users can understand the test situation to improve the user experience.

[0096] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0097] In this embodiment, an adaptive blockchain network configuration and intelligent verification test system is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0098] Figure 5 : is a structural diagram of the adaptive blockchain network configuration and intelligent verification test system of this embodiment. Figure 5As shown, the device includes: a configuration management module 210, a network model management module 220 and an execution module 230;

[0099] The configuration management module 210 is connected to the network model management module 220 and is used to configure the configuration information required for the blockchain performance test;

[0100] The network model management module 220 is connected to the execution module 230, and is used to obtain configuration information, specify the network model configuration information of the blockchain to be tested in the configuration information, and determine the corresponding first network model; transmit the configuration information and the first network model to the execution module 230;

[0101] The execution module 230 is used to start the node of the blockchain to be tested based on the specified network model configuration information to obtain the second network model; verify the second network model based on the first network model; perform stress testing on the second network model that has been successfully verified to obtain a test report.

[0102] Among them, the network model management module 220 can select one from various predefined network models and display the basic information and possible configuration options of the network model; thereby realizing the network model configuration information of the blockchain to be tested in the specified configuration information. The network model management module is responsible for defining and managing the node connection rules under different network models; it can automatically select and apply the corresponding node configuration according to the network model configuration information specified in the configuration information.

[0103] Through the above system, the second network model is automatically configured, and the first network model is used to verify the second network model to ensure the accuracy of the second network model configuration, thereby achieving the goal of improving test efficiency while ensuring test accuracy.

[0104] In some of the embodiments, Figure 6 As shown, in Figure 5 Based on, in addition to the configuration management module 210, the network model management module 220 and the execution module 230; the blockchain network configuration and intelligent verification test system also includes a test report management module 240;

[0105] The test report management module 240 is connected to the execution module 230 and is used to analyze the test report and generate a visual test report;

[0106] Performance results are presented based on visual test reports.

[0107] Through this embodiment, the test report management module 240 enables the user to know the test situation, so as to improve the user experience.

[0108] In other embodiments, the test report management module 240 can also push the visual test report to the target user.

[0109] In some of the embodiments, the execution module 230 is further used to obtain verification information and the number of failures when the verification fails;

[0110] When the number of failures is less than or equal to a preset number threshold, adjusting the second network model according to a preset adjustment strategy and verification information, and re-verifying the adjusted second network model;

[0111] When the number of failures is greater than the preset threshold, the blockchain to be tested is terminated and the nodes of the started blockchain to be tested are destroyed.

[0112] In some of the embodiments, the execution module 230 is also used to select a corresponding adjustment strategy to adjust the second network model based on the third connection type information and the third network information in the verification information; the third connection type information is the node connection type that is inconsistent between the first network model and the second network model; the third network information is the network status that is inconsistent between the first network model and the second network model; the adjustment strategy includes adding a node strategy, adding a connection strategy, modifying a node attribute strategy, and resetting a network strategy.

[0113] In some of the embodiments, the execution module 230 is further used to construct a query interface for the second network model, and obtain the second connection type information and the second network information of the second network model based on the query interface;

[0114] Acquire first connection type information and first network information of the first network model from the specified network model configuration information;

[0115] The first connection type information and the first network information of the first network model are verified with the second connection type information and the second network information of the second network model to obtain verification information.

[0116] In some of the embodiments, the execution module 230 is further used to deploy a corresponding press based on the press configuration information of the configuration information;

[0117] Under the pressure machine, the successfully verified second network model is subjected to pressure testing to obtain a test report.

[0118] It should be noted that the execution module 230 includes a policy executor and a parameter configurator; wherein the policy executor performs specific adjustment operations according to the identified adjustment strategy. The parameter configurator uniformly manages the parameters required to execute the adjustment strategy, including reading and writing the modified configuration from the configuration information. The parameter configurator locates the second network model based on the verification information returned by the verification, and identifies and outputs the current network configuration parameters of different nodes. Compare the expected network configuration parameters of the first network model (first connection type information and first network information) and the current network configuration parameters of the second network model (second connection type information and second network information), and output the parameter content that needs to be modified (verification information).

[0119] The adjustment strategy and execution steps are as follows: 1. Based on the verification information, locate the second network model, and identify and output the current network configuration parameters of different nodes (second connection type information and second network information). 2. Compare the expected network configuration parameters of the first network model (first connection type information and first network information) and the current network configuration parameters of the second network model (second connection type information and second network information), and output the parameter content that needs to be modified (verification information). 3. The policy executor updates the node status information and reconfigures the node according to the parameter content that needs to be modified in the parameter configurator. 4. Restart the node to ensure that the new configuration takes effect. 5. After restarting the node, perform the second network model verification again to verify whether the adjustment is effective.

[0120] A counter is also provided in the execution module 230; the counter is used to record the number of times the second network model verification fails. Each time the second network model verification fails, the counter is incremented by 1. When the counter reaches a preset number threshold (such as 3 times), the chain destruction operation is triggered; that is, the startup of the blockchain to be tested is terminated, and the nodes of the started blockchain to be tested are destroyed.

[0121] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0122] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0123] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0124] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0125] S1, configure the configuration information required for blockchain performance testing;

[0126] S2, obtaining configuration information, specifying the network model configuration information of the blockchain to be tested in the configuration information, and determining the corresponding first network model;

[0127] S3, based on the specified network model configuration information, start the node of the blockchain to be tested to obtain the second network model; verify the second network model based on the first network model; perform stress testing on the second network model that has been successfully verified to obtain a test report.

[0128] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0129] In addition, in combination with the adaptive blockchain network configuration and intelligent verification test method provided in the above embodiments, a storage medium can also be provided in this embodiment to implement. The storage medium stores a computer program; when the computer program is executed by the processor, any one of the adaptive blockchain network configuration and intelligent verification test methods in the above embodiments is implemented.

[0130] It should be noted that the information and data involved in this application are all authorized by the user or fully authorized by all parties and will be used legally.

[0131] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0132] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0133] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0134] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A method for testing blockchain network configuration and intelligent verification, characterized in that: The method comprises: Configure the configuration information required for blockchain performance testing; Specify the network model configuration information of the blockchain to be tested in the configuration information to determine the corresponding first network model; Based on the specified network model configuration information, the node of the blockchain to be tested is started to obtain a second network model; the second network model is verified based on the first network model; a stress test is performed on the second network model that succeeds in verification to obtain a test report.

2. The adaptive blockchain network configuration and intelligent verification test method according to claim 1 is characterized in that: The method further comprises: When verification fails, verification information and failure times are obtained; When the number of failures is less than or equal to a preset number threshold, adjusting the second network model according to a preset adjustment strategy and the verification information, and re-verifying the adjusted second network model; When the number of failures is greater than a preset threshold, the blockchain to be tested is terminated and the nodes of the blockchain to be tested that have been started are destroyed.

3. The adaptive blockchain network configuration and intelligent verification test method according to claim 2 is characterized in that: Adjusting the second network model according to a preset adjustment strategy and the verification information includes: According to the third connection type information and the third network information in the verification information, select the corresponding adjustment strategy to adjust the second network model; the third connection type information is the node connection type that is inconsistent between the first network model and the second network model; the third network information is the network status that is inconsistent between the first network model and the second network model; the adjustment strategy includes adding a node strategy, adding a connection strategy, modifying a node attribute strategy, and resetting a network strategy.

4. The adaptive blockchain network configuration and intelligent verification test method according to claim 1 is characterized in that: Verifying the second network model based on the first network model includes: Constructing a query interface for the second network model, and acquiring second connection type information and second network information of the second network model based on the query interface; Acquire the first connection type information and the first network information of the first network model from the specified network model configuration information; The first connection type information and the first network information of the first network model are verified with the second connection type information and the second network information of the second network model to obtain verification information.

5. The adaptive blockchain network configuration and intelligent verification test method according to claim 1 is characterized in that: Perform a stress test on the second network model that has been successfully verified to obtain a test report, including: Deploy a corresponding press based on the press configuration information of the configuration information; Under the pressure machine, the second network model that has been successfully verified is subjected to pressure testing to obtain a test report.

6. The adaptive blockchain network configuration and intelligent verification test method according to claim 1 is characterized in that: The method further comprises: Analyze the test report and generate a visual test report; The performance results are presented according to the visual test report.

7. A blockchain network configuration and intelligent verification test system, characterized in that: include: Configuration management module, network model management module and execution module; The configuration management module is connected to the network model management module and is used to configure the configuration information required for the blockchain performance test; The network model management module is connected to the execution module and is used to obtain the configuration information, specify the network model configuration information of the blockchain to be tested in the configuration information, and determine the corresponding first network model; transmit the configuration information and the first network model to the execution module; The execution module is used to start the node of the blockchain to be tested based on the specified network model configuration information to obtain the second network model; and verify the second network model based on the first network model; A stress test is performed on the second network model that has been successfully verified to obtain a test report.

8. The adaptive blockchain network configuration and intelligent verification test system according to claim 7 is characterized in that: The system also includes: a test report management module; The test report management module is connected to the execution module and is used to analyze the test report and generate a visual test report; The performance results are presented according to the visual test report.

9. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the blockchain network configuration and intelligent verification test method described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the blockchain network configuration and intelligent verification test method described in any one of claims 1 to 7 are implemented.