"but I am not sure". You should, perhaps, read the appropriate standards. http://faqs.org/rfcs/rfc1738.html for example.
You also need to read this: http://w3.org/Provider/Style/URI
Are those two forms of "URL" trully different URL in the perspective of search engines?
There's no generic "search engine". Each is unique. You have to make a list, and then ask each vendor whether or not query string matters. Google, for example, will not tell you anything about their search engine. Others might.
Read the Definitions in the provided links. The query string isn't part of the URI. But a search engine might use it. Or might not. There's no general answer that applies to all search engines.
have to do some thing to inform search engines this situation, then what should I do?
There's no generic "search engine". Each is unique. Google, for example, will not tell you anything about their search engine. Others might.
Some retain the 301/302 information. Some don't.
search engines toss two of the url out of their database?
There's no generic "search engine". Each is unique. Google, for example, will not tell you anything about their search engine. Others might.
Some might work on the URI without the query string. Some might work on the URI with the query string.
Here's the important point.
There's no generic "search engine". Each is unique.
Rather than worry about "search engines". Read the http://w3.org/Provider/Style/URI link and design your URI's correctly. That's the absolute best you can do.