CN106027693B - IP address-based localization method and device - Google Patents
IP address-based localization method and device Download PDFInfo
- Publication number
- CN106027693B CN106027693B CN201610510379.XA CN201610510379A CN106027693B CN 106027693 B CN106027693 B CN 106027693B CN 201610510379 A CN201610510379 A CN 201610510379A CN 106027693 B CN106027693 B CN 106027693B
- Authority
- CN
- China
- Prior art keywords
- address
- type
- cluster
- collection point
- terminal
- 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.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2101/00—Indexing scheme associated with group H04L61/00
- H04L2101/60—Types of network addresses
- H04L2101/69—Types of network addresses using geographic information, e.g. room number
Abstract
The present invention provides a kind of IP address-based localization method and device.The locating request message that the embodiment of the present invention is sent by receiving terminal, it include the IP address of the terminal in the locating request message, and then obtain the IP address type of the IP address, make it possible to the IP address type according to the IP address, obtain position data corresponding to the IP address, due to different types of IP address, have different distributions feature, therefore, according to the address style of the IP address identified, IP address-based positioning operation is executed, accurate position data can be obtained, to improve the positioning accuracy based on IP address positioning.
Description
[technical field]
The present invention relates to Internet technology more particularly to a kind of IP address-based localization methods and device.
[background technique]
IP is the abbreviation of English Internet Protocol, " agreement interconnected between network " is meant, in internet
(Internet) in, it be can make to connect all computer networks on the net realize the set of rule being in communication with each other, it is specified that
The rule that computer should abide by when being communicated on internet.Therefore, IP can also be called " Internet Protocol ".IP
Location is used to one, the terminal on Internet number, and IP address has been required in the terminal of every networking, could positive normal open
Letter.
In the prior art, the IP address of request end offer is provided, IP address database is inquired, obtains the IP address institute
Region, for example, province, city etc., still, positioning accuracy is not high.
[summary of the invention]
Many aspects of the invention provide a kind of IP address-based localization method and device, to improve positioning accuracy.
An aspect of of the present present invention provides a kind of IP address-based localization method, comprising:
The locating request message that terminal is sent is received, includes the IP address of the terminal in the locating request message;
Obtain the IP address type of the IP address;
According to the IP address type of the IP address, position data corresponding to the IP address is obtained.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the IP address
IP address type include the first kind, Second Type, third type or the 4th type;Wherein,
The first kind is fixed allocation single centre vertex type;
The Second Type is to dynamically distribute single centre vertex type;
The third type is fixed allocation multicenter vertex type;
4th type is to dynamically distribute multicenter vertex type.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the acquisition institute
Before the IP address type for stating IP address, further includes:
At least one historical location data with the terminal of the IP address is obtained, at least one described history positions number
Include network connection instruction in each historical location data in;
If network connection included in each historical location data indicates that equal instruction terminal online is connected as Wi-Fi
Network connection, by least one described historical location data, the acquisition point data of the collection point as the IP address;
According to the acquisition point data of the collection point of the IP address, to the collection point of the IP address, carry out based on distance
Density Clustering processing, to obtain at least one apart from cluster;
According at least one described distributed data apart from cluster, the IP address type of the IP address is obtained.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, it is described according to institute
At least one distributed data apart from cluster is stated, after the IP address type for obtaining the IP address, further includes:
According to the IP address type of the IP address, the collection point time-to-live of the IP address is obtained;
Obtain the acquisition point data of the collection point within the collection point time-to-live of the IP address;
According within the collection point time-to-live of the IP address type of the IP address and the acquired IP address
The acquisition point data of collection point, obtains position data corresponding to the IP address.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, it is described according to institute
State the collection point of the IP address type of IP address and the collection point within the collection point time-to-live of the acquired IP address
Data obtain position data corresponding to the IP address, comprising:
If the IP address type of the IP address is the first kind, when the collection point of the acquired IP address is survived
Between within collection point acquisition point data, the position data of a center is calculated, as corresponding to the IP address
Position data;
If the IP address type of the IP address is Second Type or third type or the 4th type, according to acquired
The acquisition point data of collection point within the collection point time-to-live of the IP address carries out based on distance the collection point
Density Clustering processing, to obtain at least two apart from cluster;If described at least two it is described in cluster it is each apart from cluster when
Between it is upper be ordered arrangement, the position data of the positioning time center apart from cluster nearest apart from current time is calculated, to make
For position data corresponding to the IP address;If described at least two it is described in cluster it is each apart from cluster be in time nothing
Sequence arrangement, calculates the position data of at least two center apart from cluster each in cluster, using as described
Position data corresponding to IP address.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, it is described according to institute
The IP address type for stating IP address, obtains position data corresponding to the IP address, comprising:
According to the IP address type of the IP address, position data corresponding to the IP address is directly obtained;Or it obtains
The stop place for taking the terminal obtains position data corresponding to the IP address near the stop place of the terminal.
Another aspect of the present invention provides a kind of IP address-based positioning device, comprising:
Receiving unit includes the end in the locating request message for receiving the locating request message of terminal transmission
The IP address at end;
Obtaining unit, for obtaining the IP address type of the IP address;
Positioning unit obtains positional number corresponding to the IP address for the IP address type according to the IP address
According to.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the IP address
IP address type include the first kind, Second Type, third type or the 4th type;Wherein,
The first kind is fixed allocation single centre vertex type;
The Second Type is to dynamically distribute single centre vertex type;
The third type is fixed allocation multicenter vertex type;
4th type is to dynamically distribute multicenter vertex type.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, described device is also
Including configuration unit, it is used for
At least one historical location data with the terminal of the IP address is obtained, at least one described history positions number
Include network connection instruction in each historical location data in;
If network connection included in each historical location data indicates that equal instruction terminal online is connected as Wi-Fi
Network connection, by least one described historical location data, the acquisition point data of the collection point as the IP address;
According to the acquisition point data of the collection point of the IP address, to the collection point of the IP address, carry out based on distance
Density Clustering processing, to obtain at least one apart from cluster;And
According at least one described distributed data apart from cluster, the IP address type of the IP address is obtained.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the configuration are single
Member is specifically used for
According to the IP address type of the IP address, the collection point time-to-live of the IP address is obtained;
Obtain the acquisition point data of the collection point within the collection point time-to-live of the IP address;And
According within the collection point time-to-live of the IP address type of the IP address and the acquired IP address
The acquisition point data of collection point, obtains position data corresponding to the IP address.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the configuration are single
Member is specifically used for
If the IP address type of the IP address is the first kind, when the collection point of the acquired IP address is survived
Between within collection point acquisition point data, the position data of a center is calculated, as corresponding to the IP address
Position data;
If the IP address type of the IP address is Second Type or third type or the 4th type, according to acquired
The acquisition point data of collection point within the collection point time-to-live of the IP address carries out based on distance the collection point
Density Clustering processing, to obtain at least two apart from cluster;If described at least two it is described in cluster it is each apart from cluster when
Between it is upper be ordered arrangement, the position data of the positioning time center apart from cluster nearest apart from current time is calculated, to make
For position data corresponding to the IP address;If described at least two it is described in cluster it is each apart from cluster be in time nothing
Sequence arrangement, calculates the position data of at least two center apart from cluster each in cluster, using as described
Position data corresponding to IP address.
The aspect and any possible implementation manners as described above, it is further provided a kind of implementation, the positioning are single
Member is specifically used for
According to the IP address type of the IP address, position data corresponding to the IP address is directly obtained;Or it obtains
The stop place for taking the terminal obtains position data corresponding to the IP address near the stop place of the terminal.
As shown from the above technical solution, the locating request message that the embodiment of the present invention is sent by receiving terminal, it is described fixed
In the request message of position include the IP address of the terminal, and then obtain the IP address type of the IP address, makes it possible to basis
The IP address type of the IP address, obtains position data corresponding to the IP address, due to different types of IP address, tool
There are different characteristic distributions, therefore, according to the address style of the IP address identified, executes IP address-based positional operand
Make, accurate position data can be obtained, to improve the positioning accuracy based on IP address positioning.
In addition, using technical solution provided by the present invention, due to use in advance magnanimity historical location data this
Big data is positioned, calculating position data corresponding to IP address can further increase and be based on so that positioning result is more accurate
The positioning accuracy of IP address positioning.
In addition, using technical solution provided by the present invention, due to using this positioning of the historical location data of magnanimity
Big data, so that the identification of IP address is more accurate, to improve the reliability of IP address classification.
In addition, the experience of user can be effectively improved using technical solution provided by the present invention.
[Detailed description of the invention]
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is some realities of the invention
Example is applied, it for those of ordinary skill in the art, without any creative labor, can also be attached according to these
Figure obtains other attached drawings.
Fig. 1 is the flow diagram for the IP address-based localization method that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides IP address-based positioning device structural schematic diagram;
Fig. 3 be another embodiment of the present invention provides IP address-based positioning device structural schematic diagram.
[specific embodiment]
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Whole other embodiments obtained without creative efforts, shall fall within the protection scope of the present invention.
It should be noted that terminal involved in the embodiment of the present invention can include but is not limited to mobile phone, individual digital
Assistant (Personal Digital Assistant, PDA), radio hand-held equipment, tablet computer (Tablet Computer),
PC (Personal Computer, PC), MP3 player, MP4 player, wearable device (for example, intelligent glasses,
Smartwatch, Intelligent bracelet etc.) etc..
In addition, the terms "and/or", only a kind of incidence relation for describing affiliated partner, indicates may exist
Three kinds of relationships, for example, A and/or B, can indicate: individualism A exists simultaneously A and B, these three situations of individualism B.Separately
Outside, character "/" herein typicallys represent the relationship that forward-backward correlation object is a kind of "or".
Fig. 1 is the flow diagram for the IP address-based localization method that one embodiment of the invention provides, as shown in Figure 1.
101, the locating request message that terminal is sent is received, the IP in the locating request message comprising the terminal
Location.
102, the IP address type of the IP address is obtained.
103, according to the IP address type of the IP address, position data corresponding to the IP address is obtained.
It should be noted that some or all of 101~103 executing subject can be to be located locally the application of terminal,
It or can also be the plug-in unit or Software Development Kit (Software being arranged in the application of local terminal
Development Kit, SDK) etc. functional units, perhaps can also in network side server processing engine or
It can also be for positioned at the distributed system of network side, the present embodiment be to this without being particularly limited to.
It is understood that the application can be mounted in the local program (nativeApp) in terminal, or may be used also
To be a web page program (webApp) of browser in terminal, the present embodiment is to this without being particularly limited to.
In this way, by the locating request message for receiving terminal transmission, comprising the terminal in the locating request message
IP address, and then the IP address type of the IP address is obtained, make it possible to the IP address type according to the IP address, obtains
Position data corresponding to the IP address has different distributions feature due to different types of IP address, therefore, according to
The address style of the IP address identified executes IP address-based positioning operation, can obtain accurate position data, from
And improve the positioning accuracy based on IP address positioning.
Specifically, the IP address type of the IP address can include but is not limited to the first kind, Second Type,
Three types or the 4th type, the present embodiment is to this without being particularly limited to.
For example, the first kind is fixed allocation single centre vertex type;The Second Type is to dynamically distribute list
Center vertex type;The third type is fixed allocation multicenter vertex type;4th type is to dynamically distribute multicenter point
Type.
So-called fixed allocation single centre vertex type, such IP address show distribution and concentrate on a region
The fixed ip address that terminal is distributed.For example, some school district of school, company the places such as some office block terminal.
So-called dynamic allocation single centre vertex type, such IP address refer at the appointed time within the scope of to point
Cloth concentrates on the free IP addresses that the terminal in a region is distributed.For example, the terminal of cell.
So-called fixed allocation multicenter vertex type, such IP address show distribution and concentrate on multiple regions
The region of the fixed ip address that terminal is distributed, distribution is less, is usually no more than 6.For example, whole school districts of school, public affairs
The terminal in the places such as whole office blocks of department.
So-called dynamic allocation multicenter vertex type, such IP address refer at the appointed time within the scope of to point
Cloth concentrates on the free IP addresses that the terminal of multiple regions is distributed, and the region of distribution is more, and generally at least 6.For example,
The terminal of many cells.
It optionally,, can also further preparatory root before 102 in a possible implementation of the present embodiment
According to a large amount of historical location datas of terminal, IP address type corresponding to each IP address, when for executing 102, root are analyzed
According to terminal included in received locating request message IP address, obtain the IP address type of the IP address.
Specifically, for the IP address, at least one history of the available terminal with the IP address is positioned
Data include network connection instruction at least one described historical location data in each historical location data.If described each
Network connection included in historical location data indicates that equal instruction terminal online is connected as Wireless Fidelity (Wireless
Fidelity, Wi-Fi) it is connected to the network, at least one historical location data by described in, the collection point as the IP address is adopted
Collect point data.In turn, then can according to the acquisition point data of the collection point of the IP address, to the collection point of the IP address,
The Density Clustering processing based on distance is carried out, to obtain at least one apart from cluster.It is then possible to according at least one described distance
The distributed data of cluster obtains the IP address type of the IP address.
In the present invention, acquired historical location data, can be for using the positioning of any positioning method acquisition terminal
As a result relative recording data, for example, global positioning system (Global Positioning System, GPS) positioning method,
Wi-Fi positioning or base station location etc..Specifically, the historical location data of any terminal can include but is not limited to the IP of terminal
Address, positioning time, positioning result and network connection instruction, the present embodiment is to this without being particularly limited to.Wherein, described
Network connection instruction, can serve to indicate that terminal online connection whether be Wi-Fi network connection, for example, network access style mark or
Whether connection Wi-Fi network instruction etc. is had.
During a concrete implementation, the historical location data of whole terminals can be specifically acquired, it in turn, then can be with
IP address is specified using identical IP address as several, at least one the described history for obtaining the terminal with the IP address is fixed
Position data.
It is described to be obtained in the following way apart from cluster: according to the IP during another concrete implementation
Positioning result, that is, collection point geographic position data in the acquisition point data of the collection point of location, the acquisition to the IP address
Point carries out the Density Clustering processing based on distance, with distance threshold to obtain at least one apart from cluster.
Wherein, the distance threshold, can be pre-set empirical value, or can according to the IP address
The geographic position data of collection point, which calculates, to be obtained, and the present embodiment is to this without being particularly limited to.
During another concrete implementation, obtain it is described at least one after cluster, specifically can be according to institute
The quantity apart from cluster, the distribution equal distribution data obtained, obtain the IP address type of the IP address.
For example, the IP address type of the IP address is the first kind if acquisition one is described apart from cluster.
Alternatively, for another example if obtain it is at least two described apart from cluster, and it is described at least two it is described in cluster each away from
It is in time ordered arrangement from cluster, then the IP address type of the IP address is Second Type.
Alternatively, for another example if obtain it is at least two described apart from cluster, and it is described at least two it is described in cluster each away from
It is in time disorderly arranged from cluster, and the quantity apart from cluster is less than or equal to pre-set amount threshold, then it is described
The IP address type of IP address is third type.
Alternatively, for another example if obtain it is at least two described apart from cluster, and it is described at least two it is described in cluster each away from
It is in time disorderly arranged from cluster, and the quantity apart from cluster is greater than pre-set amount threshold, the then IP address
IP address type be Second Type or the 4th type.It specifically, in instances, specifically can adopting according to the IP address
The acquisition point data of collection point, with time threshold, carries out time-based Density Clustering processing to the collection point of the IP address,
To obtain at least one Temporal Clustering.In turn, then can according to the acquisition point data of the collection point of the IP address, to it is described at least
Collection point in one Temporal Clustering in each Temporal Clustering carries out the Density Clustering processing based on distance, when obtaining described each
Between at least one son in cluster apart from cluster.If obtaining the son in any time cluster apart from cluster, in any time
The IP address type of the IP address is the first kind in cluster;If obtaining at least two sons in any time cluster apart from cluster,
And at least two son height every in cluster is ordered arrangement apart from cluster in time, then in any time cluster
The IP address type of the interior IP address is Second Type;If at least two sons are obtained in any time cluster apart from cluster, and
At least two son height every in cluster is disorderly arranged, and quantity of the son apart from cluster apart from cluster in time
Less than or equal to pre-set amount threshold, then the IP address type of the IP address is third in any time cluster
Type.So, if the IP address type of the IP address is the first kind or described second in each Temporal Clustering
Type, then the IP address type of the IP address is Second Type;If the IP of the IP address in any time cluster
Location type is third type, then the IP address type of the IP address is the 4th type.
Time-based Density Clustering processing is being carried out, can also further obtained at the time-based Density Clustering
The time threshold of reason.For example, the positioning time of each collection point of the available IP address in turn then can be according to institute
The positioning time for stating each collection point of IP address obtains collection point transfer time such as the average value of the IP address, will be described
Collection point transfer time, the time threshold as the time-based Density Clustering processing.
In this way, by obtain have IP address terminal at least one historical location data, if it is described at least one go through
Network connection included in each each historical location data of historical location data indicates equal instruction terminal in history location data
Online is connected as Wi-Fi network connection, then can be by least one described historical location data, the acquisition as the IP address
The acquisition point data of point, and then the IP address is adopted by the acquisition point data according to the collection point of the IP address again
Collect point, carry out the Density Clustering processing based on distance, to obtain at least one apart from cluster, makes it possible at least one described in basis
Distributed data apart from cluster obtains the IP address type of the IP address, due to use magnanimity historical location data this
Big data is positioned, so that the identification of IP address is more accurate, to improve the reliability of IP address classification.
After analyzing IP address type corresponding to each IP address, can will each IP address and its corresponding to
IP address type carries out storage processing in the storage equipment of terminal.
During a concrete implementation, the storage equipment of the terminal can be slow storage device, specifically can be with
It for the hard disk of computer system, or can also be inoperative memory, that is, physical memory of mobile phone, for example, read-only memory
(Read-Only Memory, ROM) and RAM card etc., the present embodiment is to this without being particularly limited to.
During another concrete implementation, the storage equipment of the terminal can also be speedy storage equipment, specifically
It can be the memory of computer system, or can also be running memory, that is, Installed System Memory of mobile phone, for example, random access memory
(Random Access Memory, RAM) etc., the present embodiment is to this without being particularly limited to.
It optionally,, can also further preparatory root before 103 in a possible implementation of the present embodiment
According to a large amount of historical location datas of terminal, position data corresponding to each IP address is excavated, when for executing 103, according to
The IP address of terminal and the IP address type of the IP address included in received locating request message, obtain the IP
Position data corresponding to address, i.e., the position data of the described terminal.
Specifically, for the IP address, the IP address can be obtained according to the IP address type of the IP address
The collection point time-to-live.In turn, then the collection point of the collection point within the collection point time-to-live of the available IP address
Data.It is then possible to according to the collection point time-to-live of the IP address type of the IP address and the acquired IP address
Within collection point acquisition point data, obtain position data corresponding to the IP address.
If the IP address type of the IP address is the first kind or third type, when the collection point of the IP address is survived
Between can be the endless time;If the IP address type of the IP address be Second Type or the 4th type, the IP address
The collection point time-to-live can be for acquisition by the following method: when the positioning of each collection point of the available IP address
Between, in turn, then the collection point transfer of the IP address according to the positioning time of each collection point of the IP address, can be obtained
Time such as average value, by the collection point transfer time, the collection point time-to-live of the IP address.
For example, if the IP address type of the IP address is the first kind, the collection point of the acquired IP address
The acquisition point data of collection point within time-to-live, calculates the position data of a center, using as the IP address
Corresponding position data.
Alternatively, for another example if the IP address type of the IP address is Second Type or third type or the 4th type,
According to the acquisition point data of the collection point within the collection point time-to-live of the acquired IP address, to the collection point,
The Density Clustering processing based on distance is carried out, to obtain at least two apart from cluster;If described at least two is described every in cluster
A apart from cluster be ordered arrangement in time, calculates the position of the positioning time center apart from cluster nearest apart from current time
Data are set, using as position data corresponding to the IP address;If described at least two is described each apart from cluster in cluster
It is in time disorderly arranged, the positional number of calculating at least two center apart from cluster each in cluster
According to using as position data corresponding to the IP address.
It, can be by the position corresponding to each IP address and its after excavating position data corresponding to each IP address
Data are set, carry out storage processing in the storage equipment of terminal.
During a concrete implementation, the storage equipment of the terminal can be slow storage device, specifically can be with
It for the hard disk of computer system, or can also be inoperative memory, that is, physical memory of mobile phone, for example, read-only memory
(Read-Only Memory, ROM) and RAM card etc., the present embodiment is to this without being particularly limited to.
During another concrete implementation, the storage equipment of the terminal can also be speedy storage equipment, specifically
It can be the memory of computer system, or can also be running memory, that is, Installed System Memory of mobile phone, for example, random access memory
(Random Access Memory, RAM) etc., the present embodiment is to this without being particularly limited to.
It optionally,, specifically can according to the IP in 103 in a possible implementation of the present embodiment
The IP address type of location, directly obtains position data corresponding to the IP address;Or the stop place of the terminal is obtained,
Near the stop place of the terminal, position data corresponding to the IP address is obtained.
It is understood that if current time not within the collection point time-to-live of the IP address, directly tie
Line journey, positioning failure.Only current time within the collection point time-to-live of the IP address, after being just normally carried out
Continuous positioning operation.
During a concrete implementation, if the IP address type of the IP address is the first kind, directly obtain
Position data corresponding to the IP address, the positioning result as terminal.
During another concrete implementation, if the IP address type of the IP address is Second Type, directly obtain
Obtain position data corresponding to the IP address, the positioning result as terminal.
During another concrete implementation, if the IP address type of the IP address is third type or the 4th class
Type then can further obtain the stop place of the terminal, near the stop place of the terminal, obtain the IP address
Corresponding position data.
It is understood that obtaining the stop place of terminal, any method in the prior art can be used, for example, can
With according to contact address of the user in the registration information provided in specified application perhaps the information acquisitions such as work unit or
Can also be obtained according to the historical location data of user, etc., the present embodiment is to this without being particularly limited to.
It include described in the locating request message by receiving the locating request message of terminal transmission in the present embodiment
The IP address of terminal, and then the IP address type of the IP address is obtained, make it possible to the IP address class according to the IP address
Type obtains position data corresponding to the IP address, due to different types of IP address, has different distributions feature, because
This executes IP address-based positioning operation according to the address style of the IP address identified, can obtain accurate position
Data, to improve the positioning accuracy based on IP address positioning.
In addition, using technical solution provided by the present invention, due to use in advance magnanimity historical location data this
Big data is positioned, calculating position data corresponding to IP address can further increase and be based on so that positioning result is more accurate
The positioning accuracy of IP address positioning.
In addition, using technical solution provided by the present invention, due to using this positioning of the historical location data of magnanimity
Big data, so that the identification of IP address is more accurate, to improve the reliability of IP address classification.
In addition, the experience of user can be effectively improved using technical solution provided by the present invention.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, reference can be made to the related descriptions of other embodiments.
Fig. 2 be another embodiment of the present invention provides IP address-based positioning device structural schematic diagram, such as Fig. 2 institute
Show.The IP address-based positioning device of the present embodiment may include receiving unit 21, obtaining unit 22 and positioning unit 23.Its
In, receiving unit 21 includes the terminal in the locating request message for receiving the locating request message of terminal transmission
IP address;Obtaining unit 22, for obtaining the IP address type of the IP address;Positioning unit 23, for according to the IP
The IP address type of location, obtains position data corresponding to the IP address.
Specifically, the IP address type of the IP address can include but is not limited to the first kind, Second Type,
Three types or the 4th type, the present embodiment is to this without being particularly limited to.
For example, the first kind is fixed allocation single centre vertex type;The Second Type is to dynamically distribute list
Center vertex type;The third type is fixed allocation multicenter vertex type;4th type is to dynamically distribute multicenter point
Type.
It should be noted that some or all of IP address-based positioning device provided by the present embodiment can be position
Application in local terminal, or can also be the plug-in unit being arranged in the application of local terminal or Software Development Kit
Functional units such as (Software Development Kit, SDK), or can also be the processing in network side server
Engine, or can also be for positioned at the distributed system of network side, the present embodiment is to this without being particularly limited to.
It is understood that the application can be mounted in the local program (nativeApp) in terminal, or may be used also
To be a web page program (webApp) of browser in terminal, the present embodiment is to this without being particularly limited to.
Optionally, in a possible implementation of the present embodiment, as shown in figure 3, base provided by the present embodiment
It can further include configuration unit 31 in the positioning device of IP address, can be used for obtaining the terminal with the IP address
At least one historical location data, connect in each historical location data comprising network at least one described historical location data
Connect instruction;If network connection included in each historical location data indicates that equal instruction terminal online is connected as Wi-Fi
Network connection, by least one described historical location data, the acquisition point data of the collection point as the IP address;According to institute
The acquisition point data for stating the collection point of IP address carries out the Density Clustering processing based on distance to the collection point of the IP address,
To obtain at least one apart from cluster;And according at least one described distributed data apart from cluster, obtain the IP of the IP address
Address style.
Optionally, in a possible implementation of the present embodiment, the configuration unit 31 specifically can be used for root
According to the IP address type of the IP address, the collection point time-to-live of the IP address is obtained;Obtain the acquisition of the IP address
The acquisition point data of collection point within the point time-to-live;And IP address type and acquired institute according to the IP address
The acquisition point data for stating the collection point within the collection point time-to-live of IP address, obtains positional number corresponding to the IP address
According to.
Specifically, the configuration unit 31, if the IP address type that specifically can be used for the IP address is the first kind
Type, then the acquisition point data of the collection point within the collection point time-to-live of the acquired IP address, calculates a center
The position data of position, using as position data corresponding to the IP address;If the IP address type of the IP address is the
Two types or third type or the 4th type, then according to the acquisition within the collection point time-to-live of the acquired IP address
The acquisition point data of point carries out the Density Clustering processing based on distance to the collection point, to obtain at least two apart from cluster;
If described at least two it is described in cluster it is each apart from cluster be in time ordered arrangement, calculate positioning time apart from it is current when
Between the nearest center apart from cluster position data, using as position data corresponding to the IP address;If it is described extremely
Few two it is described in cluster it is each apart from cluster be in time it is disorderly arranged, it is described every in cluster to calculate described at least two
The position data of a center apart from cluster, using as position data corresponding to the IP address.
Optionally, in a possible implementation of the present embodiment, the positioning unit 23 specifically can be used for root
According to the IP address type of the IP address, position data corresponding to the IP address is directly obtained;Or obtain the terminal
Stop place obtain position data corresponding to the IP address near the stop place of the terminal.
It should be noted that method in the corresponding embodiment of Fig. 1, it can be by provided in this embodiment IP address-based fixed
Position device is realized.Detailed description may refer to the related content in the corresponding embodiment of Fig. 1, and details are not described herein again.
In the present embodiment, the locating request message that terminal is sent is received by receiving unit, in the locating request message
IP address comprising the terminal, and then obtain by obtaining unit the IP address type of the IP address, enables positioning unit
Enough IP address types according to the IP address, obtain position data corresponding to the IP address, due to different types of IP
Address has different distributions feature, therefore, according to the address style of the IP address identified, executes IP address-based
Positioning operation can obtain accurate position data, to improve the positioning accuracy based on IP address positioning.
In addition, using technical solution provided by the present invention, due to use in advance magnanimity historical location data this
Big data is positioned, calculating position data corresponding to IP address can further increase and be based on so that positioning result is more accurate
The positioning accuracy of IP address positioning.
In addition, using technical solution provided by the present invention, due to using this positioning of the historical location data of magnanimity
Big data, so that the identification of IP address is more accurate, to improve the reliability of IP address classification.
In addition, the experience of user can be effectively improved using technical solution provided by the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or group
Part can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown
Or the mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, device or unit it is indirect
Coupling or communication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit being realized in the form of SFU software functional unit can store and computer-readable deposit at one
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are used so that a computer
It is each that device (can be personal computer, server or network equipment etc.) or processor (processor) execute the present invention
The part steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. it is various
It can store the medium of program code.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (10)
1. a kind of IP address-based localization method characterized by comprising
The locating request message that terminal is sent is received, includes the IP address of the terminal in the locating request message;
Obtain the IP address type of the IP address;
According to the IP address type of the IP address, position data corresponding to the IP address is obtained;Wherein,
The IP address type of the IP address includes the first kind, Second Type, third type or the 4th type;Wherein,
The first kind is fixed allocation single centre vertex type, and the IP address of the type is to show distribution to concentrate on a region
The fixed ip address that is distributed of terminal;
The Second Type be dynamically distribute single centre vertex type, the IP address of the type refer at the appointed time within the scope of to
Distribution concentrates on the free IP addresses that the terminal in a region is distributed;
The third type is fixed allocation multicenter vertex type, and the IP address of the type is to show distribution to concentrate on multiple regions
The fixed ip address that is distributed of terminal;
4th type be dynamically distribute multicenter vertex type, the IP address of the type refer at the appointed time within the scope of to
Distribution concentrates on the free IP addresses that the terminal of multiple regions is distributed.
2. the method according to claim 1, wherein before the IP address type for obtaining the IP address,
Further include:
At least one historical location data with the terminal of the IP address is obtained, at least one described historical location data
Include network connection instruction in each historical location data;
If network connection included in each historical location data indicates that equal instruction terminal online is connected as Wi-Fi network
Connection, by least one described historical location data, the acquisition point data of the collection point as the IP address;
The collection point of the IP address is carried out based on the close of distance according to the acquisition point data of the collection point of the IP address
Clustering processing is spent, to obtain at least one apart from cluster;
According at least one described distributed data apart from cluster, the IP address type of the IP address is obtained.
3. according to the method described in claim 2, it is characterized in that, described at least one distribution number apart from cluster according to
According to after the IP address type for obtaining the IP address, further includes:
According to the IP address type of the IP address, the collection point time-to-live of the IP address is obtained;
Obtain the acquisition point data of the collection point within the collection point time-to-live of the IP address;
According to the acquisition within the collection point time-to-live of the IP address type of the IP address and the acquired IP address
The acquisition point data of point, obtains position data corresponding to the IP address.
4. according to the method described in claim 3, it is characterized in that, the IP address type according to the IP address and being obtained
The acquisition point data of collection point within the collection point time-to-live of the IP address taken, obtains corresponding to the IP address
Position data, comprising:
If the IP address type of the IP address is the first kind, collection point time-to-live of the acquired IP address it
The acquisition point data of interior collection point, calculates the position data of a center, using as position corresponding to the IP address
Set data;
If the IP address type of the IP address is Second Type or third type or the 4th type, according to acquired described
The acquisition point data of collection point within the collection point time-to-live of IP address carries out based on the close of distance the collection point
Clustering processing is spent, to obtain at least two apart from cluster;If described at least two it is described in cluster it is each apart from cluster in time
For ordered arrangement, the position data of the positioning time center apart from cluster nearest apart from current time is calculated, using as institute
State position data corresponding to IP address;If described at least two it is described it is each in cluster be in time unordered row apart from cluster
Column calculate the position data of at least two center apart from cluster each in cluster, using as the IP
Position data corresponding to location.
5. method described in any claim according to claim 1~4, which is characterized in that described according to the IP address
IP address type obtains position data corresponding to the IP address, comprising:
According to the IP address type of the IP address, position data corresponding to the IP address is directly obtained;Or obtain institute
The stop place for stating terminal obtains position data corresponding to the IP address near the stop place of the terminal.
6. a kind of IP address-based positioning device characterized by comprising
Receiving unit includes the terminal in the locating request message for receiving the locating request message of terminal transmission
IP address;
Obtaining unit, for obtaining the IP address type of the IP address;
Positioning unit obtains position data corresponding to the IP address for the IP address type according to the IP address;Its
In,
The IP address type of the IP address includes the first kind, Second Type, third type or the 4th type;Wherein,
The first kind is fixed allocation single centre vertex type, and the IP address of the type is to show distribution to concentrate on a region
The fixed ip address that is distributed of terminal;
The Second Type be dynamically distribute single centre vertex type, the IP address of the type refer at the appointed time within the scope of to
Distribution concentrates on the free IP addresses that the terminal in a region is distributed;
The third type is fixed allocation multicenter vertex type, and the IP address of the type is to show distribution to concentrate on multiple regions
The fixed ip address that is distributed of terminal;
4th type be dynamically distribute multicenter vertex type, the IP address of the type refer at the appointed time within the scope of to
Distribution concentrates on the free IP addresses that the terminal of multiple regions is distributed.
7. device according to claim 6, which is characterized in that described device further includes configuration unit, is used for
At least one historical location data with the terminal of the IP address is obtained, at least one described historical location data
Include network connection instruction in each historical location data;
If network connection included in each historical location data indicates that equal instruction terminal online is connected as Wi-Fi network
Connection, by least one described historical location data, the acquisition point data of the collection point as the IP address;
The collection point of the IP address is carried out based on the close of distance according to the acquisition point data of the collection point of the IP address
Clustering processing is spent, to obtain at least one apart from cluster;And
According at least one described distributed data apart from cluster, the IP address type of the IP address is obtained.
8. device according to claim 7, which is characterized in that the configuration unit is specifically used for
According to the IP address type of the IP address, the collection point time-to-live of the IP address is obtained;
Obtain the acquisition point data of the collection point within the collection point time-to-live of the IP address;And
According to the acquisition within the collection point time-to-live of the IP address type of the IP address and the acquired IP address
The acquisition point data of point, obtains position data corresponding to the IP address.
9. device according to claim 8, which is characterized in that the configuration unit is specifically used for
If the IP address type of the IP address is the first kind, collection point time-to-live of the acquired IP address it
The acquisition point data of interior collection point, calculates the position data of a center, using as position corresponding to the IP address
Set data;
If the IP address type of the IP address is Second Type or third type or the 4th type, according to acquired described
The acquisition point data of collection point within the collection point time-to-live of IP address carries out based on the close of distance the collection point
Clustering processing is spent, to obtain at least two apart from cluster;If described at least two it is described in cluster it is each apart from cluster in time
For ordered arrangement, the position data of the positioning time center apart from cluster nearest apart from current time is calculated, using as institute
State position data corresponding to IP address;If described at least two it is described it is each in cluster be in time unordered row apart from cluster
Column calculate the position data of at least two center apart from cluster each in cluster, using as the IP
Position data corresponding to location.
10. according to device described in claim 6~9 any claim, which is characterized in that the positioning unit, it is specific to use
In
According to the IP address type of the IP address, position data corresponding to the IP address is directly obtained;Or obtain institute
The stop place for stating terminal obtains position data corresponding to the IP address near the stop place of the terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610510379.XA CN106027693B (en) | 2016-06-30 | 2016-06-30 | IP address-based localization method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610510379.XA CN106027693B (en) | 2016-06-30 | 2016-06-30 | IP address-based localization method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106027693A CN106027693A (en) | 2016-10-12 |
CN106027693B true CN106027693B (en) | 2019-08-27 |
Family
ID=57104828
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610510379.XA Active CN106027693B (en) | 2016-06-30 | 2016-06-30 | IP address-based localization method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106027693B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107317891A (en) * | 2017-05-10 | 2017-11-03 | 郑州埃文计算机科技有限公司 | A kind of geographic position locating method being distributed towards dynamic IP multizone |
CN107613034A (en) * | 2017-08-21 | 2018-01-19 | 郑州埃文计算机科技有限公司 | A kind of method that house IP is navigated to residential quarters |
CN109769042B (en) * | 2019-02-20 | 2022-06-03 | 北京奇艺世纪科技有限公司 | Positioning method and device |
CN112153091B (en) * | 2019-06-27 | 2022-05-13 | 北京百度网讯科技有限公司 | Method and device for determining relevance of equipment |
CN113411415A (en) * | 2021-05-13 | 2021-09-17 | 郑州埃文计算机科技有限公司 | Method for cleaning reference points based on IP network characteristics and geographic characteristics |
CN113407796A (en) * | 2021-05-13 | 2021-09-17 | 郑州埃文计算机科技有限公司 | Static IP building-level positioning method based on IP historical positions |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686698A (en) * | 2013-11-13 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | Location information processing method and device |
CN104680336A (en) * | 2015-03-24 | 2015-06-03 | 深圳市中兴云服务有限公司 | Staff position determination method and system |
-
2016
- 2016-06-30 CN CN201610510379.XA patent/CN106027693B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103686698A (en) * | 2013-11-13 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | Location information processing method and device |
CN104680336A (en) * | 2015-03-24 | 2015-06-03 | 深圳市中兴云服务有限公司 | Staff position determination method and system |
Non-Patent Citations (1)
Title |
---|
《基于IPV4的网络地理定位技术研究》;班奇等;《电脑编程技巧与维护》;20160518;第3.4节 * |
Also Published As
Publication number | Publication date |
---|---|
CN106027693A (en) | 2016-10-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106027693B (en) | IP address-based localization method and device | |
CN106210163B (en) | IP address-based localization method and device | |
CN104090970B (en) | Point of interest shows method and device | |
CN107404481B (en) | User information recognition methods and device | |
CN104239453B (en) | Data processing method and device | |
CN104717743B (en) | Mobile terminal method for tracing and system based on signalling analysis | |
CN113412608B (en) | Content pushing method and device, server and storage medium | |
CN104683161B (en) | Network management and device based on SaaS | |
CN110035388A (en) | Determine method, computer readable storage medium and the terminal device of user area | |
CN105338619A (en) | Positioning method and positioning device | |
CN105338537B (en) | A kind of method and terminal of the shared analysis of newly-increased base station site | |
CN107944677A (en) | Achievement method for tracing, application server and computer-readable recording medium | |
CN106875279A (en) | Information-pushing method and device | |
CN106131238B (en) | The classification method and device of IP address | |
CN110298687A (en) | A kind of region attraction appraisal procedure and equipment | |
CN105959306A (en) | IP address identification method and device | |
CN106846795A (en) | The acquisition methods and device in the crowd is dense region | |
CN104750824A (en) | Application functional data processing method and device | |
CN103218406B (en) | The processing method and equipment of the address information of point of interest | |
CN104080046B (en) | Passive method and apparatus of registering | |
CN109428774B (en) | Data processing method of DPI equipment and related DPI equipment | |
CN109145588A (en) | Data processing method and device | |
CN111242723B (en) | User child and child condition judgment method, server and computer readable storage medium | |
US9706414B2 (en) | Method and apparatus for determining data flow rate on service access port | |
CN113569978A (en) | Travel track identification method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |