Discrete Variational Derivative Method: A Structure-Preserving Numerical Method for Partial Differential Equations