I have no knowledge of your website script without seeing your site. But I'm guessing your website basically queries websites and gives end user information about the website.
Like pagerank, alexa, google reader subscibers, backlinks etc...?
I'm guessing you have a backlink to the queried site, and that's what balck hatters are targetting by creating lots of queries for their site, so in effect they just generate backlinks?
It's an easy patch to fix, I'm guessing just remove the backlink? But then you want to leave backlinks for certain sites, and not all. That is tricky.