Permissive block chain network parameter tuning system and method under solar erosion attack

Through regression analysis and deep reinforcement learning algorithms, screening and tuning the permissioned blockchain network parameters, the problem of poor adjustment effect of eclipse attacks in the existing technology is solved, and real-time and effective network parameter adjustment and performance improvement are achieved. .

CN119324830AInactive Publication Date: 2025-01-17SUN YAT SEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411559769.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-01-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing licensed blockchain network tuning system for solar eclipse attacks has poor system tuning effect due to incomplete rules and cannot be adjusted in real time.

Method used

Using regression analysis technology and deep reinforcement learning algorithm, the attacker simulates solar eclipse attack, the data filter controller filters the target network indicators and parameters, and the multi-agent automatic tuning device adjusts the parameters based on the target performance indicators and network indicators to determine the target Licensed blockchain network parameters.

Benefits of technology

Without relying on expert knowledge and predefined rule sets, the system tuning effect is improved, and network parameters can be adjusted in real time in complex or dynamically changing environments, improving network performance and reducing resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119324830A_ABST
    Figure CN119324830A_ABST
Patent Text Reader

Abstract

The invention discloses a permission block chain network parameter tuning system and method under solar erosion attack. The permission block chain network parameter tuning system comprises an attacker, a data filtering controller and a multi-agent automatic tuning device, the attacker is used for carrying out solar erosion attack on the initial permission block chain network and determining a target performance index and a plurality of initial network indexes; the data filtering controller is used for screening each initial network index, a plurality of initial network parameters corresponding to each initial network index and a plurality of initial network parameters corresponding to the target performance index by adopting a regression analysis technology, and determining a target network index and a plurality of target network parameters; the multi-agent automatic tuner is used for determining a plurality of target permission block chain network parameters based on a deep reinforcement learning algorithm; the technical problem that the existing permission block chain network tuning system aiming at the solar erosion attack is poor in system tuning effect due to the fact that the rule is imperfect and cannot be adjusted in real time is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a system and method for tuning parameters of a permissioned blockchain network under an eclipse attack. Background Art

[0002] As a distributed ledger technology, blockchain, with its decentralized, tamper-proof, and secure characteristics, is widely used in a variety of fields, including digital currency, supply chain management, and the Internet of Things. Permissioned blockchains, also known as private or consortium blockchains, are a specialized form of blockchain technology. Unlike traditional public blockchains, participating nodes in permissioned blockchains are authorized, allowing only specific organizations or individuals to join and participate in the blockchain network.

[0003] Eclipse attacks are particularly harmful in permissioned blockchain networks. By controlling the attacked nodes, attackers can instill false information into them. This not only exposes transaction records to tampering, disrupting the consensus process, but also potentially allows attackers to perform double-spending attacks. The consequences of such attacks are extremely severe. Not only do they directly undermine the immutability and transaction uniqueness that permissioned blockchain networks rely on, but they can also cause network partitions, significantly impacting the stability and normal operation of the entire permissioned blockchain network.

[0004] Existing permissioned blockchain network tuning systems for eclipse attacks primarily rely on expert knowledge and predefined rule sets to optimize system configurations. However, these rules rely heavily on the experience of domain experts. In complex or dynamically changing permissioned blockchain network environments, these incomplete rules and the inability to adjust them in real time lead to poor system tuning results. Summary of the Invention

[0005] The present invention provides a system and method for tuning parameters of a permissioned blockchain network under eclipse attacks, which are used to solve the technical problem that the existing permissioned blockchain network tuning system for eclipse attacks has poor system tuning effect due to imperfect rules and the inability to adjust in real time.

[0006] A first aspect of the present invention provides a permissioned blockchain network parameter tuning system under an eclipse attack, comprising an attacker, a data filtering controller, and a multi-agent automatic tuner;

[0007] The attacker is used to perform an eclipse attack on the initial permissioned blockchain network to determine a target performance indicator and multiple initial network indicators;

[0008] The data filtering controller is used to screen each of the initial network indicators, the multiple initial network parameters corresponding to each of the initial network indicators, and the multiple initial network parameters corresponding to the target performance indicators using regression analysis technology to determine the target network indicator and the multiple target network parameters;

[0009] The multi-agent automatic tuner is used to tune each of the target network parameters based on the deep reinforcement learning algorithm using the target performance indicators and the target network indicators to determine the network parameters of multiple target permissioned blockchain networks.

[0010] Furthermore, the multiple initial network indicators include multiple peer node initial network indicators and multiple sorting node initial network indicators; the target network indicator includes a peer node target network indicator and a sorting node target network indicator; the data filtering controller is specifically used to:

[0011] Normalizing a plurality of peer node initial network indicators and a plurality of sorting node initial network indicators to determine a plurality of peer normalized network indicators and a plurality of sorting normalized network indicators;

[0012] Using each of the peer-normalized network indicators and each of the ranking-normalized network indicators, calculate a peer indicator change rate corresponding to each of the peer-normalized network indicators and a ranking indicator change rate corresponding to each of the ranking-normalized network indicators;

[0013] The initial network index of the peer node corresponding to the largest peer index change rate is selected as the target network index of the peer node;

[0014] Select the sorting node initial network index corresponding to the largest sorting index change rate as the sorting node target network index;

[0015] Based on the regression analysis technology, performing importance operations on multiple initial network parameters corresponding to the peer node target network indicator, multiple initial network parameters corresponding to the sorting node target network indicator, and multiple initial network parameters corresponding to the target performance indicator, and calculating target importance values ​​corresponding to the multiple initial network parameters;

[0016] Sorting the target importance values ​​in descending order, selecting the initial network parameters preset in the first number of digits as intermediate network parameters, uniformly sampling and testing the intermediate network parameters, and outputting the average change rate corresponding to the intermediate network parameters;

[0017] The average change rates are sorted in descending order, and the intermediate network parameter with the second number of digits preset before is selected as the target network parameter.

[0018] Furthermore, the deep reinforcement learning algorithm includes an initial actor network and an initial critic network; the multi-agent automatic tuner is specifically used to:

[0019] Using an initial actor network to numerically adjust each of the target network parameters according to the target network indicator and the target performance indicator, and determine a plurality of updated network parameters at the current moment;

[0020] updating the initial permissioned blockchain network using the updated network parameters at the current moment, determining a new initial permissioned blockchain network, using a preset standard test data set as input for the new initial permissioned blockchain network, and outputting an updated network indicator at the current moment and an updated performance indicator at the current moment;

[0021] Calculating a reward value based on the updated network indicator at the current moment and the updated performance indicator at the current moment;

[0022] The reward value, the updated network index at the current moment, the updated network index at the historical moment, the updated performance index at the current moment, the updated performance index at the historical moment, and each updated network parameter at the current moment constitute initial experience data, and are placed into an experience replay buffer in the data filtering controller; the experience replay buffer includes a plurality of initial experience data;

[0023] Selecting target experience data from the experience replay buffer by the data filtering controller based on the limited experience replay mechanism;

[0024] Using the initial critic network to evaluate the target experience data, outputting a target evaluation value, and using the target evaluation value to update the network parameters of the initial critic network to determine an intermediate critic network;

[0025] Calculating a gradient based on the target experience data and the target evaluation value;

[0026] Using the gradient to update the network parameters of the initial actor network, determine the intermediate actor network, and count the number of iterations in real time;

[0027] Determining whether the number of iterations reaches a preset update threshold;

[0028] If achieved, the intermediate actor network is used as the trained target actor network;

[0029] The trained target actor network is used to numerically adjust each target network parameter according to the target network indicator and the target performance indicator to determine multiple target permission blockchain network parameters.

[0030] Furthermore, the multi-agent automatic tuner is also used to:

[0031] If the number of iterations does not reach the preset update threshold, the intermediate actor network is used as a new initial actor network, and the intermediate critic network is used as a new initial critic network;

[0032] updating the network parameters of the new initial actor network and the network parameters of the new initial critic network according to the target performance indicator, the target network indicator, and each target network parameter, and determining an intermediate actor network and an intermediate critic network until the number of iterations reaches the preset update threshold;

[0033] The intermediate actor network determined when the number of iterations reaches the preset update threshold is used as the trained target actor network;

[0034] The trained target actor network is used to numerically adjust each target network parameter according to the target network indicator and the target performance indicator to determine multiple target permission blockchain network parameters.

[0035] A second aspect of the present invention provides a method for tuning parameters of a permissioned blockchain network under an eclipse attack, which is applied to any of the above-mentioned permissioned blockchain network parameter tuning systems under an eclipse attack. The method comprises:

[0036] Conduct an eclipse attack on an initial permissioned blockchain network, identifying target performance metrics and multiple initial network metrics;

[0037] Using regression analysis technology to screen the initial network indicators, the multiple initial network parameters corresponding to the initial network indicators, and the multiple initial network parameters corresponding to the target performance indicators, to determine the target network indicators and the multiple target network parameters;

[0038] Based on a deep reinforcement learning algorithm, the target performance indicators and the target network indicators are used to tune the target network parameters to determine multiple target permissioned blockchain network parameters.

[0039] Furthermore, the multiple initial network indicators include multiple peer node initial network indicators and multiple sorting node initial network indicators; the target network indicator includes a peer node target network indicator and a sorting node target network indicator; the step of using regression analysis technology to screen each of the initial network indicators, multiple initial network parameters corresponding to each of the initial network indicators, and multiple initial network parameters corresponding to the target performance indicator to determine the target network indicator and multiple target network parameters includes:

[0040] Normalizing a plurality of peer node initial network indicators and a plurality of sorting node initial network indicators to determine a plurality of peer normalized network indicators and a plurality of sorting normalized network indicators;

[0041] Using each of the peer-normalized network indicators and each of the ranking-normalized network indicators, calculate a peer indicator change rate corresponding to each of the peer-normalized network indicators and a ranking indicator change rate corresponding to each of the ranking-normalized network indicators;

[0042] The initial network index of the peer node corresponding to the largest peer index change rate is selected as the target network index of the peer node;

[0043] Select the sorting node initial network index corresponding to the largest sorting index change rate as the sorting node target network index;

[0044] Based on the regression analysis technology, performing importance operations on multiple initial network parameters corresponding to the peer node target network indicator, multiple initial network parameters corresponding to the sorting node target network indicator, and multiple initial network parameters corresponding to the target performance indicator, and calculating target importance values ​​corresponding to the multiple initial network parameters;

[0045] Sorting the target importance values ​​in descending order, selecting the initial network parameters preset in the first number of digits as intermediate network parameters, uniformly sampling and testing the intermediate network parameters, and outputting the average change rate corresponding to the intermediate network parameters;

[0046] The average change rates are sorted in descending order, and the intermediate network parameter with the second number of digits preset before is selected as the target network parameter.

[0047] Furthermore, the deep reinforcement learning algorithm includes an initial actor network and an initial critic network; and the step of tuning each of the target network parameters using the target performance indicator and the target network indicator based on the deep reinforcement learning algorithm to determine the network parameters of multiple target permissioned blockchain networks includes:

[0048] Using an initial actor network to numerically adjust each of the target network parameters according to the target network indicator and the target performance indicator, and determine a plurality of updated network parameters at the current moment;

[0049] updating the initial permissioned blockchain network using the updated network parameters at the current moment, determining a new initial permissioned blockchain network, using a preset standard test data set as input for the new initial permissioned blockchain network, and outputting an updated network indicator at the current moment and an updated performance indicator at the current moment;

[0050] Calculating a reward value based on the updated network indicator at the current moment and the updated performance indicator at the current moment;

[0051] The reward value, the updated network index at the current moment, the updated network index at the historical moment, the updated performance index at the current moment, the updated performance index at the historical moment, and each updated network parameter at the current moment constitute initial experience data, and are placed into an experience replay buffer in the data filtering controller; the experience replay buffer includes a plurality of initial experience data;

[0052] Selecting target experience data from the experience replay buffer by the data filtering controller based on the limited experience replay mechanism;

[0053] Using the initial critic network to evaluate the target experience data, outputting a target evaluation value, and using the target evaluation value to update the network parameters of the initial critic network to determine an intermediate critic network;

[0054] Calculating a gradient based on the target experience data and the target evaluation value;

[0055] Using the gradient to update the network parameters of the initial actor network, determine the intermediate actor network, and count the number of iterations in real time;

[0056] Determining whether the number of iterations reaches a preset update threshold;

[0057] If achieved, the intermediate actor network is used as the trained target actor network;

[0058] The trained target actor network is used to numerically adjust each target network parameter according to the target network indicator and the target performance indicator to determine multiple target permission blockchain network parameters.

[0059] A third aspect of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in any one of the above items.

[0060] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed, implements the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in any one of the above items.

[0061] A fifth aspect of the present invention provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, wherein when the program instructions are executed by a computer, the computer is caused to perform the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in any one of the above items.

[0062] It can be seen from the above technical solutions that the present invention has the following advantages:

[0063] The first aspect of the above technical solution of the present invention provides a permissioned blockchain network parameter tuning system under an eclipse attack, the system comprising an attacker, a data filtering controller, and a multi-agent automatic tuner. The attacker is configured to perform an eclipse attack on an initial permissioned blockchain network to determine a target performance indicator and multiple initial network indicators. The data filtering controller is configured to use regression analysis techniques to screen each initial network indicator, multiple initial network parameters corresponding to each initial network indicator, and multiple initial network parameters corresponding to the target performance indicator to determine a target network indicator and multiple target network parameters. The multi-agent automatic tuner is configured to use a deep reinforcement learning algorithm to tune each target network parameter using the target performance indicator and the target network indicator to determine multiple target permissioned blockchain network parameters. Based on the above solution, the data filtering controller uses regression analysis techniques to screen the target network indicators and target network parameters, and then uses the multi-agent automatic tuner based on deep reinforcement learning to tune the target network parameters based on the target performance indicator, target network indicator, and target network parameters to determine the target permissioned blockchain network parameters. This process does not require reliance on expert knowledge and predefined rule sets, thereby improving the system tuning effect.

[0064] A second aspect of the technical solution of the present invention provides a method for tuning parameters of a permissioned blockchain network under an eclipse attack. The method comprises: performing an eclipse attack on an initial permissioned blockchain network to determine a target performance indicator and multiple initial network indicators; employing regression analysis to screen each initial network indicator, multiple initial network parameters corresponding to each initial network indicator, and multiple initial network parameters corresponding to the target performance indicator to determine a target network indicator and multiple target network parameters; and employing a deep reinforcement learning algorithm to tune each target network parameter using the target performance indicator and target network indicator to determine multiple target permissioned blockchain network parameters. Based on the above scheme, regression analysis is employed to screen the target network indicators and target network parameters, and then deep reinforcement learning is used to tune the target network parameters based on the target performance indicator, target network indicator, and target network parameters to determine the target permissioned blockchain network parameters. This process eliminates the need for expert knowledge and predefined rule sets, thereby improving system tuning effectiveness. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0066] Figure 1 A schematic diagram of the structure of a permissioned blockchain network parameter tuning system under an eclipse attack provided in Example 1 of the present invention;

[0067] Figure 2 This is a diagram showing the overall architecture of a permissioned blockchain network parameter tuning system under eclipse attack provided in Example 1 of the present invention;

[0068] Figure 3 A schematic diagram of the deep reinforcement learning algorithm architecture used by the multi-agent automatic tuner provided in Example 1 of the present invention;

[0069] Figure 4 This is a flowchart of the steps of a method for tuning the parameters of a permissioned blockchain network under an eclipse attack provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0070] The embodiments of the present invention provide a system and method for tuning parameters of a permissioned blockchain network under eclipse attacks, which are used to solve the technical problem that the existing permissioned blockchain network tuning system for eclipse attacks has poor system tuning effects due to imperfect rules and the inability to adjust in real time.

[0071] In order to make the purpose, features, and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0072] Explanation of terms:

[0073] Blockchain: A shared database in which the data or information stored has the characteristics of being "unforgeable", "traceable", "open and transparent", and "collectively maintained".

[0074] Permissioned Blockchain: A permissioned blockchain is a blockchain that restricts access and operation permissions. Only authorized participants can join the network, verify transactions, and access data.

[0075] Hyperledger Fabric: An open-source, enterprise-grade permissioned blockchain framework that supports a modular architecture, customizable consensus mechanisms, and privacy controls for secure and efficient transaction processing and data sharing across enterprises. In a Fabric network, network nodes are categorized as peer nodes and ordering nodes, with multiple nodes forming distinct organizations.

[0076] Gossip protocol: A decentralized communication protocol that allows nodes to randomly select partners to exchange information, so that data in the network gradually spreads and synchronizes among all nodes, similar to how a virus spreads in a group.

[0077] Eclipse Attack: An eclipse attack is an attack method against a blockchain network. By controlling and isolating the network connection of a target node, the attacker can manipulate the node's view of the blockchain, thereby affecting its transaction behavior or consensus decision-making.

[0078] Multi-Agent Deep Deterministic Policy Gradient (MADDPG) algorithm: A reinforcement learning algorithm that allows multiple agents to learn optimal policies through cooperation or competition in a shared environment, using deterministic policies and policy gradients for training.

[0079] See also Figure 1 , Figure 1 This is a schematic diagram of the structure of a permissioned blockchain network parameter tuning system under an eclipse attack provided in Example 1 of the present invention.

[0080] The present invention provides a permissioned blockchain network parameter tuning system under eclipse attack, including an attacker, a data filtering controller, and a multi-agent automatic tuner;

[0081] An attacker, used to conduct an eclipse attack on the initial permissioned blockchain network, determining the target performance metric and multiple initial network metrics;

[0082] It should be noted that the attacker simulated an eclipse attack on a permissioned blockchain network. Typically, an eclipse attack is implemented by continuously sending messages such as ping, pong, and node connection to target nodes in the network. This attack continuously attacks the initial permissioned blockchain network while the target network parameters are being tuned, forcing the node to restart and controlling all its connections. The present invention has developed a Python script that continuously sends messages from the attacker's Docker container to the target node. The Python script can be referenced from existing Python code and will not be further detailed in this invention.

[0083] a data filtering controller, configured to screen each initial network indicator, a plurality of initial network parameters corresponding to each initial network indicator, and a plurality of initial network parameters corresponding to a target performance indicator using a regression analysis technique, and determine a target network indicator and a plurality of target network parameters;

[0084] A multi-agent automatic tuner is used to tune each target network parameter based on a deep reinforcement learning algorithm using target performance indicators and target network indicators, and to determine the network parameters of multiple target permissioned blockchain networks.

[0085] The initial permissioned blockchain network consists of multiple peer nodes and multiple ordering nodes.

[0086] The regression analysis technique is the Least Absolute Shrinkage and Selection Operator (LASSO algorithm).

[0087] The target performance indicators include network throughput and transaction confirmation latency. These two indicators are related to network performance and therefore do not need to be screened. After the eclipse attack on the node, these two indicators are directly selected from all indicators as target performance indicators, and the remaining indicators are used as initial network indicators.

[0088] It should be noted that, referring to Figure 1-Figure 2The system consists of an attacker, a data filtering controller, and a multi-agent auto-tuner. The data filtering controller consists of a database, a parameter filter, and a controller. The parameter filter performs a final importance ranking for the multiple network parameters corresponding to each selected network metric. This is done by multiplying the initial importance value of each initial network parameter by the same weighting coefficient as the reward function to obtain a target importance value for each parameter and then performing an overall parameter ranking for all target importance values. For the parameters in the first digit of the pre-set parameters, these parameters are uniformly sampled and tested, and their rankings are adjusted based on the average rate of change of their performance metrics, ultimately resulting in the parameters in the second digit of the pre-set parameters. The controller is responsible for selecting the target network metric and receiving key parameters (target network parameters), constructing the corresponding action list and state list, and setting the reward function for each agent in the auto-tuner. The choice of controller determines the effectiveness and duration of system training.

[0089] Specifically, if Figure 2 As shown in the figure, the system operation process is as follows: the attacker launches an eclipse attack on the nodes in the initial permission blockchain network, thereby obtaining and storing new indicators, namely the target performance indicator and multiple initial network indicators. Each initial network indicator corresponds to multiple network parameters. The database records the above indicators, that is, based on the obtained multiple initial network indicators, calculates the change rate of each indicator and ranks them based on this. The sorting results are passed to the controller, which selects target indicators for different agents in the multi-agent automatic tuner, that is, selects the indicator corresponding to the largest change rate as the target indicator (the target indicator includes the peer node target network indicator and the sorting node target network indicator). The database uses the least absolute value convergence and selection operator (LASSO) to sort the importance of multiple initial parameters corresponding to the target indicator, outputs the target importance value corresponding to each initial network parameter, and sorts each target importance value in descending order. The initial network parameters with a preset first number of digits are selected as intermediate network parameters. The parameter filter combines the results of the LASSO, that is, the initial network parameters with a preset first number of digits are used as intermediate network parameters. These parameters are uniformly sampled and tested, and are fine-tuned through testing. The average change rate corresponding to each intermediate network parameter is output and sorted in descending order. The intermediate network parameters with a preset second number of digits are selected as the target network parameters based on the final sorting result. The preset first number and the preset second number can be set as needed. For example, the preset first number can be 30 and the preset second number can be 20. The present invention is not limited to this.

[0090] Furthermore, the controller receives the target performance indicator and the selected target network parameters and target network indicators, and sets an action list (consisting of all target network parameters), a state list (consisting of the target performance indicator and target network indicator), and the auto-tuner's reward function. In the multi-agent auto-tuner, peer nodes, sorting nodes, and network agents each determine their own actions and enter them into configuration files. Based on these files, a new blockchain network is deployed and tested using a standard test dataset. Specifically, the multi-agent auto-tuner uses the initial actor network to numerically adjust each target network parameter based on the target network indicator and target performance indicator. It then updates the initial permissioned blockchain network using the updated network parameters obtained at each current moment, determines a new initial permissioned blockchain network, and uses the preset standard test dataset as input for the new initial permissioned blockchain network, outputting the current updated network indicator and the current updated performance indicator. The multi-agent auto-tuner collects new states from the environment (i.e., the current updated network metrics and the current updated performance metrics), calculates corresponding reward data, and stores the reward values, the current updated network metrics, the historical updated network metrics, the current updated performance metrics, the historical updated performance metrics, and the current updated network parameters in an experience replay buffer in the database for training. The process of constructing the critic and actor networks, testing on a standard dataset, collecting data, and training the model is repeated until the number of iterations reaches a preset update threshold. Finally, the auto-tuner recommends the optimal parameters (the target permissioned blockchain network parameters) to the controller and outputs them to the user. The preset update threshold can be set as needed, but the present invention is not limited to this. This can be customized for a specific network configuration. For example, four peer nodes and three ordering nodes can be set to deploy an initial permissioned blockchain network, and its performance metrics under the default configuration and security environment can be recorded in the database, but the present invention is not limited to this.

[0091] It is worth mentioning that the parameter types of the updated network parameters at the current moment are consistent with those of the target network parameters, but the parameter values ​​are different; the parameter types of the updated network indicators at the current moment are consistent with those of the target network indicators, but the parameter values ​​are different; the parameter types of the updated performance indicators at the current moment are consistent with those of the target performance indicators, but the parameter values ​​are different.

[0092] In this embodiment, a network metric may be affected by multiple network parameters, and changes in a single network parameter may also affect multiple network metrics. Therefore, the relationship between network metrics and network parameters is complex, with a many-to-many relationship. Network metrics reflect the impact of adjusting network parameters on network performance and security, and constitute a state list. The target metric is the goal of optimization and is selected from all initial metrics. Metrics related to overall network performance and security, such as network throughput, are used to calculate the reward value. Network parameters are specific adjustable variables in the network protocol. Modifying parameter values ​​may or may not result in changes to the metrics. Therefore, it is necessary to screen parameters and select those with the greatest impact on the metrics for optimization.

[0093] As a further improvement, the multiple initial network indicators include multiple peer node initial network indicators and multiple sorting node initial network indicators; the target network indicator includes a peer node target network indicator and a sorting node target network indicator; the data filtering controller is specifically used to:

[0094] Normalizing a plurality of peer node initial network indicators and a plurality of sorting node initial network indicators to determine a plurality of peer normalized network indicators and a plurality of sorting normalized network indicators;

[0095] Using each peer normalized network indicator and each ranking normalized network indicator, calculate the peer indicator change rate corresponding to each peer normalized network indicator and the ranking indicator change rate corresponding to each ranking normalized network indicator;

[0096] The initial network index of the peer node corresponding to the largest peer index change rate is selected as the target network index of the peer node;

[0097] Select the sorting node initial network index corresponding to the largest sorting index change rate as the sorting node target network index;

[0098] Based on regression analysis technology, importance operations are performed on multiple initial network parameters corresponding to the target network indicators of peer nodes, multiple initial network parameters corresponding to the target network indicators of sorting nodes, and multiple initial network parameters corresponding to the target performance indicators, and target importance values ​​corresponding to the multiple initial network parameters are calculated;

[0099] Sort the importance values ​​of each target in descending order, select the initial network parameters of the first digit preset before as the intermediate network parameters, and uniformly sample and test each intermediate network parameter, and output the average change rate corresponding to each intermediate network parameter;

[0100] The average change rates are sorted in descending order, and the intermediate network parameter with the second number of digits preset before is selected as the target network parameter.

[0101] It should be noted that the database normalizes the initial network indicators of multiple peer nodes and the initial network indicators of multiple sorting nodes to determine multiple peer normalized network indicators and multiple sorting normalized network indicators. Then, using each peer normalized network indicator and each sorting normalized network indicator, the database calculates the peer indicator change rate corresponding to each peer normalized network indicator and the sorting indicator change rate corresponding to each sorting normalized network indicator; wherein the indicator change rate is the change rate of the current indicator compared with the "network indicator when no solar eclipse attack is performed."

[0102] Furthermore, the controller selects a related indicator with the highest change rate as the target indicator for the sorting node and the peer node respectively, that is, the initial network indicator of the peer node corresponding to the largest peer indicator change rate is selected as the target network indicator of the peer node, and the initial network indicator of the sorting node corresponding to the largest sorting indicator change rate is selected as the target network indicator of the sorting node.

[0103] Furthermore, based on the regression analysis technology, the database calculates the initial importance values ​​corresponding to the multiple initial network parameters according to the multiple initial network parameters corresponding to the target network indicators of the peer nodes, the multiple initial network parameters corresponding to the sorting node target network indicators and the multiple initial network parameters corresponding to the target performance indicators, and then determines the target importance value corresponding to each initial network parameter according to the initial importance values ​​corresponding to the multiple initial network parameters and the weighting coefficient of the reward function; wherein, the database uses LASSO to perform an importance sorting on the initial network parameters of each indicator for the adjustable network parameters (collected in advance from the source code and protocol of Changan Chain) to obtain the initial importance value of each initial network parameter. After the above calculation, each initial network parameter will obtain 4 initial importance values, and then, they are multiplied by the preset weighting coefficients to obtain the final importance value (target importance value) of each initial network parameter.

[0104] Furthermore, the parameter filter sorts the importance values ​​of each target in descending order, selects the initial network parameters of the first preset number of digits as the intermediate network parameters, and uniformly samples and tests each intermediate network parameter, and outputs the average change rate corresponding to each intermediate network parameter; sorts each average change rate in descending order, and selects the intermediate network parameters of the second preset number of digits as the target network parameters.

[0105] As a further improvement, the deep reinforcement learning algorithm includes an initial actor network and an initial critic network; a multi-agent automatic tuner, specifically for:

[0106] The initial actor network is used to adjust the values ​​of the target network parameters according to the target network indicators and target performance indicators, and multiple updated network parameters at the current moment are determined;

[0107] Update the initial permission blockchain network using the updated network parameters at each current moment, determine a new initial permission blockchain network, use the preset standard test data set as the input of the new initial permission blockchain network, and output the updated network index at the current moment and the updated performance index at the current moment;

[0108] Calculate the reward value based on the updated network index and the updated performance index at the current moment;

[0109] Initial experience data is formed by combining the reward value, the updated network index at the current moment, the updated network index at the historical moment, the updated performance index at the current moment, the updated performance index at the historical moment, and the updated network parameters at each current moment, and the data is stored in an experience replay buffer in the data filtering controller; the experience replay buffer includes a plurality of initial experience data;

[0110] Selecting target experience data from the experience replay buffer based on a limited experience replay mechanism through a data filtering controller;

[0111] The initial critic network is used to evaluate the target experience data, output the target evaluation value, and use the target evaluation value to update the network parameters of the initial critic network to determine the intermediate critic network;

[0112] Calculate the gradient based on the target experience data and the target evaluation value;

[0113] Use gradient to update the network parameters of the initial actor network, determine the intermediate actor network, and count the number of iterations in real time;

[0114] Determine whether the number of iterations reaches a preset update threshold;

[0115] If achieved, the intermediate actor network is used as the trained target actor network;

[0116] The trained target actor network is used to numerically adjust the target network parameters according to the target network indicators and target performance indicators, and determine the network parameters of multiple target permission blockchain networks.

[0117] It's important to note that the multi-agent autotuner aims to find a set of parameters that minimize the impact of eclipse attacks. By using the Caliper tool to launch benchmark tests and collect data such as throughput, latency, and CPU usage, while also utilizing Prometheus to monitor the blockchain system's internal metrics, the blockchain network tuning process is framed as a deep reinforcement learning problem.

[0118] Furthermore, the architecture of the multi-agent autotuner primarily consists of a blockchain network environment (the initial permissioned blockchain network), agents, states, actions, and reward functions. The initial permissioned blockchain network environment (the Fabric network environment) is deployed based on user requirements. Typically, the user specifies peer nodes, orderers, organizations, and the number of peer nodes per organization. Furthermore, each organization has a certificate authority (CA), and the entire network has a client for sending transactions for benchmarking. The agents are responsible for adjusting strategies based on states and rewards, thereby determining parameters, or actions. In a permissioned blockchain system, peer nodes are divided into different organizations, which typically have different network conditions due to their physical locations. Therefore, the present invention assigns a peer agent and a network agent to each organization. Furthermore, because the orderers operate as a single entity, a leader is selected from all orderers during sorting. Therefore, the entire network has only one orderer agent and its corresponding network agent. Therefore, assuming the number of organizations is N, there are a total of 2N+2 agents. Physical metrics such as memory usage are obtained through Caliper, while internal metrics such as ledger block processing time are obtained from Prometheus. The total number of metrics for peers, peer networks, and orderers is 31, and the total number of metrics for the orderer network is 14. Therefore, the state of centralized training is obtained by concatenating the vectors of all agents into a one-dimensional vector. Assuming a preset second order digit of 20, 20 important parameters are selected as actions based on the final parameter ranking results. These are divided into three categories: 4 peer-related actions, 1 orderer-related action, and 15 network-related actions. The actions given during centralized training are a one-dimensional vector, which is sequentially split into actions for each agent and, during the distributed execution phase, is populated into the permissioned blockchain network configuration file based on agent type.

[0119] Furthermore, assuming that, after screening, the initial network metrics are selected, the target network metric for peer nodes is the cluster-wide message delay, and the target network metric for sorting nodes is the gossip protocol state submission delay. By evaluating the impact of eclipse attacks on permissioned blockchain network metrics, transaction throughput, transaction confirmation delay, cluster-wide message delay, and gossip protocol state submission delay are selected as optimization objectives. The first two are network performance-related metrics, while the latter two are the metrics most impacted by eclipse attacks, reflecting the resource waste caused by eclipse attacks. The reward value for each metric is calculated using an exponential function and multiplied by a coefficient to obtain the combined reward value for the peer, sorting, and network agents. The reward functions for the peer and network agents are composed of transaction throughput, transaction confirmation delay, and cluster-wide message delay, while the reward function for the sorting node agent is composed of transaction throughput, transaction confirmation delay, and gossip protocol state submission delay.

[0120] Furthermore, the target experience data is evaluated by the initial critic network, and a target evaluation value is output. The target evaluation value is used to update the network parameters of the initial critic network to determine the intermediate critic network. Specifically, the loss value is calculated by the target evaluation value, and the network parameters of the initial critic network are updated using the loss value to determine the intermediate critic network. The calculation process of the loss value can be expressed as:

[0121] ;

[0122] in, is the loss value of the i-th agent; K is the number of sampled target experience data; is the target value corresponding to the j-th target experience data; The target evaluation value calculated by the initial critic network under the strategy of the initial actor network for the i-th agent using the action in the j-th target experience data (the updated network parameters at the current moment) and the historical state (the historical state includes the updated network indicators at the historical moment and the updated performance indicators at the historical moment) as input; is the historical moment state in the j-th target experience data, and the historical moment state includes the updated performance index and the updated network index at the historical moment; Update network parameters for the first agent at the current moment in the j-th target experience data; Update network parameters for the 2N+2th agent at the current moment in the jth target experience data; is the reward value of the i-th agent in the j-th target experience data; is the discount factor; The target evaluation value calculated by the initial critic network under the strategy of the initial actor network for the i-th agent using the action (the updated network parameters at the current moment) and the current state (the current state includes the updated network indicators at the current moment and the updated performance indicators at the current moment) in the j-th target experience data as input; is the current state of the j-th target experience data, which includes the updated performance index and the updated network index at the current moment; are the network parameters (actions) of the kth agent generated under the policy of the initial actor network; is the strategy of the initial actor network of the kth agent; is the updated network index and the updated performance index of the k-th agent at the historical moment in the j-th target experience data; The network parameters (actions) of the first agent generated under the strategy of the initial actor network; are the network parameters (actions) of the 2N+2th agent generated under the strategy of the initial actor network.

[0123] Furthermore, the gradient is calculated based on the target experience data and the target evaluation value, and the network parameters of the initial actor network are updated using the gradient to determine the intermediate actor network. The gradient calculation process can be expressed as:

[0124] ;

[0125] in, is the gradient; is the gradient under the agent’s network parameters; is the gradient under the network parameters of the initial blockchain network; is the strategy of the initial actor network of the i-th agent; is the updated network index and updated performance index of the historical moment of the i-th agent in the j-th target experience data; The target evaluation value calculated by the initial critic network under the strategy of the initial actor network for the i-th agent using the action in the j-th target experience data (the updated network parameters at the current moment) and the historical state (the historical state includes the updated network indicators at the historical moment and the updated performance indicators at the historical moment) as input; is the historical moment state in the j-th target experience data, and the historical moment state includes the updated performance index and the updated network index at the historical moment; Update network parameters for the first agent at the current moment in the j-th target experience data; are the network parameters (actions) of the i-th agent generated under the strategy of the initial actor network; Update network parameters for the 2N+2th agent at the current moment in the jth target experience data; is the strategy of the initial actor network of the i-th agent; is the historical state of the i-th agent in the j-th target experience data. The historical state includes the updated network indicators and the updated performance indicators at the historical moments.

[0126] Optionally, it also includes:

[0127] If the number of iterations does not reach the preset update threshold, the intermediate actor network is used as the new initial actor network, and the intermediate critic network is used as the new initial critic network;

[0128] Update the network parameters of the new initial actor network and the new initial critic network according to the target performance index, the target network index and the target network parameters, and determine the intermediate actor network and the intermediate critic network until the number of iterations reaches the preset update threshold;

[0129] The intermediate actor network determined when the number of iterations reaches the preset update threshold is used as the trained target actor network;

[0130] The trained target actor network is used to numerically adjust the target network parameters according to the target network indicators and target performance indicators, and determine the network parameters of multiple target permission blockchain networks.

[0131] It should be noted that if the number of iterations does not reach the preset update threshold, the intermediate actor network will be used as the new initial actor network, and the intermediate critic network will be used as the new initial critic network, and the execution will be jumped to the step of using the initial actor network to numerically adjust the parameters of each target network according to the target network indicators and target performance indicators, and determine multiple steps of updating network parameters at the current moment, until the number of iterations reaches the preset update threshold, and the intermediate actor network determined when the number of iterations reaches the preset update threshold will be used as the trained target actor network; the trained target actor network will be used to numerically adjust the parameters of each target network according to the target network indicators and target performance indicators to determine multiple target permission blockchain network parameters.

[0132] It is worth mentioning that see Figure 3Given a given number of organizations, N, there are 2N+2 agents, including N peer agents (subscripted p), N peer network agents (subscripted n), one sorter agent (subscripted o), and one sorter network agent (subscripted n). Each agent consists of an actor network and a critic network. The actor network takes states as input and generates actions; the critic network is responsible for evaluating the effectiveness of the actions. The scheduler combines all actions and states from the actor network and sends them to the critic network for evaluation. The actor network then uses the evaluation results to optimize the policy. In addition, to improve the utilization rate of network experience, the present invention uses a prioritized experience replay (PER) replay mechanism in the experience replay buffer during the process of selecting target experience data in the experience replay buffer through a data filtering controller based on a limited experience replay mechanism. The experience (initial experience data) is sorted by temporal-difference error (TDER) and reward value as priorities, and the initial experience data with higher priority is selected as the target experience data for network training. The experience replay buffer includes multiple initial experience data, each of which is composed of a reward value corresponding to the number of iterations, an updated network indicator at the current moment, an updated network indicator at a historical moment, an updated performance indicator at the current moment, an updated performance indicator at a historical moment, and updated network parameters at each current moment. The updated network indicator at a historical moment is the updated network indicator at the previous moment, and the updated performance indicator at a historical moment is the updated performance indicator at the previous moment. Assuming the number of iterations is t, the current moment corresponding to the updated network indicator at the current moment is t, and the historical moment corresponding to the updated performance indicator at the historical moment is t-1.

[0133] Furthermore, if the current number of iterations is 1, the amount of initial experience data in the experience replay buffer is 0, and the reward value corresponding to the current number of iterations, the updated network indicator at the current moment, the updated network indicator at the historical moment, the updated performance indicator at the current moment, the updated performance indicator at the historical moment, and the updated network parameters at each current moment are used to form the target experience data for subsequent network training steps.

[0134] In one example of the present invention, referring to Table 1, for ease of understanding, the present invention provides pseudocode for the deep reinforcement learning algorithm used by the multi-agent automatic tuner. Specifically, the algorithm assumes that the number of organizations N is the input. Assume that the agents learn for a total of M rounds (i.e., the preset update threshold is set to M). For each round (line 1), initialization is first performed, including initializing the actor and critic networks and the agent's experience replay buffer, initiating a random process for action exploration, deploying the Fabric network (i.e., the initial permissioned blockchain network) with default network parameters, and collecting initial states from the environment (lines 2-3), namely, target performance metrics and multiple initial network metrics. Then, at each step of the round (line 4), the agent generates a set of actions (i.e., multiple updated network parameters at the current moment), which take into account both the learned policy and exploration of unknown situations (line 5). The actions from all agents are combined into a unified one-dimensional vector and executed in the newly deployed environment to collect new states (i.e., updated network metrics and updated performance metrics at the current moment), and a reward value is calculated according to the reward function (line 6). The previous state, the current action, the current reward, and the current state constitute an experience, which is saved in the experience replay buffer with a default priority (the highest priority from previous experiences) (line 7). The current state is then assigned to the previous state (line 8). Next, each agent i is sampled and trained (line 9). To obtain K samples under the prioritized experience replay mechanism (line 10), probabilities are calculated based on the experience priorities and experiences are extracted from the buffer (line 11). The temporal difference error of these experiences is calculated (line 12), and this is used to update the experience priorities (line 13). Finally, for each agent, the parameters of the target network are updated (line 19). The target network is an auxiliary network maintained by the classic MADDPG algorithm for each actor and critic network to further stabilize the training process. The parameters of the target network slowly track the parameters of the corresponding network and are used to calculate a stable target for the expected reward. After M rounds, the actions given by the agents, i.e., the Fabric network parameter configuration (the parameters of the target permissioned blockchain network), are output to the user. Among them, episode in Table 1 is the number of training (iterations), S is the one-dimensional state composed of the states of all agents (the updated network index at the historical moment and the updated performance index at the historical moment), max-episode-length is the maximum number of training (the maximum number of training times in a single iteration), Л is the actor network strategy, θ is the network parameter, N t For noise, a iis the action of agent i, S' is the current state after executing the action (the updated network index at the current moment and the updated performance index at the current moment), R is the one-dimensional reward composed of the reward values ​​of all agents, k1 and k2 are the first and second coefficients respectively, and τ is the third coefficient.

[0135] Table 1 Pseudocode of the deep reinforcement learning algorithm used by the multi-agent automatic tuner

[0136]

[0137] For a comparison of technical effectiveness, existing technologies can be used as a reference. Because blockchain and distributed databases share similar characteristics, database automatic optimization methods are often modified and applied to blockchain tuning. Existing distributed database automatic tuning techniques can generally be divided into four categories: 1. Rule-based methods: These rely on expert knowledge and predefined rule sets to optimize system configuration. These rules are typically derived through analysis and summarization of extensive practical experience. Examples include adjusting cache sizes, index selection, and query plans. Each rule corresponds to a specific system behavior or performance bottleneck. When the system detects a specific scenario, it makes adjustments based on the rules. 2. Search-based methods: These optimize system performance by searching for the optimal solution among multiple possible configurations. This approach treats the tuning problem as a search problem, where each possible configuration represents a point in the search space. Common search algorithms include exhaustive search, random search, and genetic algorithms. 3. Traditional machine learning methods: These methods leverage historical data and statistical models to predict the optimal system configuration. Commonly used techniques include linear regression, support vector machines (SVMs), and decision trees. These models learn from the system's historical performance data, establishing a mapping between input parameters and system performance, thereby predicting and recommending optimal configurations. 4. Methods based on deep reinforcement learning: These optimize system performance by enabling intelligent agents to continuously interact within an environment and learn optimal policies. Deep reinforcement learning combines the decision-making capabilities of reinforcement learning with the powerful expressive power of deep learning, making it suitable for complex, high-dimensional tuning scenarios. Common algorithms include deep Q networks, policy gradient methods, and deep deterministic policy gradient methods. Current automated optimization techniques for blockchain systems typically utilize deep reinforcement learning methods, targeting system throughput and transaction confirmation latency. These methods learn and adjust various system parameters to improve overall performance.

[0138] Based on the above foundation, the above solutions have the following problems: 1. Rule-based methods lack flexibility and adaptability, and are not effective for complex or dynamically changing system environments. At the same time, the formulation of rules is highly dependent on expert knowledge and the experience of domain experts. If the rules are not perfect, suboptimal performance results may result. 2. The search-based method usually needs to traverse a large number of possible configuration combinations during the search process, and the computational and time costs are extremely high, especially in large-scale systems. In addition, in the huge search space, finding the optimal solution may require a lot of time and computing resources; 3. The accuracy of the model in the traditional machine learning method depends on the quality and quantity of historical data. If the data is insufficient or noisy, the model's prediction effect may be poor. 4. Training deep reinforcement learning models in deep reinforcement learning-based methods usually requires a lot of computing resources and time, especially in high-dimensional and complex environments. In some complex scenarios, deep reinforcement learning may face problems of unstable training or difficult convergence. 5. Although deep reinforcement learning methods are highly flexible and adaptable, when applied to blockchain systems, there is a problem that the data set acquisition and workload characteristics do not conform to the characteristics of the blockchain network. If only throughput and latency are considered and the resource waste caused by eclipse attacks is ignored, it will lead to the inability to retrieve the optimal parameter configuration. Its application still faces problems such as data set acquisition, workload characteristics, resource waste, and permissioned blockchain network characteristics, and needs further improvement and optimization.

[0139] To address these issues, this paper proposes the first automatic tuning system for permissioned blockchains that considers the impact of eclipse attacks. In a network environment exposed to eclipse attacks, this system uses an automatic tuning algorithm to screen and optimize key parameters, retrieving an optimal parameter configuration. This improves blockchain network performance and reduces resource waste. Furthermore, a deep reinforcement learning algorithm tailored to the characteristics of blockchain networks is proposed, dynamically allocating agents based on the number of organizations, improving data utilization and shortening training time. This system implements a complete process for automated Fabric network construction, data collection, metric analysis, agent training, and parameter recommendation. Based on the traditional MADDPG algorithm, a dynamic permissioned blockchain MADDPG algorithm is proposed. Effective reward functions are designed for different node types, accelerating training through sorting and filtering.

[0140] See also Figure 4 , Figure 4 This is a flowchart of the steps of a method for tuning the parameters of a permissioned blockchain network under an eclipse attack provided in Example 2 of the present invention.

[0141] The present invention provides a method for tuning parameters of a permissioned blockchain network under an eclipse attack, which is applied to a permissioned blockchain network parameter tuning system under an eclipse attack, comprising:

[0142] Step 401: Perform an eclipse attack on the initial permissioned blockchain network to determine target performance indicators and multiple initial network indicators.

[0143] Step 402: Using regression analysis technology to screen the initial network indicators, the multiple initial network parameters corresponding to the initial network indicators, and the multiple initial network parameters corresponding to the target performance indicators, to determine the target network indicators and the multiple target network parameters.

[0144] The multiple initial network indicators include multiple peer node initial network indicators and multiple sorting node initial network indicators; the target network indicators include peer node target network indicators and sorting node target network indicators.

[0145] Furthermore, step 402 may include the following sub-steps:

[0146] S21. Normalize the initial network indicators of multiple peer nodes and the initial network indicators of multiple sorting nodes to determine multiple peer normalized network indicators and multiple sorting normalized network indicators.

[0147] S22. Using each peer-normalized network indicator and each ranking-normalized network indicator, calculate a peer indicator change rate corresponding to each peer-normalized network indicator and a ranking indicator change rate corresponding to each ranking-normalized network indicator;

[0148] S23. Select the initial network index of the peer node corresponding to the largest peer index change rate as the target network index of the peer node;

[0149] S24. Select the sorting node initial network index corresponding to the largest sorting index change rate as the sorting node target network index;

[0150] S25. Based on the regression analysis technology, perform importance operations on multiple initial network parameters corresponding to the target network indicators of the peer nodes, multiple initial network parameters corresponding to the target network indicators of the sorting nodes, and multiple initial network parameters corresponding to the target performance indicators to calculate target importance values ​​corresponding to the multiple initial network parameters;

[0151] S26. Sort the importance values ​​of the targets in descending order, select the initial network parameters of the first digit preset as the intermediate network parameters, uniformly sample and test the intermediate network parameters, and output the average change rate corresponding to the intermediate network parameters;

[0152] S27 , sorting the average change rates in descending order, and selecting the intermediate network parameter with the second number of digits preset as the target network parameter.

[0153] Step 403: Based on the deep reinforcement learning algorithm, the target performance indicators and target network indicators are used to tune the target network parameters to determine the network parameters of multiple target permissioned blockchain networks.

[0154] The deep reinforcement learning algorithm consists of an initial actor network and an initial critic network.

[0155] Furthermore, step 403 may include the following sub-steps:

[0156] S31, using the initial actor network to adjust the values ​​of each target network parameter according to the target network indicator and the target performance indicator, and determining multiple updated network parameters at the current moment;

[0157] S32. Update the initial permission blockchain network using the updated network parameters at each current moment, determine a new initial permission blockchain network, use a preset standard test data set as input for the new initial permission blockchain network, and output the updated network index at the current moment and the updated performance index at the current moment;

[0158] S33. Calculate a reward value based on the current updated network indicator and the current updated performance indicator;

[0159] S34, initial experience data is formed by combining the reward value, the updated network index at the current moment, the updated network index at the historical moment, the updated performance index at the current moment, the updated performance index at the historical moment, and the updated network parameters at each current moment, and the data is stored in an experience replay buffer in the data filtering controller; the experience replay buffer includes a plurality of initial experience data;

[0160] S35, selecting target experience data from the experience replay buffer based on the limited experience replay mechanism through the data filtering controller;

[0161] S36, using the initial critic network to evaluate the target experience data, outputting a target evaluation value, and using the target evaluation value to update the network parameters of the initial critic network to determine the intermediate critic network;

[0162] S37, calculating a gradient based on the target experience data and the target evaluation value;

[0163] S38, using gradient to update the network parameters of the initial actor network, determine the intermediate actor network, and count the number of iterations in real time;

[0164] S39, determining whether the number of iterations reaches a preset update threshold;

[0165] S40, if achieved, the intermediate actor network is used as the trained target actor network;

[0166] S41. Use the trained target actor network to numerically adjust each target network parameter according to the target network indicator and the target performance indicator to determine the network parameters of multiple target permission blockchain networks.

[0167] Optionally, it also includes:

[0168] If the number of iterations does not reach the preset update threshold, the intermediate actor network is used as the new initial actor network, and the intermediate critic network is used as the new initial critic network;

[0169] Update the network parameters of the new initial actor network and the new initial critic network according to the target performance index, the target network index and the target network parameters, and determine the intermediate actor network and the intermediate critic network until the number of iterations reaches the preset update threshold;

[0170] The intermediate actor network determined when the number of iterations reaches the preset update threshold is used as the trained target actor network;

[0171] The trained target actor network is used to numerically adjust the target network parameters according to the target network indicators and target performance indicators, and determine the network parameters of multiple target permission blockchain networks.

[0172] In an embodiment of the present invention, a method for tuning parameters of a permissioned blockchain network under an eclipse attack is provided. The method includes performing an eclipse attack on an initial permissioned blockchain network to determine a target performance indicator and multiple initial network indicators. Regression analysis is used to screen each initial network indicator, multiple initial network parameters corresponding to each initial network indicator, and multiple initial network parameters corresponding to the target performance indicator to determine a target network indicator and multiple target network parameters. Based on a deep reinforcement learning algorithm, each target network parameter is tuned using the target performance indicator and target network indicator to determine multiple target permissioned blockchain network parameters. Based on the above scheme, regression analysis is used to screen the target network indicators and target network parameters. Deep reinforcement learning is then used to tune the target network parameters based on the target performance indicator, target network indicator, and target network parameters to determine the target permissioned blockchain network parameters. This process eliminates the need for expert knowledge and predefined rule sets, thereby improving system tuning effectiveness.

[0173] An embodiment of the present invention further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory; when the computer program is executed by the processor, the processor performs the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in the second embodiment above.

[0174] An embodiment of the present invention further provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in the second embodiment above are implemented.

[0175] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in the second embodiment above.

[0176] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0177] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0178] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A permissioned blockchain network parameter tuning system under eclipse attack, characterized in that: Includes attacker, data filtering controller and multi-agent automatic tuner; The attacker is used to perform an eclipse attack on the initial permissioned blockchain network to determine a target performance indicator and a plurality of initial network indicators; The data filtering controller is used to screen each of the initial network indicators, the multiple initial network parameters corresponding to each of the initial network indicators, and the multiple initial network parameters corresponding to the target performance indicators using regression analysis technology to determine the target network indicator and the multiple target network parameters; The multi-agent automatic tuner is used to tune each of the target network parameters based on a deep reinforcement learning algorithm using the target performance indicator and the target network indicator to determine multiple target permission blockchain network parameters.

2. The permission blockchain network parameter tuning system under eclipse attack according to claim 1, characterized in that: The multiple initial network indicators include multiple peer node initial network indicators and multiple sorting node initial network indicators; the target network indicator includes a peer node target network indicator and a sorting node target network indicator; the data filtering controller is specifically used to: Normalizing a plurality of peer node initial network indicators and a plurality of sorting node initial network indicators, and determining a plurality of peer normalized network indicators and a plurality of sorting normalized network indicators; Using each of the peer-to-peer normalized network indicators and each of the ranking normalized network indicators, calculate a peer indicator change rate corresponding to each of the peer-to-peer normalized network indicators and a ranking indicator change rate corresponding to each of the ranking normalized network indicators; Select the initial network index of the peer node corresponding to the largest peer index change rate as the target network index of the peer node; Select the sorting node initial network index corresponding to the largest sorting index change rate as the sorting node target network index; Based on the regression analysis technology, importance operations are performed on multiple initial network parameters corresponding to the target network index of the peer node, multiple initial network parameters corresponding to the target network index of the sorting node, and multiple initial network parameters corresponding to the target performance index, and target importance values ​​corresponding to the multiple initial network parameters are calculated; Sorting the target importance values ​​in descending order, selecting the initial network parameters of the first number of digits preset before as the intermediate network parameters, uniformly sampling and testing the intermediate network parameters, and outputting the average change rate corresponding to the intermediate network parameters; The average change rates are sorted in descending order, and the intermediate network parameters with the second number of digits preset before are selected as the target network parameters.

3. The permission blockchain network parameter tuning system under eclipse attack according to claim 1, characterized in that: The deep reinforcement learning algorithm includes an initial actor network and an initial critic network; the multi-agent automatic tuner is specifically used to: Using an initial actor network to numerically adjust each of the target network parameters according to the target network indicator and the target performance indicator, and determine a plurality of updated network parameters at the current moment; The initial permission blockchain network is updated using the updated network parameters at the current moment, a new initial permission blockchain network is determined, and a preset standard test data set is used as an input of the new initial permission blockchain network, and an updated network indicator at the current moment and an updated performance indicator at the current moment are output; Calculating a reward value according to the updated network indicator at the current moment and the updated performance indicator at the current moment; The reward value, the updated network index at the current moment, the updated network index at the historical moment, the updated performance index at the current moment, the updated performance index at the historical moment and each updated network parameter at the current moment constitute initial experience data, and are put into an experience replay buffer in the data filtering controller; the experience replay buffer includes a plurality of initial experience data; Selecting target experience data in the experience replay buffer based on the limited experience replay mechanism by the data filtering controller; Using the initial critic network to evaluate the target experience data, outputting a target evaluation value, and using the target evaluation value to update the network parameters of the initial critic network to determine an intermediate critic network; Calculating a gradient based on the target experience data and the target evaluation value; Using the gradient to update the network parameters of the initial actor network, determine the intermediate actor network, and count the number of iterations in real time; Determine whether the number of iterations reaches a preset update threshold; If achieved, the intermediate actor network is used as the trained target actor network; The trained target actor network is used to numerically adjust each of the target network parameters according to the target network indicator and the target performance indicator to determine multiple target permission blockchain network parameters.

4. The permission blockchain network parameter tuning system under eclipse attack according to claim 3 is characterized in that: The multi-agent automatic tuner is also used for: If the number of iterations does not reach the preset update threshold, the intermediate actor network is used as a new initial actor network, and the intermediate critic network is used as a new initial critic network; updating the network parameters of the new initial actor network and the network parameters of the new initial critic network according to the target performance index, the target network index and each target network parameter, and determining an intermediate actor network and an intermediate critic network until the number of iterations reaches the preset update threshold; Using the intermediate actor network determined when the number of iterations reaches the preset update threshold as the trained target actor network; The trained target actor network is used to numerically adjust each of the target network parameters according to the target network indicator and the target performance indicator to determine multiple target permission blockchain network parameters.

5. A method for tuning parameters of a permissioned blockchain network under an eclipse attack, characterized in that: A permissioned blockchain network parameter tuning system under an eclipse attack as described in any one of claims 1 to 4, the method comprising: Conduct an eclipse attack on an initial permissioned blockchain network, identifying target performance metrics and multiple initial network metrics; Using regression analysis technology to screen each of the initial network indicators, a plurality of initial network parameters corresponding to each of the initial network indicators, and a plurality of initial network parameters corresponding to the target performance indicator, to determine the target network indicator and a plurality of target network parameters; Based on a deep reinforcement learning algorithm, the target performance index and the target network index are used to tune each of the target network parameters to determine multiple target permission blockchain network parameters.

6. The method for optimizing network parameters of a permissioned blockchain under an eclipse attack according to claim 5, characterized in that: The multiple initial network indicators include multiple peer node initial network indicators and multiple sorting node initial network indicators; the target network indicator includes a peer node target network indicator and a sorting node target network indicator; the step of using regression analysis technology to screen each of the initial network indicators, multiple initial network parameters corresponding to each of the initial network indicators, and multiple initial network parameters corresponding to the target performance indicator to determine the target network indicator and multiple target network parameters includes: Normalizing a plurality of peer node initial network indicators and a plurality of sorting node initial network indicators, and determining a plurality of peer normalized network indicators and a plurality of sorting normalized network indicators; Using each of the peer-to-peer normalized network indicators and each of the ranking normalized network indicators, calculate a peer indicator change rate corresponding to each of the peer-to-peer normalized network indicators and a ranking indicator change rate corresponding to each of the ranking normalized network indicators; Select the initial network index of the peer node corresponding to the largest peer index change rate as the target network index of the peer node; Select the sorting node initial network index corresponding to the largest sorting index change rate as the sorting node target network index; Based on the regression analysis technology, importance operations are performed on multiple initial network parameters corresponding to the target network index of the peer node, multiple initial network parameters corresponding to the target network index of the sorting node, and multiple initial network parameters corresponding to the target performance index, and target importance values ​​corresponding to the multiple initial network parameters are calculated; Sorting the target importance values ​​in descending order, selecting the initial network parameters of the first number of digits preset before as the intermediate network parameters, uniformly sampling and testing the intermediate network parameters, and outputting the average change rate corresponding to the intermediate network parameters; The average change rates are sorted in descending order, and the intermediate network parameters with the second number of digits preset before are selected as the target network parameters.

7. The method for optimizing network parameters of a permissioned blockchain under an eclipse attack according to claim 5, characterized in that: The deep reinforcement learning algorithm includes an initial actor network and an initial critic network; the step of optimizing each of the target network parameters using the target performance index and the target network index based on the deep reinforcement learning algorithm to determine the network parameters of multiple target permissioned blockchain networks includes: Using an initial actor network to numerically adjust each of the target network parameters according to the target network indicator and the target performance indicator, and determine a plurality of updated network parameters at the current moment; The initial permission blockchain network is updated using the updated network parameters at the current moment, a new initial permission blockchain network is determined, and a preset standard test data set is used as an input of the new initial permission blockchain network, and an updated network indicator at the current moment and an updated performance indicator at the current moment are output; Calculating a reward value according to the updated network indicator at the current moment and the updated performance indicator at the current moment; The reward value, the updated network index at the current moment, the updated network index at the historical moment, the updated performance index at the current moment, the updated performance index at the historical moment and each updated network parameter at the current moment constitute initial experience data, and are put into an experience replay buffer in the data filtering controller; the experience replay buffer includes a plurality of initial experience data; Selecting target experience data in the experience replay buffer based on the limited experience replay mechanism by the data filtering controller; Using the initial critic network to evaluate the target experience data, outputting a target evaluation value, and using the target evaluation value to update the network parameters of the initial critic network to determine an intermediate critic network; Calculating a gradient based on the target experience data and the target evaluation value; Using the gradient to update the network parameters of the initial actor network, determine the intermediate actor network, and count the number of iterations in real time; Determine whether the number of iterations reaches a preset update threshold; If achieved, the intermediate actor network is used as the trained target actor network; The trained target actor network is used to numerically adjust each of the target network parameters according to the target network indicator and the target performance indicator to determine multiple target permission blockchain network parameters.

8. A computer device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in any one of claims 5 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in any one of claims 5 to 7 are implemented.

10. A computer program product, characterized in that The computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions, wherein when the program instructions are executed by a computer, the computer is caused to perform the steps of the method for tuning parameters of a permissioned blockchain network under an eclipse attack as described in any one of claims 5 to 7.

Citation Information

Patent Citations

  • Unmanned aerial vehicle control method and system based on multi-agent deep reinforcement learning

    CN112256056A

  • Database parameter adjustment method and device and computer readable storage medium

    CN113064879A

  • Distributed message system parameter adaptive optimization method based on reinforcement learning

    CN113132482A