In view of the unclear property rights between the power supply companies and the power users, and the problem of electricity theft, this paper proposes an intelligent high-voltage boundary switch and metering integrated device, and the boundary switch and the metering device are designed and integrated installed. Firstly, the equipment structure is redesigned, and the outdoor high-voltage boundary electric energy metering box is divided into four independent functional compartments including switch room, metering room, outlet room and inlet room. The equipment adopts a fully-sealed and fully-insulated structure design, and the protection level of the mechanism compartment reaches IP55. The fully-insulated and plug-in structure design for metering transformer is easy to replace. The structured model of electricity theft prevention is constructed, and the function of electricity theft prevention is realized through data preprocessing, user anomaly monitoring model and machine learning.