CN106027693A - Positioning method and positioning apparatus based on IP address - Google Patents

Positioning method and positioning apparatus based on IP address Download PDF

Info

Publication number
CN106027693A
CN106027693A CN201610510379.XA CN201610510379A CN106027693A CN 106027693 A CN106027693 A CN 106027693A CN 201610510379 A CN201610510379 A CN 201610510379A CN 106027693 A CN106027693 A CN 106027693A
Authority
CN
China
Prior art keywords
address
collection point
type
data
distance
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
CN201610510379.XA
Other languages
Chinese (zh)
Other versions
CN106027693B (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201610510379.XA priority Critical patent/CN106027693B/en
Publication of CN106027693A publication Critical patent/CN106027693A/en
Application granted granted Critical
Publication of CN106027693B publication Critical patent/CN106027693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/69Types of network addresses using geographic information, e.g. room number

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a positioning method and a positioning apparatus based on an IP address. In the embodiment of the invention, by means of receiving a positioning request message sent by a terminal, wherein the positioning request message contains the IP address of the terminal, IP address type of the IP address can be obtained, and thus, position data corresponding to the IP address can be obtained according to the IP address type of the IP address. Since the IP addresses of different types have different distribution characteristics, by executing a positioning operation based on the IP address according to the identified address type of the IP address, accurate position data can be obtained, and consequently, positioning accuracy of positioning based on the IP address is improved.

Description

IP address-based localization method and device
[technical field]
The present invention relates to Internet technology, particularly relate to a kind of IP address-based localization method and device.
[background technology]
IP is the abbreviation of English Internet Protocol, and the meaning is " agreement of interconnection between network ", In the Internet (Internet), it is to make to be connected to online all computer networks to realize phase intercommunication The set of rule of letter, it is stipulated that the rule should observed when computer communicates on internet.Therefore, IP can also be called " Internet Protocol ".One, the terminal that IP address is used on Internet numbering, IP address it has been required in the terminal of every networking, could proper communication.
In prior art, it is possible to use the IP address that request end provides, inquire about IP address database, obtain Take the region at this place, IP address, such as, province, city etc., but, positioning precision is the highest.
[summary of the invention]
The many aspects of the present invention provide a kind of IP address-based localization method and device, fixed in order to improve Position precision.
An aspect of of the present present invention, it is provided that a kind of IP address-based localization method, including:
Receive the locating request message that terminal sends, described locating request message comprises the IP of described terminal Address;
Obtain the IP address class type of described IP address;
IP address class type according to described IP address, it is thus achieved that the position data corresponding to described IP address.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute The IP address class type stating IP address includes the first kind, Second Type, the 3rd type or the 4th type;Its In,
The described first kind is fixed allocation single centre vertex type;
Described Second Type is dynamically to distribute single centre vertex type;
Described 3rd type is fixed allocation multicenter vertex type;
Described 4th type is dynamically to distribute multicenter vertex type.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute Before stating the IP address class type obtaining described IP address, also include:
Obtain at least one historical location data of terminal with described IP address, described at least one go through History location data comprise network in each historical location data and connects instruction;
If the network included in described each historical location data connects instruction, all instruction terminal online connect Connect for Wi-Fi network, by least one historical location data described, as the collection of described IP address The collection point data of point;
The collection point data of the collection point according to described IP address, the collection point to described IP address, carry out Density Clustering based on distance processes, to obtain at least one distance bunch;
Distributed data according at least one distance bunch described, it is thus achieved that the IP address class type of described IP address.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute State the distributed data according at least one distance bunch described, it is thus achieved that after the IP address class type of described IP address, Also include:
IP address class type according to described IP address, it is thus achieved that the collection point time-to-live of described IP address;
Obtain the collection point data of collection point within the collection point time-to-live of described IP address;
During the collection point survival of IP address class type according to described IP address and acquired described IP address The collection point data of the collection point between, it is thus achieved that the position data corresponding to described IP address.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute State the IP address class type according to described IP address and the collection point time-to-live of acquired described IP address Within the collection point data of collection point, it is thus achieved that the position data corresponding to described IP address, including:
If the IP address class type of described IP address is the first kind, then adopting of acquired described IP address The collection point data of the collection point within the collection point time-to-live, calculate the position data of a center, Using as the position data corresponding to described IP address;
If the IP address class type of described IP address is Second Type or the 3rd type or the 4th type, then basis The collection point data of the collection point within the collection point time-to-live of acquired described IP address, to described Collection point, carries out Density Clustering based on distance and processes, to obtain at least two distance bunch;If described extremely In few two described distances bunch, each distance bunch is ordered arrangement in time, calculates distance positioning time and works as The position data of the center of the distance bunch that the front time is nearest, using as the position corresponding to described IP address Put data;If each distance bunch is lack of alignment in time in distance bunch described in described at least two, meter Calculate the position data of the center of each distance bunch in distance bunch described in described at least two, using as institute State the position data corresponding to IP address.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute State the IP address class type according to described IP address, it is thus achieved that the position data corresponding to described IP address, bag Include:
According to the IP address class type of described IP address, directly obtain the positional number corresponding to described IP address According to;Or obtain the stop place of described terminal, near the stop place of described terminal, it is thus achieved that described Position data corresponding to IP address.
Another aspect of the present invention, it is provided that a kind of IP address-based positioner, including:
Receive unit, for receiving the locating request message that terminal sends, described locating request message is wrapped IP address containing described terminal;
Obtain unit, for obtaining the IP address class type of described IP address;
Positioning unit, for the IP address class type according to described IP address, it is thus achieved that described IP address institute is right The position data answered.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute The IP address class type stating IP address includes the first kind, Second Type, the 3rd type or the 4th type;Its In,
The described first kind is fixed allocation single centre vertex type;
Described Second Type is dynamically to distribute single centre vertex type;
Described 3rd type is fixed allocation multicenter vertex type;
Described 4th type is dynamically to distribute multicenter vertex type.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute State device and also include dispensing unit, be used for
Obtain at least one historical location data of terminal with described IP address, described at least one go through History location data comprise network in each historical location data and connects instruction;
If the network included in described each historical location data connects instruction, all instruction terminal online connect Connect for Wi-Fi network, by least one historical location data described, as the collection of described IP address The collection point data of point;
The collection point data of the collection point according to described IP address, the collection point to described IP address, carry out Density Clustering based on distance processes, to obtain at least one distance bunch;And
Distributed data according at least one distance bunch described, it is thus achieved that the IP address class type of described IP address.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute State dispensing unit, specifically for
IP address class type according to described IP address, it is thus achieved that the collection point time-to-live of described IP address;
Obtain the collection point data of collection point within the collection point time-to-live of described IP address;And
During the collection point survival of IP address class type according to described IP address and acquired described IP address The collection point data of the collection point between, it is thus achieved that the position data corresponding to described IP address.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute State dispensing unit, specifically for
If the IP address class type of described IP address is the first kind, then adopting of acquired described IP address The collection point data of the collection point within the collection point time-to-live, calculate the position data of a center, Using as the position data corresponding to described IP address;
If the IP address class type of described IP address is Second Type or the 3rd type or the 4th type, then basis The collection point data of the collection point within the collection point time-to-live of acquired described IP address, to described Collection point, carries out Density Clustering based on distance and processes, to obtain at least two distance bunch;If described extremely In few two described distances bunch, each distance bunch is ordered arrangement in time, calculates distance positioning time and works as The position data of the center of the distance bunch that the front time is nearest, using as the position corresponding to described IP address Put data;If each distance bunch is lack of alignment in time in distance bunch described in described at least two, meter Calculate the position data of the center of each distance bunch in distance bunch described in described at least two, using as institute State the position data corresponding to IP address.
Aspect as above and arbitrary possible implementation, it is further provided a kind of implementation, institute State positioning unit, specifically for
According to the IP address class type of described IP address, directly obtain the positional number corresponding to described IP address According to;Or obtain the stop place of described terminal, near the stop place of described terminal, it is thus achieved that described Position data corresponding to IP address.
As shown from the above technical solution, the locating request message that the embodiment of the present invention is sent by reception terminal, Described locating request message comprises the IP address of described terminal, and then obtains the IP ground of described IP address Location type, enabling according to the IP address class type of described IP address, it is thus achieved that corresponding to described IP address Position data, due to different types of IP address, there is different characteristic distributions, therefore, according to institute The address style of the IP address identified, performs IP address-based positioning action, it is possible to obtain accurate Position data, thus improve positioning precision based on IP address location.
It addition, use technical scheme provided by the present invention, position owing to have employed the history of magnanimity in advance The big data in this location of data, calculate the position data corresponding to IP address so that positioning result is more smart Accurate, it is possible to improve positioning precision based on IP address location further.
It addition, use technical scheme provided by the present invention, owing to have employed the historical location data of magnanimity The big data in this location so that the identification of IP address is more accurate, thus improve IP address sort can By property.
It addition, use technical scheme provided by the present invention, it is possible to be effectively improved the experience of user.
[accompanying drawing explanation]
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, below will be to embodiment or existing In technology description, the required accompanying drawing used is briefly described, it should be apparent that, in describing below Accompanying drawing is some embodiments of the present invention, for those of ordinary skill in the art, is not paying creation On the premise of property is laborious, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
The schematic flow sheet of the IP address-based localization method that Fig. 1 provides for one embodiment of the invention;
The structural representation of the IP address-based positioner that Fig. 2 provides for another embodiment of the present invention;
The structural representation of the IP address-based positioner that Fig. 3 provides for another embodiment of the present invention.
[detailed description of the invention]
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention, Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise Other embodiments whole obtained, broadly fall into the scope of protection of the invention.
It should be noted that terminal involved in the embodiment of the present invention can include but not limited to mobile phone, Personal digital assistant (Personal Digital Assistant, PDA), radio hand-held equipment, flat board electricity Brain (Tablet Computer), PC (Personal Computer, PC), MP3 play Device, MP4 player, wearable device (such as, intelligent glasses, intelligent watch, Intelligent bracelet etc.) Deng.
It addition, the terms "and/or", a kind of incidence relation describing affiliated partner, represent Three kinds of relations, such as, A and/or B can be there are, can represent: individualism A, there is A simultaneously And B, individualism B these three situation.It addition, character "/" herein, typically represent forward-backward correlation pair As if the relation of a kind of "or".
The schematic flow sheet of the IP address-based localization method that Fig. 1 provides for one embodiment of the invention, as Shown in Fig. 1.
101, receive the locating request message that terminal sends, described locating request message comprises described terminal IP address.
102, the IP address class type of described IP address is obtained.
103, according to the IP address class type of described IP address, it is thus achieved that the position corresponding to described IP address Data.
It should be noted that the executive agent of 101~103 can be partly or entirely to be located locally terminal Application, or can also be to be arranged in the plug-in unit in the application of local terminal or SDK The functional units such as bag (Software Development Kit, SDK), or can also be for being positioned at network Process engine in the server of side, or can also be the distributed system being positioned at network side, the present embodiment This is not particularly limited.
It is understood that the local program (nativeApp) that described application can be mounted in terminal, Or can also is that a web page program (webApp) of browser in terminal, the present embodiment is to this not It is particularly limited.
So, by receiving the locating request message that terminal sends, described locating request message comprises institute State the IP address of terminal, and then obtain the IP address class type of described IP address, enabling according to described The IP address class type of IP address, it is thus achieved that the position data corresponding to described IP address, due to dissimilar IP address, there is different characteristic distributions, therefore, according to the address style of the IP address identified, Perform IP address-based positioning action, it is possible to obtain accurate position data, thus improve based on IP The positioning precision of address location.
Specifically, the IP address class type of described IP address, can include but not limited to the first kind, Second Type, the 3rd type or the 4th type, this is not particularly limited by the present embodiment.
For example, the described first kind is fixed allocation single centre vertex type;Described Second Type is State distribution single centre vertex type;Described 3rd type is fixed allocation multicenter vertex type;Described 4th class Type is dynamically to distribute multicenter vertex type.
So-called fixed allocation single centre vertex type, such IP address is to show distribution to concentrate on one The fixed ip address that the terminal in individual region is distributed.Such as, certain school district of school, company certain do The terminal in the places such as public building.
So-called dynamic distribution single centre vertex type, such IP address refers at the appointed time scope Within to distribution concentrate on the free IP addresses that the terminal in a region is distributed.Such as, the terminal of community.
So-called fixed allocation multicenter vertex type, such IP address is to show distribution to concentrate on many The fixed ip address that the terminal in individual region is distributed, the region of its distribution is less, is usually no more than 6. Such as, the terminal in the place such as whole office blocks of whole school districts of school, company.
So-called dynamic distribution multicenter vertex type, such IP address refers at the appointed time scope Within to distribution concentrate on the free IP addresses that the terminal in multiple region is distributed, its distribution region more, General at least 6.Such as, the terminal of a lot of communities.
Alternatively, in a possible implementation of the present embodiment, before 102, it is also possible to enter One step, previously according to a large amount of historical location data of terminal, analyzes the IP address corresponding to each IP address Type, for when performing 102, according to the IP ground of the terminal included in the locating request message received Location, it is thus achieved that the IP address class type of this IP address.
Specifically, for this IP address, at least one of the terminal with described IP address can be obtained Individual historical location data, comprises net in each historical location data at least one historical location data described Network connects instruction.If the network included in described each historical location data connects instruction all indicates terminal Online be connected as Wireless Fidelity (Wireless Fidelity, Wi-Fi) network connect, by described extremely A few historical location data, as the collection point data of the collection point of described IP address.And then, then may be used With the collection point data of the collection point according to described IP address, the collection point to described IP address, carry out base Density Clustering in distance processes, to obtain at least one distance bunch.It is then possible to according to described at least The distributed data of one distance bunch, it is thus achieved that the IP address class type of described IP address.
In the present invention, acquired historical location data, can be to use any location mode to obtain end The relative recording data of the positioning result of end, such as, global positioning system (Global Positioning System, GPS) position mode, Wi-Fi location or architecture etc..Specifically, any terminal Historical location data can include but not limited to the IP address of terminal, positioning time, positioning result, with And network connects instruction, this is not particularly limited by the present embodiment.Wherein, described network connects instruction, Whether can serve to indicate that terminal online connects is that Wi-Fi network connects, such as, network access style mark or No have connection Wi-Fi network instruction etc..
During a concrete implementation, specifically can gather the historical location data of whole terminal, enter And, then identical ip addresses can be specified IP address as several, obtain and there is described IP address At least one historical location data described of terminal.
During another concrete implementation, described distance bunch can obtain in the following way: according to The positioning result i.e. geographic position data of collection point in the collection point data of the collection point of described IP address, Collection point to described IP address, with distance threshold, carries out Density Clustering based on distance and processes, to obtain Obtain at least one distance bunch.
Wherein, described distance threshold, can be the empirical value pre-set, or can also according to institute The geographic position data of the collection point stating IP address calculates and obtains, and this is not particularly limited by the present embodiment.
During another concrete implementation, after obtaining at least one distance bunch described, specifically may be used With the quantity according to the distance bunch obtained, distribution equal distribution data, it is thus achieved that the IP address of described IP address Type.
Such as, if obtaining a described distance bunch, the IP address class type of the most described IP address is the first kind Type.
Or, more such as, if obtaining distance bunch described at least two, and distance described in described at least two In bunch, each distance bunch is ordered arrangement in time, and the IP address class type of the most described IP address is Equations of The Second Kind Type.
Or, more such as, if obtaining distance bunch described at least two, and distance described in described at least two In bunch, each distance bunch is lack of alignment in time, and the quantity of described distance bunch is less than or equal in advance The amount threshold arranged, the IP address class type of the most described IP address is the 3rd type.
Or, more such as, if obtaining distance bunch described at least two, and distance described in described at least two In bunch, each distance bunch is lack of alignment in time, and the quantity of described distance bunch is more than pre-setting Amount threshold, the IP address class type of the most described IP address is Second Type or the 4th type.Specifically, In instances, specifically can be according to the collection point data of the collection point of described IP address, to described IP address Collection point, with time threshold, carry out time-based Density Clustering process, during to obtain at least one Between bunch.And then, then can be according to the collection point data of the collection point of described IP address, to described at least one Collection point in each Temporal Clustering in individual Temporal Clustering, carries out Density Clustering based on distance and processes, to obtain At least one son distance bunch in described each Temporal Clustering.If obtain in any time bunch described son away from From bunch, then in described any time bunch, the IP address class type of described IP address is the first kind;If it is arbitrary Obtain in son distance bunch described at least two, and son distance bunch described in described at least two each in Temporal Clustering Son distance bunch is ordered arrangement in time, then the IP address of described IP address in described any time bunch Type is Second Type;If obtaining son distance bunch described at least two in any time bunch, and described at least In two described son distances bunch, every height distance bunch is lack of alignment in time, and described son distance bunch Quantity is less than or equal to the amount threshold pre-set, then described IP address in described any time bunch IP address class type is the 3rd type.So, if in described each Temporal Clustering described IP address IP ground Location type is the described first kind or described Second Type, and the IP address class type of the most described IP address is second Type;If the IP address class type of described IP address is the 3rd type in described any time bunch, then described The IP address class type of IP address is the 4th type.
Carrying out time-based Density Clustering process, it is also possible to obtain described time-based close further The time threshold of degree clustering processing.During for example, it is possible to obtain the location of each collection point of described IP address Between, and then, then can be according to the positioning time of each collection point of described IP address, it is thus achieved that described IP ground Collection point transfer time of location such as meansigma methods, by described collection point transfer time, as described based on the time Density Clustering process time threshold.
So, be there is by acquisition at least one historical location data of the terminal of IP address, if described extremely Lack the network included in each historical location data of each historical location data in a historical location data Connect instruction all instruction terminal online and be connected as Wi-Fi network connection, then can be by least one history described Location data, as the collection point data of the collection point of described IP address, and then again by according to described IP The collection point data of the collection point of address, the collection point to described IP address, carry out density based on distance Clustering processing, to obtain at least one distance bunch, enabling according to dividing of at least one distance bunch described Cloth data, it is thus achieved that the IP address class type of described IP address, due to have employed magnanimity historical location data this One positions big data so that the identification of IP address is more accurate, thus improves the reliable of IP address sort Property.
After analyzing the IP address class type corresponding to each IP address, can by each IP address with Its corresponding IP address class type, carries out storage process in the storage device of terminal.
During a concrete implementation, the storage device of described terminal can be slow storage device, It is specifically as follows the hard disk of computer system, or can also be the inoperative internal memory i.e. physical memory of mobile phone, Such as, read only memory (Read-Only Memory, ROM) and RAM (random access memory) card etc., the present embodiment is to this It is not particularly limited.
During another concrete implementation, the storage device of described terminal can also set for quick storage Standby, it is specifically as follows the internal memory of computer system, or in can also being the running memory i.e. system of mobile phone Deposit, such as, random access memory (Random Access Memory, RAM) etc., the present embodiment pair This is not particularly limited.
Alternatively, in a possible implementation of the present embodiment, before 103, it is also possible to enter One step, previously according to a large amount of historical location data of terminal, excavates the positional number corresponding to each IP address According to, for when performing 103, according to the IP address of the terminal included in the locating request message received, And the IP address class type of this IP address, it is thus achieved that this position data corresponding to IP address, the most described end The position data of end.
Specifically, for this IP address, can be according to the IP address class type of described IP address, it is thus achieved that The collection point time-to-live of described IP address.And then, then can obtain the collection point survival of described IP address The collection point data of the collection point within the time.It is then possible to according to the IP address class type of described IP address Collection point data with the collection point within the collection point time-to-live of acquired described IP address, it is thus achieved that Position data corresponding to described IP address.
If the IP address class type of described IP address is the first kind or the 3rd type, adopting of described IP address Integrating some time-to-live can be as the endless time;If the IP address class type of described IP address be Second Type or 4th type, the collection point time-to-live of described IP address can be to obtain by the following method: can obtain Take the positioning time of each collection point of described IP address, and then, then can every according to described IP address The positioning time of individual collection point, it is thus achieved that collection point transfer time of described IP address such as meansigma methods, by described Collection point transfer time, the collection point time-to-live of described IP address.
Such as, if the IP address class type of described IP address is the first kind, then acquired described IP ground The collection point data of the collection point within the collection point time-to-live of location, calculate the position of a center Data, using as the position data corresponding to described IP address.
Or, more such as, if the IP address class type of described IP address be Second Type or the 3rd type or 4th type, then adopting according to the collection point within the collection point time-to-live of acquired described IP address Collection point data, to described collection point, carries out Density Clustering based on distance and processes, to obtain at least two Distance bunch;If each distance bunch is ordered arrangement in time in distance bunch described in described at least two, meter The position data of the center of the distance bunch that calculation distance positioning time current time is nearest, using as described Position data corresponding to IP address;If each distance bunch is in the time in distance bunch described in described at least two Upper is lack of alignment, calculates the position of the center of each distance bunch in distance bunch described in described at least two Put data, using as the position data corresponding to described IP address.
After excavating the position data corresponding to each IP address, can by each IP address and its Corresponding position data, carries out storage process in the storage device of terminal.
During a concrete implementation, the storage device of described terminal can be slow storage device, It is specifically as follows the hard disk of computer system, or can also be the inoperative internal memory i.e. physical memory of mobile phone, Such as, read only memory (Read-Only Memory, ROM) and RAM (random access memory) card etc., the present embodiment is to this It is not particularly limited.
During another concrete implementation, the storage device of described terminal can also set for quick storage Standby, it is specifically as follows the internal memory of computer system, or in can also being the running memory i.e. system of mobile phone Deposit, such as, random access memory (Random Access Memory, RAM) etc., the present embodiment pair This is not particularly limited.
Alternatively, in a possible implementation of the present embodiment, in 103, specifically can root According to the IP address class type of described IP address, directly obtain the position data corresponding to described IP address;Or Person obtains the stop place of described terminal, near the stop place of described terminal, it is thus achieved that described IP address Corresponding position data.
If it is understood that current time is not within the collection point time-to-live of described IP address, The most directly terminate flow process, position unsuccessfully.Only current time is in the collection point time-to-live of described IP address Within, just can be normally carried out follow-up positioning action.
During a concrete implementation, if the IP address class type of described IP address is the first kind, Then directly obtain the position data corresponding to described IP address, as the positioning result of terminal.
During another concrete implementation, if the IP address class type of described IP address is Second Type, Then directly obtain the position data corresponding to described IP address, as the positioning result of terminal.
During another concrete implementation, if the IP address class type of described IP address is the 3rd type Or the 4th type, then can obtain the stop place of described terminal further, in the stop place of described terminal Near putting, it is thus achieved that the position data corresponding to described IP address.
It is understood that obtain the stop place of terminal, any method of the prior art can be used, For example, it is possible to according to the contact address in user's log-on message provided in appointment application or work The information acquisitioies such as unit, or can also obtain according to the historical location data of user, etc., this enforcement This is not particularly limited by example.
In the present embodiment, by receiving the locating request message that terminal sends, in described locating request message Comprise the IP address of described terminal, and then obtain the IP address class type of described IP address, enabling root IP address class type according to described IP address, it is thus achieved that the position data corresponding to described IP address, due to not With the IP address of type, there is different characteristic distributions, therefore, according to the ground of the IP address identified Location type, performs IP address-based positioning action, it is possible to obtains accurate position data, thus improves Positioning precision of based on IP address location.
It addition, use technical scheme provided by the present invention, position owing to have employed the history of magnanimity in advance The big data in this location of data, calculate the position data corresponding to IP address so that positioning result is more smart Accurate, it is possible to improve positioning precision based on IP address location further.
It addition, use technical scheme provided by the present invention, owing to have employed the historical location data of magnanimity The big data in this location so that the identification of IP address is more accurate, thus improve IP address sort can By property.
It addition, use technical scheme provided by the present invention, it is possible to be effectively improved the experience of user.
It should be noted that for aforesaid each method embodiment, in order to be briefly described, therefore by its all table Stating as a series of combination of actions, but those skilled in the art should know, the present invention is by being retouched The restriction of the sequence of movement stated because according to the present invention, some step can use other orders or with Shi Jinhang.Secondly, those skilled in the art also should know, embodiment described in this description all belongs to In preferred embodiment, necessary to involved action and the module not necessarily present invention.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and does not has in certain embodiment The part described in detail, may refer to the associated description of other embodiments.
The structural representation of the IP address-based positioner that Fig. 2 provides for another embodiment of the present invention, As shown in Figure 2.The IP address-based positioner of the present embodiment can include receiving unit 21, obtaining Unit 22 and positioning unit 23.Wherein, receive unit 21, for receiving the Location Request that terminal sends Message, comprises the IP address of described terminal in described locating request message;Obtain unit 22, be used for obtaining The IP address class type of described IP address;Positioning unit 23, for the IP address according to described IP address Type, it is thus achieved that the position data corresponding to described IP address.
Specifically, the IP address class type of described IP address, can include but not limited to the first kind, Second Type, the 3rd type or the 4th type, this is not particularly limited by the present embodiment.
For example, the described first kind is fixed allocation single centre vertex type;Described Second Type is State distribution single centre vertex type;Described 3rd type is fixed allocation multicenter vertex type;Described 4th class Type is dynamically to distribute multicenter vertex type.
It should be noted that the IP address-based positioner that provided of the present embodiment is part or all of Can be the application being located locally terminal, or can also be to be arranged in the application of local terminal The functional units such as plug-in unit or SDK (Software Development Kit, SDK), or Person can also for the process engine being positioned in network side server, or can also be to be positioned at dividing of network side Cloth system, this is not particularly limited by the present embodiment.
It is understood that the local program (nativeApp) that described application can be mounted in terminal, Or can also is that a web page program (webApp) of browser in terminal, the present embodiment is to this not It is particularly limited.
Alternatively, in a possible implementation of the present embodiment, as it is shown on figure 3, the present embodiment The IP address-based positioner provided can further include dispensing unit 31, may be used for obtaining Taking at least one historical location data of the terminal with described IP address, at least one history described positions Data comprise in each historical location data network and connects instruction;If in described each historical location data The network comprised connects instruction all instruction terminal online and is connected as Wi-Fi network connection, by described at least one Individual historical location data, as the collection point data of the collection point of described IP address;According to described IP address The collection point data of collection point, the collection point to described IP address, carry out Density Clustering based on distance Process, to obtain at least one distance bunch;And the distributed data according at least one distance bunch described, Obtain the IP address class type of described IP address.
Alternatively, in a possible implementation of the present embodiment, described dispensing unit 31, specifically May be used for the IP address class type according to described IP address, it is thus achieved that time survival in the collection point of described IP address Between;Obtain the collection point data of collection point within the collection point time-to-live of described IP address;And root According to the IP address class type of described IP address with within the collection point time-to-live of acquired described IP address The collection point data of collection point, it is thus achieved that the position data corresponding to described IP address.
Specifically, described dispensing unit 31, if specifically may be used for the IP address class of described IP address Type is the first kind, then adopting of the collection point within the collection point time-to-live of acquired described IP address Collection point data, calculates the position data of a center, using as the position corresponding to described IP address Data;If the IP address class type of described IP address is Second Type or the 3rd type or the 4th type, then root According to the collection point data of the collection point within the collection point time-to-live of acquired described IP address, to institute State collection point, carry out Density Clustering based on distance and process, to obtain at least two distance bunch;If it is described In distance bunch described at least two, each distance bunch is ordered arrangement in time, calculates distance positioning time The position data of the center of the distance bunch that current time is nearest, using as corresponding to described IP address Position data;If each distance bunch is lack of alignment in time in distance bunch described in described at least two, Calculate the position data of the center of each distance bunch in distance bunch described in described at least two, using as Position data corresponding to described IP address.
Alternatively, in a possible implementation of the present embodiment, described positioning unit 23, specifically May be used for the IP address class type according to described IP address, directly obtain the position corresponding to described IP address Put data;Or obtain the stop place of described terminal, near the stop place of described terminal, it is thus achieved that Position data corresponding to described IP address.
It should be noted that method in embodiment corresponding to Fig. 1, can by the present embodiment provide based on The positioner of IP address realizes.Describe the related content that may refer in embodiment corresponding to Fig. 1 in detail, Here is omitted.
In the present embodiment, receiving, by receiving unit, the locating request message that terminal sends, described location please Ask the IP address comprising described terminal in message, and then by obtaining the IP ground of the described IP address of unit acquisition Location type so that positioning unit can be according to the IP address class type of described IP address, it is thus achieved that described IP ground Position data corresponding to location, due to different types of IP address, has different characteristic distributions, therefore, According to the address style of the IP address identified, perform IP address-based positioning action, it is possible to obtain Accurate position data, thus improve positioning precision based on IP address location.
It addition, use technical scheme provided by the present invention, position owing to have employed the history of magnanimity in advance The big data in this location of data, calculate the position data corresponding to IP address so that positioning result is more smart Accurate, it is possible to improve positioning precision based on IP address location further.
It addition, use technical scheme provided by the present invention, owing to have employed the historical location data of magnanimity The big data in this location so that the identification of IP address is more accurate, thus improve IP address sort can By property.
It addition, use technical scheme provided by the present invention, it is possible to be effectively improved the experience of user.
Those skilled in the art is it can be understood that arrive, and for convenience and simplicity of description, above-mentioned retouches The specific works process of the system stated, device and unit, is referred to the correspondence in preceding method embodiment Process, does not repeats them here.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and Method, can realize by another way.Such as, device embodiment described above is only shown Meaning property, such as, the division of described unit, be only a kind of logic function and divide, actual can when realizing There to be other dividing mode, such as, multiple unit or assembly can in conjunction with or be desirably integrated into another Individual system, or some features can ignore, or do not perform.Another point, shown or discussed mutual it Between coupling direct-coupling or communication connection can be the indirect coupling by some interfaces, device or unit Close or communication connection, can be electrical, machinery or other form.
The described unit illustrated as separating component can be or may not be physically separate, makees The parts shown for unit can be or may not be physical location, i.e. may be located at a place, Or can also be distributed on multiple NE.Can select according to the actual needs part therein or The whole unit of person realizes the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, Can also be that unit is individually physically present, it is also possible to two or more unit are integrated in a list In unit.Above-mentioned integrated unit both can realize to use the form of hardware, it would however also be possible to employ hardware adds software The form of functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer In read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, including some fingers Make with so that a computer installation (can be personal computer, server, or network equipment etc.) Or processor (processor) performs the part steps of method described in each embodiment of the present invention.And it is aforementioned Storage medium include: USB flash disk, portable hard drive, read only memory (Read-Only Memory, ROM), Random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various The medium of program code can be stored.
Last it is noted that above example is only in order to illustrate technical scheme, rather than to it Limit;Although the present invention being described in detail with reference to previous embodiment, the ordinary skill of this area Personnel it is understood that the technical scheme described in foregoing embodiments still can be modified by it, or Person carries out equivalent to wherein portion of techniques feature;And these amendments or replacement, do not make corresponding skill The essence of art scheme departs from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (12)

1. an IP address-based localization method, it is characterised in that including:
Receive the locating request message that terminal sends, described locating request message comprises the IP of described terminal Address;
Obtain the IP address class type of described IP address;
IP address class type according to described IP address, it is thus achieved that the position data corresponding to described IP address.
Method the most according to claim 1, it is characterised in that the IP address class of described IP address Type includes the first kind, Second Type, the 3rd type or the 4th type;Wherein,
The described first kind is fixed allocation single centre vertex type;
Described Second Type is dynamically to distribute single centre vertex type;
Described 3rd type is fixed allocation multicenter vertex type;
Described 4th type is dynamically to distribute multicenter vertex type.
Method the most according to claim 1, it is characterised in that described acquisition described IP address Before IP address class type, also include:
Obtain at least one historical location data of terminal with described IP address, described at least one go through History location data comprise network in each historical location data and connects instruction;
If the network included in described each historical location data connects instruction, all instruction terminal online connect Connect for Wi-Fi network, by least one historical location data described, as the collection of described IP address The collection point data of point;
The collection point data of the collection point according to described IP address, the collection point to described IP address, carry out Density Clustering based on distance processes, to obtain at least one distance bunch;
Distributed data according at least one distance bunch described, it is thus achieved that the IP address class type of described IP address.
Method the most according to claim 3, it is characterised in that described in described basis at least one away from From bunch distributed data, it is thus achieved that after the IP address class type of described IP address, also include:
IP address class type according to described IP address, it is thus achieved that the collection point time-to-live of described IP address;
Obtain the collection point data of collection point within the collection point time-to-live of described IP address;
During the collection point survival of IP address class type according to described IP address and acquired described IP address The collection point data of the collection point between, it is thus achieved that the position data corresponding to described IP address.
Method the most according to claim 4, it is characterised in that described according to described IP address The collection point of the collection point within the collection point time-to-live of IP address class type and acquired described IP address Data, it is thus achieved that the position data corresponding to described IP address, including:
If the IP address class type of described IP address is the first kind, then adopting of acquired described IP address The collection point data of the collection point within the collection point time-to-live, calculate the position data of a center, Using as the position data corresponding to described IP address;
If the IP address class type of described IP address is Second Type or the 3rd type or the 4th type, then basis The collection point data of the collection point within the collection point time-to-live of acquired described IP address, to described Collection point, carries out Density Clustering based on distance and processes, to obtain at least two distance bunch;If described extremely In few two described distances bunch, each distance bunch is ordered arrangement in time, calculates distance positioning time and works as The position data of the center of the distance bunch that the front time is nearest, using as the position corresponding to described IP address Put data;If each distance bunch is lack of alignment in time in distance bunch described in described at least two, meter Calculate the position data of the center of each distance bunch in distance bunch described in described at least two, using as institute State the position data corresponding to IP address.
6. according to the method described in Claims 1 to 5 any claim, it is characterised in that described basis The IP address class type of described IP address, it is thus achieved that the position data corresponding to described IP address, including:
According to the IP address class type of described IP address, directly obtain the positional number corresponding to described IP address According to;Or obtain the stop place of described terminal, near the stop place of described terminal, it is thus achieved that described Position data corresponding to IP address.
7. an IP address-based positioner, it is characterised in that including:
Receive unit, for receiving the locating request message that terminal sends, described locating request message is wrapped IP address containing described terminal;
Obtain unit, for obtaining the IP address class type of described IP address;
Positioning unit, for the IP address class type according to described IP address, it is thus achieved that described IP address institute is right The position data answered.
Device the most according to claim 7, it is characterised in that the IP address class of described IP address Type includes the first kind, Second Type, the 3rd type or the 4th type;Wherein,
The described first kind is fixed allocation single centre vertex type;
Described Second Type is dynamically to distribute single centre vertex type;
Described 3rd type is fixed allocation multicenter vertex type;
Described 4th type is dynamically to distribute multicenter vertex type.
Device the most according to claim 7, it is characterised in that described device also includes dispensing unit, For
Obtain at least one historical location data of terminal with described IP address, described at least one go through History location data comprise network in each historical location data and connects instruction;
If the network included in described each historical location data connects instruction, all instruction terminal online connect Connect for Wi-Fi network, by least one historical location data described, as the collection of described IP address The collection point data of point;
The collection point data of the collection point according to described IP address, the collection point to described IP address, carry out Density Clustering based on distance processes, to obtain at least one distance bunch;And
Distributed data according at least one distance bunch described, it is thus achieved that the IP address class type of described IP address.
Device the most according to claim 9, it is characterised in that described dispensing unit, specifically uses In
IP address class type according to described IP address, it is thus achieved that the collection point time-to-live of described IP address;
Obtain the collection point data of collection point within the collection point time-to-live of described IP address;And
During the collection point survival of IP address class type according to described IP address and acquired described IP address The collection point data of the collection point between, it is thus achieved that the position data corresponding to described IP address.
11. devices according to claim 10, it is characterised in that described dispensing unit, specifically use In
If the IP address class type of described IP address is the first kind, then adopting of acquired described IP address The collection point data of the collection point within the collection point time-to-live, calculate the position data of a center, Using as the position data corresponding to described IP address;
If the IP address class type of described IP address is Second Type or the 3rd type or the 4th type, then basis The collection point data of the collection point within the collection point time-to-live of acquired described IP address, to described Collection point, carries out Density Clustering based on distance and processes, to obtain at least two distance bunch;If described extremely In few two described distances bunch, each distance bunch is ordered arrangement in time, calculates distance positioning time and works as The position data of the center of the distance bunch that the front time is nearest, using as the position corresponding to described IP address Put data;If each distance bunch is lack of alignment in time in distance bunch described in described at least two, meter Calculate the position data of the center of each distance bunch in distance bunch described in described at least two, using as institute State the position data corresponding to IP address.
12. according to the device described in claim 7~11 any claim, it is characterised in that described fixed Bit location, specifically for
According to the IP address class type of described IP address, directly obtain the positional number corresponding to described IP address According to;Or obtain the stop place of described terminal, near the stop place of described terminal, it is thus achieved that described Position data corresponding to IP address.
CN201610510379.XA 2016-06-30 2016-06-30 IP address-based localization method and device Active CN106027693B (en)

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 true CN106027693A (en) 2016-10-12
CN106027693B 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)

Cited By (6)

* Cited by examiner, † Cited by third party
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
CN109769042A (en) * 2019-02-20 2019-05-17 北京奇艺世纪科技有限公司 A kind of localization method and device
CN112153091A (en) * 2019-06-27 2020-12-29 北京百度网讯科技有限公司 Method and device for determining relevance of equipment
CN113407796A (en) * 2021-05-13 2021-09-17 郑州埃文计算机科技有限公司 Static IP building-level positioning method based on IP historical positions
CN113411415A (en) * 2021-05-13 2021-09-17 郑州埃文计算机科技有限公司 Method for cleaning reference points based on IP network characteristics and geographic characteristics

Citations (2)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
班奇等: "《基于IPV4的网络地理定位技术研究》", 《电脑编程技巧与维护》 *

Cited By (7)

* Cited by examiner, † Cited by third party
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
CN109769042A (en) * 2019-02-20 2019-05-17 北京奇艺世纪科技有限公司 A kind of localization method and device
CN112153091A (en) * 2019-06-27 2020-12-29 北京百度网讯科技有限公司 Method and device for determining relevance of equipment
CN112153091B (en) * 2019-06-27 2022-05-13 北京百度网讯科技有限公司 Method and device for determining relevance of equipment
CN113407796A (en) * 2021-05-13 2021-09-17 郑州埃文计算机科技有限公司 Static IP building-level positioning method based on IP historical positions
CN113411415A (en) * 2021-05-13 2021-09-17 郑州埃文计算机科技有限公司 Method for cleaning reference points based on IP network characteristics and geographic characteristics

Also Published As

Publication number Publication date
CN106027693B (en) 2019-08-27

Similar Documents

Publication Publication Date Title
CN106027693A (en) Positioning method and positioning apparatus based on IP address
CN104090970B (en) Point of interest shows method and device
CN106210163A (en) IP address-based localization method and device
CN104239453B (en) Data processing method and device
CN105554876B (en) A kind of mobile terminal locating method and mobile terminal
CN106886918A (en) A kind of determination method of targeted customer, apparatus and system
CN106067126A (en) Card certificate checks and writes off method, Apparatus and system
CN103905471A (en) Social network information push method, server and social network
CN105338619A (en) Positioning method and positioning device
CN104731917A (en) Recommendation method and device
CN106202117A (en) Data processing method, device and server
CN106779882A (en) A kind of advertisement acquisition method, device and user terminal
CN107798102A (en) A kind of page display method and device
CN106658704A (en) Positioning method and system of starting point of indoor positioning
CN103049355A (en) Method and equipment for database system recovery
CN103039036B (en) Method and system for calculating number of users
CN105959306A (en) IP address identification method and device
CN103020680A (en) Navigation and positioning method for electronic ticket
CN106131238A (en) The sorting technique of IP address and device
CN113449986A (en) Service distribution method, device, server and storage medium
CN104750824A (en) Application functional data processing method and device
CN104683292A (en) Interactive method, interactive device and interactive system for objects
CN107103037A (en) A kind of recognition methods of social function of geographic area and terminal device
CN104378736B (en) A kind of wireless location method and system
CN104253864B (en) A kind of data hierarchy storage means and system

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