In order to optimize the overall economic benefit and hydrogen distribution of the electric hydrogen integrated energy system,a master-slave game based optimal operation method and strategy solving algorithm for the electric hydrogen integrated energy system are proposed in this paper.Firstly,the basic architecture of the electric and hydrogen integrated energy system is designed,and the integrated structure of production and marketing is constructed.Secondly,based on the idea of master-slave game,the energy storage behavior and hydrogen sales behavior are regarded as two virtual players of the electric hydrogen integrated energy system operators.The operator was regarded as the leader,and the two virtual players were regarded as the followers.A master-slave game model of one master and two slaves was established.Thirdly,information entropy is introduced into the genetic algorithm to calculate the initial population and design the fitness function,and the model is solved.Finally,the results of an example show that the proposed model can effectively improve the overall economic benefit of the system,and the improved information entropy genetic algorithm has a strong ability of optimization,solution accuracy and stability.