In this paper, we discuss multigroup SEIQR (susceptible, exposed, infectious, quarantined, and recovered) models with and without random perturbation in computer network. The transmission of malicious objects in computer network is formulated in these two models. In the deterministic model, the basic reproduction number R0 is a threshold which completely determines the persistence or extinction of the disease. Using the results of the graph theory, we show if R0>1, the disease will prevail, the infected fraction persists and the endemic equilibrium is globally stable in feasible region, if R0⩽1, the infected fraction of the nodes disappear so the disease die out. For the stochastic version, we carry out a detailed analysis on the asymptotic behavior of the stochastic model, also regarding of the value of R0. When R0>1, we deduce the globally asymptotic stability of the endemic equilibrium by measuring the difference between the solution and the endemic equilibrium of the deterministic model in time average. Numerical methods are employed to illustrate the dynamic behavior of the model and simulate the system of equations developed. The effect of quarantine on recovered nodes is also analyzed in the deterministic model and the stochastic version of the determinist model.