Two dimensional magnetic material which has been rapidly developed in recent years, has potential application in the development of spintronic devices. In order to understand the magnetic properties of two-dimensional magnetic materials, it is necessary to comprehend the magnetic interaction which is estimated by the exchange parameters between the magnetic atoms. The calculation of the magnetic exchange parameters is based on the first-principle. The commonly used method to calculate the exchange parameters is energy-mapping method. However, this method has some disadvantages. This paper derives the spin-spiral dispersion relationship under the Heisenberg interaction and the Dzyaloshinskii-Moriya (DM) interaction through the generalized Bloch condition of three kinds of two-dimensional magnetic structures: a tetragonal structure, a hexagonal structure in which the cell contains one magnetic atom, a hexagonal structure in which the cell contains two magnetic atoms. We calculate magnetic exchange parameters of some materials through the first principle. These materials are: MnB、VSe2、MnSTe、Cr2I3Cl3. MnSTe and Cr2I3Cl3 are two-dimensional Janus materials, which means they have space-reversal symmetry broken, so there is DM interaction in the system.