# Innovative Application of Blockchain Technology for Digital Recipe Copyright Protection
## 5 Improvement of Consensus Mechanisms and Quality Testing of Recipes
### Experimental Comparison
#### 5.5.2 Experimental Setting, Experimental Design, and Analysis of Results  
The experiments are conducted on a Windows host configured with an 11 th Gen Intel(R) Core(TM) i5-11400H @ 2.70 GHz 2.69 GHz with 16 GB of RAM and a 1 TB hard disk and simulated using Python language. In the simulated blockchain network, each node broadcasts in the network based on the score of its recipe. Experiment 1: Punishment and Recovery Experiment for Malicious Nodes  
In this experiment, we initially set up 50 validator nodes for the first round. We randomly selected 25 nodes as malicious nodes, assigned different malicious behaviors, and conducted 1000 rounds of the consensus process. The main focus during this process was whether our penalty mechanism could effectively punish the malicious nodes and reduce their scores. As time progressed, as long as nodes actively participated in the network and consensus process, the penalty for malicious nodes could be mitigated through a time decay factor. We randomly selected the consensus processes of five nodes for evaluation. The experimental results are presented in Figure 13:  
The results of this experiment indicate that the punishment mechanism effectively penalizes the nodes, and with time, the punishment for malicious nodes gradually reduces. After 400 rounds, some nodes can become validator nodes while submitting high-quality data. The speed of this recovery is determined by two factors: the score of the node's data and the number of malicious behaviors by the node. In the experimental results, we can observe that the 275 th node, despite the quality of its submitted data not significantly differing from that of other nodes, has participated in various malicious behaviors. This has resulted in a recovery speed much slower than that of other malicious nodes. Even after undergoing 1000 consensus mechanisms, is not able to become a validator node. Figure 12: Recipe: grilled eel. Figure 13: Punishment and recovery experiment for malicious nodes. Experiment 2: Average time required to eliminate the influence of malicious behavior  
In this experiment, we focus on evaluating the time required for nodes with different numbers of malicious behaviors to eliminate their malicious impact; we calculate the average number of rounds required for nodes with different numbers of malicious behaviors to revert back to being a verified node for the first time after they actively participate in the network maintenance and do not produce any more malicious behaviors, since the impact of malicious behaviors on the blockchain network is crucial. Therefore, we have to ensure that the negative impact can be eliminated only after a certain period of time. In addition, we need to focus on the average number of rounds required for nodes with different numbers of malicious behaviors to eliminate the malicious impact, and the punishment for nodes with multiple malicious behaviors should be more severe. The experimental results are shown in Figure 14.  
The experimental results show that the average number of recovery rounds required for different numbers of malicious behavior nodes to truly eliminate their negative impact varies. The more malicious behaviors there are, the more average recovery rounds are required, which also shows that our punitive measures for nodes with multiple negative behaviors are effective. The overall number of recovery rounds ranges from 200 to 800 rounds, which indicates that the malicious behavior nodes are unable to return to normal operation within a certain period of time, proving that our punishment mechanism achieves the guarantee of relative fairness in the network. Experiments show that the improved DPOS consensus mechanism can effectively encourage all nodes to actively participate in the network. The behavior of a node directly affects its score and status. This is an effective positive feedback mechanism that can motivate all nodes in the network to actively participate and provide high-quality data.