All three judges scored it 30-27 for Shields, but it was closer than those scores suggest: Akiyama easily could have won the first or second rounds, although Shields definitely won the third.
The win snaps a two-fight losing streak for Shields, and it's the latest blow to Akiyama, who just hasn't been successful in the UFC.
Early in the first round Akiyama showed off outstanding takedown defense when Shields shot on him, and late in the first round Akiyama showed off textbook-perfect judo to trip Shields and put him down. Shields was the more active striker in the first round, but Akiyama's grappling was superior.
The second round was more of the same: In the striking Shields was more active but Akiyama was more effective, and in the grappling Akiyama shrugged off all of Shields' takedown attempts and secured a beautiful judo throw of his own.
The third round was by far the best for Shields: He finally took Akiyama down and did it twice, and he ended up taking Akiyama's back late in the third round and attempting a rear-naked choke, although he ran out of time before he could finish it. But Shields didn't need to finish the fight: He won every round, according to all three judges.