Problem - bike suddenly revved really high, then slammed way down.

On a motorway somewhere between 5-7k on my 04 Honda VFR800, my bike started jerking forward with revs shooting up, then would slam back down all in an instant. Occasionally the revs shot down to 0 and I lost power, but would ignite again no problem. Gears are all changing fine, the bike idles fine, no warning lights came on.

Any idea what caused it? On a straight it was scary enough, but I'm worried about this happening again in rain or round a corner. Any help would be really appreciated.