It looks like I have found a solution through the QNAP users forum. I am posting it here in the hope this might be of use to other QNAP-NAS users reading this forum.
In the Administration panel of the NAS look for the Microsoft Networking > Advanced Options. There one finds a checkbox Local Master Browser. Switch this checkbox OFF. You might need to upgrade the firmware of the NAS to the latest 3.4.x version to see this option. In my experience doing this does not prevent other units on the network to access the NAS by smb, but it seems to avoid the continuous logins from the Mac as guest. The Mac is conveniently connected to the NAS by selecting afp in the Bonjour settings.
Glad I found your solution. I was having same problem on a QNAP NAS running 3.7.3 and a Mac connecting over the LAN through SAMBA. Turned off the Microsoft Networking Master Browser Advanced Option and the flood of 'guest' logins every three minutes stopped.
Wonder if there is a way on OS X to have prevented the problem?
Anyway, thanks very much for posting your solution for me to find it over a year later.