The present invention provides the compound of logical formula (I), their salt and N- oxide and its solvates and prodrug (wherein, substituent group such as defines in the description). The compound of logical formula (I) is the inhibitor of factor XI, plasma thromboplastin antecedent a, they can prevent with what and/or treat thromboembolic disorders.本發明提供了通式(I)的化合物、它們的鹽和N-氧化物,以及其溶劑合物和前藥(其中,取代基如在說明書中所定義)。通式(I)的化合物是因子XIa的抑制劑,它們可用於預防和/或治療血栓栓塞疾病。