The virtuality and openness of online social platforms make it a hotbed for the rapid propagation of various rumors. In order to block the outbreak of rumor, one of the most effective containment measures is spreading positive information to counterbalance the diffusion of rumor. The spreading mechanism of rumors and effective suppression strategies are significant and challenging research issues. Firstly, in order to simulate the dissemination of multiple types of information, we propose a competitive linear threshold model with state transition (CLTST) to describe the spreading process of rumor and anti-rumor in the same network. Subsequently, we put forward a community-based rumor blocking algorithm (CRB) based on influence maximization theory in social networks. Its crucial step is to identify a set of influential seeds that propagate anti-rumor information to other nodes, which includes community detection, selection of candidate anti-rumor seeds and generation of anti-rumor seed set. Under CLTST model, CRB algorithm has been compared with six state-of-the-art algorithms on nine online social networks to verify the performance. Experimental results show that the proposed model can better reflect the process of rumor propagation, and review the propagation mechanism of rumor and anti-rumor in online social networks. Moreover, the proposed CRB algorithm has better performance in weakening the rumor dissemination ability, which can select anti-rumor seeds in networks more accurately and achieve better performance in influence spread, sensitivity analysis, seeds distribution and running time.