Finding community structure in complex network based on latent variables