Integrated Pest Management (IPM) techniques have been widely used in agriculture to manage pest damage in the most economical way and to minimise harm to people, property and the environment. However, current research and products on the market cannot consolidate this process. Most existing solutions either require experts to visually identify pests or cannot automatically assess pest levels and make decisions based on detection results. To make the process from pest identification to pest management decision making more automated and intelligent, we propose an end-to-end integrated pest management solution that uses deep learning for semi-automated pest detection and an expert system for pest management decision making. Specifically, a low computational cost sampling point generation algorithm is proposed to enable mobile devices to generate uniformly distributed sampling points in irregularly shaped fields. We build a pest detection model based on YoloX and use Pytorch Mobile to deploy it on mobile phones, allowing users to detect pests offline. We develop a standardised sampling specification and a mobile application to guide users to take photos that allow pest population density to be calculated. A rule-based expert system is established to derive pest management thresholds from prior agricultural knowledge and make decisions based on pest detection results. We also propose a human-in-the-loop algorithm to continuously track and update the validity of the thresholds in the expert system. The mean average precision of the pest detection model is 58.17% for 97 classes, 75.29% for 2 classes, and 57.33% for 11 classes on three pest datasets, respectively. The usability of the pest management system is assessed by the User Experience Surveys and achieves a System Usability Scale (SUS) score of 76. The usability of the proposed solution is validated by qualitative field experiments.