A blockchain network stress testing method, device and equipment
By using a second blockchain network with matching configuration and transaction information, stress tests are conducted on the first network without disrupting its operations, ensuring accurate and secure stress test results.
Patent Information
- Application Number
- CN202211533702.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2042-12-01
AI Technical Summary
Existing blockchain networks face challenges in stress testing that accurately reflect their performance without interfering with normal business processing, as direct testing with stress data can disrupt operations.
A method involving a second blockchain network configured to match the configuration and transaction information of the first network, where stress test results are determined based on the second network's response to simulated transaction information, ensuring accuracy without uploading stress data to the first network.
This approach provides accurate stress test results for the first network while minimizing interference with its normal operations, maintaining data authenticity and security.
Smart Images

Figure CN116032786B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a method, device and equipment for stress testing a blockchain network. Background Art
[0002] Blockchain is a distributed shared ledger and database with the characteristics of decentralization, immutability, full traceability, traceability, collective maintenance, openness and transparency. These characteristics make blockchain technology have a wider application prospect. At present, blockchain technology has gradually been applied to data management, logistics, media and other fields. In the process of using blockchain network to handle business, people usually have the need to stress test the blockchain network to understand the precise performance status of the blockchain network during operation.
[0003] Based on this, how to determine more accurate stress test results for blockchain networks has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of this specification provide a blockchain network stress testing method, device, and equipment that can determine a relatively accurate blockchain network stress testing result.
[0005] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0006] A blockchain network stress testing method provided by an embodiment of this specification includes:
[0007] Obtaining a stress test request for a first blockchain network, wherein the stress test request carries stress test data for simulating user service data; the first blockchain network is a blockchain network for processing the user service data;
[0008] In response to the stress test request, generating first blockchain transaction information according to the stress test data;
[0009] Sending the first blockchain transaction information to a second blockchain network; the configuration information and the stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network;
[0010] Determine a stress test result for the first blockchain network based on a stress test result of the second blockchain network on the first blockchain transaction information.
[0011] A stress testing device for a blockchain network provided in an embodiment of this specification includes:
[0012] A first request acquisition module is used to obtain a stress test request for a first blockchain network, wherein the stress test request carries stress test data for simulating user service data; the first blockchain network is a blockchain network for processing the user service data;
[0013] A first blockchain transaction information generating module, configured to generate first blockchain transaction information in response to the stress test request and according to the stress test data;
[0014] A first sending module, used to send the first blockchain transaction information to a second blockchain network; the configuration information and the stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network;
[0015] A test result determination module is used to determine the stress test result for the first blockchain network based on the stress test result of the second blockchain network on the first blockchain transaction information.
[0016] A stress testing device for a blockchain network provided in an embodiment of this specification includes:
[0017] at least one processor; and,
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0020] Obtaining a stress test request for a first blockchain network, wherein the stress test request carries stress test data for simulating user service data; the first blockchain network is a blockchain network for processing the user service data;
[0021] In response to the stress test request, generating first blockchain transaction information according to the stress test data;
[0022] Sending the first blockchain transaction information to a second blockchain network; the configuration information and the stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network;
[0023] Determine a stress test result for the first blockchain network based on a stress test result of the second blockchain network on the first blockchain transaction information.
[0024] At least one embodiment provided in this specification can achieve the following beneficial effects:
[0025] By building a second blockchain network that is consistent with the configuration information and stored blockchain transaction information of the first blockchain network, the stress test results for the first blockchain network and the second blockchain network are highly consistent. Therefore, when it is necessary to perform a stress test on the first blockchain network used to process real user business data, the first blockchain transaction information generated by the stress test data used to simulate real user business data can be sent to the second blockchain network for processing, so as to generate a stress test result with good accuracy for the first blockchain network based on the stress test result of the second blockchain network for the first blockchain transaction information. At the same time, since this solution does not upload the stress test data to the first blockchain network, it is also conducive to ensuring the authenticity and accuracy of the data at the first blockchain network, so as to avoid interference with the normal business processing process of the first blockchain network. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0027] Figure 1 A schematic diagram of an application scenario of a blockchain network stress testing method provided in an embodiment of this specification;
[0028] Figure 2 A flowchart of a stress testing method for a blockchain network provided in an embodiment of this specification;
[0029] Figure 3 The embodiments of this specification provide corresponding to Figure 2 A swimlane flow diagram of the stress testing method for blockchain networks in ;
[0030] Figure 4 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a stress testing device for a blockchain network;
[0031] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a stress testing device for a blockchain network. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.
[0033] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0034] In the prior art, blockchain can be understood as a data chain consisting of multiple blocks stored sequentially. The block header of each block contains the timestamp of the current block, the hash value of the previous block information and the hash value of the current block information, thereby realizing mutual verification between blocks and blocks, forming an unalterable blockchain. Each block can be understood as a data block (a unit for storing data). As a decentralized database, blockchain is a string of data blocks generated by using cryptographic methods to correlate with each other. Each data block contains information about a network transaction, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The chain formed by connecting blocks end to end is the blockchain. If the data in the block needs to be modified, the content of all blocks after this block needs to be modified, and the data backed up by all nodes in the blockchain network needs to be modified. Therefore, blockchain has the characteristics of being difficult to tamper with and delete. After the data has been saved to the blockchain, it is reliable as a method to maintain the integrity of the content.
[0035] Since the blockchain network has the characteristic that data is difficult to tamper with, various institutions have gradually begun to use the blockchain network to process related businesses. In order to ensure the smooth and controllable operation of the business, various institutions usually need to stress test the blockchain network. However, if the test data is directly used for on-chain testing, it will often interfere with the process of the blockchain network processing real business requests. Therefore, how to stress test the blockchain network and obtain more accurate stress test results without interfering with the normal business processing process of the blockchain network has become a technical problem that needs to be solved urgently.
[0036] In order to solve the defects in the prior art, this solution provides the following embodiments:
[0037] Figure 1 A schematic diagram of an application scenario of a blockchain network stress testing method provided in an embodiment of this specification.
[0038] like Figure 1As shown, the first blockchain network 102 can be a blockchain network for processing real user business data, and is also a blockchain network that needs to be stress tested in this solution; the second blockchain network 103 can be used to simulate the first blockchain network 102. When the second blockchain network 103 is used for stress testing, its configuration information and stored blockchain transaction information should be consistent with the first blockchain network 102. The business server 101 can interact with the first blockchain network 102 to process the user's business request.
[0039] Specifically, when performing a stress test, the business system at the business server 101 can be used to receive or automatically generate a stress test request carrying stress test data for simulating user business data, and the stress test request can be transmitted to the on-chain client in the business server 101, so that the on-chain client generates first blockchain transaction information according to the stress test data, and sends the first blockchain transaction information to the second blockchain network 103 used to simulate the first blockchain network 102, so that the nodes in the second blockchain network reach a consensus on the first blockchain transaction information, thereby performing a stress test on the second blockchain network 103, and then determining the stress test result of the first blockchain network 102 according to the stress test result of the second blockchain network 103. Since there is no need to send the stress test data to the first blockchain network for storage, the interference of the stress test data used in the stress test process on the data in the first blockchain network can be avoided, so as to ensure the correct processing of the real user business request by the first blockchain network.
[0040] Next, a stress testing method for a blockchain network provided in an embodiment of the specification is specifically described with reference to the accompanying drawings:
[0041] Figure 2 A flowchart of a method for stress testing a blockchain network provided in an embodiment of this specification. From a program perspective, the execution subject of the process can be a business server, or an application installed on the business server.
[0042] like Figure 2 As shown, the process may include the following steps:
[0043] Step 202: Obtain a stress test request for a first blockchain network, wherein the stress test request carries stress test data for simulating user business data; the first blockchain network is a blockchain network for processing the user business data.
[0044] In the embodiments of this specification, the first blockchain network is the blockchain network to be stress-tested in this solution, which can be used to process user business data generated by users in the process of actually handling business. Specifically, the first blockchain network can store blockchain transaction information generated based on real user business data to store business processing process and business processing results. Alternatively, the first blockchain network can also use its smart contract to process blockchain transaction information generated based on the real user business data to generate business processing results, which is not specifically limited.
[0045] In the embodiments of this specification, the type of user business data processed by the first blockchain network depends on the type of business handled by the user, and no specific limitation is made to this. For example, when the business handled by the user is the purchase or sale of digital collections, the user business data may include the identity information of the buyer or seller, the identification information of the digital collections traded, etc. Among them, digital collections may refer to the unique digital certificates generated for specific works and artworks using blockchain technology, which can realize authentic and reliable digital issuance, purchase, collection and use on the basis of protecting their digital copyrights; digital collections are a type of non-fungible token (NFT). Alternatively, when the business handled by the user is to apply for a loan product or repay a loan product, the user business data may include the user's identity information, relevant information of the loan product, etc.
[0046] In the embodiments of this specification, the stress test may include a test on the performance indicators of the first blockchain network, and the performance indicators may include: transactions per second (TPS), and / or business processing time, etc.; the transactions per second (TPS) may be the number of blockchain transaction information that can be processed by the blockchain network per second, or the number of user business requests that can be processed by the blockchain network per second; the business processing time may include: the time it takes for the blockchain network to process a blockchain transaction information, and / or the total time it takes to process all blockchain transaction information corresponding to a user business request. Among them, a user business request may correspond to one blockchain transaction information or to multiple blockchain transaction information, which is not specifically limited.
[0047] In the embodiments of this specification, the stress test request for the first blockchain network can be manually initiated by a staff member by triggering a business system in a business server (for example, a user clicks on a stress test control in the business system), or can be automatically initiated by the business system in the business server according to pre-set stress test rules, and there is no specific limitation on this.
[0048] In the embodiment of this specification, the stress test data may be virtual user business data generated by the business system in the business server to simulate real user business data, so as to achieve stress testing of the first blockchain network at any time. The information types and information formats contained in the stress test data and the user business data should generally be consistent to ensure the accuracy of the stress test results.
[0049] Step 204: In response to the stress test request, generate first blockchain transaction information according to the stress test data.
[0050] In the embodiment of the present specification, after obtaining a stress test request for the first blockchain network, first blockchain transaction information must be generated based on the stress test data. This is because the stress test for the blockchain network is a test of the blockchain network's operational capability to process blockchain transaction information.
[0051] In actual applications, the first blockchain transaction information generated based on stress test data and the blockchain transaction information generated based on real user business data contain the same information type and format to ensure the accuracy of the stress test results.
[0052] Step 206: Send the first blockchain transaction information to the second blockchain network; the configuration information and stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network.
[0053] In the embodiments of the present specification, a second blockchain network can be deployed for the first blockchain network to be stress tested, and the second blockchain network is used to simulate the first blockchain network. Since the configuration information and transaction information of the second blockchain network are closer to the first blockchain network, the stress test results of the second blockchain network can more accurately reflect the stress test results of the first blockchain network. Therefore, this solution uses the configuration information of the first blockchain network and the stored blockchain transaction information to configure the second blockchain network, so that the configuration information and the stored blockchain transaction information of the second blockchain network are consistent with the configuration information and the stored blockchain transaction information of the first blockchain network.
[0054] In the embodiments of this specification, the configuration information consistency may include: the number of nodes in the second blockchain network is consistent with the number of nodes in the first blockchain network, the software and hardware resources of the corresponding nodes, and the blockchain configuration. For example, if the first blockchain network includes ten nodes, then the second blockchain network must be configured with ten nodes accordingly. Assuming that a node in the first blockchain network is configured with 10G of traffic and 10G of memory, the node in the second blockchain network corresponding to this node in the first blockchain network must also be configured with 10G of traffic and 10G of memory accordingly. In addition, the block size, queue length, consensus algorithm, consensus frequency, etc. of the first blockchain network and the second blockchain network must be consistent.
[0055] In actual applications, the nodes in the first blockchain network and the nodes in the second blockchain network may be prohibited from communicating with each other to ensure the isolation of data in the first blockchain network from data in the second blockchain network, which is conducive to improving the security of data in the first blockchain network.
[0056] In the embodiments of this specification, it is necessary to synchronize the data of the first blockchain network and the second blockchain network in advance so that the data in the second blockchain network is consistent with the data in the first blockchain network. Specifically, the data in the first blockchain network can be copied to the off-chain device, and then the data in the first blockchain network copied to the off-chain device is written to the second blockchain to achieve data synchronization between the first blockchain network and the second blockchain network; or, instructions can be sent to the platform for building the blockchain network to use the platform and / or the underlying blockchain capabilities to copy the data of the first blockchain network and write it to the second blockchain network to achieve data synchronization between the first blockchain network and the second blockchain network, and there is no specific limitation on this.
[0057] Step 208: Determine the stress test result for the first blockchain network based on the stress test result of the second blockchain network on the first blockchain transaction information.
[0058] In the embodiments of this specification, the stress test result of the second blockchain network can be directly used as the stress test result of the first blockchain network, or the result obtained by processing multiple stress test results of the second blockchain network (for example, calculating the average) can be used as the stress test result of the first blockchain network, without specific limitation.
[0059] Figure 2The method in the embodiment of the present invention is to build a second blockchain network that is consistent with the configuration information and stored blockchain transaction information of the first blockchain network. When it is necessary to perform stress testing on the first blockchain network used to process real user business data, the first blockchain transaction information generated by the stress test data used to simulate the real user business data can be sent to the second blockchain network for processing, so as to generate a stress test result with good accuracy for the first blockchain network based on the stress test result of the second blockchain network for the first blockchain transaction information. At the same time, since the scheme does not upload the stress test data to the first blockchain network, it is also conducive to ensuring the authenticity and accuracy of the data at the first blockchain network, so as to avoid interference with the normal business processing process of the first blockchain network.
[0060] based on Figure 2 The method in this specification also provides some specific implementation plans of the method, which are described below.
[0061] In the embodiments of the present specification, since the first blockchain network usually needs to store blockchain transaction information generated based on real user business data on the chain in real time, and the first blockchain network is only occasionally stress tested, after a period of time after a stress test on the first blockchain network, there will be certain differences between the blockchain transaction information in the first blockchain network and the blockchain transaction information in the second blockchain network.
[0062] Based on this, before sending the first blockchain transaction information to the second blockchain network, it also includes:
[0063] Determine target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network, where the target blockchain transaction information is blockchain transaction information generated based on the user business data processed by the first blockchain network.
[0064] The target blockchain transaction information is stored in the second blockchain network.
[0065] In an embodiment of the present specification, the target blockchain transaction information may include blockchain transaction information generated based on user business data processed by the first blockchain network during the last and current stress tests on the first blockchain network.
[0066] In practical applications, the data stored in the blockchain network is usually linked in order from far to near by blocks containing blockchain transaction information. In addition to blockchain transaction information, the block may also include other data, such as: block birth time, block hash value, block height (number of blocks), etc.; among them, since the hash value of each block is generated according to the hash value of its previous block, the block hash value can uniquely and clearly identify a block, and any blockchain network node can independently obtain the block hash value by simply performing a hash calculation on the block header; in addition, the block height (blockheight), that is, the position of the block in the blockchain, can also be used to identify the block.
[0067] Based on this, when it is necessary to determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network, the corresponding block can be found in the first blockchain network by identifying the hash value or block height of the last block generated in the second blockchain network, and the blockchain transaction information of all blocks after this block in the first blockchain network can be stored in the second blockchain network.
[0068] In the embodiments of the present specification, the target blockchain transaction information that is missing from the second blockchain network compared to the first blockchain network is determined, and the target blockchain transaction information is stored in the second blockchain network; only the target blockchain transaction information that is missing from the second blockchain network compared to the first blockchain network is synchronized, which effectively reduces the amount of data processing and improves the efficiency of stress testing the first blockchain network; it is worth noting that when data synchronization processing is missing between the second blockchain network and the first blockchain network, the second blockchain network can also be rebuilt and configured before stress testing the first blockchain network to ensure that the first blockchain network and the second blockchain network are completely synchronized in terms of data, and there is no specific limitation on this.
[0069] In the embodiments of this specification, there are multiple ways to keep the blockchain transaction information stored in the second blockchain network consistent with that stored in the first blockchain network.
[0070] Implementation method 1
[0071] Considering the privacy of user data stored in the first blockchain network, it may not be convenient to directly copy the blockchain transaction information in the first blockchain network to the second blockchain network. Therefore, it is necessary to convert the blockchain transaction information generated based on real user business data stored in the first blockchain network into blockchain transaction information generated based on virtual user business data (for example, data in the form of stress test data), and then write the converted blockchain transaction information into the second blockchain network.
[0072] Based on this, before step 202: obtaining a stress test request for the first blockchain network, the following may also be included:
[0073] A first user service processing request is obtained; the first user service processing request carries the user service data.
[0074] Determine virtual user unique identification information corresponding to the real user unique identification information in the user service data.
[0075] Generate second blockchain transaction information carrying the real user's unique identification information.
[0076] The second blockchain transaction information is stored in the first blockchain network.
[0077] Generate third blockchain transaction information carrying the unique identification information of the virtual user.
[0078] The third blockchain transaction information is stored in a third blockchain network; the blockchain transaction information stored in the third blockchain network is consistent with that stored in the first blockchain network.
[0079] The determining of the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network may specifically include:
[0080] According to the block information of the third blockchain network and the block information of the second blockchain network, determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network from the third blockchain transaction information at the third blockchain network.
[0081] In an embodiment of the present specification, the user business data carried in the first user business processing request is the user business data generated by the real user in the actual business processing process, and the user business data may include a unique identifier of the real user, which is usually information at the business server used to uniquely identify any real user, for example, the account information that the real user needs to use in the business processing process, or the user identity UID (User Identification) that the real user needs to use in the business processing process.
[0082] In the embodiments of this specification, the unique identification information of a virtual user can be used to uniquely identify a virtual user for stress testing. A unique identification information of a virtual user can be obtained by transforming a unique identification information of a real user according to a preset rule, that is, the unique identification information of the real user and the unique identification information of the virtual user can correspond one to one. In actual application, the user will not use the unique identification information of the virtual user in the actual business process, and the unique identification information of the virtual user is only used in the stress testing process.
[0083] In the embodiment of the present specification, in the process of processing real user business requests, the second blockchain transaction information and the third blockchain transaction information can be generated based on the real user business data. The difference is that the user unique identification information in the second blockchain transaction information is the real user unique identification, while the user unique identification information in the third blockchain transaction information is the virtual user unique identification information.
[0084] In the embodiments of this specification, the block information may include: block birth time, block hash value, block height (number of blocks), etc. Since the principle of realizing data synchronization between blockchain networks based on block information has been explained in the previous embodiments, and the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network can be determined from the third blockchain transaction information at the third blockchain network based on block information based on relevant principles, and thus it will not be described in detail.
[0085] In the embodiments of this specification, the third blockchain network can communicate directly with the nodes in the second blockchain network to achieve cross-chain transmission, so that the data of each node in the second blockchain network can be directly copied from each node in the third blockchain network, which is convenient and fast. It is worth noting that, since the blockchain transaction information stored in the second blockchain network is obtained from the third blockchain network, there is no need for the nodes in the first blockchain network and the nodes in the second blockchain network to communicate with each other to ensure that the data in the first blockchain network is isolated from the data in the second blockchain network, thereby ensuring the security of the data in the first blockchain network.
[0086] In the embodiment of this specification, the blockchain transaction information carrying the unique identification information of the virtual user corresponding to the unique identification information of the real user is stored by using the third blockchain network, and then the third blockchain network is used to synchronize data with the second blockchain network to achieve stress testing. In this embodiment, since the data at the third blockchain network and the second blockchain network are both virtual user business data, rather than real user business data, the real user business data is only stored in the first blockchain network, which is conducive to avoiding the leakage of the real user business data, so as to ensure the privacy and security of the real user business data during the stress test.
[0087] In practical applications, since blockchain transaction information usually needs to include blockchain account information to indicate the initiator and recipient of the blockchain transaction information, based on this, before generating the third blockchain transaction information carrying the unique identification information of the virtual user, it may also include:
[0088] Determine blockchain account information corresponding to the virtual user unique identification information at the second blockchain network.
[0089] The generating of the third blockchain transaction information carrying the unique identification information of the virtual user specifically includes:
[0090] Generate third blockchain transaction information that carries the unique identification information of the virtual user and the blockchain account information.
[0091] Data synchronization is performed on the third blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
[0092] In the embodiments of the present specification, corresponding blockchain account data can be generated according to the unique identification information of the virtual user, so that the generated blockchain account data can be used as the blockchain account in the second blockchain network, so that the generated blockchain account data can be added to the third blockchain transaction information carrying the unique identification information of the virtual user, so as to serve as the blockchain account information of the initiator or recipient of the third blockchain transaction information.
[0093] In practical applications, since the second blockchain network is a real blockchain network, the user public key information corresponding to the virtual user unique identification information can also be used to generate transaction information for registering a blockchain account at the second blockchain network, so as to obtain the blockchain account at the second blockchain network corresponding to the virtual user unique identification information through the real account registration process. It is worth noting that the blockchain account at the second blockchain network corresponding to the virtual user unique identification information can be the same as or different from the blockchain account at the first blockchain network corresponding to the real user unique identification information of the virtual user unique identification information, and there is no specific limitation on this.
[0094] In the embodiments of this specification, since the second blockchain network needs to synchronize data with the third blockchain network, the form of blockchain transaction information stored in the second blockchain network and the third blockchain network should be consistent. Therefore, when the second blockchain network needs to be used to process the first blockchain network information for stress testing, the form of the first blockchain network information and the third blockchain transaction information stored in the third blockchain network should also be consistent.
[0095] Based on this, generating the first blockchain transaction information according to the stress test data may specifically include:
[0096] Determine the target virtual user unique identification information in the stress test data.
[0097] Determine the target blockchain account information corresponding to the target virtual user unique identification information at the second blockchain network.
[0098] Generate first blockchain transaction information carrying the target virtual user unique identification information and the target blockchain account information.
[0099] In the embodiments of this specification, the target virtual user unique identification information can be used to uniquely identify the test user to which the stress test data belongs, and the target virtual user unique identification information can be the virtual user unique identification information mentioned in the previous embodiments. And the target blockchain account information can be used to represent the address of the blockchain account of the test user at the second blockchain network. Based on this, a first blockchain transaction information carrying the target virtual user unique identification information and the target blockchain account information can be generated to ensure that the first blockchain network information is consistent with the third blockchain transaction information stored at the third blockchain network, and then the first blockchain network information is also consistent with the blockchain transaction information stored at the second blockchain network, so as to ensure that the second blockchain network can be used to process the first blockchain network information to obtain the stress test process.
[0100] Implementation method 2
[0101] Generally speaking, the higher the degree of simulation of the second blockchain network on the first blockchain network, the more accurately the stress test results on the second blockchain network can reflect the actual operating performance of the first blockchain network. Therefore, considering the cost and accuracy of the stress test, the blockchain transaction information in the first blockchain network can also be directly copied to the second blockchain network for stress testing.
[0102] Based on this, before obtaining the stress test request for the first blockchain network, the following may also be included:
[0103] A second user service processing request is obtained; the second user service processing request carries the user service data.
[0104] Generate fourth blockchain transaction information that carries the real user unique identification information in the user business data.
[0105] The fourth blockchain transaction information is stored in the first blockchain network.
[0106] The determining of the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network may specifically include:
[0107] According to the block information of the first blockchain network and the block information of the second blockchain network, determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network from the fourth blockchain transaction information at the first blockchain network.
[0108] Data synchronization is performed on the first blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
[0109] In the embodiment of this specification, the first blockchain network may be a blockchain network for processing real user business data. The second user business request may be a user business request generated by a real user in the process of actually processing a business. The real user unique identification information may be used to represent the identity information of the real user in the business server. Thus, the fourth blockchain transaction information may be generated based on the real user business data and stored in the first blockchain network, so that the fourth blockchain transaction information may be processed using the first blockchain network, thereby realizing the processing of the real business.
[0110] In the embodiments of this specification, the blockchain transaction information stored in the first blockchain network can be directly copied to the second blockchain network to achieve data synchronization. Since there is no need to deploy a third blockchain network, it is beneficial to reduce the cost of stress testing. In addition, since the blockchain account and user unique identification information carried by the blockchain transaction information stored in the second blockchain network are the blockchain account and real user unique identification information of the real user in the first blockchain network, respectively, the blockchain transaction information of the second blockchain network is highly consistent with that of the first blockchain network, which is beneficial to ensure the accuracy of the stress test on the first blockchain network.
[0111] In the embodiments of the present specification, since the data stored in the second blockchain network is obtained by copying the data in the first blockchain network, the user unique identifier in the blockchain transaction information in the second blockchain network is the real user unique identifier. However, since the user unique identifier contained in the stress test data is the target virtual user unique identifier information, if the stress test is performed directly using the target virtual user unique identifier information, there will be no blockchain transaction information generated based on historical user business data associated with it in the second blockchain network, thereby affecting the accuracy of the stress test results.
[0112] Based on this, generating the first blockchain transaction information according to the stress test data may specifically include:
[0113] Determine the target real user unique identification information corresponding to the target virtual user unique identification information in the stress test data.
[0114] Generate first blockchain transaction information carrying the unique identification information of the target real user.
[0115] In the embodiments of the present specification, since the blockchain transaction information stored in the second blockchain network carries the unique identification information of the real user, but the stress test data carries the unique identification information of the target virtual user, it is necessary to carry the real user unique identification information corresponding to the unique identification information of the target virtual user in the first blockchain transaction information to ensure the consistency of the blockchain transaction information in the first blockchain network and the blockchain transaction information in the second blockchain network, thereby facilitating the use of the second blockchain network to perform stress testing based on the first blockchain transaction information, which is beneficial to improving the accuracy of the stress test results.
[0116] In actual applications, when the user to whom the real user unique identification information corresponding to the target virtual user unique identification information belongs has performed business before, the first blockchain network and the second blockchain network usually store the user's historical business data, so that stress testing can be performed using old users who have performed business, which is conducive to improving the accuracy of stress test results. When the user to whom the real user unique identification information corresponding to the target virtual user unique identification information belongs has not performed business, it is equivalent to performing stress testing using new users who have not performed business, which is conducive to improving the flexibility of stress testing.
[0117] In the embodiment of the present specification, since the first blockchain network is consistent with the second blockchain network, the stress test result for the first blockchain network can be determined according to the stress test result of the second blockchain network.
[0118] Specifically, step 208: determining the stress test result for the first blockchain network according to the stress test result of the second blockchain network on the first blockchain transaction information may include:
[0119] Obtain performance indicator data of the second blockchain network during the process of processing the first blockchain transaction information.
[0120] Determine a stress test result for the first blockchain network based on the performance indicator data.
[0121] In the embodiments of this specification, the performance indicators may include: transactions per second (TPS) and / or business processing time, where the transactions per second refers to the number of blockchain transaction information processed by the blockchain network per second; the business processing time may include: the time it takes for the blockchain to complete processing of one blockchain transaction information, and / or the total time it takes to complete processing of all blockchain transaction information corresponding to a business.
[0122] In actual applications, if the performance indicators of the first blockchain network and the second blockchain network are the same indicator data, the performance indicator data of the second blockchain network can be directly used as the stress test result of the first blockchain network, or the performance indicator data of the second blockchain network can be calculated (for example, the performance indicator data of multiple time periods of the second blockchain network is averaged) to obtain the data as the stress test result of the first blockchain network, without specific limitation.
[0123] If the performance indicators of the first blockchain network and the second blockchain network are different indicator data, it is necessary to perform calculations on the performance indicator data of the second blockchain network. For example, the performance indicator of the first blockchain network is the number of transactions per second (TPS), and the performance indicator data of the second blockchain network is the time it takes for the blockchain to complete a blockchain transaction information. Then the stress test result of the first blockchain network is the inverse of the time consumption.
[0124] In the embodiments of this specification, the business server can usually obtain real business processing requests and stress test requests, so it is necessary to parse the obtained user business requests to determine whether the currently obtained user business processing requests belong to stress test requests.
[0125] Based on this, obtaining a stress test request for the first blockchain network specifically includes:
[0126] Obtain a third-party user service processing request.
[0127] It is determined whether the third user service processing request carries stress test identification information, and a determination result is obtained.
[0128] If the judgment result indicates that the third user service processing request carries stress test identification information, the third user service processing request is determined to be a stress test request.
[0129] In the embodiments of this specification, the stress test identification information can be implemented by user unique identification information and / or data type identification information. The user unique identification information can be virtual user unique identification information or user unique identification information. The data type identification information can be used to identify the type of data carried by the third user service processing request as stress test data or real user service data.
[0130] Specifically, if the third user service processing request carries virtual user unique identification information, it can be indicated that it carries stress test identification information, so that the third user service processing request can be determined as a stress test request. If the third user service processing request carries real user unique identification information, it can be prohibited to determine the third user service processing request as a stress test request.
[0131] Alternatively, if the third user service processing request carries data type identification information for identifying that the data type is stress test data, it can be indicated that it carries stress test identification information, so that the third user service processing request can be determined as a stress test request. Otherwise, it should be prohibited to determine the third user service processing request as a stress test request, which is convenient and quick.
[0132] Figure 3 The embodiments of this specification provide corresponding to Figure 2 A swimlane flow diagram of the stress testing method for blockchain networks in . Figure 3 As shown, the stress testing process of the blockchain network may involve execution entities such as the business server, the first blockchain network, the second blockchain network, and the third blockchain network.
[0133] During the real user business data processing stage, the business server first obtains a user business processing request carrying real user business data, then generates a second blockchain transaction information carrying the real user unique identification information in the real user business data, and sends the second blockchain transaction information to the first blockchain network. The first blockchain network can store the obtained second blockchain transaction information.
[0134] At the same time, considering the privacy of user data stored in the first blockchain network, it may not be convenient to directly copy the blockchain transaction information in the first blockchain network to the second blockchain network. Based on this, it is also necessary to determine the virtual user unique identification information corresponding to the real user unique identification information in the real user business data after the business server obtains the user business processing request carrying the real user business data, and then generate the third blockchain transaction information carrying the virtual user unique identification information, and send the third blockchain transaction information to the third blockchain network, and the third blockchain network stores the obtained third blockchain transaction information. It can be seen that the blockchain transaction information stored in the third blockchain network is consistent with that in the first blockchain network.
[0135] During the stress test phase, the business server can obtain a stress test request carrying stress test data. Subsequently, data synchronization can be performed directly on the first blockchain network and the second blockchain network, by sending the target blockchain transaction information that the first blockchain network has more than the second blockchain network to the second blockchain network to ensure the consistency of the blockchain transaction information stored in the first blockchain network and the second blockchain network. Then, the target real user unique identification information corresponding to the target virtual user unique identification information carried in the stress test data can be determined to generate the first blockchain transaction information carrying the target real user unique identification information, and send the first blockchain transaction information to the second blockchain network. The second blockchain network can then obtain the first blockchain transaction information and process the first blockchain transaction information so that the business server can determine the stress test results for the first blockchain network based on the stress test results of the second blockchain network for the first blockchain transaction information.
[0136] During the stress test phase, when data synchronization cannot be performed directly on the first blockchain network and the second blockchain network, since the blockchain transaction information stored in the third blockchain network is consistent with that in the first blockchain network, the target blockchain transaction information that the third blockchain network has more than the second blockchain network can be sent to the second blockchain network to ensure the consistency of the blockchain transaction information stored in the first blockchain network and the second blockchain network. Then, the business server can also determine the target virtual user unique identification information carried in the stress test data to generate the first blockchain transaction information carrying the target virtual user unique identification information, and send the first blockchain transaction information to the second blockchain network. The second blockchain network obtains the first blockchain transaction information and processes the first blockchain transaction information so that the business server can determine the stress test results for the first blockchain network based on the stress test results of the second blockchain network for the first blockchain transaction information.
[0137] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 4 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a stress testing device for a blockchain network. Figure 4 As shown, the device may include:
[0138] The first request acquisition module 402 is used to obtain a stress test request for a first blockchain network, wherein the stress test request carries stress test data for simulating user business data; the first blockchain network is a blockchain network for processing the user business data.
[0139] The first blockchain transaction information generating module 404 is used to generate first blockchain transaction information in response to the stress test request and according to the stress test data.
[0140] The sending module 406 is used to send the first blockchain transaction information to the second blockchain network; the configuration information and the stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network.
[0141] The test result determination module 408 is used to determine the stress test result for the first blockchain network according to the stress test result of the second blockchain network on the first blockchain transaction information.
[0142] based on Figure 4 The present specification also provides some specific implementation schemes of the device, which are described below.
[0143] Optionally, the pressure testing device may further include:
[0144] The target blockchain transaction information determination module is used to determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network, and the target blockchain transaction information is the blockchain transaction information generated based on the user business data processed by the first blockchain network.
[0145] The first storage module is used to store the target blockchain transaction information to the second blockchain network.
[0146] Optionally, the pressure testing device may further include:
[0147] The second request acquisition module is used to acquire a first user service processing request; the first user service processing request carries the user service data.
[0148] The identification information determination module is used to determine the virtual user unique identification information corresponding to the real user unique identification information in the user service data.
[0149] The second blockchain transaction information generation module is used to generate second blockchain transaction information carrying the real user's unique identification information.
[0150] The second storage module is used to store the second blockchain transaction information to the first blockchain network.
[0151] The third blockchain transaction information generation module is used to generate the third blockchain transaction information carrying the unique identification information of the virtual user.
[0152] The third storage module is used to store the third blockchain transaction information in a third blockchain network; the blockchain transaction information stored in the third blockchain network is consistent with that stored in the first blockchain network.
[0153] The target blockchain transaction information determination module can be specifically used for:
[0154] According to the block information of the third blockchain network and the block information of the second blockchain network, determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network from the third blockchain transaction information at the third blockchain network.
[0155] Optionally, the pressure testing device may further include:
[0156] An account information determination module is used to determine the blockchain account information corresponding to the unique identification information of the virtual user at the second blockchain network.
[0157] The third blockchain transaction information generation module can be specifically used for:
[0158] Generate third blockchain transaction information that carries the unique identification information of the virtual user and the blockchain account information.
[0159] Optionally, the first storage module may be specifically used for:
[0160] Data synchronization is performed on the third blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
[0161] Optionally, the first blockchain transaction information generating module 404 may specifically include:
[0162] The first identification information determining unit is used to determine the unique identification information of the target virtual user in the stress test data.
[0163] An account information determination unit is used to determine the target blockchain account information corresponding to the target virtual user unique identification information at the second blockchain network.
[0164] The first transaction information generating unit is used to generate the first blockchain transaction information carrying the unique identification information of the target virtual user and the target blockchain account information.
[0165] Optionally, the pressure testing device may further include:
[0166] The third request acquisition module is used to acquire a second user service processing request; the second user service processing request carries the user service data.
[0167] The fourth blockchain transaction information generation module is used to generate the fourth blockchain transaction information carrying the real user unique identification information in the user business data.
[0168] The fourth storage module is used to store the fourth blockchain transaction information to the first blockchain network.
[0169] The target blockchain transaction information determination module can be specifically used for:
[0170] According to the block information of the first blockchain network and the block information of the second blockchain network, determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network from the fourth blockchain transaction information at the first blockchain network.
[0171] Optionally, the first storage module may be specifically used for:
[0172] Data synchronization is performed on the first blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
[0173] Optionally, the first blockchain transaction information generating module 404 may specifically include:
[0174] The second identification information determining unit is used to determine the target real user unique identification information corresponding to the target virtual user unique identification information in the stress test data.
[0175] The second transaction information generating unit is used to generate the first blockchain transaction information carrying the unique identification information of the target real user.
[0176] Optionally, the test result determination module 408 may specifically include:
[0177] A performance indicator data acquisition unit is used to obtain performance indicator data of the second blockchain network during the process of processing the first blockchain transaction information.
[0178] A test result determination unit is used to determine a stress test result for the first blockchain network based on the performance indicator data.
[0179] Optionally, the first request obtaining module 402 may specifically include:
[0180] The request acquisition unit is used to acquire a third user service processing request.
[0181] The judgment unit is used to judge whether the third user service processing request carries stress test identification information and obtain a judgment result.
[0182] A test request determining unit is configured to determine the third user service processing request as a stress test request if the judgment result indicates that the third user service processing request carries stress test identification information.
[0183] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0184] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a stress test device for a blockchain network. Figure 5 As shown, the device 500 may include:
[0185] at least one processor 510; and,
[0186] A memory 530 in communication with the at least one processor; wherein,
[0187] The memory 530 stores instructions 520 executable by the at least one processor 510. The instructions are executed by the at least one processor 510 to enable the at least one processor 510 to:
[0188] A stress test request for a first blockchain network is obtained, wherein the stress test request carries stress test data for simulating user business data; the first blockchain network is a blockchain network for processing the user business data.
[0189] In response to the stress test request, first blockchain transaction information is generated according to the stress test data.
[0190] The first blockchain transaction information is sent to a second blockchain network; the configuration information and stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network.
[0191] Determine a stress test result for the first blockchain network based on a stress test result of the second blockchain network on the first blockchain transaction information.
[0192] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 5 As for the device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0193] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented with "logic compiler" software, which is similar to the software compiler used when developing and writing programs. The original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one kind of HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that it is easy to obtain a hardware circuit that implements the logical method flow by simply performing some logic programming on the method flow using the above-mentioned hardware description languages and programming it into an integrated circuit.
[0194] The controller can be implemented in any appropriate manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, AtmelAT91SAM, MicrochipPIC18F26K20, and SiliconeLabsC8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules for implementing the method and structures within the hardware component.
[0195] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0196] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0197] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0198] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0199] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0201] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0202] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0203] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0204] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0205] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0206] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0207] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A stress testing method for a blockchain network, comprising: Obtaining a stress test request for the first blockchain network, wherein the stress test request carries stress test data for simulating user service data; The first blockchain network is a blockchain network used to process the user business data; In response to the stress test request, generating first blockchain transaction information according to the stress test data; The first blockchain transaction information is sent to a second blockchain network; the configuration information and the stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network; the blockchain transaction information in the second blockchain network is the blockchain transaction information generated based on the real user business data stored in the first blockchain network converted into blockchain transaction information generated based on virtual user business data, including: determining virtual user unique identification information corresponding to the real user unique identification information in the real user business data; Generate third blockchain transaction information carrying the unique identification information of the virtual user; store the third blockchain transaction information in a third blockchain network; obtain blockchain transaction information of the second blockchain network from the third blockchain network; the blockchain transaction information stored in the third blockchain network is consistent with that in the first blockchain network; Determine a stress test result for the first blockchain network based on a stress test result of the second blockchain network on the first blockchain transaction information.
2. The method according to claim 1, before sending the first blockchain transaction information to the second blockchain network, further comprising: Determine target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network, where the target blockchain transaction information is blockchain transaction information generated according to the user business data processed by the first blockchain network; The target blockchain transaction information is stored in the second blockchain network.
3. The method according to claim 2, before obtaining the stress test request for the first blockchain network, further comprising: Obtaining a first user service processing request; The first user service processing request carries the user service data; Determine virtual user unique identification information corresponding to the real user unique identification information in the user service data; Generate second blockchain transaction information carrying the real user's unique identification information; Storing the second blockchain transaction information in the first blockchain network; Generate third blockchain transaction information carrying the unique identification information of the virtual user; Storing the third blockchain transaction information in a third blockchain network; the blockchain transaction information stored in the third blockchain network is consistent with that stored in the first blockchain network; The determining the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network specifically includes: According to the block information of the third blockchain network and the block information of the second blockchain network, the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network is determined from the third blockchain transaction information at the third blockchain network.
4. The method according to claim 3, before generating the third blockchain transaction information carrying the unique identification information of the virtual user, further comprising: Determine blockchain account information corresponding to the unique identification information of the virtual user at the second blockchain network; The generating of the third blockchain transaction information carrying the unique identification information of the virtual user specifically includes: Generate third blockchain transaction information that carries the unique identification information of the virtual user and the blockchain account information.
5. The method according to claim 4, wherein storing the target blockchain transaction information to the second blockchain network specifically comprises: Data synchronization is performed on the third blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
6. The method according to any one of claims 3 to 5, wherein generating first blockchain transaction information according to the stress test data specifically comprises: Determine the unique identification information of the target virtual user in the stress test data; Determine the target blockchain account information corresponding to the target virtual user unique identification information at the second blockchain network; Generate first blockchain transaction information carrying the target virtual user unique identification information and the target blockchain account information.
7. The method according to claim 2, before obtaining the stress test request for the first blockchain network, further comprising: Obtaining a second user service processing request; The second user service processing request carries the user service data; Generate fourth blockchain transaction information carrying the real user unique identification information in the user business data; Storing the fourth blockchain transaction information to the first blockchain network; The determining the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network specifically includes: According to the block information of the first blockchain network and the block information of the second blockchain network, determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network from the fourth blockchain transaction information at the first blockchain network.
8. The method according to claim 7, wherein storing the target blockchain transaction information to the second blockchain network specifically comprises: Data synchronization is performed on the first blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
9. The method according to claim 7 or 8, wherein generating the first blockchain transaction information according to the stress test data specifically comprises: Determine the target real user unique identification information corresponding to the target virtual user unique identification information in the stress test data; Generate first blockchain transaction information carrying the unique identification information of the target real user.
10. The method according to claim 1, wherein determining the stress test result for the first blockchain network according to the stress test result of the second blockchain network on the first blockchain transaction information specifically comprises: Obtaining performance indicator data of the second blockchain network in a process of processing the first blockchain transaction information; Determine a stress test result for the first blockchain network based on the performance indicator data.
11. The method according to claim 1, wherein obtaining a stress test request for the first blockchain network specifically comprises: Obtaining a third-party user service processing request; Determine whether the third user service processing request carries stress test identification information, and obtain a determination result; If the judgment result indicates that the third user service processing request carries stress test identification information, the third user service processing request is determined to be a stress test request.
12. A stress testing device for a blockchain network, comprising: A first request acquisition module, used to obtain a stress test request for the first blockchain network, wherein the stress test request carries stress test data for simulating user service data; The first blockchain network is a blockchain network used to process the user business data; A first blockchain transaction information generating module, configured to generate first blockchain transaction information in response to the stress test request and according to the stress test data; A sending module, used for sending the first blockchain transaction information to a second blockchain network; the configuration information and stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network; the blockchain transaction information in the second blockchain network is the conversion of the blockchain transaction information generated based on the real user business data stored in the first blockchain network into blockchain transaction information generated based on virtual user business data, including: determining the virtual user unique identification information corresponding to the real user unique identification information in the real user business data; generating third blockchain transaction information carrying the virtual user unique identification information; storing the third blockchain transaction information in a third blockchain network; obtaining the blockchain transaction information of the second blockchain network from the third blockchain network; the third blockchain network is consistent with the blockchain transaction information stored in the first blockchain network; A test result determination module is used to determine the stress test result for the first blockchain network based on the stress test result of the second blockchain network on the first blockchain transaction information.
13. The apparatus of claim 12, further comprising: A target blockchain transaction information determination module, used to determine target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network, wherein the target blockchain transaction information is blockchain transaction information generated according to the user business data processed by the first blockchain network; The first storage module is used to store the target blockchain transaction information to the second blockchain network.
14. The apparatus of claim 13, further comprising: A second request acquisition module, used to acquire a first user service processing request; The first user service processing request carries the user service data; An identification information determination module, used to determine virtual user unique identification information corresponding to the real user unique identification information in the user service data; A second blockchain transaction information generation module, used to generate second blockchain transaction information carrying the real user's unique identification information; A second storage module, used to store the second blockchain transaction information to the first blockchain network; A third blockchain transaction information generation module, used to generate third blockchain transaction information carrying the unique identification information of the virtual user; A third storage module is used to store the third blockchain transaction information in a third blockchain network; the blockchain transaction information stored in the third blockchain network is consistent with that stored in the first blockchain network; The target blockchain transaction information determination module is specifically used to: According to the block information of the third blockchain network and the block information of the second blockchain network, the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network is determined from the third blockchain transaction information at the third blockchain network.
15. The apparatus of claim 14, further comprising: An account information determination module, used to determine the blockchain account information corresponding to the unique identification information of the virtual user at the second blockchain network; The third blockchain transaction information generation module is specifically used to: Generate third blockchain transaction information that carries the unique identification information of the virtual user and the blockchain account information.
16. The device according to claim 15, wherein the first storage module is specifically configured to: Data synchronization is performed on the third blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
17. The device according to any one of claims 14 to 16, wherein the first blockchain transaction information generation module specifically comprises: A first identification information determining unit, used to determine the unique identification information of the target virtual user in the stress test data; An account information determining unit, configured to determine target blockchain account information corresponding to the target virtual user unique identification information at the second blockchain network; The first transaction information generating unit is used to generate the first blockchain transaction information carrying the unique identification information of the target virtual user and the target blockchain account information.
18. The apparatus of claim 13, further comprising: A third request acquisition module, used to acquire a second user service processing request; The second user service processing request carries the user service data; A fourth blockchain transaction information generation module, used to generate fourth blockchain transaction information carrying the real user unique identification information in the user business data; A fourth storage module, used to store the fourth blockchain transaction information to the first blockchain network; The target blockchain transaction information determination module is specifically used to: According to the block information of the first blockchain network and the block information of the second blockchain network, determine the target blockchain transaction information that the second blockchain network lacks compared to the first blockchain network from the fourth blockchain transaction information at the first blockchain network.
19. The device according to claim 18, wherein the first storage module is specifically configured to: Data synchronization is performed on the first blockchain network and the second blockchain network, and the target blockchain transaction information is stored in the second blockchain network.
20. The device according to claim 18 or 19, wherein the first blockchain transaction information generation module specifically comprises: A second identification information determining unit, configured to determine target real user unique identification information corresponding to target virtual user unique identification information in the stress test data; The second transaction information generating unit is used to generate the first blockchain transaction information carrying the unique identification information of the target real user.
21. The device according to claim 12, wherein the test result determination module specifically comprises: A performance indicator data acquisition unit, used to acquire performance indicator data of the second blockchain network in a process of processing the first blockchain transaction information; A test result determination unit is used to determine a stress test result for the first blockchain network based on the performance indicator data.
22. The device according to claim 12, wherein the first request acquisition module specifically comprises: A request acquisition unit, used to acquire a service processing request from a third user; A judging unit, configured to judge whether the third user service processing request carries stress test identification information, and obtain a judging result; A test request determining unit is configured to determine the third user service processing request as a stress test request if the judgment result indicates that the third user service processing request carries stress test identification information.
23. A stress testing device for a blockchain network, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining a stress test request for a first blockchain network, wherein the stress test request carries stress test data for simulating user service data; the first blockchain network is a blockchain network for processing the user service data; In response to the stress test request, generating first blockchain transaction information according to the stress test data; The first blockchain transaction information is sent to a second blockchain network; the configuration information and the stored blockchain transaction information of the second blockchain network are consistent with those of the first blockchain network; the blockchain transaction information in the second blockchain network is the blockchain transaction information generated based on the real user business data stored in the first blockchain network converted into blockchain transaction information generated based on virtual user business data, including: determining the virtual user unique identification information corresponding to the real user unique identification information in the real user business data; generating the third blockchain transaction information carrying the virtual user unique identification information; storing the third blockchain transaction information in the third blockchain network; obtaining the blockchain transaction information of the second blockchain network from the third blockchain network; the third blockchain network is consistent with the blockchain transaction information stored in the first blockchain network; Determine a stress test result for the first blockchain network based on a stress test result of the second blockchain network on the first blockchain transaction information.
