Aiming at the problem that it is difficult to realize the visualization and real-time information of the container Internet of Things in the current ocean transportation process, an improved LEACH non-uniform clustering algorithm is proposed to solve the uneven node energy consumption and the premature death of nodes in the cluster routing algorithm. And other issues, and fully consider the respective characteristics of general-purpose containers and refrigerated containers to make them more in line with the application requirements of the container Internet of Things, and realize the efficient transmission of ocean-going container transportation information. First, in the cluster establishment stage, a reasonable size cluster is constructed through the improved LEACH algorithm and the non-uniform competition radius. Second, in the inter-cluster routing stage, a multi-hop routing method between clusters that approximates the shortest path is designed. Third, in the rotation phase of the cluster head, in order to reduce the number of network reorganizations and reduce energy consumption, an intra-cluster rotation mechanism is adopted. The simulation results show that the improved algorithm is not only suitable for network environments of various scales, but also effectively balances the energy consumption of the container Internet of Things, better solves the problem of premature death of nodes, and prolongs the survival time of the network.