CN110266834A - The regional lookup method and device of internet protocol-based address - Google Patents

The regional lookup method and device of internet protocol-based address Download PDF

Info

Publication number
CN110266834A
CN110266834A CN201910688369.9A CN201910688369A CN110266834A CN 110266834 A CN110266834 A CN 110266834A CN 201910688369 A CN201910688369 A CN 201910688369A CN 110266834 A CN110266834 A CN 110266834A
Authority
CN
China
Prior art keywords
internet protocol
area
protocol address
address
character string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910688369.9A
Other languages
Chinese (zh)
Other versions
CN110266834B (en
Inventor
卢健
沈晓敏
黄红艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN201910688369.9A priority Critical patent/CN110266834B/en
Publication of CN110266834A publication Critical patent/CN110266834A/en
Application granted granted Critical
Publication of CN110266834B publication Critical patent/CN110266834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/604Address structures or formats
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the present application provides the regional lookup method and device of a kind of internet protocol-based address, and method therein includes: the regional look-up command that reception includes targeted internet protocol address;It converts targeted internet protocol address to the numeric format of default long, obtains corresponding target string;Matched area number is searched in the first ordered three-dimensional array using binary chop, or searches matched area number in Hash table;First ordered three-dimensional array has the corresponding relationship between the corresponding character string of each Internet protocol address and area number;Hash table has the corresponding relationship between the corresponding index of each Internet protocol address and area number;The matched area number of target string is exported to number the area where determining targeted internet protocol address according to this area.The application can effectively improve the efficiency that corresponding area is searched using IP address, and then can effectively improve the efficiency and accuracy positioned to IP address.

Description

The regional lookup method and device of internet protocol-based address
Technical field
This application involves technical field of data processing, and in particular to the regional lookup method of internet protocol-based address and Device.
Background technique
Internet protocol address (English: Internet Protocol Address, and it is translated into internet protocol address), contracting It is written as IP address (IP Address), IP address is a kind of unified address format that IP agreement provides, it is on internet One logical address of each network and each host assignment, the difference of physical address is shielded with this.
During the risk monitoring and controls such as the anti money washing of financial industry or anti-fraud, can encounter often according to transaction IP come pair The problem of whether than two places are the same places.At this moment it needs first to find corresponding area, but each area according to IP Multiple sections IP may be had, and these sections often and are not continuous.Only the external section IP just has 64700, If searched in order one by one, efficiency be it is very low, be unable to satisfy the requirement of the real-time of risk monitoring and control substantially, and search area This functionality is again usually critically important.
Therefore, it needs to design a kind of efficient regional lookup method.
Summary of the invention
For the problems of the prior art, the application provide a kind of internet protocol-based address regional lookup method and Device can effectively improve the efficiency for searching corresponding area using IP address, and then can effectively improve and determine IP address The efficiency and accuracy of position.
In order to solve the above technical problems, the application the following technical schemes are provided:
In a first aspect, the application provides a kind of regional lookup method of internet protocol-based address, comprising:
Receive regional look-up command, wherein include targeted internet protocol address in this area's look-up command;
It converts the targeted internet protocol address to the numeric format of default long, obtains the targeted internet The corresponding target string of agreement;
It is searched in preset first ordered three-dimensional array using binary chop matched with the target string Area's number, alternatively, being searched and the matched area number of the target string in preset Hash table;
Wherein, be stored in the first ordered three-dimensional array the corresponding character string of each Internet protocol address with Corresponding relationship between area number;The corresponding index of each Internet protocol address and ground are stored in the Hash table Corresponding relationship between area's number;
The matched area number of the target string is exported to determine that the targeted internet is assisted according to this area's number Discuss the area where address.
Further, before the regional look-up command of the reception, further includes:
Obtain each area number and at least one corresponding Internet protocol address of each area number;
Using each area number and at least one corresponding Internet protocol of each area number Address generates corresponding first ordered three-dimensional array.
Further, the application each area number and each area number corresponding at least one A Internet protocol address generates corresponding first ordered three-dimensional array, comprising:
According to preset first character string transformation rule, corresponding word is converted by each Internet protocol address Symbol string;
With determining character string and the end Internet protocol of the corresponding start Internet protocol address of each area number The character string of location;
Character string or each described according to the sequence that numerical value is ascending, to each start Internet protocol address The character string for terminating Internet protocol address is ranked up, and generates corresponding first ordered three-dimensional according to corresponding ranking results Array;
Wherein, every a line in the first ordered three-dimensional array is stored with the area number, this area is compiled The character string of number corresponding start Internet protocol address and the character string for terminating Internet protocol address.
Further, described according to preset first character string transformation rule, each Internet protocol address is equal It is converted into corresponding character string, comprising:
The mode for applying the addition 0 after first separation, will be between the every two point in each Internet protocol address Number be added to three digits, obtain corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings;
In with each 12 character strings of 0 beginning, 0 occurred before first non-zero number is deleted, is obtained To each corresponding character string of Internet protocol address.
Further, before the regional look-up command of the reception, further includes:
Obtain each area number and at least one corresponding Internet protocol address of each area number;
Using each area number and at least one corresponding Internet protocol of each area number Address generates corresponding Hash table.
Further, the application each area number and each area number corresponding at least one A Internet protocol address generates corresponding Hash table, comprising:
According to preset second character string transformation rule, corresponding word is converted by each Internet protocol address Symbol string;
With determining character string and the end Internet protocol of the corresponding start Internet protocol address of each area number The character string of location;
Character string or each described according to the sequence that numerical value is ascending, to each start Internet protocol address The character string for terminating Internet protocol address is ranked up, and generates corresponding second ordered three-dimensional according to corresponding ranking results Array;
Wherein, every a line in the second ordered three-dimensional array is stored with the area number, this area is compiled The character string of number corresponding start Internet protocol address and the character string for terminating Internet protocol address;
Corresponding digital section is converted by each character string in the second ordered three-dimensional array, wherein institute It states digital section to be made of four number of segment words, and the number in every section is less than or equal to three digits;
Using the digital section, it is corresponding extremely that each area number of rule generation is established according to preset index A few allocation index, and generation includes the Hash table of each index.
Further, described according to preset second character string transformation rule, each Internet protocol address is equal It is converted into corresponding character string, comprising:
The mode for applying the addition 0 after first separation, will be between the every two point in each Internet protocol address Number be added to three digits, obtain corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings.
Further, each character string by the second ordered three-dimensional array is converted into corresponding number Field, comprising:
Each 12 character strings in the second ordered three-dimensional array are divided into four sections, and in each section It include three numbers;
By in three digits started in every section with 0,0 occurred before first non-zero number is deleted, and complete if it exists Portion be 0 section, then retain one of them 0, to obtain the corresponding digital section of each 12 character strings.
Further, the application digital section is established each area of rule generation according to preset index and is compiled Number at least one corresponding allocation index, and generate include each index Hash table, comprising:
An area number is selected to number as current objective area;
It executes the obtaining step of allocation index: numbering corresponding start Internet protocol address in objective area and terminate mutual In the corresponding digital section in networking protocol address, start Internet protocol address is chosen with sequence from left to right or is terminated mutual First in networking protocol address there is numerical value and section different from each other, and numerical value and different from each other occurs by this first Section is determined as the objective area and numbers corresponding target phase;And corresponding start Internet is numbered from the objective area Last section of beginning in protocol address and the end corresponding digital section of Internet protocol address, using the target side It successively obtains the objective area and numbers corresponding whole allocation index;
The area number numbered as current objective area is updated, and re-executes the acquisition step of the allocation index Suddenly, until acquiring at least one corresponding allocation index of each area number.
Device is searched in second aspect, the area that the application provides a kind of internet protocol-based address, comprising:
Command reception module, for receiving regional look-up command, wherein include target interconnection in this area's look-up command FidonetFido address;
Character string conversion module, for converting the targeted internet protocol address to the numerical value lattice of default long Formula obtains the corresponding target string of the targeted internet agreement;
Area number searching module, for applying binary chop to search in preset first ordered three-dimensional array and institute The matched area number of target string is stated, alternatively, searching in preset Hash table matched with the target string Area's number;
Wherein, be stored in the first ordered three-dimensional array the corresponding character string of each Internet protocol address with Corresponding relationship between area number;The corresponding index of each Internet protocol address and ground are stored in the Hash table Corresponding relationship between area's number;
Output module is encoded, is determined for exporting the matched area number of the target string with being numbered according to this area Area where the targeted internet protocol address.
Further, further includes:
Internet protocol address obtains module, respectively right for obtaining each area number and each area number At least one Internet protocol address answered;
First ordered three-dimensional array generation module, for applying each area number and each area number At least one corresponding Internet protocol address generates corresponding first ordered three-dimensional array.
Further, the first ordered three-dimensional array generation module includes:
First character string converting unit is used for according to preset first character string transformation rule, by each internet Protocol address is converted into corresponding character string;
First character string corresponding unit, for determining the word of the corresponding start Internet protocol address of each area number Symbol string and the character string for terminating Internet protocol address;
First sequencing unit, for the sequence ascending according to numerical value, to each start Internet protocol address Character string or it is each it is described terminate Internet protocol address character string be ranked up, and according to corresponding ranking results generate Corresponding first ordered three-dimensional array;
Wherein, every a line in the first ordered three-dimensional array is stored with the area number, this area is compiled The character string of number corresponding start Internet protocol address and the character string for terminating Internet protocol address.
Further, the first character string converting unit is specifically used for executing following content:
The mode for applying the addition 0 after first separation, will be between the every two point in each Internet protocol address Number be added to three digits, obtain corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings;
In with each 12 character strings of 0 beginning, 0 occurred before first non-zero number is deleted, is obtained To each corresponding character string of Internet protocol address.
Further, further includes:
Internet protocol address obtains module, respectively right for obtaining each area number and each area number At least one Internet protocol address answered;
Hash table generation module, it is corresponding for application each area number and each area number At least one Internet protocol address generates corresponding Hash table.
Further, the Hash table generation module includes:
Second character string converting unit is used for according to preset second character string transformation rule, by each internet Protocol address is converted into corresponding character string;
Second character string corresponding unit, for determining the word of the corresponding start Internet protocol address of each area number Symbol string and the character string for terminating Internet protocol address;
Second sequencing unit, for the sequence ascending according to numerical value, to each start Internet protocol address Character string or it is each it is described terminate Internet protocol address character string be ranked up, and according to corresponding ranking results generate Corresponding second ordered three-dimensional array;
Wherein, every a line in the second ordered three-dimensional array is stored with the area number, this area is compiled The character string of number corresponding start Internet protocol address and the character string for terminating Internet protocol address;
Digital section conversion unit, for converting each character string in the second ordered three-dimensional array to pair The digital section answered, wherein the digital section is made of four number of segment words, and the number in every section is less than or equal to three digits;
Allocation index establishes unit, for applying the digital section, establishes rule according to preset index and generates each institute At least one corresponding allocation index of area number is stated, and generation includes the Hash table of each index.
Further, the second character string converting unit is specifically used for executing following the description:
The mode for applying the addition 0 after first separation, will be between the every two point in each Internet protocol address Number be added to three digits, obtain corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings.
Further, the digital section conversion unit is specifically used for executing following the description:
Each 12 character strings in the second ordered three-dimensional array are divided into four sections, and in each section It include three numbers;
By in three digits started in every section with 0,0 occurred before first non-zero number is deleted, and complete if it exists Portion be 0 section, then retain one of them 0, to obtain the corresponding digital section of each 12 character strings.
Further, the allocation index establishes unit and is specifically used for executing following the description:
An area number is selected to number as current objective area;
It executes the obtaining step of allocation index: numbering corresponding start Internet protocol address in objective area and terminate mutual In the corresponding digital section in networking protocol address, start Internet protocol address is chosen with sequence from left to right or is terminated mutual First in networking protocol address there is numerical value and section different from each other, and numerical value and different from each other occurs by this first Section is determined as the objective area and numbers corresponding target phase;And corresponding start Internet is numbered from the objective area Last section of beginning in protocol address and the end corresponding digital section of Internet protocol address, using the target side It successively obtains the objective area and numbers corresponding whole allocation index;
The area number numbered as current objective area is updated, and re-executes the acquisition step of the allocation index Suddenly, until acquiring at least one corresponding allocation index of each area number.
The third aspect, the application provides a kind of electronic equipment, including memory, processor and storage are on a memory and can The computer program run on a processor, the processor when executing described program with realizing the internet protocol-based The step of regional lookup method of location.
Fourth aspect, the application provide a kind of computer readable storage medium, are stored thereon with computer program, the calculating The step of regional lookup method of the internet protocol-based address is realized when machine program is executed by processor.
As shown from the above technical solution, the regional lookup method and dress of internet protocol-based address provided by the present application It sets, method therein includes: the regional look-up command that reception includes targeted internet protocol address;By targeted internet agreement Address is converted into the numeric format of default long, obtains corresponding target string;It is orderly first using binary chop Matched area number is searched in three-dimensional array, or matched area number is searched in Hash table;First ordered three-dimensional array There is the corresponding relationship between the corresponding character string of each Internet protocol address and area number;Hash table has each Corresponding relationship between the corresponding index of Internet protocol address and area number;Export the matched area number of target string To number the area where determining targeted internet protocol address according to this area, can effectively improve using IP address lookup pair The efficiency in area, and search procedure high reliablity are answered, lookup result accuracy is high, and then can effectively improve and carry out to IP address The efficiency and accuracy of positioning, and can effectively improve and the risk monitoring and controls such as anti money washing or anti-fraud are carried out according to positioning result Efficiency and accuracy.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the application Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is that the configuration diagram of device is searched in the area of the internet protocol-based address of the application.
Fig. 2 is the flow diagram of the regional lookup method of the internet protocol-based address in the embodiment of the present application.
Fig. 3 is step 010 and step in the regional lookup method of the internet protocol-based address in the embodiment of the present application Rapid 020 flow diagram.
Fig. 4 is the stream of the step 020 in the regional lookup method of the internet protocol-based address in the embodiment of the present application Journey schematic diagram.
Fig. 5 is the stream of the step 021 in the regional lookup method of the internet protocol-based address in the embodiment of the present application Journey schematic diagram.
Fig. 6 is step 030 and step in the regional lookup method of the internet protocol-based address in the embodiment of the present application Rapid 040 flow diagram.
Fig. 7 is the stream of the step 040 in the regional lookup method of the internet protocol-based address in the embodiment of the present application Journey schematic diagram.
Fig. 8 is the stream of the step 041 in the regional lookup method of the internet protocol-based address in the embodiment of the present application Journey schematic diagram.
Fig. 9 is the stream of the step 044 in the regional lookup method of the internet protocol-based address in the embodiment of the present application Journey schematic diagram.
Figure 10 is the stream of the step 045 in the regional lookup method of the internet protocol-based address in the embodiment of the present application Journey schematic diagram.
Figure 11 is that the structural schematic diagram of device is searched in the area of the internet protocol-based address in the embodiment of the present application.
Figure 12 is the structural schematic diagram of the electronic equipment in the embodiment of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In attached drawing, technical solutions in the embodiments of the present application carries out clear, complete description, it is clear that described embodiment is Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall in the protection scope of this application.
In view of existing during the risk monitoring and controls such as the anti money washing of financial industry or anti-fraud, root can be encountered often The problem of whether two places are the same places compared according to transaction IP.At this moment it needs first to be found correspondingly according to IP Area, but each area may have multiple sections IP, and these sections often and are not continuous.The only external section IP Just have 64700, if searched in order one by one, efficiency be it is very low, be unable to satisfy wanting for the real-time of risk monitoring and control substantially Ask, and search regional this functionality be usually it is critically important, therefore, the application provides a kind of internet protocol-based address Regional lookup method, the regional of internet protocol-based address search device, electronic equipment and computer readable storage medium, lead to Cross the regional look-up command of reception, wherein include targeted internet protocol address in this area's look-up command;The target is mutual Networking protocol address is converted into the numeric format of default long, obtains the corresponding target character of the targeted internet agreement String;It searches in preset first ordered three-dimensional array using binary chop and is compiled with the matched area of the target string Number, alternatively, being searched and the matched area number of the target string in preset Hash table;
Wherein, be stored in the first ordered three-dimensional array the corresponding character string of each Internet protocol address with Corresponding relationship between area number;The corresponding index of each Internet protocol address and ground are stored in the Hash table Corresponding relationship between area's number;The matched area number of the target string is exported according to this area's number determination Area where targeted internet protocol address can effectively improve the efficiency for searching corresponding area using IP address, and search Process reliability is high, and lookup result accuracy is high, and then can effectively improve the efficiency and accuracy positioned to IP address, And the efficiency and accuracy that the risk monitoring and controls such as anti money washing or anti-fraud are carried out according to positioning result can be effectively improved.
For above content, the embodiment of the present application provides a kind of area lookup for realizing internet protocol-based address Device is searched in the area of the internet protocol-based address of method, and device is searched in the area of the internet protocol-based address can Think a kind of server 01, referring to Fig. 1, the server 01 can at least one be used for provide related data database 02 it Between communicate to connect, can also be communicated to connect between at least one client device 03.
Based on above content, the server 01 can include online targeted internet association from the reception of client device 03 The regional look-up command of address is discussed, then the targeted internet protocol address is converted default long by the server 01 Numeric format, obtain the corresponding target string of the targeted internet agreement, server 01 can be online from database 02 Obtain corresponding first ordered three-dimensional array, searched in preset first ordered three-dimensional array using binary chop with it is described The matched area number of target string, alternatively, being searched and the matched area of the target string in preset Hash table Number;Wherein, the corresponding character string of each Internet protocol address and ground are stored in the first ordered three-dimensional array Corresponding relationship between area's number;The corresponding index of each Internet protocol address and area are stored in the Hash table Corresponding relationship between number;Then, the matched area number of the target string is sent to the client by server 01 End 02, client 02 determine the area where the targeted internet protocol address further according to this area's number.
On this basis, the client 02 is according to where the determining targeted internet protocol address of this area's number Behind area, compare each targeted internet protocol address of the target user in preset period of time whether in areal, or Whether person each targeted internet protocol address is in each area in same country, and according to comparison result application The risk monitoring and controls model such as preset anti money washing or anti-fraud judges whether the target user occurs anti money washing or anti-fraud etc. Behavior.
It is understood that the client device may include smart phone, Flat electronic equipment, network machine top box, Portable computer, desktop computer, personal digital assistant (PDA), mobile unit, intelligent wearable device etc..Wherein, the intelligence Wearable device may include smart glasses, smart watches, Intelligent bracelet etc..
In practical applications, the part that the area of internet protocol-based address is searched can be as described in above content Server side executes, and operation that can also be all is all completed in the client device.It specifically can be according to the client The processing capacity of equipment and the limitation of user's usage scenario etc. select.The application is not construed as limiting this.If all behaviour Work is all completed in the client device, and the client device can also include processor.
Above-mentioned client device can have communication module (i.e. communication unit), can be led to long-range server Letter connection, realizes and transmits with the data of the server.The server may include the server of task schedule center side, It also may include the server of halfpace in other implement scenes, such as have communication linkage with task schedule central server Third-party server platform server.The server may include single computer unit, also may include multiple The server cluster of server composition or the server architecture of distributed devices.
Any suitable network protocol can be used between the server and the client device to be communicated, including In the network protocol that the application submitting day is not yet developed.The network protocol for example may include ICP/IP protocol, UDP/IP Agreement, http protocol, HTTPS agreement etc..Certainly, the network protocol for example can also include using on above-mentioned agreement RPC agreement (Remote Procedure Call Protocol, remote procedure call protocol), REST agreement (Representational State Transfer, declarative state transfer protocol) etc..
In order to effectively improve the efficiency for applying IP address to search corresponding area, and then can effectively improve to IP address The efficiency and accuracy positioned, the application, which provides a kind of executing subject, to be server above-mentioned or the base of client In the embodiment of the regional lookup method of Internet protocol address, referring to fig. 2, the area of the internet protocol-based address is looked into Looking for method specifically includes following content:
Step 100: receiving regional look-up command, wherein include targeted internet agreement in this area's look-up command Location.
Step 200: converting the targeted internet protocol address to the numeric format of default long, obtain the mesh Mark the corresponding target string of Internet protocol;
Step 300: being searched in preset first ordered three-dimensional array and the target string using binary chop Matched area number, alternatively, being searched and the matched area number of the target string in preset Hash table.
It is understood that it is corresponding to be stored with each Internet protocol address in the first ordered three-dimensional array Corresponding relationship between character string and area number;It is corresponding that each Internet protocol address is stored in the Hash table Corresponding relationship between index and area number.
Step 400: exporting the matched area number of the target string to determine the target according to this area's number Area where Internet protocol address.
In order to improve the application reliability of the first ordered three-dimensional array, IP address is applied to search accordingly to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on internet In one embodiment of the regional lookup method of protocol address, referring to Fig. 3, looked into the area of the internet protocol-based address It looks for before the step 100 of method, also specifically includes following content:
Step 010: obtaining each area number and at least one corresponding internet of each area number Protocol address.
Step 020: application each area number and each area number it is corresponding at least one mutually Networking protocol address generates corresponding first ordered three-dimensional array.
In order to effectively improve the acquisition accuracy of Internet protocol address, IP address is applied to search correspondence to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on interconnection In one embodiment of the regional lookup method of fidonetFido address, referring to fig. 4, the step 020 specifically includes following content:
Step 021: according to preset first character string transformation rule, converting each Internet protocol address to Corresponding character string.
Step 022: determining the character string of the corresponding start Internet protocol address of each area number and terminate interconnection The character string of fidonetFido address.
Step 023: according to the sequence that numerical value is ascending, character string to each start Internet protocol address or Each character string for terminating Internet protocol address is ranked up, and generates corresponding first according to corresponding ranking results Ordered three-dimensional array.
It is understood that every a line in the first ordered three-dimensional array be stored with the area number, It numbers the character string of corresponding start Internet protocol address and terminates the character string of Internet protocol address in this area.
In order to effectively improve the accuracy and reliability of character string conversion, IP address is applied to search correspondence to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on interconnection In one embodiment of the regional lookup method of fidonetFido address, referring to Fig. 5, the step 021 specifically includes following content:
Step 0211: the mode of the addition 0 after first separation is applied, by every two in each Internet protocol address Number between a point is added to three digits, obtains corresponding 12 characters of each Internet protocol address String.
Step 0212: deleting each separation in each 12 character strings.
Step 0213: in each 12 character strings of 0 beginning, deleting before first non-zero number 0 occurred, obtains each corresponding character string of the Internet protocol address.
In order to improve the application reliability of Hash table, to further increase the efficiency for applying IP address to search corresponding area, And then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based address of the application In one embodiment of regional lookup method, referring to Fig. 6, in the step of the regional lookup method of the internet protocol-based address Also specifically include following content before rapid 100:
Step 030: obtaining each area number and at least one corresponding internet of each area number Protocol address.
Step 040: application each area number and each area number it is corresponding at least one mutually Networking protocol address generates corresponding Hash table.
In order to improve the acquisition efficiency and accuracy of Hash table, IP address is applied to search corresponding area to further increase Efficiency, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based of the application In one embodiment of the regional lookup method of address, referring to Fig. 7, the step 040 specifically includes following content:
Step 041: according to preset second character string transformation rule, converting each Internet protocol address to Corresponding character string.
Step 042: determining the character string of the corresponding start Internet protocol address of each area number and terminate interconnection The character string of fidonetFido address.
Step 043: according to the sequence that numerical value is ascending, character string to each start Internet protocol address or Each character string for terminating Internet protocol address is ranked up, and generates corresponding second according to corresponding ranking results Ordered three-dimensional array.
It is understood that every a line in the second ordered three-dimensional array be stored with the area number, It numbers the character string of corresponding start Internet protocol address and terminates the character string of Internet protocol address in this area.
Step 044: corresponding digital section is converted by each character string in the second ordered three-dimensional array, Wherein, the digital section is made of four number of segment words, and the number in every section is less than or equal to three digits.
Step 045: applying the digital section, rule is established according to preset index and generates each area number respectively At least one corresponding allocation index, and generation includes the Hash table of each index.
In order to effectively improve the accuracy and reliability of character string conversion, IP address is applied to search correspondence to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on interconnection In one embodiment of the regional lookup method of fidonetFido address, referring to Fig. 8, the step 041 specifically includes following content:
Step 0411: the mode of the addition 0 after first separation is applied, by every two in each Internet protocol address Number between a point is added to three digits, obtains corresponding 12 characters of each Internet protocol address String.
Step 0412: deleting each separation in each 12 character strings.
In order to effectively improve the reliability of digital section conversion, to further increase the effect for applying IP address to search corresponding area Rate, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based of the application In one embodiment of the regional lookup method of location, referring to Fig. 9, the step 044 specifically includes following content:
Step 0441: each 12 character strings in the second ordered three-dimensional array are divided into four sections, And each Duan Zhongjun includes three numbers.
Step 0442: by three digits started in every section with 0,0 occurred before first non-zero number is deleted, And all 0 section if it exists, then retain one of them 0, to obtain the corresponding number of each 12 character strings Section.
In order to effectively improve the application reliability of Hash table, to further increase the effect for applying IP address to search corresponding area Rate, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based of the application In one embodiment of the regional lookup method of location, referring to Figure 10, the step 045 specifically includes following content:
Step 0451: an area number being selected to number as current objective area.
Step 0452: execute the obtaining step of allocation index: objective area with numbering corresponding start Internet agreement In location and the end corresponding digital section of Internet protocol address, with choosing start Internet agreement with sequence from left to right There is numerical value and section different from each other in location or terminate in Internet protocol address first, and by this first occur numerical value and Section different from each other is determined as the objective area and numbers corresponding target phase;And it is numbered from the objective area corresponding Last section of beginning in start Internet protocol address and the end corresponding digital section of Internet protocol address, application The target side successively obtains the objective area and numbers corresponding whole allocation index;
Step 0453: updating the area number numbered as current objective area, and re-execute the allocation index Obtaining step, until acquire at least one corresponding allocation index of each area number.
In order to further illustrate this programme, it is corresponding that the application also provides a kind of application binary search Internet protocol address Area number method specific application example, specifically include following content:
(1) first IP is converted to the numeric format of long.Transform mode is to the IP section polishing 3 less than 3 digits Then intermediate " " is removed in position, for giving omission processing with 0 beginning.Such as: be after the IP conversion of " 192.168.0.1 " 192168000001, into 84232079091 after " 84.232.79.91 " is converted.
(2) section IP after conversion is sorted from small to large, is stored in the orderly 3 dimension group that a length is n.3 dimensions It is as shown in table 1 to respectively indicate starting ip, end IP and area number:
Table 1
Starting ip Terminate IP Area number
1011000000 1011255255 410
1016000000 1019255255 410
1020000000 1020255255 764
1021000000 1021255255 392
1022000000 1023255255 356
(3) any IP is searched with the thought of binary chop.Finding step is as follows:
S1: judge whether it belongs to that section IP among subordinate ordered array:
The intermediate corresponding area IP sections of is returned to if belonged to.
Otherwise S2 and S3 is executed:
S2: if it is greater than intermediate IP sections of end IP, then the second half section for intercepting array is new array;
S3: if it is less than intermediate IP sections of starting ip, then the front half section for intercepting array is new array;
The above search operation is repeated from obtained new array.
The lookup space that can reduce half every time, time complexity (at most inquiry time are searched by this method Number) be O (log2 (n)), in the case where n=64700 IP section under, most lookups 16 times, so that it may find location.Base Originally it can achieve requirement of real-time.
For further instruction above scheme, the application also provides a kind of application Hash lookup mode and obtains Target IP pair The specific application example for the area number answered, particular content are as follows:
1. converting character string for IP.Transformation rule are as follows: to IP section polishing 3 less than 3 digits, then remove centre “.”。
2. minimizing ground by reasonably intercepting character string from left to right and establishing index, (key is interception to deposit HASH table IP character string is worth for area).The time complexity (searching number) of this method is O (1).Its difficult point is how to minimize Index is established, if not intercepting character string, index is established to each complete IP, then it will be surprisingly big that space, which is occupied, 255 biquadratic.
The method for minimizing index is Reasonable character string.Such as table 2:
Table 2
Starting ip Terminate IP Area number
001011000000 001011255255 410
It is " 001011 " respective value is " 410 " that character first six digits, which can be intercepted, and establish index, and this reduces 255*255-1 A index, for first six digits be " 001011 " regardless of IP what value be followed by, it must be " 410 " this regional IP.But Actual conditions are often much more complex, and many IP sections are not that completely entire codomain is taken as 0-255.Such as table 3:
Table 3
Starting ip Terminate IP Area number
023002137101 023004092007 840
This index that split out several different lengths.Such as:
" 023003 ", it is ensured that first six digits are that the certain of " 023003 " belongs to regional " 840 " " 023002138 ", can also be protected It demonstrate,proves first nine and centainly belongs to " 840 " for " 023002138 ";It but cannot be " 023002137 ", because first six digits are " 023002137 " is not necessarily regional " 840 ", such as " 023002137100 ".The thinking of algorithm is the foundation index minimized Number, but these indexes can map all IP for belonging to this area correctly.
The algorithm specifically indexed is as follows.
Starting ip and end IP are first split as four sections by every three one section, use stored digital.Such as:
" 023002137101 " in upper table is stored as [23,2,137,101];" 023004092007 " be stored as [23, 4,92,7]。
It is different since which section to compare two IP, is second segment in example table: 2 ≠ 4.Then this is generated using following algorithm IP sections of all indexes (minimum number and can include all situations), shown in table 4 specific as follows:
Table 4
Wherein, the above-mentioned application example for obtaining the corresponding area number of Target IP using Hash lookup mode is corresponding specific It is exemplified below:
(1) format is converted
Corresponding character string is converted by the corresponding each IP of each area number.Transformation rule are as follows: to less than 3 digits IP section polishing 3, then remove intermediate " ".
(2) orderly storage
The each area number of IP for translating into corresponding character string is ranked up according to the sequence of numerical value from small to large, and Each IP for being converted into corresponding character string after sequence is stored.
(3) conversion of digital section
S1: the IP for translating into corresponding character string is split as four sections by every three one section, and will be located at number in every section Preceding 0 is deleted, and is stored with digital section, and for convenience, digital section is in subsequent abbreviation are as follows: section.
S2: selecting an area number to number as current objective area, can be since first area number CODE1 It chooses, wherein A1-1, B1-1, C1-1 that each section of byte-identifier of the corresponding starting ip of first area number CODE1 is And D1-1;Corresponding each section of byte A1-2, B1-2, C1-2 and the D1-2 terminated in IP of first area number CODE1.
S3: determine objective area number in starting ip each section of byte A1-1 into D1-1 with terminate IP in each section of word The different byte of A1-2 numerical value into D1-2 is saved, and starting ip is chosen with sequence from left to right or terminates first appearance in IP The section of different numerical value, and the starting ip that is defined as in the number of the objective area and terminate the common target phase T1-12 of IP.
(4) index is established
S1: judge that objective area numbers working as in leading portion (the 4th section of D1-1) and end IP for corresponding starting ip and works as leading portion Whether (the 4th section of D1-2) is the target phase;
If so, the numerical value for illustrating that the objective area is numbered in first three section of corresponding starting ip and end IP is homogeneous Together, and due to starting ip and terminate IP be according to numerical value have it is small arranged to big sequence, it can be considered that starting ip is worked as It is small that numeric ratio in leading portion (the 4th section of D1-1) terminates the numerical value in leading portion (the 4th section of D1-2) in IP, and executes step S2;
If it is not, and objective area number corresponding starting ip third section C1-1 and terminate IP in third section C1-2 be institute Target phase is stated, S5 is thened follow the steps;
If it is not, and objective area number corresponding starting ip second segment B1-1 and terminate IP in second segment B1-2 be institute Target phase is stated, S13 is thened follow the steps;
S2: judge the objective area number corresponding starting ip when whether the numerical value of leading portion (the 4th section of D1-1) differs In 0, and it is described terminate in IP when whether the numerical value of leading portion (the 4th section of D1-2) is not equal to 255;
If the objective area number corresponding starting ip while the numerical value of leading portion (the 4th section of D1-1) is not 0, Meet it is described end IP in when leading portion (the 4th section of D1-2) numerical value be not equal to 255, then execute S3;
If the objective area number corresponding starting ip when the numerical value of leading portion (the 4th section of D1-1) is 0, and the knot In beam IP when leading portion (the 4th section of D1-2) numerical value be equal to 255, then execute S4.
S3: by the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) with end IP in it is current Corresponding four sections IP sections for including all four sections of whole numerical value in section (the 4th section of D1-2) are as current goal area volume Number IP index.
For example, terminating in IP if corresponding four sections of the starting ip of current goal area number are [23.2.137.101] Four sections are [23.2.137.137], then make [23.2.137.101], [23.2.137.102] ... .. [23.2.137.137] For the IP index of current goal area number.
S4: it is current in leading portion (the 4th section of D1-1) and end IP that working as corresponding starting ip, is numbered into the objective area Section (the 4th section of D1-2) delete, and by remaining starting ip or terminate IP in include first three section three sections of IP sections of conducts The IP index of current goal area number.
For example, terminating four in IP if corresponding four sections of the starting ip of current goal area number are [23.2.137.0] Section is [23.2.137.255], then the IP index by [23.2.137] as current goal area number.
S5: judge that numerical value as leading portion (the 4th section of D1-1) and the end of corresponding starting ip are numbered in the objective area In IP when leading portion (the 4th section of D1-2) the numerical value size relation between 0 and 255 respectively;
If the objective area number corresponding starting ip when the numerical value of leading portion (the 4th section of D1-1) is not 0 and is less than 255, and if the objective area number it is corresponding terminate IP when the numerical value of leading portion (the 4th section of D1-2) is not 255 and is not 0, Then execute S6;
If the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) numerical value be 0, and if described Objective area number it is corresponding terminate IP when leading portion (the 4th section of D1-2) numerical value be 255, then execute S10;
If the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) numerical value be 255, and if institute State objective area number it is corresponding terminate IP when the numerical value of leading portion (the 4th section of D1-2) is also 255, then execute S11;
If the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) numerical value be 0, and if described Objective area number it is corresponding terminate IP when the numerical value of leading portion (the 4th section of D1-2) is also 0, then execute S12;
S6: to the objective area number corresponding starting ip when the current value of leading portion (the 4th section of D1-1) is to 255 Between numerical value it is corresponding include all four sections IP the section of four sections it is sub as the first IP index of current goal area number Group, and execute S7.
For example, if corresponding four sections of the starting ip of current goal area number are [23.2.24.101], it will The first IP index of [23.2.24.101], [23.2.24.102] ... [23.2.24.255] as current goal area number Subgroup.
S7: to the objective area number it is corresponding terminate IP when leading portion (the 4th section of D1-2) 0 to current value it Between numerical value it is corresponding include all four sections IP sections of four sections as the 2nd IP index subgroup of current goal area number, Then execute S8.
For example, if four sections terminated in IP of current goal area number are [23.2.127.137], it will The 2nd IP index of [23.2.127.0], [23.2.127.2] ... [23.2.127.137] as current goal area number Group.
S8: deleting working as in leading portion (the 4th section of D1-1) and end IP for the starting ip and work as leading portion (the 4th section of D1-2), And to the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) the last period (namely third section C1- 1) it after numerical value adds 1, obtains corresponding including first to three sections IP sections of starting of third section, and, by the objective area Number in corresponding end IP after the numerical value of the last period of leading portion (the 4th section of D1-2) subtracts 1, obtain corresponding including the One to three sections IP sections of end of third section, will include three sections IP section of the starting to the whole three for terminating three sections IP sections then IP sections of section then executes S9 as the 3rd IP index subgroup of current goal area number.
For example, terminating four in IP if corresponding four sections of the starting ip of current goal area number are [23.2.24.101] Section is [23.2.127.137], and the first IP index subgroup is [23.2.24.101], [23.2.24.102] ... [23.2.24.255], the 2nd IP index subgroup be [23.2.127.0], [23.2.127.1] ... [23.2.127.137], then 3rd IP index subgroup of current goal area number is [23.2.25], [23.2.26] ... .. [23.2.24.126].
S9: first IP index subgroup, twoth IP index subgroup and threeth IP index subgroup of the S7 into S8 are formed current Objective area number corresponding IP index.
For example, terminating the in IP if corresponding four sections of the starting ip of current goal area number are [23.2.24.101] Four sections are [23.2.127.137], and the first IP index subgroup is [23.2.24.101], [23.2.24.102] ... [23.2.24.255], the 2nd IP index subgroup are [23.2.127.0], [23.2.127.1] ... [23.2.127.137], the Three IP index subgroups are [23.2.25], [23.2.26] ... .. [23.2.126], the then corresponding IP rope of current goal area number Draw as shown in table 5.
Table 5
S10: deleting working as in leading portion (the 4th section of D1-1) and end IP for the starting ip and work as leading portion (the 4th section of D1-2), Generation includes first to three sections IP sections of starting of third section of starting ip, and, generation includes to terminate the first of IP to the Three sections IP sections of three sections of end, then, will include it is described starting three sections IP section to terminate three sections IP sections whole three sections IP sections As the IP index of current goal area number.
For example, terminating four sections in IP if corresponding four sections of the starting ip of current goal area number are [23.2.24.0] For [23.2.127.255], then the corresponding IP index of current goal area number is [23.2.24], [23.2.25] ... [23.2.127]。
S11: by the starting ip when leading portion (the 4th section of D1-1) it is corresponding four sections IP section as current goal area volume Number one of IP index, and delete the starting ip as leading portion (the 4th section of D1-1) and terminate to work as (the 4th section of leading portion in IP D1-2), and to the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) the last period (namely third Section C1-1) numerical value add 1 after, obtain corresponding including first to three sections IP sections of starting of third section, and, by the target The first of the corresponding end IP of area number then, will include described four sections IP sections, rise to three sections IP sections of end of third section Begin three sections IP sections to terminate three sections IP sections all three sections IP sections as the IP index of current goal area number.
For example, terminating four in IP if corresponding four sections of the starting ip of current goal area number are [23.2.24.255] Section is [23.2.127.255], then the corresponding IP index of current goal area number is [23.2.24.255], further includes [23.2.25]、[23.2.26]…[23.2.127]。
S12: by the end IP when leading portion (the 4th section of D1-2) it is corresponding four sections IP section it is regional as current goal One of IP index of number, and delete working as in leading portion (the 4th section of D1-1) and end IP for the starting ip and work as leading portion the (the 4th Section D1-2), and obtaining the corresponding of starting ip includes first to three sections IP sections of starting of third section, and, to the target Area number is corresponding terminate IP subtract 1 when the numerical value of the last period (namely third section C1-1) of leading portion (the 4th section of D1-2) Afterwards, corresponding first to three sections IP the section of end of third section for terminating IP are obtained, then, will include described four sections IP sections, Begin three sections IP sections to terminate three sections IP sections all three sections IP sections as the IP index of current goal area number.
For example, terminating four sections in IP if corresponding four sections of the starting ip of current goal area number are [23.2.24.0] For [23.2.127.0], then the corresponding IP index of current goal area number is [23.2.127.0], further include [23.2.24], [23.2.25]…[23.2.126]。
S13: judge the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) numerical value and knot In beam IP when leading portion (the 4th section of D1-2) the numerical value size relation between 0 and 255 respectively;
If the objective area number corresponding starting ip when the numerical value of leading portion (the 4th section of D1-1) is not 0 and is less than 255, and if the objective area number it is corresponding terminate IP when the numerical value of leading portion (the 4th section of D1-2) is not 255 and is not 0, Then execute S14;
S14: to the objective area number corresponding starting ip when the current value of leading portion (the 4th section of D1-1) is to 255 Between numerical value it is corresponding include all four sections IP the section of four sections it is sub as the first IP index of current goal area number Group, and execute S15.
For example, if corresponding four sections of the starting ip of current goal area number are [23.2.24.101], it will The first IP index of [23.2.24.101], [23.2.24.102] ... [23.2.24.255] as current goal area number Subgroup.
S15: to the objective area number it is corresponding terminate IP when leading portion (the 4th section of D1-2) 0 to current value it Between numerical value it is corresponding include all four sections IP sections of four sections as the 2nd IP index subgroup of current goal area number, Then execute S16.
For example, if four sections terminated in IP of current goal area number are [23.14.127.137], it will The 2nd IP rope of [23.14.127.0], [23.14.127.2] ... [23.14.127.137] as current goal area number Introduction group.
S16: deleting working as in leading portion (the 4th section of D1-1) and end IP for the starting ip and work as leading portion (the 4th section of D1-2), And to the objective area number corresponding starting ip when leading portion (the 4th section of D1-1) the last period (namely third section C1- 1) numerical value adds 1, obtains corresponding including first to three sections IP sections of starting of third section, and, the objective area is compiled It is number corresponding terminate in IP after the numerical value of the last period of leading portion (the 4th section of D1-2) subtracts 1, obtain corresponding including first To three sections IP sections of end of third section, then, three sections IP sections will be originated and terminate three sections of IP sections of compositions new starting ips and end IP, at this point, new starting ip and end IP only include content of the first segment to third section, then to the new starting ip With the content for terminating IP execution abovementioned steps S6 to S12, i.e., the leading portion of working as of initial IP above-mentioned is replaced with into third section C1-1, and The leading portion of working as above-mentioned for terminating IP is replaced with into third section C1-2.
For example, terminating four in IP if corresponding four sections of the starting ip of current goal area number are [23.2.24.101] Section is [23.2.127.137], and the first IP index subgroup is [23.2.24.101], [23.2.24.102] ... [23.2.24.255], the 2nd IP index subgroup be [23.14.127.0], [23.14.127.1] ... [23.14.127.137], Then the new starting ip of current goal area number is [23.2.25] and new end IP is [23.14.126];And laggard one Step judge in [23.2.25] and [23.14.126] to last position be not 0 or 255, then obtain the first of new starting ip IP index subgroup is [23.2.25], [23.2.26] ... [23.2.255];It is described terminate IP the 2nd IP index subgroup be [23.14.0], [23.14.1] ... [23.14.126], the 3rd IP index subgroup are [23.3], [23.4] ... [23.13].
Based on this, if the starting ip of objective area number is [23.2.24.101], four sections terminated in IP are [23.14.127.137], then the corresponding IP index of current goal area number is as shown in table 6.
Table 6
It is similar based on above content, if starting ip is all different with the numerical value in each section in end IP, although should A possibility that kind situation occurs very little, but the aforesaid way of application the application, still can establish manipulative indexing to such situation.
Such as: if the starting ip of objective area number is [23.2.24.101], four sections terminated in IP are [28.14.127.137], then the corresponding IP index of current goal area number is as shown in table 7.
Table 7
(5) area is searched
According to the index of aforementioned foundation, the corresponding area number of Target IP is searched using hash algorithm.
As can be seen from the above description, the regional lookup method for the internet protocol-based address that the application application example provides, Solve the problems, such as that the IP encountered in doing anti money washing modeling process searches area.It can achieve real-time searching effect, while memory It occupies also little.1. greatly shortening the waiting time that modeling personnel do Feature Engineering time-histories sort run, working efficiency is improved.It can be with Reach instantaneous results, provides feasibility to prediction in thing.3. this method is equally applicable to other scenes for encountering similar problems.
For software view, in order to effectively improve the efficiency for applying IP address to search corresponding area, and then can The efficiency and accuracy positioned to IP address is effectively improved, the application provides one kind for realizing above-mentioned based on internet protocol Search the implementation of device in the area for discussing the internet protocol-based address of all or part of the content in the regional lookup method of address Example, referring to Figure 11, it specifically includes following content that device is searched in the area of the internet protocol-based address:
Command reception module 10, for receiving regional look-up command, wherein include that target is mutual in this area's look-up command Networking protocol address.
Character string conversion module 20, for converting the targeted internet protocol address to the numerical value lattice of default long Formula obtains the corresponding target string of the targeted internet agreement.
Area number searching module 30, for searching in preset first ordered three-dimensional array using binary chop and The matched area number of target string, alternatively, being searched in preset Hash table matched with the target string Area number.
It is understood that it is corresponding to be stored with each Internet protocol address in the first ordered three-dimensional array Corresponding relationship between character string and area number;It is corresponding that each Internet protocol address is stored in the Hash table Corresponding relationship between index and area number.
Output module 40 is encoded, it is true to be numbered according to this area for exporting the matched area number of the target string Area where the fixed targeted internet protocol address.
The embodiment that device is searched in the area of internet protocol-based address provided by the embodiments of the present application can specifically be used In the process flow of the embodiment for the regional lookup method for executing the internet protocol-based address in above-described embodiment, function Details are not described herein, is referred to the detailed description of the regional lookup method embodiment of above-mentioned internet protocol-based address.
As can be seen from the above description, device, energy are searched in the area of internet protocol-based address provided by the embodiments of the present application The efficiency that corresponding area is searched using IP address, and search procedure high reliablity are enough effectively improved, lookup result accuracy is high, into And the efficiency and accuracy positioned to IP address can be effectively improved, and can effectively improve and carry out according to positioning result The efficiency and accuracy of the risk monitoring and controls such as anti money washing or anti-fraud.
In order to improve the application reliability of the first ordered three-dimensional array, IP address is applied to search accordingly to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on internet The area of protocol address also specifically includes following content in one embodiment with searching device:
Internet protocol address obtains module, respectively right for obtaining each area number and each area number At least one Internet protocol address answered.
First ordered three-dimensional array generation module, for applying each area number and each area number At least one corresponding Internet protocol address generates corresponding first ordered three-dimensional array.
In order to effectively improve the acquisition accuracy of Internet protocol address, IP address is applied to search correspondence to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on interconnection With searching device in one embodiment, the first ordered three-dimensional array generation module specifically includes as follows in the area of fidonetFido address Content:
First character string converting unit is used for according to preset first character string transformation rule, by each internet Protocol address is converted into corresponding character string.
First character string corresponding unit, for determining the word of the corresponding start Internet protocol address of each area number Symbol string and the character string for terminating Internet protocol address.
First sequencing unit, for the sequence ascending according to numerical value, to each start Internet protocol address Character string or it is each it is described terminate Internet protocol address character string be ranked up, and according to corresponding ranking results generate Corresponding first ordered three-dimensional array.
It is understood that every a line in the first ordered three-dimensional array be stored with the area number, It numbers the character string of corresponding start Internet protocol address and terminates the character string of Internet protocol address in this area.
In order to effectively improve the accuracy and reliability of character string conversion, IP address is applied to search correspondence to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on interconnection With searching device in one embodiment, the first character string converting unit is specifically used for executing in following in the area of fidonetFido address Hold:
The mode for applying the addition 0 after first separation, will be between the every two point in each Internet protocol address Number be added to three digits, obtain corresponding 12 character strings of each Internet protocol address.
Delete each separation in each 12 character strings.
In with each 12 character strings of 0 beginning, 0 occurred before first non-zero number is deleted, is obtained To each corresponding character string of Internet protocol address.
In order to improve the application reliability of Hash table, to further increase the efficiency for applying IP address to search corresponding area, And then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based address of the application Area is searched in one embodiment of device, also specifically includes following content:
Internet protocol address obtains module, respectively right for obtaining each area number and each area number At least one Internet protocol address answered.
Hash table generation module, it is corresponding for application each area number and each area number At least one Internet protocol address generates corresponding Hash table.
In order to improve the acquisition efficiency and accuracy of Hash table, IP address is applied to search corresponding area to further increase Efficiency, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based of the application The area of address is searched in one embodiment of device, and the Hash table generation module specifically includes following content:
Second character string converting unit is used for according to preset second character string transformation rule, by each internet Protocol address is converted into corresponding character string.
Second character string corresponding unit, for determining the word of the corresponding start Internet protocol address of each area number Symbol string and the character string for terminating Internet protocol address.
Second sequencing unit, for the sequence ascending according to numerical value, to each start Internet protocol address Character string or it is each it is described terminate Internet protocol address character string be ranked up, and according to corresponding ranking results generate Corresponding second ordered three-dimensional array.
It is understood that every a line in the second ordered three-dimensional array be stored with the area number, It numbers the character string of corresponding start Internet protocol address and terminates the character string of Internet protocol address in this area.
Digital section conversion unit, for converting each character string in the second ordered three-dimensional array to pair The digital section answered, wherein the digital section is made of four number of segment words, and the number in every section is less than or equal to three digits.
Allocation index establishes unit, for applying the digital section, establishes rule according to preset index and generates each institute At least one corresponding allocation index of area number is stated, and generation includes the Hash table of each index.
In order to effectively improve the accuracy and reliability of character string conversion, IP address is applied to search correspondence to further increase The efficiency in area, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the application based on interconnection The area of fidonetFido address is searched in one embodiment of device, and the second character string converting unit is specifically used for executing following Content:
The mode for applying the addition 0 after first separation, will be between the every two point in each Internet protocol address Number be added to three digits, obtain corresponding 12 character strings of each Internet protocol address.
Delete each separation in each 12 character strings.
In order to effectively improve the reliability of digital section conversion, to further increase the effect for applying IP address to search corresponding area Rate, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based of the application The area of location is searched in one embodiment of device, and the digital section conversion unit specifically includes following content:
Each 12 character strings in the second ordered three-dimensional array are divided into four sections, and in each section It include three numbers.
By in three digits started in every section with 0,0 occurred before first non-zero number is deleted, and complete if it exists Portion be 0 section, then retain one of them 0, to obtain the corresponding digital section of each 12 character strings.
In order to effectively improve the application reliability of Hash table, to further increase the effect for applying IP address to search corresponding area Rate, and then the efficiency and accuracy positioned to IP address can be effectively improved, in the internet protocol-based of the application The area of location is searched in one embodiment of device, and the allocation index establishes unit and is specifically used for executing following the description:
An area number is selected to number as current objective area.
It executes the obtaining step of allocation index: numbering corresponding start Internet protocol address in objective area and terminate mutual In the corresponding digital section in networking protocol address, start Internet protocol address is chosen with sequence from left to right or is terminated mutual First in networking protocol address there is numerical value and section different from each other, and numerical value and different from each other occurs by this first Section is determined as the objective area and numbers corresponding target phase;And corresponding start Internet is numbered from the objective area Last section of beginning in protocol address and the end corresponding digital section of Internet protocol address, using the target side It successively obtains the objective area and numbers corresponding whole allocation index.
The area number numbered as current objective area is updated, and re-executes the acquisition step of the allocation index Suddenly, until acquiring at least one corresponding allocation index of each area number.
For hardware view, in order to effectively improve the efficiency for applying IP address to search corresponding area, and then can The efficiency and accuracy positioned to IP address is effectively improved, the application provides one kind for realizing described based on internet protocol The embodiment of the electronic equipment of all or part of the content in the regional lookup method of address is discussed, the electronic equipment specifically includes There is following content:
Processor (processor), memory (memory), communication interface (Communications Interface) and Bus;Wherein, the processor, memory, communication interface complete mutual communication by the bus;The communication interface It is searched between the relevant devices such as device, types of databases and user terminal for realizing the area of internet protocol-based address Information transmission;The electronic equipment can be desktop computer, tablet computer and mobile terminal etc., and the present embodiment is without being limited thereto. In the present embodiment, which is referred to the reality of the regional lookup method of the internet protocol-based address in embodiment Example is applied, and, the embodiment that device is searched in the area of internet protocol-based address is implemented, and content is incorporated in this, Overlaps will not be repeated.
Figure 12 is the schematic block diagram that the system of the electronic equipment 9600 of the embodiment of the present application is constituted.As shown in figure 12, the electricity Sub- equipment 9600 may include central processing unit 9100 and memory 9140;Memory 9140 is coupled to central processing unit 9100. It is worth noting that, the Figure 12 is exemplary;Other kinds of structure can also be used, to supplement or replace the structure, with Realize telecommunications functions or other function.
In one embodiment, the regional locating function of internet protocol-based address can be integrated into central processing unit 9100 In.Wherein, it is control as follows to can be configured as progress for central processing unit 9100:
Step 100: receiving regional look-up command, wherein include targeted internet agreement in this area's look-up command Location.
Step 200: converting the targeted internet protocol address to the numeric format of default long, obtain the mesh Mark the corresponding target string of Internet protocol;
Step 300: being searched in preset first ordered three-dimensional array and the target string using binary chop Matched area number, alternatively, being searched and the matched area number of the target string in preset Hash table.
It is understood that it is corresponding to be stored with each Internet protocol address in the first ordered three-dimensional array Corresponding relationship between character string and area number;It is corresponding that each Internet protocol address is stored in the Hash table Corresponding relationship between index and area number.
Step 400: exporting the matched area number of the target string to determine the target according to this area's number Area where Internet protocol address.
As can be seen from the above description, the electronic equipment that embodiments herein provides, can effectively improve and look into using IP address The efficiency of corresponding area, and search procedure high reliablity are looked for, lookup result accuracy is high, and then can effectively improve to IP address The efficiency and accuracy positioned, and can effectively improve and the risks such as anti money washing or anti-fraud are carried out according to positioning result The efficiency and accuracy of monitoring.
In another embodiment, the area lookup device of internet protocol-based address can be with central processing unit 9100 separate configurations, such as the area of internet protocol-based address can be searched and be configured to connect with central processing unit 9100 Chip, pass through the control of central processing unit to realize the regional locating function of internet protocol-based address.
As shown in figure 12, which can also include: communication module 9110, input unit 9120, at audio Manage device 9130, display 9160, power supply 9170.It is worth noting that, electronic equipment 9600 is also not necessary to include Figure 12 Shown in all components;In addition, electronic equipment 9600 can also include the component being not shown in Figure 12, can refer to existing Technology.
As shown in figure 12, central processing unit 9100 is otherwise referred to as controller or operational controls, may include microprocessor Or other processor devices and/or logic device, the central processing unit 9100 receive each of input and controlling electronic devices 9600 The operation of a component.
Wherein, memory 9140, such as can be buffer, flash memory, hard disk driver, removable medium, volatile memory, non- One of volatile memory or other appropriate devices or more.Above-mentioned information related with failure can be stored, additionally The program executed for information about can be stored.And the program of the memory 9140 storage can be performed in central processing unit 9100, with Realize information storage or processing etc..
Input unit 9120 provides input to central processing unit 9100.The input unit 9120 is, for example, key or touches defeated Enter device.Power supply 9170 is used to provide electric power to electronic equipment 9600.Display 9160 is for carrying out the display such as image and text The display of object.The display may be, for example, LCD display, and but it is not limited to this.
The memory 9140 can be solid-state memory, for example, read-only memory (ROM), random access memory (RAM), SIM card etc..The memory that may also is that, saves information when power is off, can be selectively erased And more data are equipped with, the example of the memory is sometimes referred to as EPROM etc..Memory 9140 can also be some other type Device.Memory 9140 includes buffer storage 9141 (sometimes referred to as buffer).Memory 9140 may include using/ Function storage unit 9142, the applications/functions storage unit 9142 is for storing application program and function program or for passing through center Processor 9100 executes the process of the operation of electronic equipment 9600.
Memory 9140 can also include data store 9143, the data store 9143 for storing data, such as Contact person, numerical data, picture, sound and/or any other data used by electronic equipment.The driving journey of memory 9140 Sequence storage unit 9144 may include electronic equipment for communication function and/or other function for executing electronic equipment (such as Messaging application, address list application etc.) various drivers.
Communication module 9110 is the transmitter receiver 9110 sent and received signal via antenna 9111.Communicate mould Block (transmitter receiver) 9110 is coupled to central processing unit 9100, and to provide input signal and receive output signal, this can be with The case where with normal mobile communication terminal, is identical.
Based on the different communication technologys, in same electronic equipment, multiple communication modules 9110 can be set, such as honeycomb Network module, bluetooth module and/or Wireless LAN module etc..Communication module (transmitter receiver) 9110 is also via audio Processor 9130 is coupled to loudspeaker 9131 and microphone 9132, to provide audio output via loudspeaker 9131, and receives and From the audio input of microphone 9132, to realize common telecommunications functions.Audio processor 9130 may include any suitable Buffer, decoder, amplifier etc..In addition, audio processor 9130 is additionally coupled to central processing unit 9100, so that can Can record in the machine by microphone 9132, and allow to play the sound stored in the machine by loudspeaker 9131 Sound.
It is server or client that embodiments herein, which also provides and can be realized the executing subject in above-described embodiment, A kind of computer readable storage medium of Overall Steps, the computer in the regional lookup method of internet protocol-based address Computer program is stored on readable storage medium storing program for executing, which realizes holding in above-described embodiment when being executed by processor Row main body is the Overall Steps of the regional lookup method of the internet protocol-based address of server or client, for example, described Processor realizes following step when executing the computer program:
Step 100: receiving regional look-up command, wherein include targeted internet agreement in this area's look-up command Location.
Step 200: converting the targeted internet protocol address to the numeric format of default long, obtain the mesh Mark the corresponding target string of Internet protocol;
Step 300: being searched in preset first ordered three-dimensional array and the target string using binary chop Matched area number, alternatively, being searched and the matched area number of the target string in preset Hash table.
It is understood that it is corresponding to be stored with each Internet protocol address in the first ordered three-dimensional array Corresponding relationship between character string and area number;It is corresponding that each Internet protocol address is stored in the Hash table Corresponding relationship between index and area number.
Step 400: exporting the matched area number of the target string to determine the target according to this area's number Area where Internet protocol address.
As can be seen from the above description, the computer readable storage medium that embodiments herein provides, can effectively improve and answer The efficiency of corresponding area, and search procedure high reliablity are searched with IP address, lookup result accuracy is high, and then can effectively mention The efficiency and accuracy that height positions IP address, and can effectively improve and anti money washing or anti-is carried out according to positioning result The efficiency and accuracy of the risk monitoring and controls such as fraud.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, apparatus or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (device) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Specific embodiment is applied in the present invention, and principle and implementation of the present invention are described, above embodiments Explanation be merely used to help understand method and its core concept of the invention;At the same time, for those skilled in the art, According to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion in this specification Appearance should not be construed as limiting the invention.

Claims (20)

1. a kind of regional lookup method of internet protocol-based address characterized by comprising
Receive regional look-up command, wherein include targeted internet protocol address in this area's look-up command;
It converts the targeted internet protocol address to the numeric format of default long, obtains the targeted internet agreement Corresponding target string;
It searches in preset first ordered three-dimensional array using binary chop and is compiled with the matched area of the target string Number, alternatively, being searched and the matched area number of the target string in preset Hash table;
Wherein, the corresponding character string of each Internet protocol address and area are stored in the first ordered three-dimensional array Corresponding relationship between number;The corresponding index of each Internet protocol address is stored in the Hash table to compile with area Corresponding relationship between number;
The matched area number of the target string is exported with according to the determining targeted internet agreement of this area's number Area where location.
2. the regional lookup method of internet protocol-based address according to claim 1, which is characterized in that connect described Before the regional look-up command of receipts, further includes:
Obtain each area number and at least one corresponding Internet protocol address of each area number;
Using each area number and at least one corresponding Internet protocol address of each area number, Generate corresponding first ordered three-dimensional array.
3. the regional lookup method of internet protocol-based address according to claim 2, which is characterized in that the application Each area number and at least one corresponding Internet protocol address of each area number are generated and are corresponded to The first ordered three-dimensional array, comprising:
According to preset first character string transformation rule, corresponding character is converted by each Internet protocol address String;
It determines the character string of the corresponding start Internet protocol address of each area number and terminates Internet protocol address Character string;
According to the sequence that numerical value is ascending, to the character string or each end of each start Internet protocol address The character string of Internet protocol address is ranked up, and generates corresponding first ordered three-dimensional number according to corresponding ranking results Group;
Wherein, every a line in the first ordered three-dimensional array is stored with the area number, this area's number point The character string of not corresponding start Internet protocol address and the character string for terminating Internet protocol address.
4. the regional lookup method of internet protocol-based address according to claim 3, which is characterized in that the basis Each Internet protocol address is converted corresponding character string by preset first character string transformation rule, comprising:
The mode for applying the addition 0 after first separation, by the number between the every two point in each Internet protocol address Word is added to three digits, obtains corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings;
In with each 12 character strings of 0 beginning, 0 occurred before first non-zero number is deleted, is obtained each A corresponding character string of the Internet protocol address.
5. the regional lookup method of internet protocol-based address according to claim 1, which is characterized in that connect described Before the regional look-up command of receipts, further includes:
Obtain each area number and at least one corresponding Internet protocol address of each area number;
Using each area number and at least one corresponding Internet protocol address of each area number, Generate corresponding Hash table.
6. the regional lookup method of internet protocol-based address according to claim 5, which is characterized in that the application Each area number and at least one corresponding Internet protocol address of each area number are generated and are corresponded to Hash table, comprising:
According to preset second character string transformation rule, corresponding character is converted by each Internet protocol address String;
It determines the character string of the corresponding start Internet protocol address of each area number and terminates Internet protocol address Character string;
According to the sequence that numerical value is ascending, to the character string or each end of each start Internet protocol address The character string of Internet protocol address is ranked up, and generates corresponding second ordered three-dimensional number according to corresponding ranking results Group;
Wherein, every a line in the second ordered three-dimensional array is stored with the area number, this area's number point The character string of not corresponding start Internet protocol address and the character string for terminating Internet protocol address;
Corresponding digital section is converted by each character string in the second ordered three-dimensional array, wherein the number Field is made of four number of segment words, and the number in every section is less than or equal to three digits;
Using the digital section, rule is established according to preset index and generates each area number corresponding at least one A allocation index, and generation includes the Hash table of each index.
7. the regional lookup method of internet protocol-based address according to claim 6, which is characterized in that the basis Each Internet protocol address is converted corresponding character string by preset second character string transformation rule, comprising:
The mode for applying the addition 0 after first separation, by the number between the every two point in each Internet protocol address Word is added to three digits, obtains corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings.
8. the regional lookup method of internet protocol-based address according to claim 7, which is characterized in that described by institute The each character string stated in the second ordered three-dimensional array is converted into corresponding digital section, comprising:
Each 12 character strings in the second ordered three-dimensional array are divided into four sections, and each Duan Zhongjun packet Contain three numbers;
By in three digits started in every section with 0,0 occurred before first non-zero number is deleted, and all if it exists 0 section, then retain one of them 0, to obtain the corresponding digital section of each 12 character strings.
9. the regional lookup method of internet protocol-based address according to claim 6, which is characterized in that the application The digital section establishes rule according to preset index and generates each at least one corresponding address rope of the area number Draw, and generation includes the Hash table of each index, comprising:
An area number is selected to number as current objective area;
It executes the obtaining step of allocation index: numbering corresponding start Internet protocol address in objective area and terminate internet In the corresponding digital section of protocol address, start Internet protocol address is chosen with sequence from left to right or terminates internet First in protocol address there is numerical value and section different from each other, and numerical value occurs by this first and section different from each other is true It is set to the objective area and numbers corresponding target phase;And corresponding start Internet agreement is numbered from the objective area Last section of beginning in address and the end corresponding digital section of Internet protocol address, successively using the target side It obtains the objective area and numbers corresponding whole allocation index;
The area number numbered as current objective area is updated, and re-executes the obtaining step of the allocation index, directly To acquiring at least one corresponding allocation index of each area number.
10. device is searched in a kind of area of internet protocol-based address characterized by comprising
Command reception module, for receiving regional look-up command, wherein include targeted internet association in this area's look-up command Discuss address;
Character string conversion module is obtained for converting the targeted internet protocol address to the numeric format of default long To the corresponding target string of the targeted internet agreement;
Area number searching module, for being searched in preset first ordered three-dimensional array and the mesh using binary chop The area number of string matching is marked, is compiled alternatively, being searched in preset Hash table with the matched area of the target string Number;
Wherein, the corresponding character string of each Internet protocol address and area are stored in the first ordered three-dimensional array Corresponding relationship between number;The corresponding index of each Internet protocol address is stored in the Hash table to compile with area Corresponding relationship between number;
Output module is encoded, for exporting the matched area number of the target string according to this area's number determination Area where targeted internet protocol address.
11. device is searched in the area of internet protocol-based address according to claim 10, which is characterized in that also wrap It includes:
Internet protocol address obtains module, corresponding for obtaining each area number and each area number At least one Internet protocol address;
First ordered three-dimensional array generation module is used for application each area number and each area number respectively At least one corresponding Internet protocol address generates corresponding first ordered three-dimensional array.
12. device is searched in the area of internet protocol-based address according to claim 11, which is characterized in that described the One ordered three-dimensional array generation module includes:
First character string converting unit is used for according to preset first character string transformation rule, by each Internet protocol Address is converted into corresponding character string;
First character string corresponding unit, for determining the character string of the corresponding start Internet protocol address of each area number With the character string for terminating Internet protocol address;
First sequencing unit, for the sequence ascending according to numerical value, to the word of each start Internet protocol address Symbol string or each character string for terminating Internet protocol address are ranked up, and are generated and corresponded to according to corresponding ranking results The first ordered three-dimensional array;
Wherein, every a line in the first ordered three-dimensional array is stored with the area number, this area's number point The character string of not corresponding start Internet protocol address and the character string for terminating Internet protocol address.
13. device is searched in the area of internet protocol-based address according to claim 12, which is characterized in that described the One character string converting unit is specifically used for executing following content:
The mode for applying the addition 0 after first separation, by the number between the every two point in each Internet protocol address Word is added to three digits, obtains corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings;
In with each 12 character strings of 0 beginning, 0 occurred before first non-zero number is deleted, is obtained each A corresponding character string of the Internet protocol address.
14. device is searched in the area of internet protocol-based address according to claim 10, which is characterized in that also wrap It includes:
Internet protocol address obtains module, corresponding for obtaining each area number and each area number At least one Internet protocol address;
Hash table generation module, it is corresponding at least for application each area number and each area number One Internet protocol address, generates corresponding Hash table.
15. device is searched in the area of internet protocol-based address according to claim 14, which is characterized in that the Kazakhstan Wishing table generation module includes:
Second character string converting unit is used for according to preset second character string transformation rule, by each Internet protocol Address is converted into corresponding character string;
Second character string corresponding unit, for determining the character string of the corresponding start Internet protocol address of each area number With the character string for terminating Internet protocol address;
Second sequencing unit, for the sequence ascending according to numerical value, to the word of each start Internet protocol address Symbol string or each character string for terminating Internet protocol address are ranked up, and are generated and corresponded to according to corresponding ranking results The second ordered three-dimensional array;
Wherein, every a line in the second ordered three-dimensional array is stored with the area number, this area's number point The character string of not corresponding start Internet protocol address and the character string for terminating Internet protocol address;
Digital section conversion unit, it is corresponding for converting each character string in the second ordered three-dimensional array to Digital section, wherein the digital section is made of four number of segment words, and the number in every section is less than or equal to three digits;
Allocation index establishes unit, and for applying the digital section, it is each describedly to establish rule generation according to preset index Area numbers at least one corresponding allocation index, and generation includes the Hash table of each index.
16. device is searched in the area of internet protocol-based address according to claim 15, which is characterized in that described the Two character string converting units are specifically used for executing following the description:
The mode for applying the addition 0 after first separation, by the number between the every two point in each Internet protocol address Word is added to three digits, obtains corresponding 12 character strings of each Internet protocol address;
Delete each separation in each 12 character strings.
17. device is searched in the area of internet protocol-based address according to claim 16, which is characterized in that the number Field conversion unit is specifically used for executing following the description:
Each 12 character strings in the second ordered three-dimensional array are divided into four sections, and each Duan Zhongjun packet Contain three numbers;
By in three digits started in every section with 0,0 occurred before first non-zero number is deleted, and all if it exists 0 section, then retain one of them 0, to obtain the corresponding digital section of each 12 character strings.
18. device is searched in the area of internet protocol-based address according to claim 15, which is characterized in that describedly Location index establishes unit and is specifically used for executing following the description:
An area number is selected to number as current objective area;
It executes the obtaining step of allocation index: numbering corresponding start Internet protocol address in objective area and terminate internet In the corresponding digital section of protocol address, start Internet protocol address is chosen with sequence from left to right or terminates internet First in protocol address there is numerical value and section different from each other, and numerical value occurs by this first and section different from each other is true It is set to the objective area and numbers corresponding target phase;And corresponding start Internet agreement is numbered from the objective area Last section of beginning in address and the end corresponding digital section of Internet protocol address, successively using the target side It obtains the objective area and numbers corresponding whole allocation index;
The area number numbered as current objective area is updated, and re-executes the obtaining step of the allocation index, directly To acquiring at least one corresponding allocation index of each area number.
19. a kind of electronic equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine program, which is characterized in that the processor realizes that claim 1 to 9 is described in any item based on mutual when executing described program The step of regional lookup method of networking protocol address.
20. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt The step of the regional lookup method of the described in any item internet protocol-based addresses of claim 1 to 9 is realized when processor executes Suddenly.
CN201910688369.9A 2019-07-29 2019-07-29 Area searching method and device based on internet protocol address Active CN110266834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910688369.9A CN110266834B (en) 2019-07-29 2019-07-29 Area searching method and device based on internet protocol address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910688369.9A CN110266834B (en) 2019-07-29 2019-07-29 Area searching method and device based on internet protocol address

Publications (2)

Publication Number Publication Date
CN110266834A true CN110266834A (en) 2019-09-20
CN110266834B CN110266834B (en) 2022-08-26

Family

ID=67912341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910688369.9A Active CN110266834B (en) 2019-07-29 2019-07-29 Area searching method and device based on internet protocol address

Country Status (1)

Country Link
CN (1) CN110266834B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671948A (en) * 2020-12-28 2021-04-16 北京锐安科技有限公司 Method and device for determining IP address belonging area, electronic equipment and storage medium
CN117278521A (en) * 2023-11-16 2023-12-22 烽台科技(北京)有限公司 Asset identification method and computer device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140274022A1 (en) * 2013-03-15 2014-09-18 Factual, Inc. Apparatus, systems, and methods for analyzing movements of target entities
CN104796437A (en) * 2014-01-16 2015-07-22 深圳市快播科技有限公司 Method, device and system for querying geographical location information based on Nginx
CN107613043A (en) * 2017-09-26 2018-01-19 小草数语(北京)科技有限公司 The regional information searching method and its device of IP address
CN107682466A (en) * 2017-09-26 2018-02-09 小草数语(北京)科技有限公司 The regional information searching method and its device of IP address
CN108712519A (en) * 2018-05-31 2018-10-26 康键信息技术(深圳)有限公司 Localization method, device and the storage medium of IP address

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140274022A1 (en) * 2013-03-15 2014-09-18 Factual, Inc. Apparatus, systems, and methods for analyzing movements of target entities
CN104796437A (en) * 2014-01-16 2015-07-22 深圳市快播科技有限公司 Method, device and system for querying geographical location information based on Nginx
CN107613043A (en) * 2017-09-26 2018-01-19 小草数语(北京)科技有限公司 The regional information searching method and its device of IP address
CN107682466A (en) * 2017-09-26 2018-02-09 小草数语(北京)科技有限公司 The regional information searching method and its device of IP address
CN108712519A (en) * 2018-05-31 2018-10-26 康键信息技术(深圳)有限公司 Localization method, device and the storage medium of IP address

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112671948A (en) * 2020-12-28 2021-04-16 北京锐安科技有限公司 Method and device for determining IP address belonging area, electronic equipment and storage medium
WO2022142499A1 (en) * 2020-12-28 2022-07-07 北京锐安科技有限公司 Method and apparatus for determining region to which ip address belongs, and electronic device and storage medium
CN117278521A (en) * 2023-11-16 2023-12-22 烽台科技(北京)有限公司 Asset identification method and computer device
CN117278521B (en) * 2023-11-16 2024-03-19 烽台科技(北京)有限公司 Asset identification method and computer device

Also Published As

Publication number Publication date
CN110266834B (en) 2022-08-26

Similar Documents

Publication Publication Date Title
CN108769111A (en) A kind of server connection method, computer readable storage medium and terminal device
CN104462285B (en) A kind of method for secret protection of Information Mobile Service inquiry system
WO2013143278A1 (en) Method, device and system for querying data index
CN103138981A (en) Method and device for social network service analysis
CN113051446A (en) Topological relation query method, device, electronic equipment and medium
CN110266834A (en) The regional lookup method and device of internet protocol-based address
CN108733787A (en) Database operation method, device, electronic equipment and storage medium
CN108897874A (en) Method and apparatus for handling data
CN109800336A (en) Table implementation method, device, equipment and medium based on key-value pair storage system
CN101848248B (en) Rule searching method and device
CN105224560A (en) Data cached lookup method and device
CN110135993A (en) Method, equipment and the storage medium of UTXO model adaptation intelligence contract account model
CN109359476A (en) A kind of two side's method for mode matching and device of hiding input
CN106844288A (en) A kind of random string generation method and device
CN105989457A (en) Information query method and apparatus thereof
CN104408183B (en) The data lead-in method and device of data system
CN104572994B (en) Method and apparatus for searching for data
CN105550220B (en) A kind of method and device of the access of heterogeneous system
CN110222286A (en) Information acquisition method, device, terminal and computer readable storage medium
CN106528750B (en) Data extraction method and device
CN104866535A (en) Compression method and device of number segment records
CN114493799A (en) Method and system for managing special vehicle order data in warehouse and table dividing manner
CN107562842A (en) The guard method of resource data and equipment
CN114265869A (en) Data message forwarding method and device, storage medium and electronic equipment
CN102724106A (en) Learning method for MAC addresses, network side equipment, and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant