In recent years, with the continuous implementation of the "county-wide rooftop distributed photovoltaic (DPV) development program" promoted by the National Energy Administration, the integration scale of PV in China has steadily expanded, enhancing the utilization efficiency of renewable energy. However, the large-scale integration of PV users, particularly at the ends of low-voltage distribution networks. has led to issues such as localized voltage violations and abnormal power losses, thereby compromising power system's operational security and economic efficiency. To address the aforementioned issues, this paper proposes a bi-level optimal allocation method for distributed generation siting and sizing based on second-order cone programming relaxation. Firstly, to balance system's operational security and economic efficiency, a bi-level optimization model is established with the dual objectives of minimizing the system's daily comprehensive operating cost and maximizing PV utilization, which takes account such factors as the aging, maintenance costs and operational safety of distributed energy storage systems. Then, the second-order cone programming relaxation technique is employed to transform the power flow model, converting the original non-convex model into a convex one to reduce computational complexity, and the multi-objective particle swarm optimization algorithm is used to solve the model. Finally, using the improved IEEE 33-bus system and an actual distribution network in Hebei for case study, a comparison with the traditional planning approaches is conducted to verify the superiority of the proposed method. The results indicate that the proposed method can enhance power quality, reduce network losses, and increase the DPV hosting capacity while ensuring economic efficiency of distribution networks.