Machine Learning with Hard Constraints:Physics-Constrained Constitutive Models with Neural ODEs and Diffusion