Portugal as we know it today was not the same Portugal that existed in the late Medieval period. What we refer to as "Portugal" nowadays was actually just a group of kingdoms and powerful houses that came together between 1200-1500. Unfortunately I do not have time to answer your question fully here, but in short no, there was no real concept of Portuguese identity during the Muslim occupation of Iberia. A.R. Disney and M.D. Newitt are two good historians who deal with Portugal during the Middle Ages if you are looking for more information.