The top two lines (especially the first two measures) bear some resemblance to the boogie woogie bass part that seems to have been pretty common in 1950s rock and roll: arpeggiating chords using the root, third, fifth, sixth, and flatted seventh. Here, though, McCartney plays the octave instead of the flatted seventh and then reverses the order (octave, sixth, fifth, third, root) for the next arpeggiation.