Nonlinear Schrödinger equation (NLSE) has important applications in quantum mechanics, nonlinear optics, plasma physics, condensed matter physics, optical fiber communication and laser system design, and its accurate solution is very important for understanding complex physical phenomena. Here, the traditional finite difference method (FDM), the split-step Fourier (SSF) method and the physics-informed neural network (PINN) method are studied, aiming to analyze in depth the solving mechanisms of various algorithms, and then realize the efficient and accurate solution of complex NLSE in optical fiber. Initially, the steps, process and results of PINN in solving the NLSE for pulse under the condition of short-distance transmission are described, and the errors of these methods are quantitatively evaluated by comparing them with the errors of PINN, FDM and SSF. On this basis, the key factors affecting the accuracy of NLSE solution for pulse under long-distance transmission are further discussed. Then, the effects of different networks, activation functions, hidden layers and the number of neurons in PINN on the accuracy of NLSE solution are discussed. It is found that selecting a suitable combination of activation functions and network types can significantly reduce the error, and the combination of FNN and tanh activation functions is particularly good. The effectiveness of ensemble learning strategy is also verified, that is, by combining the advantages of traditional numerical methods and PINN, the accuracy of NLSE solution is improved. Finally, the evolution characteristics of Airy pulse with different chirps in fiber and the solution of vector NLSE corresponding to polarization-maintaining fiber are studied by using the above algorithm. This study explores the solving mechanisms of FDM, SSF and PINN in complex NLSE, compares and analyzes the error characteristics of those methods in various transmission scenarios, proposes and verifies the ensemble learning strategy, thus providing a solid theoretical basis for studying pulse transmission dynamics and data-driven simulation.