The USB ID Repository
The top level of the hierarchy is the list of vendors. Each vendor has a 2-byte ID, stored in the database as 4 hexadecimal digits (with lowercase letters). They can be browsed here.
Each vendor keeps a list of his devices and assigns ID's to them. Each device in the list has a 2-byte long ID, stored the same way as the vendor ID (4 hexadecimal digits).
You can have a look at USB device classes.