The grouping method of ip address or mobile phone number and the query method of attribution

A technology of IP address and mobile phone number, applied in the field of network communication, can solve the problems of large system resource consumption, low system consumption, consumption and other problems, and achieve the effect of small system resource consumption, fast initialization speed and less system resources

CN103177000BActive Publication Date: 2016-06-15卓望数码技术(深圳)有限公司
4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Publication Date
2016-06-15

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

The invention discloses a grouping method of Internet protocol (IP) addresses or cell phone numbers and a query method of an attribution place. The grouping method comprises the steps of grouping of the IP addresses or the cell phone numbers first according to the attribution place, and then converting the IP addresses or the cell phone numbers in each group into integer numbers and storing the integer numbers into a digit group after the integer numbers are sequenced; and grouping of the IP addresses or the cell phone numbers to generate a digit group list according to the grouping method of the IP addresses or the cell phone numbers. The query method comprises the steps of first converting the IP addresses or the cell phone numbers which are requested to be queried into the integer numbers in a corresponding mode, and afterwards, querying the positions of the integer numbers which are matched with the IP addresses or the cell phone numbers in the digit group list through the dichotomy, and finally, returning corresponding attribution place information. By means of the grouping method of the IP addresses or the cell phone numbers and the query method of the attribution place, system consumption can be lowered, a high concurrent processing capacity is achieved, the query speed is higher than query speed of a database query and an internal memory query, and initialization time which is shorter than time of a query of a corresponding relation of internal memory distributed storage is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The invention relates to the field of network communication, more specifically, to a method for grouping IP addresses or mobile phone numbers and a method for inquiring about their locations. Background technique

[0002] Telecom operators have the need to query IP addresses and mobile phone numbers in groups. For example, query the attribution of the IP address and the attribution of the mobile phone number, etc.

[0003] There are two existing query methods:

[0004] The first one is to save the corresponding relationship between the mobile phone number segment, the IP address subnet segment and the province in the database, and traverse the database query when querying.

[0005] The second is to store the corresponding relationship between the mobile phone number segment, IP address subnet segment and province in the memory correspondence of the distributed storage system (Key-Value), and directly use the mobile phone number or IP address as the p...

Examples

Embodiment Construction

[0063] The method for grouping IP addresses or mobile phone numbers and the query method for attribution of the present invention will be further explained below in conjunction with the accompanying drawings and embodiments.

[0064] figure 1 It is the flow chart of the first embodiment of the IP address grouping method of the present invention, as figure 1 As shown, in the present embodiment, the grouping method of the IP address of the present invention comprises the following steps:

[0065] S110, grouping the IP addresses in the database according to the attribution;

[0066] S120, converting the IP address of each group into an integer number and sorting according to the increment of the value;

[0067] S130. The integer number with the smallest value in each group is used as the initial value of the IP address and stored in the array, and the initial value of the IP address is self-incremented and compared with the adjacent integer numbers; if they are equal, continue ...