Block chain data processing method and device, equipment and readable medium

By controlling the blockchain network indicator values ​​as reference values ​​through multiple detection programs and generating indicator reference ranges, the problem of not being able to obtain stable operating network conditions before and after the blockchain system goes live is solved, thus achieving stable operation of the blockchain system.

CN120979975APending Publication Date: 2025-11-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410624021.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-15
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

Before and after a blockchain system goes live, it is difficult to directly obtain the network conditions required to ensure its stable operation, which makes it impossible to prevent network situations that may affect the stable operation of the blockchain and thus affect its operational stability.

Method used

By controlling the index values ​​of the network indicators to be tested during blockchain operation through multiple detection programs, different reference values ​​are obtained. The operation status data of blockchain under different network indicator values ​​are explored, and an indicator reference range is generated to ensure the stable operation of blockchain within the indicator value range.

Benefits of technology

It has enabled the acquisition of network conditions for stable blockchain operation, ensuring that the blockchain operates normally within the range of network indicator values, thereby improving the stability of the blockchain system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979975A_ABST
    Figure CN120979975A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a block chain data processing method and device, equipment and a readable medium. The method comprises the following steps: acquiring a plurality of detection programs of a to-be-detected network index; controlling the index values of the to-be-detected network indexes to be reference values through the detection programs when the block chain runs, so that the index values of the to-be-detected network indexes are different reference values; acquiring operation state data of the block chain in the control process of each detection program; and generating an index reference interval of the block chain about the to-be-detected network index based on the reference value corresponding to the operation state data used for representing that the block chain is in the normal operation state. According to the technical scheme provided by the embodiment of the invention, the network condition for ensuring stable operation of the block chain can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer and communication, in particular, to a data processing method of a block chain, a data processing device of a block chain, an electronic device, a computer readable storage medium and a computer program product. BACKGROUND

[0002] The block chain is a new application mode of distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and other computer technologies. As a typical distributed system, it is difficult to directly obtain the network conditions required to ensure the stable operation of the block chain before and after going online, that is, the network performance of the block chain cannot be known. This leads to the fact that relevant personnel cannot prevent the network conditions that may affect the stable operation of the block chain in the process of managing and using the block chain, thereby affecting the operation stability of the block chain. Therefore, how to obtain the network conditions required to ensure the stable operation of the block chain is a problem that needs to be solved at present. SUMMARY

[0003] Embodiments of the present application provide a data processing method of a block chain, a data processing device of a block chain, an electronic device, a computer readable storage medium and a computer program product, which can obtain network conditions required to ensure the stable operation of the block chain.

[0004] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.

[0005] According to an aspect of an embodiment of the present application, a data processing method of a block chain is provided, and the method comprises:

[0006] Obtaining a plurality of detection procedures of a to-be-detected network index;

[0007] Controlling the index value of the to-be-detected network index of the block chain to be each reference value through each detection procedure, so that the index value of the to-be-detected network index is different reference values;

[0008] Obtaining the running state data of the block chain in the control process of each detection procedure;

[0009] Generating an index reference interval of the block chain about the to-be-detected network index based on the reference value corresponding to the running state data for representing that the block chain is in a normal running state.

[0010] According to an aspect of an embodiment of the present application, a data processing device of a block chain is provided, and the device comprises a program obtaining unit, a control unit, a data obtaining unit and a generating unit, wherein:

[0011] The program acquisition unit is configured to acquire a plurality of detection programs for detecting a network index;

[0012] The control unit is configured to control the index value of the network index to be detected by each detection program to be a respective reference value, so that the index value of the network index to be detected is different reference values;

[0013] The data acquisition unit is configured to acquire running state data of the blockchain during the control process of each detection program;

[0014] The generation unit is configured to generate an index reference interval of the blockchain with respect to the network index to be detected based on a reference value corresponding to the running state data indicating that the blockchain is in a normal running state.

[0015] According to an aspect of an embodiment of the present application, the present application provides an electronic device, comprising one or more processors; a storage device for storing one or more computer programs, when the one or more computer programs are executed by the one or more processors, the electronic device implements the data processing method of the blockchain as described above.

[0016] According to an aspect of an embodiment of the present application, the present application provides a computer readable storage medium having a computer program stored thereon, when the computer program is executed by a processor of an electronic device, the electronic device executes the data processing method of the blockchain as described above.

[0017] According to an aspect of an embodiment of the present application, the present application provides a computer program product, comprising a computer program stored in a computer readable storage medium, a processor of an electronic device reads and executes the computer program from the computer readable storage medium, so that the electronic device executes the data processing method of the blockchain as described above.

[0018] In the technical solutions provided in the embodiments of the present application, the index values of the network indicators to be detected of the blockchain runtime can be controlled to be different reference values respectively through the plurality of detection programs, so that the running state data of the blockchain when the index values of the network indicators to be detected are different reference values can be obtained. The running state data can represent whether the blockchain is in a normal running state. As can be seen, the embodiments of the present application can explore under what conditions the blockchain is in a normal running state when the index values of the network indicators to be detected are different, and under what conditions the blockchain is in an abnormal running state when the index values of the network indicators to be detected are different. Finally, the running state data corresponding to the reference values used for generating the index reference interval are all representative of the blockchain being in a normal running state, so that the index values of the network indicators to be detected in the blockchain within the index reference interval can guarantee the normal and stable running of the blockchain, thereby achieving the purpose of obtaining the network conditions guaranteeing the stable running of the blockchain.

[0019] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0020] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those of ordinary skill in the art without creative labor. In the drawings:

[0021] Figure 1 is a structural schematic diagram of a blockchain system provided by an embodiment of the present application;

[0022] Figure 2 is a schematic diagram of a blockchain provided by an embodiment of the present application;

[0023] Figure 3 is a structural schematic diagram of a data processing system of a blockchain provided by an embodiment of the present application;

[0024] Figure 4 is a flow schematic diagram of a data processing method of a blockchain provided by an embodiment of the present application;

[0025] Figure 5 is a flow schematic diagram of another data processing method of a blockchain provided by an embodiment of the present application;

[0026] Figure 6 is an example schematic diagram of a deployment template file provided by an embodiment of the present application;

[0027] Figure 7is a structural schematic diagram of an index exploration test device provided by an embodiment of the present application;

[0028] Figure 8 is a functional schematic diagram of a test arrangement module provided by an embodiment of the present application;

[0029] Figure 9 is a functional schematic diagram of a test injection module provided by an embodiment of the present application;

[0030] Figure 10 is a functional schematic diagram of an exploration detection module provided by an embodiment of the present application;

[0031] Figure 11 is a functional schematic diagram of a test adjustment module provided by an embodiment of the present application;

[0032] Figure 12 is a process schematic diagram of an index exploration test provided by an embodiment of the present application;

[0033] Figure 13 is a structural block diagram of a data processing device of a blockchain shown by an example embodiment of the present application;

[0034] Figure 14 shows a structural schematic diagram of a computer system of an electronic device suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION

[0035] The example embodiments will be described in detail herein with reference to the accompanying drawings. In the following description, the same numbers refer to the same or similar elements unless otherwise represented. The implementations described in the following example embodiments do not represent all implementations consistent with the present application. Instead, they only represent examples of apparatuses and methods consistent with some aspects of the present application, as detailed in the appended claims.

[0036] The block diagrams shown in the accompanying drawings are merely functional entities, and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0037] The flowcharts shown in the accompanying drawings are merely illustrative, and do not necessarily include all contents and operations, nor are they necessarily executed in the described order. For example, some operations can be further divided, and some operations can be combined or partially combined, so the actual execution order can be changed according to actual conditions.

[0038] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented in whole or in part by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.

[0039] It should also be noted that "multiple" is referred to as two or more in the present application. The association relationship of the associated objects is described by "and / or", which means that there can be three relationships, for example, A and / or B can represent the existence of A alone, the existence of A and B together, and the existence of B alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.

[0040] Blockchain is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. Blockchain is essentially a decentralized database, which is a chain of data blocks associated using cryptographic methods, and each data block contains information about a batch of network transactions, which is used to verify the validity (anti-fraud) of the information and generate the next block.

[0041] Blockchain can also be seen as a shared, tamper-proof ledger designed to facilitate transaction recording and asset tracking processes in business networks. Assets can be tangible (such as houses, cars, cash, land, etc.) or intangible (such as copyrights, brands, etc.). Almost anything of value can be tracked and traded on a blockchain network, thereby reducing risks and costs in all aspects.

[0042] Among them, the consensus mechanism of the blockchain refers to the mechanism for the nodes of the blockchain to reach a consensus on the block (also known as block information or block data), which can ensure that the latest block is accurately added to the blockchain. The current mainstream consensus algorithms include: Proof of Work (POW), Proof of Stake (POS), Delegated Proof of Stake (DPOS), Practical Byzantine Fault Tolerance (PBFT) algorithm, etc. Among them, in various consensus algorithms, a consensus is usually reached after a predetermined number of consensus nodes agree on the data to be consensus (i.e. consensus proposal), thereby determining the success of the consensus on the consensus proposal.

[0043] For example, in the PBFT algorithm, for N≥3f+1 consensus nodes, f malicious nodes can be tolerated, where N and f are positive integers. That is, when 2f+1 of the N consensus nodes reach an agreement, consensus success can be determined.

[0044] Specifically, the consensus node that initiates the consensus proposal in the blockchain can be referred to as a master node, and other consensus nodes that receive the consensus proposal in the blockchain are referred to as slave nodes. The consensus proposal can include a to-be-consensus block packaged and generated by the master node. The to-be-consensus block usually contains multiple transactions and the transaction execution order of each transaction, etc.

[0045] However, it is difficult to directly obtain the network conditions required to ensure the stable operation of the blockchain before and after the online of the blockchain system, that is, the network performance of the blockchain cannot be known. Moreover, the existing detection of the blockchain is more focused on the detection of the transaction performance (such as throughput, delay time, memory consumption, etc.) of the blockchain, and often ignores the detection of the network performance of the blockchain.

[0046] Therefore, relevant personnel cannot prevent the network conditions that may affect the stable operation of the blockchain in the process of managing and using the blockchain, thereby affecting the operation stability of the blockchain.

[0047] Based on this, the embodiment of the present application provides a data processing scheme of a blockchain. The scheme can obtain a plurality of detection programs about a to-be-detected network index in advance, so as to control the index value of the to-be-detected network index of the blockchain during operation to be different reference values through the plurality of detection programs. In this way, the running state data of the blockchain when the to-be-detected network index is different values can be explored. Therefore, the index reference interval of the blockchain about the to-be-detected network index can be generated through the reference value corresponding to the running state data representing that the blockchain is in a normal running state.

[0048] Specifically, the network index can include bandwidth, delay, packet loss rate, throughput, network reliability, etc. The network index is very important for evaluating network performance, planning network architecture, and optimizing network operation.

[0049] In addition, one detection program can control the index value of the to-be-detected network index of the blockchain during operation to be one or more reference values. The reference values controlled by different detection programs are different. Specifically, the detection program can be run in a node in the blockchain, and the index value of the to-be-detected network index of the node in the blockchain during operation is controlled to be a reference value, that is, the index value of the to-be-detected network index of the node in the blockchain is controlled to be a reference value.

[0050] Therefore, by means of the present scheme, the reference values of the index values of the to-be-detected network indicators controlled by the plurality of detection procedures are different, and the running state data of the blockchain when the to-be-detected network indicators are different values can be obtained. In this way, it can be explored that under what value of the to-be-detected network indicator, the blockchain is in a normal running state, and under what value of the to-be-detected network indicator, the blockchain is in an abnormal running state. Finally, based on the value of the to-be-detected network indicator when the to-be-detected network indicator is in a normal state, the index reference interval of the blockchain about the to-be-detected network indicator can be obtained. In this way, it is equivalent to knowing that if the index value of the to-be-detected network indicator is within the index reference interval, the blockchain can run normally, thereby achieving the purpose of obtaining the network condition for ensuring stable operation of the blockchain.

[0051] Based on the above data processing scheme based on the blockchain, an embodiment of the present application provides a blockchain system, which can be seen from Figure 1 , Figure 1 shows a structural schematic diagram of a blockchain system. Figure 1 The blockchain system 100 shown can be a system for sharing data between nodes. The blockchain system 100 can include a plurality of blockchain nodes (also referred to as consensus nodes), such as Figure 1 The blockchain nodes 101 to 104 shown; wherein Figure 1 The ellipsis in indicates that the blockchain system 100 also includes other blockchain nodes. The blockchain node is the basic component of the entire blockchain system, responsible for functions such as processing transactions, storing blockchain data, and participating in consensus. In a specific implementation, the blockchain node can be a server, so the blockchain node can also be referred to as a server node.

[0052] Each blockchain node in the blockchain system 100 stores a same blockchain (also referred to as a block ledger). The block ledger is the core data structure in the blockchain system, used to store and manage all confirmed blocks. The block ledger is organized in a chain structure, each block contains a set of transactions, a block header (including the hash value of the previous block, a timestamp, and other metadata), and other information. The block ledger provides a public, tamper-proof transaction history record for the blockchain system, ensuring transparency and consistency of the system.

[0053] In addition, each blockchain node can receive input information when working normally, and maintain shared data within the blockchain system 100 based on the received input information. In order to ensure information exchange within the blockchain system 100, as Figure 1 shown, there can be wired or wireless communication connections between each blockchain node in the blockchain system 100, and the blockchain nodes can transmit information through the above communication connections.

[0054] For example, when any blockchain node in the blockchain system 100 responds to the transaction request of the object, after performing a plurality of transactions requested, the plurality of transactions performed can be packaged into a block as input information. After receiving the block, other blockchain nodes in the blockchain system 100 process the block according to the consensus algorithm, and after the block is consensus, the block is stored as data in the shared data, so that the data stored on all blockchain nodes in the blockchain system 100 is consistent.

[0055] For each blockchain node in the blockchain system 100, there is a node identifier corresponding to it, and each blockchain node in the blockchain system 100 can store the node identifier of other blockchain nodes in the blockchain system 100, so as to subsequently broadcast the generated block to other blockchain nodes in the blockchain system 100 according to the node identifier of the other blockchain nodes. Each blockchain node can maintain a node identifier list as shown in the following table, and store the node name and node identifier in the node identifier list. The node identifier can be an IP (Internet Protocol) address and any other information that can be used to identify the node. In Table 1, only the IP address is used as an example for illustration.

[0056] Table 1

[0057] Node name Node identity Blockchain node 101 117.114.151.174 Blockchain node 102 117.116.189.145 … … Blockchain node xxx xxx.xxx.xxx.xxx

[0058] Each node in the blockchain system 100 stores a same blockchain. The blockchain is composed of a plurality of blocks, as shown in Figure 2 The blockchain is composed of a plurality of blocks, and the genesis block includes a block header and a block body. The input information feature value, version number, timestamp, and difficulty value are stored in the block header, and the input information is stored in the block body. The next block of the genesis block takes the genesis block as the parent block, and the next block also includes a block header and a block body. The input information feature value of the current block, the block header feature value of the parent block, the version number, the timestamp, and the difficulty value are stored in the block header, and the next block is taken as an example. The same is true for the next block, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.

[0059] In some embodiments, the blockchain node 101 can obtain a plurality of detection procedures of the network indicator to be detected, and control the indicator value of the network indicator to be detected of the blockchain system to be each reference value through each detection procedure, so that the indicator value of the network indicator to be detected of the blockchain node 101 is different reference values. Then, the blockchain node 101 can obtain the running state data of the blockchain system in the control process of each detection procedure; finally, the blockchain node 101 can generate the indicator reference interval of the blockchain about the network indicator to be detected based on the reference value corresponding to the running state data for characterizing that the blockchain is in a normal running state.

[0060] Based on the above blockchain-based data processing scheme, another blockchain data processing system is also provided in the embodiments of the present application, which can be seen from Figure 3 , Figure 3 A structural schematic diagram of a blockchain data processing system is shown. Figure 3 The blockchain data processing system shown includes a blockchain system 300 and a server 301; the number of the server 301 can include one or more, and a communication connection is established between the blockchain system 300 and the server 301. The specific description of the blockchain system 300 can be seen from the above specific description of the blockchain system 100, which is not limited here.

[0061] The server 301 can be a server or server cluster that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms, etc. Basic cloud computing services.

[0062] In some embodiments, the server 301 can deploy and run each detection procedure about the network indicator to be detected to the blockchain system 300; then, the server 301 can control the indicator value of the network indicator to be detected of the blockchain system 300 to be each reference value through each detection procedure, so that the indicator value of the network indicator to be detected is different reference values; after that, the server 301 can obtain the running state data of the blockchain system 300 in the control process of each detection procedure; finally, the server 301 can generate the indicator reference interval of the blockchain about the network indicator to be detected based on the reference value corresponding to the running state data for characterizing that the blockchain is in a normal running state.

[0063] In some embodiments, after the server 301 generates the indicator reference interval, the server 301 can control the network indicator to be detected of the blockchain system 300 to be within the indicator reference interval during the running process of the blockchain system 300, so as to guarantee the stable running of the blockchain system 300.

[0064] In other embodiments, after generating the indicator reference range, the server 301 can send the indicator reference range to the administrator of the blockchain system 300; the administrator of the blockchain system 300 can control the network indicator to be detected in the blockchain system 300 to be within the indicator reference range during the operation of the blockchain system 300, thereby ensuring the stable operation of the blockchain system 300.

[0065] It should be noted that the embodiments of this application can be applied to blockchain systems in various scenarios, including but not limited to smart finance, cloud technology, AI (Artificial Intelligence), smart transportation, smart healthcare, and so on, and are not limited thereto.

[0066] Furthermore, in specific embodiments of this application, if the running status data, blocks, or other data or information involve objects, when the embodiments of this application are applied to specific products or technologies, permission or consent from the objects is required, and the collection, use, and processing of related data or information must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0067] The following details the various implementation details of the technical solutions in the embodiments of this application:

[0068] like Figure 4 As shown, Figure 4 This is a schematic flowchart illustrating a blockchain data processing method according to an embodiment of this application. This method can be applied to… Figure 1 The blockchain system shown can be executed by blockchain nodes within the blockchain system; this method can also be applied to... Figure 3 The blockchain data processing system shown can be executed by a server or a blockchain node within the system. In this embodiment, the method is described using a server as an example. The blockchain data processing method may include steps S401 to S404, which are detailed below:

[0069] S401, Multiple detection programs for obtaining network metrics to be detected.

[0070] In this embodiment, the number of network metrics to be detected may include one or more. These metrics may be selected manually or by servers or blockchain nodes in the aforementioned blockchain data processing system based on the network requirements of the blockchain system; no limitation is made here. Specifically, the network metrics to be detected may include one or more network metrics such as network packet loss rate, network bandwidth, network latency, probability of erroneous packets, probability of duplicate packets, blocking nodes, network reliability, and data throughput.

[0071] Each detection procedure of the to-be-detected network indicator can control the indicator value of the to-be-detected network indicator in the blockchain runtime to be one or more reference values. The reference values controlled by different detection procedures are different.

[0072] Optionally, since the indicator value of the to-be-detected network indicator in the blockchain can only be one value at a time, the multiple detection procedures of the to-be-detected network indicator can exist in a certain running order. Then, the manner of obtaining the multiple detection procedures of the to-be-detected network indicator can also include: sequentially obtaining the multiple detection procedures of the to-be-detected network indicator.

[0073] In an embodiment, the program startup script of each network indicator can be preset, and then the detection procedure of the to-be-detected network indicator can be obtained by loading the program startup script of the to-be-detected network indicator. The program startup script can include the indicator parameter of the corresponding network indicator.

[0074] Then, the multiple program startup scripts corresponding to the to-be-detected network indicator can be obtained by updating the parameter value of the indicator parameter in the program startup script of the to-be-detected network indicator; and the multiple detection procedures of the to-be-detected network indicator can be obtained by loading the multiple program startup scripts corresponding to the to-be-detected network indicator. The parameter value of the indicator parameter in each updated program startup script matches the reference value controlled by the corresponding detection procedure.

[0075] In an embodiment, before obtaining the multiple detection procedures of the to-be-detected network indicator, the detection configuration information of the blockchain can also be obtained. The detection configuration information can include the to-be-detected network indicator; the detection configuration information can be configured by the administrator of the blockchain according to the business demand and network demand of the blockchain, or can be selected by the server or the blockchain node in the data processing system of the blockchain according to the network demand of the blockchain system, which is not limited herein.

[0076] Optionally, the aforementioned updating of the parameter value of the indicator parameter in the program startup script of the to-be-detected network indicator can be performed; and the specific updating manner can also be artificially set. Therefore, the detection configuration information can also include the indicator value change information of the to-be-detected network indicator. The indicator value change information of the to-be-detected network indicator is used to represent the change rule of the indicator value of the to-be-detected network indicator.

[0077] Then, the obtaining process of any detection procedure includes: first, updating the parameter value of the indicator parameter in the program startup script of the to-be-detected network indicator based on the indicator value change information to obtain an updated program startup script; and then, running any detection procedure in the blockchain through the updated program startup script. The parameter value of the indicator parameter in the updated program startup script matches the reference value controlled by any detection procedure.

[0078] S402, control the index value of the network index to be detected by each detection program to be each reference value, so that the index value of the network index to be detected is different reference values.

[0079] In the embodiments of the present application, the blockchain includes a plurality of blockchain nodes, and one detection program can be deployed in one or more blockchain nodes. Therefore, controlling the index value of the network index to be detected by each detection program to be each reference value can specifically include: controlling the index value of the network index to be detected by each detection program to be each reference value.

[0080] In one embodiment, considering that the performance of most blockchain nodes in the blockchain system is the same, the network performance of part of the blockchain nodes can represent the network performance of the whole blockchain nodes; or the administrator can only want to explore the network performance of part of the blockchain nodes in the blockchain system about the network index to be detected. Therefore, the detection configuration information can further include the node identifier of the blockchain node. Then, after the server obtains each detection program, the server can deploy each detection program to the blockchain node indicated by the node identifier in the detection configuration information.

[0081] Optionally, the program startup script mentioned in step S401 can further include a node parameter; and the program startup script for deploying the detection program to the blockchain node indicated by the node identifier can be obtained by updating the parameter value of the node parameter in the program startup script of the network index to be detected to the node identifier in the detection configuration information.

[0082] S403, obtain the running state data of the blockchain in the control process of each detection program.

[0083] In the embodiments of the present application, the running state data can include the parameter value of the performance parameter. The performance parameter can be a parameter representing the processing performance of the blockchain, and specifically, the performance parameter in the running state data can include at least one of the survival state of the blockchain node, the error information in the blockchain log, the generation speed of the block, the data sending speed of the blockchain node, the data receiving speed of the blockchain node, and the data transmission speed of the blockchain node.

[0084] In one embodiment, the plurality of detection programs mentioned in step S401 can be used to detect the blockchain nodes in sequence; if the running time of each detection program is too long, it will lead to too long overall time required for exploring the network conditions of the blockchain about the network index to be detected.

[0085] Therefore, the detection configuration information can further include a detection duration; the detection duration is used to limit the running duration of the detection program. Specifically, the program startup script mentioned in step S401 can further include a running duration parameter. In this way, the program startup script that can limit the running duration of the detection program can be obtained by updating the parameter value of the running duration parameter in the program startup script of the network indicator to be detected to the detection duration in the detection configuration information.

[0086] Then, the acquisition process of the running state data can include: if the time length between the startup time and the current time of each detection program reaches the detection duration, acquiring the running state data generated by the blockchain in the time period from the startup time to the current time, and stopping running each detection program.

[0087] S404, generating an indicator reference interval of the blockchain about the network indicator to be detected based on a reference value corresponding to the running state data used to represent that the blockchain is in a normal running state.

[0088] In the embodiment of the application, if the parameter value of the performance parameter included in the running state data is within the preset range, it is determined that the running state data represents that the blockchain is in a normal running state; if the parameter value of the performance parameter included in the running state data is outside the preset range, it is determined that the running state data represents that the blockchain is in an abnormal running state.

[0089] The preset ranges corresponding to different performance parameters are different; the preset ranges can be set by humans or by servers or blockchain nodes in the data processing system of the blockchain, which are not limited herein. Specifically, the preset ranges corresponding to different performance parameters can be set according to the evaluation standards of different performances of the blockchain. For example, the preset range corresponding to the survival state of the blockchain node can be survival; that is, if the survival state of the blockchain node is survival, it can be determined that the survival state of the blockchain node is within the preset range. The preset range corresponding to the data sending speed of the blockchain node can be greater than 150 kb / s; that is, if the data sending speed of the blockchain node is greater than 150 kb / s, it can be determined that the data sending speed of the blockchain node is within the preset range.

[0090] In a possible implementation manner, if objective conditions such as network disconnection and blockchain node failure cause the network state of the blockchain itself to be in an abnormal state, the running state data acquired at this time must represent that the blockchain is in an abnormal running state; therefore, these running state data are easy to cause the finally obtained indicator reference interval to be inaccurate.

[0091] Therefore, if the network state of the blockchain is detected to be in an abnormal state, the time when the network state is detected to be in the abnormal state can be marked as a detection suspension time; if the network state of the blockchain is detected to be updated from the abnormal state to the normal state, the time when the network state is detected to be updated to the normal state can be marked as a detection recovery time; and finally, the running state data obtained within the detection suspension time to the detection recovery time can be marked as abnormal data. The abnormal data is not part of the running state data. Specifically, the abnormal data can be deleted or invalidated.

[0092] Optionally, in order to further guarantee the stable operation of the blockchain, after obtaining the running state data for representing that the blockchain is in an abnormal running state, the running state data for representing that the blockchain is in an abnormal running state can be analyzed to obtain an updating scheme for the blockchain; and then, the updating scheme is used to update the blockchain. The updating scheme is mainly about updating the node deployment or performance configuration of the blockchain. The updated blockchain is more stable when encountering the abnormal situation matched with the running state data.

[0093] Specifically, the possible influence of the index value of the network index outside the index reference interval on the operation of the blockchain can be prevented by analyzing the running state data for representing that the blockchain is in an abnormal running state and proposing a corresponding scheme, so as to further guarantee the stable operation of the blockchain.

[0094] For example, the blockchain node in the blockchain is a server with 8 cores and 16G memory, and in the case of a network bandwidth of 200 megabits, it is found that the data transmission speed of the blockchain node is slow. Therefore, the subsequent developers, managers and other related personnel of the blockchain can use a server with better configuration as a blockchain node. For another example, when the packet loss rate is 50%, the blockchain node cannot generate blocks normally (i.e., the generation speed of the block is too low), and therefore the related personnel can upgrade and update the deployment of the blockchain node, so as to guarantee the stability of the blockchain.

[0095] In a possible implementation, the generation time of the index reference interval can also be stored in association with the index reference interval; if the time difference between the generation time and the current time is greater than a preset difference value, steps S401 to S404 are triggered to generate a new index reference interval; and if the time difference between the generation time and the current time is less than or equal to the preset difference value, the blockchain is managed according to the index reference interval. The preset difference value can be set by a person or by a server or a blockchain node in the data processing system of the blockchain, which is not limited here.

[0096] Specifically, since the performance environment and other conditions of the blockchain are changeable, if the generation time of the index reference interval is too long from the current time, the index reference interval is likely to be inaccurate; therefore, the time difference between the generation time and the current time can be used to determine whether a new index reference interval needs to be generated, so as to obtain a more accurate index reference interval that is more in line with the current situation of the blockchain.

[0097] In the embodiments of the present application, the index values of the network indicators to be detected in the blockchain can be controlled to be different reference values by the plurality of detection programs, so that the running state data of the blockchain when the index values of the network indicators to be detected are different reference values can be obtained. The running state data can represent whether the blockchain is in a normal running state. As can be seen, the embodiments of the present application can explore under what conditions the blockchain is in a normal running state when the index values of the network indicators to be detected are different, and under what conditions the blockchain is in an abnormal running state when the index values of the network indicators to be detected are different. Finally, the running state data corresponding to the reference values used to generate the index reference interval are all indicative of the blockchain being in a normal running state, so that the index values of the network indicators to be detected in the blockchain within the index reference interval can guarantee the normal and stable operation of the blockchain, thereby achieving the purpose of obtaining network conditions that guarantee the stable operation of the blockchain.

[0098] In an embodiment of the present application, as shown in Figure 5 , another data processing method of a blockchain is provided. The method can be applied to the blockchain system as shown in Figure 1 , and can be executed by a blockchain node in the blockchain system. The method can also be applied to the data processing system of the blockchain as shown in Figure 3 , and can be executed by a server or a blockchain node in the data processing system of the blockchain. In the embodiments of the present application, the data processing method of the blockchain extends the method shown in Figure 4 .

[0099] Among them, S501 to S507 are described in detail as follows:

[0100] S501, obtaining detection configuration information of the blockchain.

[0101] In the embodiments of the present application, the detection configuration information includes the network indicators to be detected and the index value change information. The index value change information can include the initial index value and the adjustment rule of the index value. For example, when the network indicators to be detected include network packet loss, the index value change information can include that the initial packet loss rate is set to 60%, and the packet loss rate is reduced by 5% each time the update is adjusted; when the network indicators to be detected include processor load, the index value change information can include that the initial processor load is set to 50%, and the processor load is increased by 10% each time the update is adjusted.

[0102] Optionally, the number of network indicators to be detected mentioned in step S401 can include multiple. Therefore, the network indicators to be detected included in the detection configuration information can be multiple, and accordingly, the detection configuration information can also include the indicator value change information of each network indicator to be detected.

[0103] Optionally, the detection configuration information can also include the node parameter mentioned in step S402, the running time parameter mentioned in step S403, etc., which is not limited herein.

[0104] S502, based on the indicator value change information in the detection configuration information, the parameter value of the indicator parameter in the program startup script of the network indicator to be detected is updated multiple times, and multiple updated program startup scripts are obtained.

[0105] In the embodiment of the present application, the program startup script of the network indicator is pre-set. Specifically, considering that there are multiple deployment modes of the blockchain, and the method of starting and running the application program in the blockchain in different deployment modes is different; therefore, the program startup script corresponding to each network indicator can include multiple, and different program startup scripts are suitable for different deployment modes of the blockchain.

[0106] In addition, the parameter value of the indicator parameter in each updated program startup script is obtained by adjusting the parameter value of the indicator parameter in the program startup script obtained by the last update based on the indicator value change information.

[0107] Specifically, the process of the first update can include: based on the initial indicator value in the indicator value change information, the indicator parameter in the program startup script of the network indicator to be detected is assigned, and the program startup script obtained by the first update is obtained.

[0108] The process of non-first update can include: obtaining the parameter value of the indicator parameter in the program startup script obtained by the last update; adjusting the obtained parameter value based on the indicator value change information to obtain a new parameter value; assigning the indicator parameter in the program startup script of the network indicator to be detected by the new parameter value, and obtaining the program startup script updated this time.

[0109] In a possible implementation, since the number of network indicators to be detected mentioned in step S501 can be multiple; therefore, the process of each update of the program startup script can include: based on the indicator value change information of each network indicator to be detected, the parameter value of the indicator parameter in the program startup script of each network indicator to be detected obtained by the last update is updated, and the target program startup script of each network indicator to be detected is obtained; based on the target program startup scripts of multiple network indicators to be detected, the program startup script updated this time is obtained.

[0110] Optionally, the network environment is complex and variable, and therefore the management personnel can have the need to explore the network conditions (i.e., boundary values) of multiple network indicators; when exploring the network conditions of multiple network indicators, in order to cater to different network needs, there can be a detection order between these to-be-detected network indicators; for example, multiple to-be-detected network indicators can need to be detected in series, or can need to be detected in parallel, or some to-be-detected network indicators in the multiple to-be-detected network indicators can need to be detected in series, and some to-be-detected network indicators can need to be detected in parallel.

[0111] Therefore, the detection configuration information can further include the detection order of the multiple to-be-detected network indicators; and the specific process of obtaining the updated program startup script based on the target program startup script of the multiple to-be-detected network indicators can include: splicing the target program startup script of each to-be-detected network indicator to obtain a spliced program startup script; splicing the script identifiers of the target program startup scripts corresponding to each to-be-detected network indicator according to the detection order of each to-be-detected network indicator to obtain an identifier list; adding a detection order parameter in the spliced program startup script, and assigning the detection order parameter through the identifier list to obtain an updated program startup script.

[0112] Specifically, the detection program started and run by the updated program startup script will control the indicator values of each to-be-detected network indicator in the blockchain runtime to be the corresponding reference values in turn according to the arrangement order of each to-be-detected network indicator in the identifier list in the detection order parameter. Among them, the arrangement order of some to-be-detected network indicators in the identifier list can be the same, and then the detection program will control the indicator values of each to-be-detected network indicator in this part of to-be-detected network indicators in the blockchain runtime to be the corresponding reference values in parallel.

[0113] S503, run each detection program of the to-be-detected network indicators in the blockchain through each updated program startup script.

[0114] In the embodiments of the present application, the parameter values of the indicator parameters in each updated program startup script match the reference values controlled by each detection program.

[0115] Optionally, different program startup scripts can be used for different deployment modes of the blockchain as mentioned in step S502. When the deployment mode of the blockchain is container deployment, the program startup script of the to-be-detected network indicators can include the executable file identifier corresponding to the detection program of the to-be-detected network indicators, so as to facilitate the deployment of the detection program to the blockchain through the container technology.

[0116] So, the running process of any detection program in the blockchain can include: obtaining a deployment template file corresponding to the network indicator to be detected; updating the deployment template file based on the detection configuration information and the image identifier of the target image required by the detection program running the network indicator to be detected, to obtain a program deployment description file of the network indicator to be detected; calling the updated program startup script to obtain the executable file indicated by the file identifier in the updated program startup script; and deploying any detection program to the blockchain based on the program deployment description file, the executable file, and the indicator parameters in the updated program startup script.

[0117] In the deployment template file, mode parameters related to the detection method of the network indicator to be detected can be included, such as runtime parameter, node parameter, value range parameter, direction parameter, etc. The mode parameters of different network indicators can be different. In a specific implementation, the deployment template file is a chart package, and the chart package includes one or more yaml files (one readable, used to express the format of data serialization).

[0118] In a specific implementation, the process of obtaining a detection program and obtaining running state data through the detection program can be called a network indicator exploration test. Please refer to FIG. 6, which shows an example of a deployment template file. Figure 6 As shown in the deployment template file example 601 in FIG. 6, apiVersion refers to the API version of the Kubernetes (an open source container orchestration platform) resource object; “kind: NetworkChaos” refers to a custom resource object created in Kubernetes, which is used to simulate network failure or abnormal scenario; the “name” in the fourth row is the exploration test name of the network indicator to be detected. Figure 6

[0119] The “action” in the sixth row is used to represent the network indicator to be detected, and “action: loss” indicates that the network indicator to be detected includes packet loss rate. The “mode: one” in the seventh row indicates that only one network indicator is detected; the “duration” in the eighth row is the runtime parameter, and “duration: 25m” indicates that the runtime parameter is 25 minutes. The “namespaces” in the tenth to eleventh rows are blockchain identifier parameters, and “-chainmaker” is the name of the blockchain; the “node” in the thirteenth row is the node parameter, and “node3” is the node identifier of the blockchain.

[0120] ​The 14th to 17th lines are about the detailed detection method of the packet loss rate. The "loss: '100'" in the 15th line indicates that the value range of the packet loss rate is [0, 100]. The "correlation: '0'" in the 16th line indicates that the correlation between data packets is 0. The "direction" in the 17th line indicates the action direction (in this case, the transmission direction of the data packet), where the value of direction is from when the data packet is from the specified blockchain node (in this case, node3), the value of direction is to when the data packet is sent to the specified blockchain node; the value of direction is both when the data packet contains data packets from the specified blockchain node and data packets sent to the specified blockchain node.

[0121] In addition, the specific process of deploying any detection program to the blockchain can include: obtaining a target image through a program deployment description file; constructing a program container of the detection program according to the target image, an executable file, and an index parameter, and deploying the program container to a blockchain node in the off-chain blockchain, thereby completing the deployment of the detection program to the blockchain. The reference value controlled by the detection program matches the parameter value of the index parameter. The loading and execution of the executable file can realize the application function of the detection program, and the target image can provide the file system, resource environment, etc. required for the loading and execution of the executable file. Therefore, the program container can be constructed through the target image and the executable file.

[0122] The index parameter in the program startup script mentioned above can be assigned by the index value change information. For example, the index parameter in the program startup script can be "percent", and the index value change information can include an initial index value of 20 and a decrease of 5% for each update adjustment of the index value. Then, the program startup script "percent = 20 + (N-1) x 5%", where N is the number of updates of the index value, and N is a positive integer.

[0123] When the deployment mode of the blockchain is single-machine deployment (also known as bare-metal deployment). Then, the running process of any detection program in the blockchain can include: loading the updated program startup script, assigning the network control instruction of the network index to be detected based on the index parameter in the updated program startup script, to obtain the assigned network control instruction; executing the assigned network control instruction to run any detection program in the blockchain. In specific implementation, the network control instruction can be a traffic control instruction (Traffic Control, abbreviated as tc instruction), and the tc instruction can be used to manage and control network traffic, including limiting bandwidth, setting delay, adjusting transmission priority, etc.

[0124] S504, the detected network index value is controlled by each detection program control block chain runtime reference value.

[0125] In the embodiments of the present application, the specific implementation of step S504 can refer to the specific implementation of step S402, which will not be repeated here.

[0126] S505, obtain the running state data of the blockchain in the control process of each detection program.

[0127] In the embodiments of the present application, the specific implementation of step S505 can refer to the specific implementation of step S403, which will not be repeated here.

[0128] In one possible implementation, considering that the boundary value of most network indexes is usually the upper limit value or the lower limit value, that is, there is usually only an upper limit value or a lower limit value in the index reference interval.

[0129] Therefore, the updating process of the index parameter in step S502 can further include: if the running state data corresponding to the last detection program is used to represent that the blockchain is in a normal running state, obtaining the reference value corresponding to the control of the last detection program (i.e. the parameter value of the index parameter in the program startup script obtained by the last update) ; adjust the obtained parameter value based on the index value change information to obtain a new parameter value, and assign the index parameter in the program startup script of the detected network index by the new parameter value to obtain the updated program startup script this time, so as to run the detection program this time in the blockchain through the updated program startup script this time. If the running state data corresponding to the last detection program is used to represent that the blockchain is in an abnormal running state, step S506 is triggered.

[0130] For example, the index value change information of the packet loss rate includes that the initial packet loss rate is 10%, and the packet loss rate is increased by 5% each time. It should be noted that the management personnel can set a larger or smaller adjustment range according to their own needs, such as an adjustment range of 1%, 15%, etc.

[0131] Then, the detection program started by the program startup script obtained by the first update will control the blockchain to run with a packet loss rate of 10%; if the running state data obtained at this time represents that the blockchain is in a normal running state; then continue to obtain the next detection program, and the next detection program will control the blockchain to run with a packet loss rate of 15%.

[0132] The detection program started by the program startup script obtained through the 7th update controls the packet loss rate of the blockchain runtime to be 45%, and the obtained running state data represents that the blockchain is in a normal running state; the detection program corresponding to the 8th update is continuously obtained, the detection program corresponding to the 8th update controls the packet loss rate of the blockchain runtime to be 50%, and the block generation speed in the obtained running state data is outside the corresponding preset range (that is, the block cannot be normally generated, and the blockchain node cannot generate blocks), so that the obtained running state data represents that the blockchain is in an abnormal running state. Therefore, the index exploration test of the packet loss rate can be ended, and it can be determined that the index reference interval of the packet loss rate is 0 to 45%.

[0133] In the embodiment of the present application, the specific implementation process of step S506 can refer to the specific implementation process of step S404, which will not be repeated here.

[0134] In the embodiment of the present application, the specific implementation process of step S506 can refer to the specific implementation process of step S404, which will not be repeated here.

[0135] In a specific implementation, Figure 6 In the example, the process of generating a detection program each time and obtaining running state data through the detection program can be called an index exploration test. Please refer to FIG. 7, which shows a structural schematic diagram of an index exploration test device. As shown in FIG. 7, Figure 7 , a structural schematic diagram of an index exploration test device is shown. As shown in FIG. 7, Figure 7 The index exploration test device 701 can be deployed in a server, and the index exploration test device 701 can include a test arrangement module 702, a test injection module 703, a data recording module 704, an exploration detection module 705, and a test adjustment module 706.

[0136] The test arrangement module 702 is mainly used to provide the ability to configure the network index to be detected and the index detection method. Please refer to FIG. 8, which shows a functional schematic diagram of a test arrangement module. As shown in FIG. 8, Figure 8 The test arrangement module 702 includes a test combination method and a network index. Figure 8

[0137] Each network index in the network index part is pre-set with a corresponding program startup script. The administrator can select one or more network indexes from the network index part as the network index to be detected according to the needs. Each network index type in the network index part can further classify new network indexes for specific operations or scenarios. For example, the network index type of network packet loss can further classify network indexes such as packet loss rate and packet loss quantity.

[0138] ​Additionally, administrators can configure the testing methods for network metrics under test through the test combination method. Multiple network metrics can be combined in different ways to conduct metric exploration tests according to network requirements; alternatively, metric exploration tests can be conducted separately for each network metric under test.

[0139] Specifically, when an administrator selects only one network metric to be tested, they can choose to perform a single test; and when an administrator selects multiple network metrics to be tested, they can choose to perform a combined test, and further configure the testing order of the multiple network metrics to be tested by selecting serial or parallel methods.

[0140] In addition, administrators can configure one or more of the following information through the planned test run section of the test combination method: test start time, test end time, test duration, target (i.e., the blockchain node running the test program), direction of action, indicator value change information, etc. for the indicator exploration test for the network indicator to be tested.

[0141] After the administrator completes the configuration, the test orchestration module 702 can generate the blockchain detection configuration information and send it to the test injection module 703. Please see the appendix. Figure 9 This illustrates a functional diagram of a test injection module. For example... Figure 9 As shown, after receiving the detection configuration information, the test injection module 703 can first obtain the deployment method of the blockchain, and then obtain the program startup script adapted to the deployment method from the program startup script corresponding to the network indicator to be detected in the detection configuration information. Then, it updates the adapted program startup script based on the detection configuration information to obtain the updated program startup script, thereby completing the test injection.

[0142] If the blockchain is deployed in a containerized manner, the test injection module 703 can deploy the detection program to the blockchain in the form of a container based on the detection configuration information, YAML file, and updated program startup script; if the blockchain is deployed in a standalone manner (also known as bare-metal deployment), the detection program can be run in the blockchain through the corresponding program startup script and tc command.

[0143] At the same time, the test injection module 703 can also record test data related to the detection program running this time; the test data may include one or more of the following: network indicators to be detected, target, direction of action, indicator value change information, program start time, program runtime, etc.

[0144] In the process of detecting the program running in the blockchain, the data recording module 704 saves the data related to the current index exploration test, and provides data support for the subsequent test adjustment module.

[0145] In a specific implementation, the data recording module 704 mainly includes two parts: data recording and event recording. The data recording part mainly records the configuration data of the current index exploration test, such as the network index to be detected, the object of action, the direction of action, the parameter value of the index parameter, etc. The event recording part mainly records the running state data of the blockchain in the process of checking program control, and the program start time of the detection program, the running time of the detection program, the detection pause time of the detection program, the detection recovery time of the detection program, the stop running time of the detection program, etc.

[0146] The running state data is mainly obtained by the exploration detection module 705. Please refer to FIG. 7B, which shows a functional schematic diagram of an exploration detection module. As shown in FIG. 7B, the exploration detection module 705 mainly includes three parts: exploring the running state of the blockchain, obtaining the running state data, and notifying the update of the index exploration test. Among them, exploring the running state of the blockchain is to judge whether the blockchain is in a normal running state. Figure 10 Figure 10 Specifically, the code for obtaining the running state data and the logical judgment code for judging whether each performance parameter in the running state data is within the corresponding preset range can be added in the program start script. Then, the exploration detection module 705 can obtain the running state data through the detection program and judge whether the running state data represents that the blockchain is in a normal running state (for example, the blockchain node is normally alive, there is no error in the blockchain log, the blockchain can continuously send transactions and normally generate blocks, etc.). When the detection program stops running, the exploration detection module 705 can obtain the running state data of the detection program from the start of running to the stop of running.

[0147] If the detection program does not detect the running state data representing that the blockchain is in an abnormal running state during the running process of the blockchain, the exploration detection module 705 can obtain the running state data of the detection program from the start of running to the stop of running, and notify the test adjustment module 706 that there is no exception in this index exploration test.

[0148] If the detection program detects the running state data representing that the blockchain is in an abnormal running state during the running process of the blockchain, the exploration detection module 705 can send the running state data representing that the blockchain is in an abnormal running state to the test adjustment module 706.

[0149] If the detection program detects the running state data representing that the blockchain is in an abnormal running state during the running process of the blockchain, the exploration detection module 705 can send the running state data representing that the blockchain is in an abnormal running state to the test adjustment module 706.

[0150] ​The test adjustment module 706 mainly updates the parameter value of the index parameter according to the adjustment rule of the index value in the index value change information based on the notification information or data sent by the exploration detection module 705, and notifies the test arrangement module to perform the next index exploration test.

[0151] Specifically, please refer to the accompanying drawings Figure 11 , which shows a functional schematic diagram of a test adjustment module. As shown in Figure 11 , the test adjustment module 706 stores index value change information and contains two functions of script updating and notification of test arrangement.

[0152] If the exploration detection module 705 notifies the test adjustment module 706 that the current index exploration test does not have an abnormality, the test adjustment module 706 can store the reference value controlled by the detection program that has just ended running, and can call the stored index value change information to adjust the reference value controlled by the detection program that has just ended running to obtain a new reference value. Then, the test adjustment module 706 can send the new reference value to the test arrangement module 702, so that the test arrangement module 702 assigns the corresponding program start script through the new reference value, so that the detection program that runs next controls the blockchain to run the index value of the network index to be detected to be the new reference value.

[0153] If the test adjustment module 706 receives the running state data representing that the blockchain is in an abnormal running state sent by the exploration detection module 705, the test adjustment module 706 can generate the index reference interval of the network index to be detected based on the historically stored reference value.

[0154] In this way, the index value of the network index to be detected can be automatically adjusted through the running state data of the blockchain, and a new index exploration test can be performed. Through multiple index exploration tests, the boundary value of the network index to be detected can be explored, so as to obtain the index reference interval of the network index to be detected that can guarantee the stable running of the blockchain.

[0155] Optionally, the test adjustment module 706 can also send the running state data representing that the blockchain is in an abnormal running state and the reference value controlled by the detection program that has just ended running to the administrator, so that the administrator can prevent the unstable running of the blockchain. Optionally, the index reference interval can also be sent to the administrator.

[0156] The operation state data representing that the blockchain is in an abnormal operation state and the corresponding reference value, index reference interval and other test results are fed back to the relevant personnel such as R&D and testing, so that different personnel can decide whether to deploy services to the blockchain, whether to modify the operation environment of the blockchain, and the like according to the actual business needs. At the same time, the relevant management personnel can avoid the risk of online failure due to unreasonable index setting in actual business according to the index reference interval, and the operation state data representing that the blockchain is in an abnormal operation state can expose and solve the problems of the blockchain in advance, so that the relevant management personnel can prevent potential problems.

[0157] In general, please refer to the accompanying drawings Figure 12 , which shows a process diagram of index exploration testing. As shown in Figure 12 , steps 1201 to 1202 can be mainly executed by the test arrangement module 702. Steps 1203 to 1204 to 1206, and step 1209 are mainly executed by the test injection module 703. Steps 1207 and 1210 are mainly executed by the data recording module 704. Steps 1208, 1211 and 1212 are mainly executed by the exploration detection module 705. Steps 1213 and 1214 are mainly executed by the test adjustment module 706. The specific implementation process of the related steps can be referred to the specific implementation process of the corresponding module, which is not described here.

[0158] In short, there will be multiple index exploration tests for the network index to be detected. Each index exploration test will explore the operation state of the blockchain when the network index to be detected is controlled to be a certain value. According to the value controlled by each index exploration test and the index value change information, the value controlled by the next index exploration test can be automatically adjusted, so as to realize the continuous exploration of the blockchain under various conditions; and finally the index reference interval that can guarantee the stable operation of the blockchain is obtained.

[0159] In addition, as long as the blockchain deployed on the server can explore the index reference interval of various network indexes through the example scheme, the example scheme has universality. At the same time, the example scheme can also flexibly adopt different test injection methods according to different deployment methods of the blockchain, which has great application prospect.

[0160] In the embodiments of the present application, the mode of controlling the index value of the to-be-detected network index of the blockchain runtime by the plurality of detection programs to be different reference values can explore the real running state of the blockchain under different values of the to-be-detected network index. In this way, the reference value corresponding to the running state data representing the normal running state of the blockchain can be a real and accurate index reference interval that can guarantee the normal and stable running of the blockchain, thereby achieving the purpose of obtaining network conditions that guarantee the stable running of the blockchain. In addition, the embodiments of the present application automatically obtain and run the detection programs through the program startup script, which is conducive to improving the exploration efficiency of the index reference interval. At the same time, the embodiments of the present application also automatically update the index parameters in the program startup script through the index value change information, which is conducive to subsequently automatically generating detection programs for controlling different reference values, thereby facilitating the simplification of the process and the improvement of the exploration efficiency of the index reference interval.

[0161] The device embodiments of the present application are introduced here and can be used to execute the data processing method of the blockchain in the above-mentioned embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the above-mentioned embodiments of the data processing method of the blockchain.

[0162] The embodiments of the present application provide a data processing device of a blockchain, as shown in Figure 13 The device includes a program acquisition unit 1301, a control unit 1302, a data acquisition unit 1303, and a generation unit 1304, wherein:

[0163] The program acquisition unit 1301 is configured to acquire a plurality of detection programs of a to-be-detected network index.

[0164] The control unit 1302 is configured to control the index value of the to-be-detected network index of the blockchain runtime by each detection program to be each reference value, so that the index value of the to-be-detected network index is different reference values.

[0165] The data acquisition unit 1303 is configured to acquire running state data of the blockchain in the control process of each detection program.

[0166] The generation unit 1304 is configured to generate an index reference interval of the to-be-detected network index of the blockchain based on the reference value corresponding to the running state data representing the normal running state of the blockchain.

[0167] In an embodiment of the present application, based on the foregoing scheme, the program acquisition unit 1301 can also be configured to acquire detection configuration information of the blockchain; wherein the detection configuration information comprises the network indicator to be detected and the indicator value change information of the network indicator to be detected. When acquiring any detection program, the program acquisition unit 1301 is specifically configured to update the parameter value of the indicator parameter in the program startup script of the network indicator to be detected based on the indicator value change information, to obtain an updated program startup script; and run any detection program in the blockchain through the updated program startup script; wherein the parameter value of the indicator parameter in the updated program startup script matches the reference value controlled by any detection program.

[0168] In an embodiment of the present application, based on the foregoing scheme, when acquiring a plurality of detection programs of the network indicator to be detected, the program acquisition unit 1301 can be specifically configured to: if the running state data corresponding to the previous detection program running before any detection program is used to represent that the blockchain is in a normal running state, trigger the step of updating the parameter value of the indicator parameter in the program startup script of the network indicator to be detected based on the indicator value change information, to obtain an updated program startup script; and if the running state data corresponding to the previous detection program is used to represent that the blockchain is in an abnormal running state, trigger the step of generating an indicator reference interval of the blockchain for the network indicator to be detected based on the reference value corresponding to the running state data representing that the blockchain is in a normal running state.

[0169] In an embodiment of the present application, the program startup script contains an executable file identifier corresponding to the detection program of the network indicator to be detected; based on the foregoing scheme, when running any detection program in the blockchain through the updated program startup script, the program acquisition unit 1301 can be specifically configured to: if the deployment mode of the blockchain is container deployment, acquire a deployment template file corresponding to the network indicator to be detected; update the deployment template file based on the detection configuration information and the image identifier of the target image required for running the detection program of the network indicator to be detected, to obtain a program deployment description file of the network indicator to be detected; call the updated program startup script to acquire the executable file indicated by the file identifier in the updated program startup script; and deploy any detection program to the blockchain based on the program deployment description file, the executable file and the indicator parameter in the updated program startup script.

[0170] In an embodiment of the present application, based on the foregoing scheme, the program acquisition unit 1301 can be specifically configured to, when running any detection program in the blockchain based on the updated program startup script, if the deployment mode of the blockchain is single-machine deployment, load the updated program startup script, assign the network control instruction of the to-be-detected network indicator based on the index parameter in the updated program startup script, and obtain the assigned network control instruction; and execute the assigned network control instruction to run any detection program in the blockchain.

[0171] In an embodiment of the present application, based on the foregoing scheme, the program acquisition unit 1301 can be specifically configured to, when obtaining the updated program startup script based on the index value change information and updating the parameter value of the index parameter in the program startup script of the to-be-detected network indicator, obtain the parameter value of the index parameter in the program startup script obtained by the last update; adjust the obtained parameter value based on the index value change information to obtain a new parameter value; and assign the index parameter in the program startup script of the to-be-detected network indicator by using the new parameter value to obtain the updated program startup script.

[0172] In an embodiment of the present application, the detection configuration information contains a plurality of to-be-detected network indicators, and further contains index value change information of each to-be-detected network indicator; based on the foregoing scheme, the program acquisition unit 1301 can be specifically configured to, when obtaining the updated program startup script based on the index value change information and updating the parameter value of the index parameter in the program startup script of each to-be-detected network indicator, update the parameter value of the index parameter in the program startup script of each to-be-detected network indicator based on the index value change information of each to-be-detected network indicator to obtain a target program startup script of each to-be-detected network indicator; and obtain the updated program startup script based on the target program startup scripts of the plurality of to-be-detected network indicators.

[0173] In an embodiment of the present application, the detection configuration information further includes a detection sequence of a plurality of to-be-detected network indicators; based on the foregoing scheme, the program acquisition unit 1301 can be specifically configured to, when obtaining the updated program startup script based on the target program startup scripts of the plurality of to-be-detected network indicators, splice the target program startup scripts of each to-be-detected network indicator to obtain a spliced program startup script; splice the script identifiers of the target program startup scripts corresponding to each to-be-detected network indicator according to the detection sequence of each to-be-detected network indicator to obtain an identifier list; add a detection sequence parameter in the spliced program startup script, and assign the detection sequence parameter by using the identifier list to obtain the updated program startup script.

[0174] In an embodiment of the present application, the detection configuration information further includes a detection duration, and the program starting script further includes a running duration parameter; based on the foregoing scheme, when the program obtaining unit 1301 updates the parameter value of the index parameter in the program starting script of the to-be-detected network index based on the index value change information to obtain the updated program starting script, the specific operation can be as follows: in the process of updating the parameter value of the index parameter in the program starting script of the to-be-detected network index based on the index value change information, the parameter value of the running duration parameter in the program starting script of the to-be-detected network index is updated based on the detection duration to obtain the updated program starting script; when the data obtaining unit 1303 obtains the running state data of the blockchain in the control process of each detection program, the specific operation can be as follows: if the time length between the starting time of each detection program and the current time reaches the detection duration, the running state data generated by the blockchain in the time period from the starting time to the current time is obtained, and the running of each detection program is stopped.

[0175] It should be noted that the apparatus provided in the above embodiments and the method provided in the above embodiments belong to the same concept, and the specific manner in which each module and unit performs operations has been described in detail in the method embodiments, which will not be described here.

[0176] The apparatus provided in the above embodiments can be arranged in a terminal device or a server. Through the apparatus provided in the embodiments of the present application, the index values of the to-be-detected network index of the blockchain running can be controlled to be different reference values by the multiple detection programs, so that the running state data of the blockchain when the index values of the to-be-detected network index are different reference values can be obtained. The running state data can represent whether the blockchain is in a normal running state. As can be seen, through the multiple detection programs, it can be explored that under what conditions of the index values of the to-be-detected network index, the blockchain is in a normal running state, and under what conditions of the index values of the to-be-detected network index, the blockchain is in an abnormal running state. Finally, the running state data corresponding to the reference values used to generate the index reference interval all represent that the blockchain is in a normal running state. Therefore, the index values of the to-be-detected network index in the index reference interval can guarantee the normal and stable running of the blockchain, so as to achieve the purpose of obtaining the network conditions guaranteeing the stable running of the blockchain.

[0177] Embodiments of the present application also provide an electronic device, comprising one or more processors and a storage device, wherein the storage device is configured to store one or more computer programs, and when the one or more computer programs are executed by the one or more processors, the electronic device implements the data processing method of the blockchain as described above.

[0178] Figure 14A structural diagram of a computer system of an electronic device suitable for implementing embodiments of the present application is shown.

[0179] It should be noted that, Figure 14 The computer system 1400 of the electronic device shown is merely an example and should not impose any limitation on the functions and usage range of embodiments of the present application.

[0180] As Figure 14 shown, the computer system 1400 includes a processor (CPU) 1401 which can perform various appropriate actions and processes in accordance with a program stored in a read-only memory (ROM) 1402 or a program loaded from a storage section 1408 into a random access memory (RAM) 1403, such as performing the methods in the above-described embodiments. In the RAM 1403, various programs and data required for system operation are also stored. The CPU 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0181] In some embodiments, the following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, a mouse, etc.; an output section 1407 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as necessary. A removable recording medium 1411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1410 as necessary, so that a computer program read therefrom is installed into the storage section 1408 as necessary.

[0182] In particular, according to the embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer program. For example, the embodiments of the present application include a computer program product including a computer program carried on a computer-readable medium, the computer program containing a computer program for executing the method shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1009, and / or installed from the detachable medium 1011. When the computer program is executed by the processor (CPU) 1001, various functions defined in the system of the present application are executed.

[0183] Note that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium can be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable signal medium can include a data signal propagated in a baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable computer program is carried. Such a propagated data signal can take on many forms, including but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium that can send, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained in the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.

[0184] The flowcharts and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of apparatuses, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may be executed in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams or flowcharts, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer program products.

[0185] The units or modules described in the embodiments of the present application can be implemented by software, or can be implemented by hardware, or can be implemented by a combination of software and hardware. The names of the units or modules do not constitute a limitation on the units or modules themselves in some cases.

[0186] Another aspect of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the data processing method of the blockchain as described above. The computer readable storage medium can be included in the electronic device described in the above embodiments, or can exist separately without being assembled into the electronic device.

[0187] Another aspect of the present application further provides a computer program product, which includes a computer program stored in a computer readable storage medium. The processor of the electronic device reads the computer program from the computer readable storage medium, and the processor executes the computer program to make the electronic device perform the data processing method of the blockchain as described above.

[0188] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, the division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into a plurality of modules or units.

[0189] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with a true scope of the application being indicated by the following claims.

[0190] The above-described embodiments are merely illustrative for the present application and not intended to limit the implementation of the present application. Any modification, variation, or adaptation based on the main idea and spirit of the present application can be easily made by those skilled in the art without departing from the scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope as claimed in the following claims.

Claims

1. A data processing method for blockchain, characterized in that, The method includes: Multiple detection programs to obtain the metrics of the network to be detected; By controlling the operation of the blockchain through various detection programs, the index values ​​of the network indicators to be detected are set to various reference values, so that the index values ​​of the network indicators to be detected are different reference values. Obtain the operational status data of the blockchain during the control process of each detection program; Based on the reference values ​​corresponding to the operating status data used to characterize that the blockchain is in a normal operating state, an index reference range for the blockchain with respect to the network index to be detected is generated.

2. The method according to claim 1, characterized in that, The method further includes: Obtain the detection configuration information of the blockchain; wherein, the detection configuration information includes the network indicator to be detected, and the indicator value change information of the network indicator to be detected; The acquisition process for any detection program includes: Based on the change information of the indicator value, the parameter values ​​of the indicator parameters in the program startup script of the network indicator to be detected are updated to obtain the updated program startup script. The updated program startup script is used to run any of the detection programs in the blockchain; wherein the parameter values ​​of the indicator parameters in the updated program startup script match the reference values ​​controlled by any of the detection programs.

3. The method according to claim 2, characterized in that, The multiple detection procedures for obtaining the network metrics to be detected include: If the running status data corresponding to the previous detection program that ran before any of the detection programs is used to characterize that the blockchain is in a normal running state, then the step of updating the parameter values ​​of the indicator parameters in the program startup script of the network indicator to be detected based on the indicator value change information is triggered to obtain the updated program startup script. If the running status data corresponding to the previous detection procedure is used to characterize that the blockchain is in an abnormal running state, then the step of generating the index reference range of the blockchain with respect to the network index to be detected is triggered based on the reference value corresponding to the running status data used to characterize that the blockchain is in a normal running state.

4. The method according to claim 2, characterized in that, The program startup script contains the executable file identifier corresponding to the detection program for the network metric to be detected; running any of the detection programs in the blockchain using the updated program startup script includes: If the blockchain is deployed using a container, then obtain the deployment template file corresponding to the network metric to be detected; Based on the detection configuration information and the image identifier of the target image required to run the detection program of the network metric to be detected, the deployment template file is updated to obtain the program deployment description file of the network metric to be detected. Invoke the updated program startup script to obtain the executable file indicated by the file identifier in the updated program startup script; Based on the program deployment description file, the executable file, and the indicator parameters in the updated program startup script, any one of the detection programs is deployed to the blockchain.

5. The method according to claim 2, characterized in that, The step of running any of the detection programs in the blockchain via the updated program startup script includes: If the blockchain is deployed as a single machine, the updated program startup script is loaded, and the network control command of the network indicator to be detected is assigned a value based on the indicator parameters in the updated program startup script, so as to obtain the assigned network control command. Execute the network control instructions after the assignment to run any of the detection programs in the blockchain.

6. The method according to claim 2, characterized in that, The step of updating the parameter values ​​of the indicator parameters in the program startup script of the network indicator to be detected based on the indicator value change information to obtain the updated program startup script includes: Retrieve the parameter values ​​of the metrics in the program startup script obtained from the last update; The obtained parameter values ​​are adjusted based on the changes in the indicator values ​​to obtain new parameter values; The updated program startup script is obtained by assigning the new parameter values ​​to the indicator parameters in the program startup script of the network indicator to be detected.

7. The method according to claim 2, characterized in that, The detection configuration information includes multiple network metrics to be detected, and also includes metric value change information for each network metric to be detected. Based on the metric value change information, the parameter values ​​of the metric parameters in the program startup script of the network metric to be detected are updated to obtain the updated program startup script, including: Based on the indicator value change information of each network indicator to be detected, the parameter values ​​of the indicator parameters in the program startup script of each network indicator to be detected are updated to obtain the target program startup script of each network indicator to be detected. The updated program startup script is obtained based on the target program startup script with multiple network metrics to be detected.

8. The method according to claim 7, characterized in that, The detection configuration information also includes the detection order of the multiple network metrics to be detected; the updated program startup script, obtained based on the target program startup script of the multiple network metrics to be detected, includes: The target program startup scripts of each of the network metrics to be detected are concatenated to obtain the concatenated program startup script. According to the detection order of each network indicator to be detected, the script identifiers of the target program startup scripts corresponding to each network indicator to be detected are concatenated to obtain an identifier list; Add a detection order parameter to the concatenated program startup script, and assign values ​​to the detection order parameter using the identifier list to obtain the updated program startup script.

9. The method according to claim 2, characterized in that, The detection configuration information also includes the detection duration, and the program startup script also includes a runtime parameter; the step of updating the parameter values ​​of the indicator parameters in the program startup script of the network indicator to be detected based on the indicator value change information to obtain the updated program startup script includes: During the process of updating the parameter values ​​of the indicator parameters in the program startup script of the network indicator to be detected based on the indicator value change information, the parameter values ​​of the runtime parameters in the program startup script of the network indicator to be detected are updated based on the detection duration, so as to obtain the updated program startup script. The step of obtaining the operational status data of the blockchain during the control process of each detection program includes: If the time between the start time of each detection program and the current time reaches the detection duration, the operating status data generated by the blockchain during the time period from the start time to the current time is obtained, and the operation of each detection program is stopped.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: If the network state of the blockchain is detected to be abnormal, the time when the network state is detected to be abnormal will be marked as the detection pause time. If the network state of the blockchain is detected to have changed from the abnormal state to the normal state, the time when the network state is detected to have changed to the normal state is marked as the detection recovery time. The operational status data acquired during the detection pause time to the detection recovery time will be marked as abnormal data.

11. A data processing device for blockchain, characterized in that, The device includes a program acquisition unit, a control unit, a data acquisition unit, and a generation unit, wherein: The program acquisition unit is used to acquire multiple detection programs for the network metrics to be detected; The control unit is used to control the index value of the network indicator to be detected during the operation of the blockchain through various detection programs, so that the index value of the network indicator to be detected is different reference value. The data acquisition unit is used to acquire the operating status data of the blockchain during the control process of each detection program; The generation unit is used to generate an index reference range for the blockchain regarding the network index to be detected, based on the reference value corresponding to the operating status data used to characterize the blockchain as being in normal operating condition.

12. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the blockchain data processing method as described in any one of claims 1 to 10.

13. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the blockchain data processing method as described in any one of claims 1 to 10.