I'm definitely no expert, but, is there a chance you have got water into the cylinder, I got my bike very wet and dirty recently, it developed a knocking sound aswell. Sounds similar to your problem. I thought mine was something mechanical as the knock appeared in an instant like something had broken.
I took it to my local dealer he changed the piston rings and cleaned it the cylinder, he said that it was wet and full of dirt. It is good as new now.