Blockchain technology is currently evolving rapidly, and smart contracts are the hallmark of the second generation of blockchains. Currently, smart contracts are gradually being used in power system networks to build a decentralized energy system. Security is very important to power systems and attacks launched against smart contract vulnerabilities occur frequently, seriously affecting the development of the smart contract ecosystem. Current smart contract vulnerability detection tools suffer from low correct rates and high false positive rates, which cannot meet current needs. Therefore, we propose a smart contract vulnerability detection system based on the Siamese network in this paper. We improved the original Siamese network model to perform smart contract vulnerability detection by comparing the similarity of two sub networks with the same structure and shared parameters. We also demonstrate, through extensive experiments, that the model has better vulnerability detection performance and lower false alarm rate compared with previous research results.
1 January 2022 in Discrete Dynamics in Nature and Society
Aiming at the shortcomings of the Harris hawks optimization algorithm (HHO), such as poor initial population diversity, slow convergence speed, poor local optimization ability, and easily falling into local optimum, a Harris hawks optimization algorithm (CCCHHO) integrating multiple mechanisms is proposed. First, the population diversity is enhanced by the initialization of the chaotic method. Second, the cosine function is used to better simulate the characteristics of the periodic change of the energy of the prey in the repeated contests with the group of hawks, to better balance the exploration and exploitation of the algorithm. Third, Cauchy mutation on the optimal individual in the exploration phase is performed, and the characteristics of the Cauchy distribution to enhance the diversity of the population are used, which can effectively prevent the algorithm from falling into the local optimum. Fourth, the local optimization ability of the algorithm by using the ergodicity of the chaotic system in the exploitation phase to perform a chaotic local search for the optimal individual is enhanced, which can effectively jump out after the algorithm falls into the local optimum. Finally, we use the elite individuals of the population to guide the position update of the population’s individuals, fully communicate with the dominant individuals, and speed up the convergence speed of the algorithm. Through the simulation experiments on CCCHHO with 11 different benchmark functions, CCCHHO is better than the gray wolf optimization algorithm (GWO), the Salp swarm algorithm (SSA), the ant lion optimization algorithm (ALO), and three improved HHO algorithms in terms of convergence speed and optimization accuracy, whether it is a unimodal benchmark function or a multimodal benchmark function. The experimental results show that CCCHHO has excellent algorithm efficiency and robustness.