Neural network (NN) model has been widely used in pattern recognition (PR), speech recognition, image processing and other fields, but its application in edge computing (EC) environment faces performance and energy consumption problems. This article first introduced the basic structure and training process of NN, including backpropagation algorithms. Then, this article presented a NN modeling approach based on EC, including NN model compression, distributed NN model and knowledge distillation approach. Finally, this article implemented a PR model for the MNIST (Mixed National Institute of Standards and Technology database) dataset and analyzed the experimental results. The experimental outcomes indicated that the presented approach can significantly enhance the performance of the NN model in the EC environment, while ensuring a high recognition accuracy. The NN modeling approach based on EC can reduce the amount of computation and storage of the NN, thus improving the operating efficiency of the NN in the EC environment by 6%-12%. The NN modeling approach based on EC can optimize the performance and efficiency of the NN model in the EC environment, and provide new ideas and approaches for the application of NN in the EC environment.