As agriculture enters the 4.0 era, the demand for intelligent and precise agricultural production is gradually increasing. However, the high cost of agricultural data collection, insufficient decision-making models and low level of intelligence are still the main obstacles to the improvement of land output rate and labor productivity in the process of agricultural production. In this paper, to address the long-standing problems of high cost of soil nitrogen content sampling, difficulty in acquiring soil nitrogen content and reduced accuracy of model long-term prediction during melon growth, a soil nitrogen content prediction model based on improved BP neural network combining a small amount of sampling and a comprehensive model is constructed to realize intelligent decision making of melon nitrogen fertilizer application.