The Internet of Things (IoT) is a highly integrated application of the advanced information technology, which is expected to bring convenience for daily life and improve the efficiency of industrial production. Owing to the limitation of battery capacity and the broadcast nature of IoT nodes, IoT networks face the bottleneck of energy shortage and security vulnerability. In recent years, the emerging technologies of wireless powered communication network (WPCN) and physical-layer security (PLS) are regarded as potential solutions to allow IoT nodes to harvest energy from radio frequency (RF) and ensure the secure data delivery. How to efficiently allocate energy for IoT devices to improve throughput while guaranteeing secure data transmission is a challenging problem. In this article, we consider a WPCN with the existence of an eavesdropper, who is trying to eavesdrop the data transmitted from a certain node to the hybrid sink (H-sink). In the proposed system, the nodes first harvest energy from the H-sink, then transmit the information to the H-sink and generate interference to the eavesdropper. We first formulate the sum-throughput maximization problem as the nonlinear optimization problem and find its closed-form solution by the Lagrangian method. We further design an efficient algorithm to obtain the optimal numerical results to make up for the defect that the closed-form solution may not meet the explicit constraints. Furthermore, we propose a simple and reasonable method, the ratio method (RM), based on the observation of the optimal solution and make a comparison between the proposed method and the most common method, the same interference power method (SIPM).