Most people can learn a melody without knowing which notes there are, also the rhythm can be reproduced not necessarily notated.
Identifying the tones may be achieved interval based or root tone based, but also by recognizing the lead tones fa-mi, ti-do, ta-la, si-la.
A big help will be knowing typical chords like augmented triades, (domisi), diminished triades, minor and major triades.
The best is when you can keep the tonal center in the short term memory and the fifth. Check the final note.
A good start for learning melodies is a repertoire of typical beginnings of a dozen of songs.
As you didn't mention in your question the Solfege-Practise I wonder whether you are aware of it:
This is nothing else than ear training by singing the chords, training usual chord progressions and melodies:
You can learn to sing (or follow/analyse by your inner ear) whole concertos and solos singing (or thinking) the notes.
I trained this by learning the inventions by bach and preludes by heart and minding them connotated with the syllables of doremi. The same I'am practising with the Concerti grossi of Handel, the Brandenburgian Concertos, Haydn's Trumpet Concerto and with each piece I have to learn new. The best is when you practise thie with a tuning fork so that you always are in the right pitch too.
You can do this when laying in bed, or when you are on a tour or when you are swimming or listening to music.
You will see that suddenly that the system of solfege (doremi) will function automatically and unconsiuosly as a concitioned reflex. So one day you will recognize melodic patterns when you listen to music ... without minding or thinking.