Modeling and Stability Analysis of Epidemic Dynamics over Networks