Z-process method for change point problems with applications to discretely observed diffusion processes