IP (Internet Protocol) address base retrieval method and system

The invention discloses an IP (Internet Protocol) address base retrieval method and system, and relates to the field of computer networks. The method comprises the following steps: constructing an IP address base into a source code, wherein the constructed source code comprises an IP address hash table, an index storage table and function confirmation information; compiling the source code into a target program; and retrieving an IP address through the target program, and retrieving to obtain IP address attribution information. The invention also discloses an IP address base retrieval system. The technical scheme of the IP address base retrieval method and system has the advantages of being high in loading speed, low in memory occupation, high in retrieval speed and confidential in address base. The defects of a traditional IP address base retrieval method are solved.