  Based on conservation laws as one of the important integrable properties of
nonlinear physical models, we design a modified physics-informed neural network
method based on the conservation law constraint. From a global perspective,
this method imposes physical constraints on the solution of nonlinear physical
models by introducing the conservation law into the mean square error of the
loss function to train the neural network. Using this method, we mainly study
the standard nonlinear Schr\"odinger equation and predict various data-driven
optical soliton solutions, including one-soliton, soliton molecules,
two-soliton interaction, and rogue wave. In addition, based on various exact
solutions, we use the modified physics-informed neural network method based on
the conservation law constraint to predict the dispersion and nonlinear
coefficients of the standard nonlinear Schr\"odinger equation. Compared with
the traditional physics-informed neural network method, the modified method can
significantly improve the calculation accuracy.
