CN109474712A - IP geographic information determining method, server and storage medium - Google Patents

IP geographic information determining method, server and storage medium Download PDF

Info

Publication number
CN109474712A
CN109474712A CN201811311249.9A CN201811311249A CN109474712A CN 109474712 A CN109474712 A CN 109474712A CN 201811311249 A CN201811311249 A CN 201811311249A CN 109474712 A CN109474712 A CN 109474712A
Authority
CN
China
Prior art keywords
target
information
geography information
address
segmentation
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
CN201811311249.9A
Other languages
Chinese (zh)
Other versions
CN109474712B (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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and Technology Co Ltd
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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201811311249.9A priority Critical patent/CN109474712B/en
Publication of CN109474712A publication Critical patent/CN109474712A/en
Application granted granted Critical
Publication of CN109474712B publication Critical patent/CN109474712B/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
    • 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

Abstract

The embodiment of the invention relates to the technical field of communication, and discloses an IP geographic information determining method, a server and a storage medium. The invention comprises the following steps: acquiring a target IP needing to be determined by geographic information; and determining the geographic information of the target IP by carrying out region detection on the target IP. The method comprises the steps of sending a detection instruction aiming at the target IP to a machine which is in connection with a server, analyzing according to a detection result returned by the machine, and determining the geographic information of the target IP according to the analysis result.

Description

A kind of IP geography information determines method, server and storage medium
Technical field
The present embodiments relate to field of communication technology, in particular to a kind of IP geography information determine method, server and Storage medium.
Background technique
With the development of internet technology, it can all use in more and more fields to online clothes in people's lives Business, and when being networked, it will use and arrive the address Internet protocol (Internet Protocol Address, IP).
At least there are the following problems in the prior art for inventor's discovery: user's geography information of IP address or operator are not Together, multiple IP or IP sections can be cut into different users, individually with the geography and fortune of one or several IP for one IP sections Quotient's information is sought as entire IP sections of geography and operator's informaiton, is inaccurate for the IP sections of other IP.Existing skill Art provided by user the modes such as the IP information such as city, access carrier that it is used obtain IP geography information but this side The problems such as method will appear IP information update not in time, and more manpower intervention, cost is too high, and it is passive to update, and information is imperfect.Therefore The geography information for accurately determining IP address can be simply and easily gone there are no a kind of method in the prior art.
Summary of the invention
A kind of IP geography information of being designed to provide of embodiment of the present invention determines method, server and storage medium, Enable the server to the accurate determination that geography information is carried out to acquired target Target IP.
In order to solve the above technical problems, embodiments of the present invention, which provide a kind of IP geography information, determines method, including Following steps: it obtains one and needs to carry out the Target IP that geography information determines;Mesh is determined by carrying out regionally detecting to Target IP Mark the geography information of IP
Embodiments of the present invention additionally provide a kind of server, comprising: at least one processor;And with it is described extremely The memory of few processor communication connection;Wherein, the memory, which is stored with, to be executed by least one described processor Instruction, described instruction is executed by least one described processor, so that at least one described processor is able to carry out institute as above The IP geography information stated determines method.
Embodiments of the present invention additionally provide a kind of computer readable storage medium, are stored with computer program, calculate Machine program realizes that IP geography information as described above determines method when being executed by processor.
Embodiment of the present invention in terms of existing technologies, needs to carry out geography information when server acquisition one and determines Target IP when, by Target IP carry out regionally detecting, i.e., by with server have connection relationship machine send needle It to the probe instructions of Target IP, is analyzed, and is realized based on the analysis results to Target IP according to the detection result that machine returns The determination of geography information detect to Target IP the geography information of Target IP obtained by then passing through, thus make really The geography information of fixed Target IP is more accurate.
In addition, specifically including by carrying out the geography information that regionally detecting determines Target IP to Target IP: judging Target IP In whether include segmentation markers information, if so, carrying out segmentation detection to Target IP, and according to segmentation detection result to Target IP Regionally detecting is carried out, the geography information of Target IP is determined according to the result of regionally detecting;Otherwise, region directly is carried out to Target IP Detection, the geography information of Target IP is determined according to the result of regionally detecting.In the realization, by judge in Target IP whether include Segmentation markers information, and the determination to Target IP geography information is realized according to judging result in different ways, to embody The diversity of Target IP geography information method of determination.
In addition, segmentation markers information includes mark of the IP address number greater than one for including or two sections of detections in Target IP Mark.
In addition, carrying out segmentation detection to Target IP, and regionally detecting is carried out to Target IP according to segmentation detection result, according to The result of regionally detecting determines the geography information of Target IP, specifically includes: to the machine hair with connection relationship and best performance Send the first probe instructions for each IP address in Target IP, and the optimal machine of receptivity is according to the first probe instructions To the detection information of each IP address in Target IP, detected the detection information of each IP address in Target IP as segmentation As a result, wherein detection information includes regional value;Target IP is segmented according to segmentation detection result, generates segmentation result;Root Regionally detecting is carried out to Target IP according to segmentation result, the geography information of Target IP is determined according to the result of regionally detecting.The realization In, when determining in Target IP includes segmentation markers information, first by an optimal machine to each IP in Target IP Address carries out segmentation detection, generates segmentation result according to segmentation detection result, determines target according to the number for the IP section being divided into The number of geography information in IP, and by each section of progress regionally detecting being divided into, determining each IP sections specific geographic The content of information, to realize the accurate determination to Target IP geography information.
In addition, being segmented according to segmentation detection result to Target IP, segmentation result is generated, is specifically included: by Target IP Middle sequence is connected and the difference IP address within a preset range of regional value is divided into one IP section, will division obtain it is every A IP sections is used as segmentation result.
In addition, the detection information according to each IP address is segmented Target IP, generates segmentation result and also wrap later It includes: segmentation markers information included in Target IP is deleted.In the realization, after generating segmentation result, pass through by Segmentation markers information in Target IP is deleted, and can determine that Target IP has completed the process of segmentation, so as to realize Regionally detecting process is carried out to Target IP.
In addition, carrying out regionally detecting to Target IP according to segmentation result, Target IP is determined according to the result of regionally detecting Geography information specifically includes: selecting an IP address respectively in each IP sections;To whole operation machines with connection relationship Device sends the second probe instructions for being directed to selected IP address, and receives and all run machine according to the second probe instructions to every The detection information of IP address selected in one IP sections, wherein detection information includes regional value;It is connect according to all operation machines The regional value of IP address selected in each IP sections received, determines each IP sections of area information;By each IP sections Area information matched with mapping table, and each IP sections of geography information is determined according to matching result, and by each Geography information of IP sections of the geography information as Target IP, wherein pair of area information and geography information has been prestored in mapping table It should be related to.
In addition, directly carrying out regionally detecting to Target IP, the geography information of Target IP is determined according to the result of regionally detecting, It specifically includes: sending second for an IP address included in Target IP to whole operation machines with connection relationship Probe instructions, and receive all detection of the operation machine according to the second probe instructions to an IP address included in Target IP Information, wherein detection information includes regional value;According to an IP address included in all operation received Target IPs of machine Regional value determine the area information of an IP address included in Target IP;By the area information of IP address and mapping Table is matched, and the geography information of an IP address is determined according to matching result, and the geography information of an IP address is made For the geography information of Target IP, wherein prestored the corresponding relationship of area information and geography information in mapping table.In the realization, When determining in Target IP does not include segmentation markers information, illustrate in Target IP at this time only comprising an IP address, it at this time can be with Regionally detecting directly is carried out to IP address, so that it is determined that the geography information of an IP address out, and by IP address Geography information of the geography information as Target IP, to realize the geography information for quickly determining Target IP.
Detailed description of the invention
One or more embodiments are illustrated by the picture in corresponding attached drawing, these exemplary theorys The bright restriction not constituted to embodiment, the element in attached drawing with same reference numbers label are expressed as similar element, remove Non- to have special statement, composition does not limit the figure in attached drawing.
Fig. 1 is the flow chart that IP geography information determines method in the application first embodiment;
Fig. 2 is that IP geography information determines the flow chart of method in a specific implementation in the application first embodiment;
Fig. 3 is the flow chart that IP geography information determines method in the application second embodiment;
Fig. 4 is the block diagram that IP geography information determines system in the application 3rd embodiment;
Fig. 5 is the structural schematic diagram of server in the application fourth embodiment.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Each embodiment be explained in detail.However, it will be understood by those skilled in the art that in each embodiment party of the present invention In formula, in order to make the reader understand this application better, many technical details are proposed.But even if without these technical details And various changes and modifications based on the following respective embodiments, the application technical solution claimed also may be implemented.
The first embodiment of the present invention is related to a kind of IP geography information to determine method, is applied to server.Detailed process As shown in Figure 1, comprising the following steps:
Step 101, it obtains one and needs to carry out the Target IP that geography information determines.
Specifically, in the present embodiment Target IP is also possible to lead to either what system was submitted automatically It crosses and is manually submitted, and by being mentioned by the way of Target IP when manually submitting, can be set using period submission It hands over, and specific cycle time can be according to actual needs by manually voluntarily being set.
In addition, the Target IP in the application may include one or more IP address.It is by mesh in present embodiment Mark IP carries out the geography information that regionally detecting determines Target IP, regionally detecting in the application embodiment refer to passing through to There is the machine transmission of connection relationship for the probe instructions of Target IP with server, carried out according to the detection result that machine returns Analysis, and the determination to Target IP geography information is realized based on the analysis results, and passes through the step 102 of present embodiment to step 103 content carries out regionally detecting to Target IP and determines that the geography information of Target IP is illustrated.
Step 102, judge in Target IP whether to include segmentation markers information, if so, thening follow the steps 103, otherwise, execute Step 104.
It should be noted that the segmentation markers information in present embodiment includes that the IP address data that include are big in Target IP In one mark or two sections of snoop tags.Therefore after server gets Target IP, pass through the attribute information to Target IP It is detected, determines in Target IP whether include segmentation markers information according to testing result, however, it is determined that exist, then illustrate needs pair Target IP carries out segmentation detection, and is segmented according to segmentation detection result to Target IP, if it does not exist, can determine Target IP In only one IP address, it is directly independent to this at this point, do not need the operation being segmented for an independent IP address IP address carries out region and determines.
Step 103, segmentation detection is carried out to Target IP, and regionally detecting is carried out to Target IP according to segmentation detection result, The geography information of Target IP is determined according to the result of regionally detecting.
At one in the specific implementation, as shown in Fig. 2, step 103 specifically includes step 1031 to step 1033, wherein such as Shown in Fig. 2, the process of step 103 is specifically described.
Step 1031, it sends to the machine with connection relationship and best performance for each IP address in Target IP First probe instructions, and detection of the optimal machine of receptivity according to the first probe instructions to each IP address in Target IP Information, using the detection information of each IP address in Target IP as segmentation detection result.
Specifically, in the present embodiment, detection information includes regional value, and the regional value in the application can be It is indirectly obtained by calculating process, when each IP address detects in Target IP, each IP can be obtained The routing iinformation of location will include detection source, the autonomous system number (Autonomous of each IP address in routing iinformation System Number, ASN) and parameter informations such as time delay value, by by the parameter information in routing iinformation according to preset meter It calculates formula to carry out calculating an available numerical value, and the numerical value is known as regional value.About regional value in the embodiment of the present application Specific calculation formula can be set according to difference of the user to regional value precision, such as can be regional value=A detection Source * ASN+ final jump * time delay value is only to carry out calculation formula for example, for it certainly, in the embodiment of the present application It is all this Shen within the scope of protection of this application as long as the calculation formula of its type can obtain the regional value of user's requirement Calculation formula is not limited specifically please.When server includes segmentation markers information in determining Target IP after testing, Illustrate that server needs the operation being segmented to the Target IP at this time.Because server can have connection to close with multiple machines System, and the characteristic of each machine be it is different, consider each machine network connection attribute, the hardware feature of itself And the composite factors such as load-carrying situation, select one with connection relationship and a machine of best performance, and to institute The machine of the best performance chosen sends the first probe instructions for each IP address in Target IP, that is, It says, the machine of the best performance each IP address can send detection packet into Target IP after receiving the first probe instructions, And it receives each IP address in Target IP and detects based on the received and wrap fed back detection information, and by each in Target IP The detection information of IP address is as segmentation detection result, and certainly, the detection result in present embodiment, which can also be, passes through calculating It is secondhand, it whether directly obtains or is obtained indirectly by calculating, as long as can be realized according to result of that probe to mesh The segmentation for marking IP, is all within the scope of protection of this application.
For example, with server have connection relationship there are three machine, machine 1, machine 2 and machine 3, and pass through detection Determine that the performance of machine 1 is optimal, if it is determined that there are four IP address be IP1, IP2, IP3 and IP4 respectively in Target IP, then Server please send the first probe instructions for IP1, IP2, IP3 and IP4 to machine, and machine 1 refers to receiving the first detection Detection packet can be sent to IP1, IP2, IP3 and IP4 respectively after order, and receive IP1, IP2, IP3 and IP4 and detect packet based on the received The detection result returned respectively determines that the regional value of IP1 is 30, the regional value of IP2 is 31, the area of IP3 according to detection result Thresholding is 33 and the regional value of IP4 is 34.
Step 1032, Target IP is segmented according to segmentation detection result, generates segmentation result.
Specifically, in the present embodiment, it will sequentially be connected in Target IP and the difference of regional value be in preset range Interior IP address is divided into one IP sections, will divide each IP sections obtained as segmentation result.
For example, IP1, IP2, IP3 are four IP address being sequentially connected in Target IP with IP4, and determine the region of IP1 Value is 30, the regional value of IP2 is 31, the regional value of IP3 is 33 and the regional value of IP4 is 34, and sets the default threshold of segmentation Value be 1, the difference of the regional value of two adjacent IP address is then divided into one IP section if being not above 1 because IP1 and The difference of the regional value of IP2 is 1, then IP1 and IP2 is divided into the first in IP sections;The difference of the regional value of IP3 and IP2 is 2 big In preset threshold, so IP3 will not be divided into the first in IP sections;Because the difference of the regional value of IP3 and IP4 is 1, then by IP3 The 2nd is divided into IP sections with IP4.To divide obtained the first IP sections including IP1 and IP2, and including IP3 and IP4 the 2nd IP sections be used as segmentation result.
Step 1033, regionally detecting is carried out to Target IP according to segmentation result, target is determined according to the result of regionally detecting The geography information of IP.
Specifically, an IP address is selected respectively in each IP sections;To whole operation machines with connection relationship Device sends the second probe instructions for being directed to selected IP address, and receives and all run machine according to the second probe instructions to every The detection information of IP address selected in one IP sections, wherein detection information includes regional value;It is connect according to all operation machines The regional value of IP address selected in each IP sections received, determines each IP sections of area information;By each IP sections Area information matched with mapping table, and each IP sections of geography information is determined according to matching result, and by each Geography information of IP sections of the geography information as Target IP, wherein pair of area information and geography information has been prestored in mapping table It should be related to.
For example, Target IP segmentation result for obtaining after segmentation is: the first IP sections including IP1 and IP2, and including The 2nd IP sections of IP3 and IP4 respectively represent a geography information due to each IP sections, and the IP in each IP sections The geography information of location is identical, so IP3 of arbitrarily IP1 of the selection the first in IP sections and the 2nd in IP sections.Server is to having All three operation machine, that is, machines 1, machine 2 and the machine 3 of connection relationship, which send to detect for the second of IP1 and IP3, to be referred to It enables, machine 1, machine 2 and machine 3 can send detection packet to IP1 and IP3 respectively after receiving the second probe instructions, and connect It receives IP1 and IP3 and detects the detection information that packet returns respectively based on the received, wherein detection information includes regional value.Machine The regional value of IP1 received by 1 is 40, and the regional value of IP1 received by machine 2 is 42, IP1 received by machine 3 Regional value be 38;And the regional value of IP3 received by machine 1 is 58, and the regional value of IP3 received by machine 2 is The regional value of 62, IP3 received by machine 3 are 60.It is obtained for IP1 and IP3 that server receives each machine Regional value, and by average calculate obtain IP1 and IP3 area information, so that it is determined that the area information of IP1 be 40, The area information of IP3 be 60, i.e., the first IP section area information be 40, the 2nd IP sections area information be 60.And by the first IP The area information of section and the 2nd IP sections of area information are matched with mapping table respectively, due to having prestored region in mapping table The corresponding relationship of information and geography information, and having prestored the corresponding geography information of area information 40 is Beijing, area information 60 Corresponding geography information is Hebei, therefore can obtain the first IP section of geography information by matching is Beijing, the 2nd IP sections Geography information is Hebei, and using the first IP sections geography information and the 2nd IP sections geography information as Target IP geography believe Breath.
Step 104, regionally detecting directly is carried out to Target IP, determines that the geographical of Target IP is believed according to the result of regionally detecting Breath.
Specifically, when not including segmentation markers information in Target IP, illustrate not needing to divide Target IP at this time Section illustrates that server can be to whole operation machines with connection relationship at this time comprising an IP address in Target IP at this time The second probe instructions for an IP address included in Target IP are sent, and receives all operation machines and is visited according to second Instruction is surveyed to the detection information of an IP address included in Target IP, wherein detection information includes regional value.And according to complete The regional value of an IP address included in portion's operation received Target IP of machine determines an IP included in Target IP The area information of address.The area information of one IP address is matched with mapping table, and determines one according to matching result The geography information of IP address, and using the geography information of an IP address as the geography information of Target IP, wherein it is pre- in mapping table The corresponding relationship of area information and geography information is deposited.Historical geography due to saving Target IP in the information bank of server is believed Breath, so the historical geography information of the Target IP saved in the geography information and information bank for determining the Target IP newly obtained is not When identical, the geography information of the Target IP newly obtained can be replaced to the historical geography information of Target IP, to realize information bank It updates.Since any one IP address geography information determines in the method for determination of the geography information of an IP address and one IP sections Mode it is roughly the same, so present embodiment no longer repeats it.
Compared with prior art, when server, which obtains one, needs to carry out the Target IP that geography information determines, by right Target IP carries out regionally detecting, i.e., is referred to by being directed to the detection of Target IP to the machine transmission with server with connection relationship It enables, is analyzed according to the detection result that machine returns, and realize the determination to Target IP geography information based on the analysis results, by The geography information for detect to Target IP Target IP obtained is then passed through, thus the geographical letter of Target IP determined by making It is more accurate to cease.
Second embodiment of the present invention is related to a kind of IP geography information and determines method.The present embodiment is in first embodiment On the basis of be further improved, specific improvements are as follows: Target IP is being carried out according to the detection information of each IP address Segmentation generates segmentation result and increases later: the step of segmentation markers information included in Target IP is deleted.This reality It applies the IP geography information in example and determines that the process of method is as shown in Figure 3.Specifically, in the present embodiment, including step 201 to Step 204, and step 203 is made of step 2031 to step 2034.Wherein step 201 is implemented to step 202 with first Step 101 in mode is roughly the same to step 102, and step 204 is roughly the same with the step 104 in first embodiment, step Rapid 2031 is roughly the same to step 1032 with the step 1031 in first embodiment to step 2032, and step 2034 is real with first The step 1033 applied in mode is roughly the same, and details are not described herein again, mainly introduces difference below, not in the present embodiment The technical detail of detailed description, reference can be made to IP geography information provided by first embodiment determines method, details are not described herein again.
After step 201, step 202 is executed.
Step 202, judge in Target IP whether to include otherwise segmentation markers information, is held if so, thening follow the steps 2031 Row step 204.
Step 2031, it sends to the machine with connection relationship and best performance for each IP address in Target IP First probe instructions, and detection of the optimal machine of receptivity according to the first probe instructions to each IP address in Target IP Information, using the detection information of each IP address in Target IP as segmentation detection result.
Step 2032, Target IP is segmented according to segmentation detection result, generates segmentation result.
Step 2033, the segmentation markers information for including in Target IP is deleted.
Specifically, in the present embodiment, Target IP is segmented according to segmentation detection result, generates segmentation knot After fruit, the regionally detecting task for segmentation result can be reacquired according to the segmentation result server of generation, and passed through The segmentation markers information for including in Target IP is deleted, is to have carried out convenient for the task that server directly determines acquisition Staged operation, regionally detecting directly is carried out to extracting again for the task, to improve at the analysis of server Manage speed.
It should be noted that can also believe by segmentation markers to further increase the analysis processing speed of server After breath is deleted, segmentation markers information is added to the segmentation result of generation.
Step 2034, regionally detecting is carried out to Target IP according to segmentation result, target is determined according to the result of regionally detecting The geography information of IP.
Step 204, regionally detecting directly is carried out to Target IP, determines that the geographical of Target IP is believed according to the result of regionally detecting Breath.
Compared with prior art, the IP geography information that present embodiment provides determines method, when server obtains a need When carrying out the Target IP that geography information determines, by carrying out regionally detecting to Target IP, i.e., by the way that there is company to server Connect relationship machine send be directed to Target IP probe instructions, according to machine return detection result analyzed, and according to point It analyses result and realizes determination to Target IP geography information, detect to Target IP the ground of Target IP obtained by then passing through Information is managed, so that the geography information of Target IP determined by making is more accurate.And believe according to the detection of each IP address Breath is segmented Target IP, generates segmentation result later by deleting segmentation markers information included in Target IP It removes, is to have carried out staged operation convenient for the task that server directly determines acquisition, directly to resubmiting for the task Regionally detecting is carried out, to improve the analysis processing speed of server.
The step of various methods divide above, be intended merely to describe it is clear, when realization can be merged into a step or Certain steps are split, multiple steps are decomposed into, as long as including identical logical relation, all in the protection scope of this patent It is interior;To adding inessential modification in algorithm or in process or introducing inessential design, but its algorithm is not changed Core design with process is all in the protection scope of the patent.
Third embodiment of the invention is related to a kind of IP geography information and determines system, and specific structure is for example as shown in Figure 4.
As shown in figure 4, IP geography information determine system include task module 401, detecting module 402, analysis module 403, Decision-making module 404 and refresh module 405:
Wherein, task module 401 need to carry out the Target IP that geography information determines for generating detection mission, and will Detection mission is transferred to detecting module.
Detecting module 402 executes segmentation detection with the presence or absence of two sections of snoop tags in detection mission for judging if having Otherwise task executes regionally detecting task, and the detection information of acquisition is passed to analysis module.
Analysis module 403 calculates the regional value for obtaining detection information for carrying out according to detection information, and regional value is passed It is defeated by decision-making module.
Decision-making module 404, for whether there is segmentation markers information in detection zone thresholding, and if it exists, then execute segmentation and appoint It is engaged in decision, submits after decision " even if task " to arrive task module, carry " segmentation marker " in task;Otherwise, region is obtained to visit Decision is surveyed, and regionally detecting decision is passed into refresh module.
The result of refresh module 405, the regionally detecting decision for submitting to decision-making module verifies, and automatically updates Into information bank.
It is noted that each module involved in present embodiment is logic module, and in practical applications, one A logic unit can be a physical unit, be also possible to a part of a physical unit, can also be with multiple physics lists The combination of member is realized.In addition, in order to protrude innovative part of the invention, it will not be with solution institute of the present invention in present embodiment The technical issues of proposition, the less close unit of relationship introduced, but this does not indicate that there is no other single in present embodiment Member.
Fifth embodiment of the invention is related to a kind of server, as shown in figure 5, including at least one processor 501;With And the memory 502 with the communication connection of at least one processor 501;Wherein, be stored with can be by least one for memory 502 The instruction that device 501 executes is managed, instruction is executed by least one processor 501, so that at least one processor 501 is able to carry out The IP geography information stated in embodiment determines method.
In the present embodiment, for processor 501 is with central processing unit (Central Processing Unit, CPU), deposit For reservoir 502 is with readable and writable memory (Random Access Memory, RAM).Processor 501, memory 502 can lead to It crosses bus or other modes connects, in Fig. 5 for being connected by bus.Memory 502 is used as a kind of non-volatile calculating Machine readable storage medium storing program for executing can be used for storing non-volatile software program, non-volatile computer executable program and module, such as Realize that IP geography information determines that the program of method is stored in memory 502 in the embodiment of the present application.Processor 501 passes through fortune Non-volatile software program, instruction and the module that row is stored in memory 502, thereby executing the various function application of equipment And data processing, that is, realize that above-mentioned IP geography information determines method.
Memory 502 may include storing program area and storage data area, wherein storing program area can store operation system Application program required for system, at least one function;It storage data area can the Save option list etc..In addition, memory can wrap High-speed random access memory is included, can also include nonvolatile memory, for example, at least disk memory, a flash memories Part or other non-volatile solid state memory parts.In some embodiments, it includes relative to processor 501 that memory 502 is optional Remotely located memory, these remote memories can pass through network connection to external equipment.The example of above-mentioned network includes But be not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
One or more program module is stored in memory 502, is executed when by one or more processor 501 When, the IP geography information executed in above-mentioned any means embodiment determines method.
Method provided by the embodiment of the present application can be performed in the said goods, has the corresponding functional module of execution method and has Beneficial effect, the not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present application.
The sixth embodiment of the application is related to a kind of computer readable storage medium, in the computer readable storage medium It is stored with computer program, which can be realized when being executed by processor involved in any means embodiment of the present invention IP geography information determine method.
It will be understood by those skilled in the art that implementing the method for the above embodiments is that can pass through Program is completed to instruct relevant hardware, which is stored in a storage medium, including some instructions are used so that one A equipment (can be single-chip microcontroller, chip etc.) or processor (processor) execute each embodiment the method for the application All or part of the steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
It will be understood by those skilled in the art that the respective embodiments described above are to realize specific embodiments of the present invention, And in practical applications, can to it, various changes can be made in the form and details, without departing from the spirit and scope of the present invention.

Claims (10)

1. a kind of IP geography information determines method, which is characterized in that be applied to server, comprising:
It obtains one and needs to carry out the Target IP that geography information determines;
By carrying out the geography information that regionally detecting determines the Target IP to the Target IP.
2. IP geography information according to claim 1 determines method, which is characterized in that it is described by the Target IP into Row regionally detecting determines the geography information of the Target IP, specifically includes:
Judge in the Target IP whether to include segmentation markers information, if so, carrying out segmentation detection, and root to the Target IP Regionally detecting is carried out to the Target IP according to segmentation detection result, the geography of the Target IP is determined according to the result of regionally detecting Information;
Otherwise, regionally detecting directly is carried out to the Target IP, the geography of the Target IP is determined according to the result of regionally detecting Information.
3. IP geography information according to claim 2 determines method, which is characterized in that the segmentation markers information includes institute State mark or two sections of probe marks that the IP address number for including in Target IP is greater than one.
4. IP geography information according to claim 2 determines method, which is characterized in that described to divide the Target IP Section detection, and according to segmentation detection result to the Target IP carry out regionally detecting, according to the result of regionally detecting determine described in The geography information of Target IP, specifically includes:
The first detection for each IP address in the Target IP is sent to the machine with connection relationship and best performance Instruction, and the machine of the best performance is received according to first probe instructions to each IP address in the Target IP Detection information, using the detection information of each IP address in the Target IP as segmentation detection result, wherein the detection letter Breath includes regional value;
The Target IP is segmented according to the segmentation detection result, generates segmentation result;
Regionally detecting is carried out to the Target IP according to the segmentation result, the Target IP is determined according to the result of regionally detecting Geography information.
5. IP geography information according to claim 4 determines method, which is characterized in that described detected according to the segmentation is tied Fruit is segmented the Target IP, generates segmentation result, specifically includes:
It will sequentially be connected in the Target IP and the IP address of the difference of the regional value within a preset range be divided into one In IP sections, each IP sections obtained will be divided and be used as the segmentation result.
6. IP geography information according to claim 4 determines method, which is characterized in that each IP according to The detection information of location is segmented the Target IP, after generation segmentation result further include:
Segmentation markers information included in the Target IP is deleted.
7. IP geography information according to claim 5 determines method, which is characterized in that described according to the segmentation result pair The Target IP carries out regionally detecting, and the geography information of the Target IP is determined according to the result of regionally detecting, is specifically included:
Select an IP address respectively in each is IP sections described;
The second probe instructions for being directed to selected IP address are sent to whole operation machines with connection relationship, and receive institute State all operation machines according to second probe instructions each it is IP sections described selected in IP address detection information, Wherein, the detection information includes regional value;
According to it is described all operation machines it is received each it is IP sections described selected in IP address regional value, determine each A IP sections of area information;
Each described IP sections area information is matched with mapping table, and each described IP is determined according to matching result The geography information of section, and using each described IP sections geography information as the geography information of the Target IP, wherein it is described to reflect The corresponding relationship of area information and geography information has been prestored in firing table.
8. IP geography information according to claim 2 determines method, which is characterized in that it is described directly to the Target IP into Row regionally detecting determines the geography information of the Target IP according to the result of regionally detecting, specifically includes:
Second for an IP address included in the Target IP is sent to whole operation machines with connection relationship Probe instructions, and all operations machine is received according to second probe instructions to one included in the Target IP The detection information of IP address, wherein the detection information includes regional value;
According to the regional values determination of an IP address included in the whole operation received Target IPs of machine The area information of an IP address included in Target IP;
The area information of one IP address is matched with mapping table, and with determining one IP according to matching result The geography information of location, and using the geography information of one IP address as the geography information of the Target IP, wherein it is described to reflect The corresponding relationship of area information and geography information has been prestored in firing table.
9. a kind of server characterized by comprising
At least one processor;And
The memory being connect at least one described processor communication;Wherein,
The memory is stored with the instruction that can be executed by least one described processor, and described instruction is by described at least one It manages device to execute, so as to be able to carry out IP geography information as claimed in any one of claims 1 to 8 true at least one described processor Determine method.
10. a kind of computer readable storage medium, is stored with computer program, which is characterized in that the computer program is located Reason device realizes that the described in any item IP geography information of claim 1 to 8 determine method when executing.
CN201811311249.9A 2018-11-06 2018-11-06 IP geographic information determining method, server and storage medium Active CN109474712B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811311249.9A CN109474712B (en) 2018-11-06 2018-11-06 IP geographic information determining method, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811311249.9A CN109474712B (en) 2018-11-06 2018-11-06 IP geographic information determining method, server and storage medium

Publications (2)

Publication Number Publication Date
CN109474712A true CN109474712A (en) 2019-03-15
CN109474712B CN109474712B (en) 2022-05-13

Family

ID=65672015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811311249.9A Active CN109474712B (en) 2018-11-06 2018-11-06 IP geographic information determining method, server and storage medium

Country Status (1)

Country Link
CN (1) CN109474712B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327495A (en) * 2020-02-25 2020-06-23 网宿科技股份有限公司 Method and device for detecting IP service area of visitor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090129377A1 (en) * 2007-11-19 2009-05-21 Simon Chamberlain Service for mapping ip addresses to user segments
CN105227688A (en) * 2015-08-31 2016-01-06 罗向阳 A kind of region class Target IP localization method based on route characteristic
CN105933294A (en) * 2016-04-12 2016-09-07 晶赞广告(上海)有限公司 Network user positioning method, device and terminal
CN106341498A (en) * 2015-07-06 2017-01-18 阿里巴巴集团控股有限公司 Network address based locating method and device and IP segment data storage method and device
CN108574744A (en) * 2017-07-28 2018-09-25 北京金山云网络技术有限公司 A kind of domain name analytic method, device, electronic equipment and readable storage medium storing program for executing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090129377A1 (en) * 2007-11-19 2009-05-21 Simon Chamberlain Service for mapping ip addresses to user segments
CN106341498A (en) * 2015-07-06 2017-01-18 阿里巴巴集团控股有限公司 Network address based locating method and device and IP segment data storage method and device
CN105227688A (en) * 2015-08-31 2016-01-06 罗向阳 A kind of region class Target IP localization method based on route characteristic
CN105933294A (en) * 2016-04-12 2016-09-07 晶赞广告(上海)有限公司 Network user positioning method, device and terminal
CN108574744A (en) * 2017-07-28 2018-09-25 北京金山云网络技术有限公司 A kind of domain name analytic method, device, electronic equipment and readable storage medium storing program for executing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111327495A (en) * 2020-02-25 2020-06-23 网宿科技股份有限公司 Method and device for detecting IP service area of visitor
CN111327495B (en) * 2020-02-25 2021-08-27 网宿科技股份有限公司 Method and device for detecting IP service area of visitor

Also Published As

Publication number Publication date
CN109474712B (en) 2022-05-13

Similar Documents

Publication Publication Date Title
Norvill et al. Automated labeling of unknown contracts in ethereum
CN106407768B (en) A kind of determination of device-fingerprint, the method and apparatus that target device is identified
CN105335515A (en) Information recommendation method and information recommendation device
CN101876934B (en) Method and system for sampling input data
CN109359186B (en) Method and device for determining address information and computer readable storage medium
CN109165326A (en) A kind of character string matching method and device
CN107291721A (en) A kind of information gathering of point of interest and processing method, apparatus and system
CN109710708A (en) A kind of electronic map mapping method and device
CN109766176A (en) A kind of scan progress calculation method and device based on large scale network space exploration
CN108334444A (en) Various dimensions dynamic combined shunts method of servicing, device, terminal and storage medium
KR20210065687A (en) Apparatus, method, storage medium of storing program and computer program for analyzing cyber assets damage using system operation status information
CN106104480A (en) Similarity is used to retain the memory management of the cluster wide signed
CN111047448A (en) Analysis method and device for multi-channel data fusion
CN107277121A (en) A kind of network equipment localization method and device
CN109474712A (en) IP geographic information determining method, server and storage medium
CN114500346A (en) Network space mapping method and device
CN110502443A (en) Redundant code detection method, detection module, electronic equipment and computer storage medium
CN117172633B (en) Manufacturing service subgraph simulation method and system for industrial Internet platform
CN108923962A (en) A kind of Local network topology measurement task selection method based on semi-supervised clustering
CN108205515A (en) A kind of mobile platform crowdsourcing task pricing method and system
US10666536B1 (en) Network asset discovery
CN111951059A (en) Real estate valuation method, device, terminal and readable storage medium
CN110099442A (en) The change in location of the network equipment determines method, apparatus, computer equipment and medium
CN106375551A (en) Information interaction method and device, and terminal
CN104657507B (en) The mode detection method and device of diagram data based on distributed 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