With the development of terminal technology and the expansion of application fields, the Internet of Things’ application value and service requirements continue to increase. Efficient data transmission is a reliable guarantee for the development and application of the Internet of Things. Blockchain technology provides a solution for storing and delivering distributed data. On this basis, taking the Industrial Internet of Things as the research object, a blockchain-based data transmission optimization method was established. First, an undirected complete graph model is used to describe the network scene. A matrix grid model is used to replace the randomly distributed set of data nodes. Then, a double optimization method is proposed. We designed the mathematical description and modeling method of the lattice matching decision problem and designed the artificial neural network to find the optimal solution to the problem. Finally, an example is used to verify the government data transmission method’s technical performance and packet loss rate. It has achieved at least 20% and 30% improvements in optimizing the network life of static aggregation nodes and data transmission, respectively. While improving the robustness of the network, it also shows a stable advantage in terms of network energy efficiency indicators.