Terrorism has become a major threat to global non-traditional security, characterized by localization, decentralization and networking. Based on GTD database, with the help of big data thinking, this paper optimizes the GTD related data of terrorist attacks by using mathematical methods such as hierarchical analysis, fuzzy clustering analysis and regression analysis, screens the main influencing factors of the harmfulness of terrorist incidents, and uses the analytic hierarchy process to carry out weight analysis. Hazard coefficients are defined for different influencing factors, and a quantitative model of terrorist attack hazards is constructed based on the weight of influencing factors. The hazard values of all events in the sample set are calculated by the model, and the hazard values are sorted and graded. Based on the model, the terrorist events in GTD are graded, calculated and ranked. Based on the self-defined similarity coefficient, the suspicion degree of terrorists about typical events is determined, thus the global counter-terrorism situation is effectively predicted.