Blockchain theory and its key technologies are developing rapidly, and the industrial internet combined with blockchain technology is driving the realization of safe and reliable comprehensive connectivity in multiple fields. In this paper, we propose a resource optimization allocation method for industrial internet that integrates edge computing and blockchain to reduce the task computing energy consumption and computational overhead of the system while improving the efficiency of the consensus process. This optimization problem is constructed as a Markov decision process, and a deep reinforcement learning algorithm is used to solve the optimal resource scheduling strategy under a single edge node. The effectiveness of the proposed resource optimization allocation method for industrial internet fusing edge computing and blockchain is verified by simulation validation. The method is able to obtain better and smoother convergence under the premise of harvesting high total rewards, effectively reduces the computational energy consumption and computational overhead of the device, and at the same time effectively improves the consensus efficiency of the blockchain.