Well, When John sang about the Walrus, it was just random nonsense thrown at the critics to mock them. Lennon found how people often analysed his songs as ridiculous, so he wrote Walrus as a private joke for himself and the band.
Later, he said the Walrus was Paul, just to keep Paul happy. This was done, because by this time, Lennon & Yoko were very close, and the paul & john bond was breaking, thus he wrote it to keep him happy..
The Walrus* is heavily influenced by Alice through the looking glass...the characters the Walrus & the Carpenter...( The Walrus is infact the evil capitalist character)
Hope it helps.