CN113779165A - Method for judging geographic position ambiguity of IP address and related equipment - Google Patents

Method for judging geographic position ambiguity of IP address and related equipment Download PDF

Info

Publication number
CN113779165A
CN113779165A CN202110884008.9A CN202110884008A CN113779165A CN 113779165 A CN113779165 A CN 113779165A CN 202110884008 A CN202110884008 A CN 202110884008A CN 113779165 A CN113779165 A CN 113779165A
Authority
CN
China
Prior art keywords
address
dispute
active
address field
information
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
CN202110884008.9A
Other languages
Chinese (zh)
Other versions
CN113779165B (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.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
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 Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202110884008.9A priority Critical patent/CN113779165B/en
Publication of CN113779165A publication Critical patent/CN113779165A/en
Application granted granted Critical
Publication of CN113779165B publication Critical patent/CN113779165B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90348Query processing by searching ordered data, e.g. alpha-numerically ordered data
    • 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)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Remote Sensing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Navigation (AREA)

Abstract

The present disclosure provides an IP address geographic location ambiguity determination method and related device, the method including: and constructing the same IP address field set and the dispute IP address field set according to different IP positioning libraries, and performing IP address activity detection on the basis of the same IP address field set to construct an active IP address data set. And associating the dispute IP address field with the active IP address field, respectively calculating path vectors corresponding to different IP address fields, and taking the address position of the active IP address field closest to the path vector of the dispute IP address field as the target geographic position of the dispute IP address field. The judgment method provided by the disclosure solves the problem of inconsistency of the IP address geographical positions of the multi-source IP address geographical position database, fully utilizes the full-path information from the detection point to the target IP, and has higher reliability. Meanwhile, only partial active IP corresponding to the disputed city is needed and the geographic position can be judged, so that the method has the advantages of real-time performance, accuracy, light weight and easiness in deployment.

Description

Method for judging geographic position ambiguity of IP address and related equipment
Technical Field
The disclosure relates to the technical field of internet, in particular to an IP address geographic position ambiguity determination method and related equipment.
Background
The IP address is a uniform address format provided by the IP protocol, is a core component of the internet, and can be used to uniquely identify a host or device accessing the network. The device or host used by the user must have an IP address to access the internet and thereby obtain network resources. IP address geographic location refers to an address in physical space that corresponds to an IP address in network space. Generally, there is a one-to-one correspondence between IP addresses and physical addresses. IP positioning refers to establishing a mapping relationship between an IP address and a physical address thereof by a certain technical means. The IP positioning is widely applied to the aspects of network performance optimization, network security analysis, personalized recommendation and the like. The IP address is a logical address of a network or a host in the internet, and the geographical location of the IP address plays an important role in network traffic scheduling, network security event analysis and user popularization. Currently, more IP address geographic position databases exist in the industry, but the multi-source IP address geographic position information causes an IP address position ambiguity and reduces the use effect of the IP address geographic position.
Disclosure of Invention
In view of the above, the present disclosure provides a method and a device for determining a geographic position ambiguity of an IP address.
Based on the above purpose, the present disclosure provides a method for determining an ambiguity of a geographic location of an IP address, including:
acquiring positioning information from at least two IP positioning libraries;
carrying out standardization processing on the geographic position in the positioning information;
associating the IP address field in the positioning information with autonomous system as (autonomous system) information in a routing information table through a routing prefix;
constructing the same IP address field set based on the positioning information and the as information, and constructing a dispute IP address field set based on the positioning information and the as information;
determining an active IP address segment set through activity detection based on the same IP address segment set;
determining, by a predetermined rule, at least two active IP address segments associated with each of the set of dispute IP address segments based on the set of dispute IP address segments and the set of active IP address segments;
respectively obtaining the path vector of the dispute IP address field and the path vectors of all the active IP address fields associated with the path vector by route tracking, respectively calculating the distance between the path vector of the dispute IP address field and the path vector of each active IP address field, and taking the geographic position associated with the active IP address field corresponding to the minimum distance as the target geographic position of the dispute IP address field.
Further, the positioning information includes: start-stop IP, country code, state/province/region, and city name, the geographic location including country code, state/province/region, and city name.
Further, the normalization process includes: and inquiring the geographic position in a preset standard geographic position library, and replacing the geographic position with a standard geographic position if the geographic position is a non-standard geographic position.
Further, the constructing a same IP address field set based on the positioning information and the as information and constructing a dispute IP address field set based on the positioning information and the as information includes: and merging the recorded information corresponding to the start and stop IP with the same geographic position and the same as information to construct a same IP address field set, and merging the recorded information with the same start and stop IP and different geographic positions and/or as information to construct a dispute IP address field set.
Further, the determining, based on the same IP address segment set, an active IP address segment set through activity detection includes: extracting information from the same IP address field set to construct a first dictionary, wherein the first dictionary is { city name: as: and [ IP address field set ] }, randomly extracting part of IP addresses from each IP address field of the first dictionary, performing activity detection on the part of IP addresses, and constructing an active IP address field set based on the city name, the as information and the IP address field with the active detection result corresponding to the as information.
Further, the predetermined rule includes: extracting information from the dispute IP address field set to construct a second dictionary, wherein the second dictionary is { dispute IP address field: [ first and second dispute cities …, nth dispute city as ] }, which queries, based on as information and using the similarity principle, active IP address fields corresponding to the first dispute city in the second dictionary and the nth dispute city in the active IP address field set of the second dispute city …, respectively, as active IP address fields associated with the dispute IP address fields.
Further, the obtaining the path vector of the dispute IP address segment and the path vectors of all the active IP address segments associated therewith through the route tracing respectively includes: and constructing a third dictionary, wherein the third dictionary is a { dispute IP address field: [ first dispute city + as + first active IP address field second dispute city + as + second active IP address field … nth dispute city + as + nth active IP address field ] }, initiating route tracing detection on the dispute IP address field and all the active IP address fields in the third dictionary, and converting the path obtained through the route tracing detection into a path vector.
Based on the same inventive concept, the present disclosure also provides an IP address geographic ambiguity determination apparatus, comprising:
the acquisition module is configured to acquire positioning information from at least two IP positioning libraries;
a normalization processing module configured to normalize the geographic location in the positioning information;
an information association module configured to associate the IP address field in the positioning information with as information in a routing information table through a routing prefix;
a set construction module configured to construct a same set of IP address segments based on the positioning information and the as information, and construct a set of dispute IP address segments based on the positioning information and the as information;
an activity detection module configured to determine a set of active IP address segments through activity detection based on the set of identical IP address segments;
an associated active IP determination module configured to determine, based on the set of dispute IP address segments and the set of active IP address segments, at least two active IP address segments associated with each of the set of dispute IP address segments by a predetermined rule;
and the geographic position judging module is configured to respectively acquire the path vector of the dispute IP address field and the path vectors of all the active IP address fields associated with the path vector by route tracking, respectively calculate the distance between the path vector of the dispute IP address field and the path vector of each active IP address field, and use the geographic position associated with the active IP address field corresponding to the minimum distance as the target geographic position of the dispute IP address field.
Based on the same inventive concept, the present disclosure also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.
Based on the same inventive concept, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described above.
From the above, the method for determining the geographical location ambiguity of the IP address and the related device provided by the present disclosure solve the problem of inconsistent geographical locations of IP addresses in the multi-source IP address geographical location database. The method comprises the steps of analyzing a multi-source IP address geographic position database, obtaining the same IP address set and different IP address sets of IP address geographic position positioning in the database, obtaining network paths from specific measuring points to the sets through active measurement, and establishing a metro-level network path reference data set according to the network paths for positioning the same IP address set. And aiming at the set with inconsistent IP address geographic positions, the ambiguity discrimination of the IP address geographic positions is realized by comparing the similarity of the network paths to the reference data set of the specific urban network path. The method provided by the disclosure has low dependence degree on network quality, fully utilizes the full path information from the detection point to the target IP, and has high reliability. Meanwhile, only partial active IP corresponding to the disputed city is needed and the geographic position can be judged, so that the method has the advantages of real-time performance, accuracy, light weight and easiness in deployment.
Drawings
In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings needed to be used in the description of the embodiments or related technologies are briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a method for determining an ambiguity of a geographic location of an IP address according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of activity detection according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus for determining an ambiguity of a geographic location of an IP address according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that technical terms or scientific terms used in the embodiments of the present disclosure should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in the embodiments of the disclosure is not intended to indicate any order, quantity, or importance, but rather to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
As described in the background, an IP address geolocation database is a database that describes the mapping of IP addresses to their physical locations, commonly referred to as an IP locator base. Acquiring IP positioning using an IP positioning library is one of the most common forms, and therefore, many organizations provide IP positioning library services. The IP positioning library commonly available at present has two versions of free and business, the number of records of the free version is less than that of the business version, and the positioning accuracy is relatively low. The IP location stock is in a plurality of records, and each record generally comprises information from address block prefix or starting address to ending address, continent code, country code, state/province/region, city, longitude and latitude, postal code and the like. Based on this, a mapping relationship of the IP address to the physical address can be determined. Different IP positioning libraries have different detection methods, so that the situation that the positioning is inconsistent may exist in the IP positioning libraries with the same IP address and different IP addresses, the data with inconsistent positioning is called dispute IP, and the ambiguous address position of the dispute IP is judged, so that the problem that the geographic positions of the multi-source IP addresses are inconsistent is solved.
Embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
Referring to fig. 1, the present disclosure provides a method for determining an ambiguity of a geographic location of an IP address, comprising the following steps:
step S101, positioning information is obtained from at least two IP positioning libraries. Specifically, different IP location libraries have different detection methods, and thus, description of IP addresses is inconsistent. And extracting the positioning information of the IP address field from different IP positioning libraries, and further processing the positioning information.
And S102, carrying out standardization processing on the geographic position in the positioning information. The descriptions of the same geographic location in different IP location repositories may be different, and the descriptions of the geographic location need to be unified, that is, standardized.
And step S103, associating the IP address field in the positioning information with the as information in the routing information table through the routing prefix. The routing table contains routing prefixes and autonomous system numbers (asn) of autonomous domains, a prefix tree is established for all the routing prefixes, and the routing prefixes to which the IP address field belongs are searched from the prefix tree, so that the IP address field can be associated with the routing prefixes and the asn to which the IP address field belongs.
And step S104, constructing the same IP address field set based on the positioning information and the as information, and constructing a dispute IP address field set based on the positioning information and the as information. Specifically, different sets are respectively constructed according to different IP address field information in the positioning information, the positioning information without disputes of the IP address fields is combined to construct the same IP address field set, and the positioning information with disputes of the IP address fields is combined to construct a disputed IP address field set.
And S105, determining an active IP address field set through activity detection based on the same IP address field set. Specifically, for the same IP address segment set with no dispute of the IP address segments, the activity detection is carried out on the IP address segments in the set, and the IP address segments with the active detection result are merged to be used as the active IP address segment set.
And step S106, determining at least two active IP address fields related to each dispute IP address field in the dispute IP address field set through a preset rule based on the dispute IP address field set and the active IP address field set. And associating the dispute IP address field with the active IP address fields in the active IP address field set, and selecting at least two active IP address fields with the highest similarity to the dispute IP address field for subsequently judging the geographic position of the dispute IP address field.
Step S107, respectively obtaining the path vector of the dispute IP address field and the path vectors of all the active IP address fields associated with the path vector by route tracking, respectively calculating the distance between the path vector of the dispute IP address field and the path vector of each active IP address field, and taking the geographic position associated with the active IP address field corresponding to the minimum distance as the target geographic position of the dispute IP address field.
In some embodiments, the positioning information comprises: start-stop IP, country code, state/province/region, and city name, the geographic location including country code, state/province/region, and city name. The location information in the IP location base typically includes address block prefixes or start addresses to end addresses, country codes, state/province/region and city fields, and the description of the same city may differ from one IP location base to another.
In some embodiments, the normalization process comprises: and inquiring the geographic position in a preset standard geographic position library, and replacing the geographic position with a standard geographic position if the geographic position is a non-standard geographic position. Specifically, with the geographic position information in one of the IP positioning bases as a reference, the geographic position information in the other positioning bases as a key, and the geographic position information in the reference positioning base as a value, a { alias: standard naming, if the geographic position information of one record is different from the geographic position information in the reference library, inquiring the dictionary for replacement.
In some embodiments, said constructing a set of identical IP address segments based on said location information and said as information, constructing a set of dispute IP address segments based on said location information and said as information, comprises: and merging the recorded information corresponding to the start and stop IP with the same geographic position and the same as information to construct a same IP address field set, and merging the recorded information with the same start and stop IP and different geographic positions and/or as information to construct a dispute IP address field set.
Specifically, the IP address fields in the positioning information include a dispute-free IP address field and a dispute IP address field, and the two types of IP address fields are respectively merged to construct a set. The dispute-free IP address field is recorded information with completely same geographic position information in the positioning information, and the dispute-free IP address field is combined to construct the same IP address field set. For example, the positioning information in the first IP positioning base is { IP segment one: the start and stop IP, country A, province A, city A, as A }, and the positioning information in the second IP positioning base is { IP section one: and starting and stopping IP, national A, province A, city A and as A }, and regarding the positioning information as the same recorded information, and constructing and storing the same IP address field set.
The different geographical position information of the dispute IP address field is recorded behind the dispute IP address field as an element of the dispute IP address field set, wherein the different geographical position information or the as information of the dispute IP address field comprises the conditions of different states, provinces, regions, city names or as information and the like. For example, the positioning information in the first IP positioning base is { IP segment one: the start and stop IP, country A, province A, city A, as A }, and the positioning information in the second IP positioning base is { IP section one: and starting and stopping IP, country A, province B, city B and as A }, and constructing and storing a dispute IP address field set by regarding the positioning information as different recording information.
In some embodiments, said determining, based on said same set of IP address segments, a set of active IP address segments by activity detection comprises: extracting information from the same IP address field set to construct a first dictionary, wherein the first dictionary is { city name: as: and [ IP address field set ] }, randomly extracting part of IP addresses from each IP address field of the first dictionary, performing activity detection on the part of IP addresses, and constructing an active IP address field set based on the city name, the as information and the IP address field with the active detection result corresponding to the as information.
Specifically, a first dictionary { city name: as: the same city name and as information correspond to different IP address fields, and the IP address fields are recorded as a set behind the city name and as information. For a set of IP address segments, which may include an active IP address segment and an inactive IP address segment, further detection of network conditions by a detection tool is required. Referring to fig. 2, in this embodiment, PING is used to perform activity detection, PING commands detect activity by sending an ICMP message to a destination address, if a reply message is received, the address segment is considered to be an active address segment, an active address is stored in the address segment, and meanwhile, an inactive IP address segment is removed from a set, and an active IP address segment set with the same location in each city and each network is established.
In some embodiments, the predetermined rules include: extracting information from the dispute IP address field set to construct a second dictionary, wherein the second dictionary is { dispute IP address field: [ first and second dispute cities …, nth dispute city as ] }, which queries, based on as information and using the similarity principle, active IP address fields corresponding to the first dispute city in the second dictionary and the nth dispute city in the active IP address field set of the second dispute city …, respectively, as active IP address fields associated with the dispute IP address fields.
Specifically, different dispute cities corresponding to dispute IP address fields with the same as information are queried in the active IP address field set, an IP address field with the highest similarity corresponding to each dispute city is selected as an active IP address field corresponding to the dispute city, and a third dictionary { dispute IP address field: [ first dispute city + as + first active IP address field second dispute city + as + second active IP address field … Nth dispute city + as + Nth active IP address field ] }.
In some embodiments, said obtaining the path vector of said dispute IP address segment and the path vectors of all said active IP address segments associated therewith separately by route tracing comprises: and constructing a third dictionary, wherein the third dictionary is a { dispute IP address field: [ first dispute city + as + first active IP address field second dispute city + as + second active IP address field … nth dispute city + as + nth active IP address field ] }, initiating route tracing detection on the dispute IP address field and all the active IP address fields in the third dictionary, and converting the path obtained through the route tracing detection into a path vector. In this embodiment, a scamper tool is used to initiate route tracing, so that multiple threads can be used to perform detection, the sending rate of a detection packet is controlled, the detection rate is increased, and the detection result is stored in a file form.
A fourth dictionary { IP address field: a path vector comprising the path vector of the dispute IP address segment and the path vector of the active IP address segment, which is discarded if encountered (no return packet) when the path vector is constructed. And taking the IP address field in the third dictionary as a key, searching a corresponding value in the fourth dictionary, and constructing a fifth dictionary { dispute IP address field: dispute IP address segment path vector the first active IP address segment corresponding path to the second active IP address segment corresponding path vector … the nth active IP address segment corresponding path vector. And respectively comparing the distance between the path vector of the dispute IP address segment and the path vector of each active IP address segment, wherein the similarity of two IP address segments with closer distances in a physical space is larger. Because the lengths of the vectors are inconsistent, a Dynamic Time Warping (DTW) algorithm is used to compare the distances between the vectors, which is specifically as follows:
(1) and inputting a path vector corresponding to the dispute IP address field and a path vector corresponding to one active IP address field, and respectively calculating the distance between each point of the two vectors by constructing a distance matrix between the two vectors.
(2) A path from the top left corner to the bottom right corner is found from the distance matrix so that the sum of the elements on the path is the minimum, which is the distance of the two vectors. The minimum element is searched and a dynamic programming method is adopted, and the method is specifically realized as follows:
assuming that the distance matrix is M, the shortest path length from the upper left corner (1,1) of the matrix to any point (i, j) is Lmin (i, j). Since the current path length is equal to the previous path length + the size of the current element, for a certain element (i, j) on the path, its previous element may only be one of the following three: a) left adjacent element (i, j-1), b) upper adjacent element (i-1, j), c) upper left adjacent element (i-1, j-1). Then a recursive algorithm can be used to find the shortest path length: lmin (i, j) ═ min { Lmin (i, j-1), Lmin (i-1, j-1) } + M (i, j), where the initial condition Lmin ═ 1,1 ═ M (1,1), the result returns the distance between the two vectors.
(3) Respectively inputting (a dispute IP address segment path vector, a first active IP address segment corresponding path vector), (a dispute IP address segment path vector, a second active IP address segment corresponding path vector) … (a dispute IP address segment path vector, an Nth active IP address segment corresponding path vector) as parameters into the DTW algorithm, comparing the return distance values, and finally obtaining the geographic position of the active IP address segment corresponding to the value with the minimum distance as the target geographic position of the dispute IP address segment, thereby finishing the judgment of the dispute IP address geographic position.
In one particular embodiment, there are two IP location repositories a and B. Firstly, taking the A library as a standard, standardizing the records of the city and the A library in the alias in the B library. And then associating each IP address field with the prefix of the routing table and further associating with the corresponding as by combining with the routing table of the current day. Then comparing the location of each IP section in the A base with that in the B base, storing the records with the same location as the same IP address section set, dividing the data in the set according to cities and as, and establishing a { city: as: the [ IP address field set ] } set is used as a reference, for each IP field in the reference set, a plurality of IPs are randomly selected for activity detection, a PING tool is used for detection, the address is considered to be active after a reply is received, the active IP address field is attached to the back of the IP address field, and if the active IP address field is not found, the IP address field is removed. And storing records with different positioning as a dispute IP address field set, wherein the positioning of the IP address field by the library A is Suzhou, and the positioning of the IP address field by the library B is Nanjing. For this record we save as { dispute IP address field: [ south Beijing as of Suzhou ] }, inquiring an active IP address set of corresponding as of Suzhou and Nanjing from a reference set, searching an IP address segment with the highest similarity to the dispute IP address segment from the active addresses by using a similarity principle, and generating a { dispute IP address segment: [ Suzhou + as + first active IP Nanjing + as + second active IP ] } dictionary. And respectively initiating route tracing detection to the dispute IP and the corresponding active IP by using the scamper, and storing the result in a file form. And converting the detected path into a path vector, and constructing a { IP: [ path vector ] } dictionary. To { dispute IP address field: the IP in [ suzhou + as + first active IP Nanjing + as + second active IP ] } dictionary is a key, where { IP: the value corresponding to the dictionary is searched in the [ path vector ] } dictionary, and a { dispute IP: [ dispute IP path to first active IP corresponding path to second active IP corresponding path vector ] } dictionary. And respectively comparing the distances between the dispute IP and the path vectors corresponding to the first active IP and the second active IP by using a DTW algorithm, and returning a result to show that the distance between the dispute IP and the first active IP address segment is close, and determining that the IP address segment is positioned in Suzhou.
It should be noted that the method of the embodiments of the present disclosure may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In such a distributed scenario, one of the devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the devices may interact with each other to complete the method.
It should be noted that the above describes some embodiments of the disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same inventive concept, corresponding to the method of any embodiment, the disclosure also provides a device for judging the geographic position ambiguity of the IP address.
Referring to fig. 3, the IP address geographic position ambiguity determining apparatus includes:
an obtaining module 301 configured to obtain positioning information from at least two IP positioning libraries;
a normalization processing module 302 configured to normalize the geographic location in the positioning information;
an information associating module 303 configured to associate the IP address field in the positioning information with as information in a routing information table through a routing prefix;
a set construction module 304 configured to construct a same set of IP address segments based on the positioning information and the as information, and construct a set of dispute IP address segments based on the positioning information and the as information;
an activity detection module 305 configured to determine, based on the same set of IP address segments, a set of active IP address segments through activity detection;
an associated active IP determination module 306 configured to determine, based on the set of dispute IP address segments and the set of active IP address segments, at least two active IP address segments associated with each of the set of dispute IP address segments by a predetermined rule;
and a geographic location determining module 307 configured to obtain the path vector of the dispute IP address segment and the path vectors of all the active IP address segments associated therewith respectively through route tracing, calculate a distance between the path vector of the dispute IP address segment and the path vector of each of the active IP address segments respectively, and use the geographic location associated with the active IP address segment corresponding to the minimum distance as the target geographic location of the dispute IP address segment.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations of the present disclosure.
The apparatus in the foregoing embodiment is used to implement the method for determining ambiguity of geographic location of an IP address in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to the method of any embodiment described above, the present disclosure further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the method for determining the geographic position ambiguity of the IP address according to any embodiment described above.
Fig. 4 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present apparatus and other apparatuses. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, Bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the corresponding method for determining ambiguity of the geographic location of the IP address in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-described embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the IP address geo-location ambiguity determination method according to any of the above embodiments.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the method for determining an ambiguity of an IP address geographic position according to any of the foregoing embodiments, and have the beneficial effects of corresponding method embodiments, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the present disclosure, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the disclosure. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the present disclosure, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the present disclosure are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that the embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The disclosed embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalents, improvements, and the like that may be made within the spirit and principles of the embodiments of the disclosure are intended to be included within the scope of the disclosure.

Claims (10)

1. A method for judging the geographic position ambiguity of an IP address comprises the following steps:
acquiring positioning information from at least two IP positioning libraries;
carrying out standardization processing on the geographic position in the positioning information;
associating the IP address field in the positioning information with autonomous system as information in a routing information table through a routing prefix;
constructing the same IP address field set based on the positioning information and the as information, and constructing a dispute IP address field set based on the positioning information and the as information;
determining an active IP address segment set through activity detection based on the same IP address segment set;
determining, by a predetermined rule, at least two active IP address segments associated with each of the set of dispute IP address segments based on the set of dispute IP address segments and the set of active IP address segments;
respectively obtaining the path vector of the dispute IP address field and the path vectors of all the active IP address fields associated with the path vector by route tracking, respectively calculating the distance between the path vector of the dispute IP address field and the path vector of each active IP address field, and taking the geographic position associated with the active IP address field corresponding to the minimum distance as the target geographic position of the dispute IP address field.
2. The decision method of claim 1, wherein the positioning information comprises: start-stop IP, country code, state/province/region, and city name, the geographic location including country code, state/province/region, and city name.
3. The determination method according to claim 1, wherein the normalization process includes: and inquiring the geographic position in a preset standard geographic position library, and replacing the geographic position with a standard geographic position if the geographic position is a non-standard geographic position.
4. The decision method of claim 2, wherein the constructing a set of identical IP address segments based on the positioning information and the as information and a set of dispute IP address segments based on the positioning information and the as information comprises:
and merging the recorded information corresponding to the start and stop IP with the same geographic position and the same as information to construct a same IP address field set, and merging the recorded information with the same start and stop IP and different geographic positions and/or as information to construct a dispute IP address field set.
5. The determination method of claim 2, wherein the determining, based on the same set of IP address segments, a set of active IP address segments by activity detection comprises:
extracting information from the same IP address field set to construct a first dictionary, wherein the first dictionary is { city name: as: and [ IP address field set ] }, randomly extracting part of IP addresses from each IP address field of the first dictionary, performing activity detection on the part of IP addresses, and constructing an active IP address field set based on the city name, the as information and the IP address field with the active detection result corresponding to the as information.
6. The determination method according to claim 1, wherein the predetermined rule includes: extracting information from the dispute IP address field set to construct a second dictionary, wherein the second dictionary is { dispute IP address field: [ first and second dispute cities …, nth dispute city as ] }, which queries, based on as information and using the similarity principle, active IP address fields corresponding to the first dispute city in the second dictionary and the nth dispute city in the active IP address field set of the second dispute city …, respectively, as active IP address fields associated with the dispute IP address fields.
7. The method of determining as described in claim 6, said obtaining path vectors for said disputed IP address segment and all of said active IP address segments associated therewith separately by route tracing comprising: and constructing a third dictionary, wherein the third dictionary is a { dispute IP address field: [ first dispute city + as + first active IP address field second dispute city + as + second active IP address field … nth dispute city + as + nth active IP address field ] }, initiating route tracing detection on the dispute IP address field and all the active IP address fields in the third dictionary, and converting the path obtained through the route tracing detection into a path vector.
8. An IP address geographic ambiguity resolution apparatus, comprising:
the acquisition module is configured to acquire positioning information from at least two IP positioning libraries;
a normalization processing module configured to normalize the geographic location in the positioning information;
an information association module configured to associate the IP address field in the positioning information with as information in a routing information table through a routing prefix;
a set construction module configured to construct a same set of IP address segments based on the positioning information and the as information, and construct a set of dispute IP address segments based on the positioning information and the as information;
an activity detection module configured to determine a set of active IP address segments through activity detection based on the set of identical IP address segments;
an associated active IP determination module configured to determine, based on the set of dispute IP address segments and the set of active IP address segments, at least two active IP address segments associated with each of the set of dispute IP address segments by a predetermined rule;
and the geographic position judging module is configured to respectively acquire the path vector of the dispute IP address field and the path vectors of all the active IP address fields associated with the path vector by route tracking, respectively calculate the distance between the path vector of the dispute IP address field and the path vector of each active IP address field, and use the geographic position associated with the active IP address field corresponding to the minimum distance as the target geographic position of the dispute IP address field.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, the processor implementing the method of any one of claims 1 to 7 when executing the computer program.
10. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-7.
CN202110884008.9A 2021-08-03 2021-08-03 IP address geographic position ambiguity judging method and related equipment Active CN113779165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110884008.9A CN113779165B (en) 2021-08-03 2021-08-03 IP address geographic position ambiguity judging method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110884008.9A CN113779165B (en) 2021-08-03 2021-08-03 IP address geographic position ambiguity judging method and related equipment

Publications (2)

Publication Number Publication Date
CN113779165A true CN113779165A (en) 2021-12-10
CN113779165B CN113779165B (en) 2023-07-28

Family

ID=78836606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110884008.9A Active CN113779165B (en) 2021-08-03 2021-08-03 IP address geographic position ambiguity judging method and related equipment

Country Status (1)

Country Link
CN (1) CN113779165B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115378912A (en) * 2022-07-21 2022-11-22 北京华顺信安科技有限公司 Scanning method and system for active IPv6 address

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130139044A1 (en) * 2011-11-28 2013-05-30 Google Inc. System and method for obtaining a structured address by geocoding unstructured address information
US20150009072A1 (en) * 2013-07-08 2015-01-08 Rockwell Collins Inc System and Methods for Non-Parametric Technique Based Geolocation and Cognitive Sensor Activation
CN110858810A (en) * 2018-08-24 2020-03-03 中国移动通信集团四川有限公司 Network link state monitoring method, device, system and medium
CN111629081A (en) * 2020-05-28 2020-09-04 腾讯科技(深圳)有限公司 Internet protocol IP address data processing method and device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130139044A1 (en) * 2011-11-28 2013-05-30 Google Inc. System and method for obtaining a structured address by geocoding unstructured address information
US20150009072A1 (en) * 2013-07-08 2015-01-08 Rockwell Collins Inc System and Methods for Non-Parametric Technique Based Geolocation and Cognitive Sensor Activation
CN110858810A (en) * 2018-08-24 2020-03-03 中国移动通信集团四川有限公司 Network link state monitoring method, device, system and medium
CN111629081A (en) * 2020-05-28 2020-09-04 腾讯科技(深圳)有限公司 Internet protocol IP address data processing method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
彭艳兵,龚俭,丁伟,徐加羚: "自相似活跃子网前缀空间的路由查找", 计算机学报 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115378912A (en) * 2022-07-21 2022-11-22 北京华顺信安科技有限公司 Scanning method and system for active IPv6 address
CN115378912B (en) * 2022-07-21 2023-06-09 北京华顺信安科技有限公司 Scanning method and system for active IPv6 address

Also Published As

Publication number Publication date
CN113779165B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN109040343B (en) Domain name resolution method and device, computer readable storage medium and electronic equipment
US11698261B2 (en) Method, apparatus, computer device and storage medium for determining POI alias
RU2486586C1 (en) Method and device for integration of data on point provided by group of suppliers
TWI654867B (en) Method and device for determining the location of a terminal
CN104703125B (en) Information recommendation method, device and terminal based on instant messaging
US20150161207A1 (en) Assisting query and querying
CN111447292B (en) IPv6 geographical position positioning method, device, equipment and storage medium
CN110162512B (en) Log retrieval method, device and storage medium
WO2016127881A1 (en) Positioning method and apparatus
CN105224609A (en) Index query method and device
CN107423037B (en) Application program interface positioning method and device
US9453741B2 (en) Navigation system with indexed term searching and method of operation thereof
CN110704476A (en) Data processing method, device, equipment and storage medium
CN110688434B (en) Method, device, equipment and medium for processing interest points
CN113779165B (en) IP address geographic position ambiguity judging method and related equipment
CN110019444B (en) Operation request processing method, device, equipment and system
CN114448849B (en) Method for detecting supporting mode of IPv6 network of website and electronic equipment
CN107341221B (en) Index structure establishing and associated retrieving method, device, equipment and storage medium
CN105868316A (en) Method and device for acquiring regional information and electronic equipment
KR20210040310A (en) Method, apparatus, device and storage medium for map retrieval test
CN109511166B (en) Positioning method and positioning device of equipment
CN114637761B (en) Business object generation method and device
JP2010140355A (en) System and method for searching information
CN110753136B (en) Domain name resolution method, device, equipment and storage medium
CN110866003B (en) Index value number estimation method and device and electronic equipment

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