According to the relationship between the antibody density and the pathogen attack intensity, a dynamic immunity-based real-time network risk evaluation method (DIRNR) is presented. In DIRNR, the concepts and formal definitions of self, nonself, antibody, antigen and immune detector in network risk evaluation domain are given. Then, depending on a series of immune responses to antigen, such as self evolution, self tolerance and immune detector lifecycle, the mathematical models for describing the change of network risk are established. Building upon the above models, a real-time network risk calculation model based on antibody density is presented. By using DIRNR, the types and intensity of network attacks can be calculated in real-time. In DIRNR, the concept of the antibody density in a biological immune system has been abstracted and extended, and a new method based on antibody density for network risk evaluation has been presented. The theoretical analysis and the experimental results show that the proposed method is a good solution to real-time evaluation for the network risk.