Andy Murray says his aggressive approach was the key to beating Roger Federer and remaining on course for a third Shanghai Masters title.