CN113067913A - Positioning method, device, server, medium and product - Google Patents
Positioning method, device, server, medium and product Download PDFInfo
- Publication number
- CN113067913A CN113067913A CN202110295660.7A CN202110295660A CN113067913A CN 113067913 A CN113067913 A CN 113067913A CN 202110295660 A CN202110295660 A CN 202110295660A CN 113067913 A CN113067913 A CN 113067913A
- Authority
- CN
- China
- Prior art keywords
- address
- positioning data
- associated positioning
- position information
- location information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5007—Internet protocol [IP] addresses
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/52—Network services specially adapted for the location of the user terminal
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The disclosure provides a positioning method, a positioning device, a server, a medium and a product, for an IP address of position information to be determined, one or more associated positioning data can be obtained, the associated positioning data includes the IP address, an equipment identifier of an electronic device using the IP address and position information of the electronic device when the IP address is used, because the IP address is dynamically allocated, the same IP address may be allocated to different electronic devices in different time, and therefore, the equipment identifiers contained in the obtained different associated positioning data may not be completely identical; the first number of electronic devices included in the one or more associated positioning data may be obtained according to the device identifier included in the one or more associated positioning data, that is, the IP address is used by a first number of electronic devices at different times. If the first number is greater than or equal to a first threshold, determining location information of the IP address based on location information included in one or more associated positioning data.
Description
Technical Field
The present disclosure relates to the field of positioning technologies, and in particular, to a positioning method, apparatus, server, medium, and product.
Background
The positioning of the electronic device plays an important role in various scenarios, such as pushing information about a city where the electronic device is located for the electronic device, providing services for the electronic device by using a server in the city where the electronic device is located, and the like.
In the related art, the positioning method of the electronic device is as follows: the method includes querying location information corresponding to an IP address used by the electronic device in an IP (Internet protocol address) address library, and if it is queried that the IP address used by the electronic device does not correspond to the location information or the corresponding location information is missing, for example, city information is missing, then accurate service cannot be provided for the electronic device.
Disclosure of Invention
The present disclosure provides a positioning method, apparatus, server, medium, and product based on an IP address, so as to at least solve a problem in the related art that if it is found that an IP address used by an electronic device does not correspond to location information, or if the corresponding location information is missing, accurate service cannot be provided for the electronic device. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a positioning method, including:
acquiring an Internet Protocol (IP) address of position information to be determined;
acquiring one or more associated positioning data, wherein the associated positioning data comprises the IP address, an equipment identifier of the electronic equipment using the IP address and position information of the electronic equipment when the IP address is used;
acquiring a first number of electronic devices included in the one or more associated positioning data according to the device identifiers included in the one or more associated positioning data;
if the first number is greater than or equal to a first threshold, determining the location information of the IP address based on the location information included in the one or more associated positioning data.
With reference to the first aspect, in a first possible implementation manner, the determining, based on the location information included in the one or more associated positioning data, the location information of the IP address includes:
if the position information contained in the one or more associated positioning data is the same, determining that the position information of the IP address is the position information contained in the one or more associated positioning data;
if the position information contained in the one or more associated positioning data is not completely the same, dividing the associated positioning data with the same position information into the same position information set to obtain a plurality of position information sets;
obtaining a target position information set containing the maximum number of associated positioning data from the plurality of position information sets;
and determining the position information of the IP address based on the position information in the associated positioning data contained in the target position information set.
With reference to the first aspect, in a second possible implementation manner, the determining, based on location information in associated positioning data included in the target location information set, location information of the IP address includes:
and determining the position information in the associated positioning data contained in the target position information set as the position information of the IP address.
With reference to the first aspect, in a third possible implementation manner, the determining, based on location information in associated positioning data included in the target location information set, location information of the IP address includes:
determining a ratio of a second quantity to a quantity of the one or more associated positioning data, the second quantity being a quantity of associated positioning data contained in the set of target location information;
and if the ratio is larger than or equal to a second threshold value, determining the position information in the associated positioning data contained in the target position information set as the position information of the IP address.
With reference to the first aspect, in a fourth possible implementation manner, the step of obtaining one or more associated positioning data includes:
acquiring a plurality of candidate associated positioning data and reporting time corresponding to the candidate associated positioning data, wherein the candidate associated positioning data comprises the IP address, an equipment identifier of electronic equipment using the IP address and position information of the electronic equipment when the IP address is used;
dividing the same candidate associated positioning data into the same candidate data set to obtain at least one candidate data set, wherein the at least one associated positioning data contained in the candidate data set is sorted according to the reporting time;
extracting at least one target candidate associated positioning data from at least one candidate associated positioning data contained in each candidate data set at intervals of at least a preset reporting time period;
and determining the extracted target candidate associated positioning data as the associated positioning data.
With reference to the first aspect, in a fifth possible implementation manner, the location information included in the associated positioning data includes country information, province information, and city information, and the step of obtaining a plurality of candidate associated positioning data includes:
acquiring a plurality of original associated positioning data, wherein the original associated positioning data comprise the IP address, an equipment identifier of the electronic equipment using the IP address and position information of the electronic equipment when the IP address is used;
inquiring and obtaining city default position information corresponding to the IP address from an address library, wherein the city default position information consists of country information and province information;
obtaining a plurality of candidate associated positioning data from the plurality of original associated positioning data, wherein the country information in the position information contained in the candidate associated positioning data is the same as the country information in the default position information of the city, and the province information in the position information contained in the candidate associated positioning data is the same as the province information in the default position information of the city.
According to a second aspect of the embodiments of the present disclosure, there is provided a positioning apparatus including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire an Internet Protocol (IP) address of position information to be determined;
the second acquisition module is configured to acquire one or more associated positioning data, wherein the associated positioning data comprises the IP address, the device identifier of the electronic device using the IP address and the position information of the electronic device when the IP address is used;
a third obtaining module configured to obtain a first number of electronic devices included in the one or more associated positioning data according to the device identifiers included in the one or more associated positioning data;
a first determining module configured to determine location information of the IP address based on location information included in the one or more associated positioning data if the first number is greater than or equal to a first threshold.
With reference to the second aspect, in a first possible implementation manner, the first determining module is specifically configured to:
a first determining unit, configured to determine, if the location information included in the one or more pieces of associated positioning data is the same, that the location information of the IP address is the location information included in the one or more pieces of associated positioning data;
the first dividing unit is configured to divide the associated positioning data with the same position information into the same position information set to obtain a plurality of position information sets if the position information included in the one or more associated positioning data is not completely the same;
a first acquisition unit configured to acquire a target position information set containing the largest number of associated positioning data from the plurality of position information sets;
a second determining unit configured to determine the location information of the IP address based on the location information in the associated positioning data included in the set of target location information.
With reference to the second aspect, in a second possible implementation manner, the second determining unit is specifically configured to:
a first determining subunit configured to determine, as the location information of the IP address, the location information in the associated positioning data included in the target location information set.
With reference to the second aspect, in a third possible implementation manner, the second determining unit is specifically configured to:
a second determining subunit configured to determine a ratio of a second quantity to the quantity of the one or more associated positioning data, the second quantity being the quantity of associated positioning data contained in the set of target position information;
a third determining subunit, configured to determine, if the ratio is greater than or equal to a second threshold, location information in the associated positioning data included in the target location information set as location information of the IP address.
With reference to the second aspect, in a fourth possible implementation manner, the second obtaining module is specifically configured to:
a second obtaining unit, configured to obtain a plurality of candidate associated positioning data and reporting times corresponding to the plurality of candidate associated positioning data, where the candidate associated positioning data includes the IP address, a device identifier of an electronic device using the IP address, and location information of the electronic device when the IP address is used;
the second dividing unit is configured to divide the same candidate associated positioning data into the same candidate data set to obtain at least one candidate data set, wherein the at least one associated positioning data included in the candidate data set is sorted according to the reporting time;
the extraction unit is configured to extract at least one target candidate associated positioning data every at least a preset reporting time period from at least one candidate associated positioning data included in each candidate data set;
a third determining unit configured to determine the extracted object candidate associated positioning data as the associated positioning data.
With reference to the second aspect, in a fifth possible implementation manner, the location information included in the associated positioning data includes country information, province information, and city information, and the second obtaining unit is specifically configured to:
a third obtaining unit configured to obtain a plurality of original associated positioning data, where the original associated positioning data includes the IP address, a device identifier of an electronic device using the IP address, and location information of the electronic device when the IP address is used;
the inquiry unit is configured to acquire city default position information corresponding to the IP address from an address library, wherein the city default position information consists of country information and province information;
a fourth obtaining unit configured to obtain the plurality of candidate associated positioning data from the plurality of original associated positioning data, where the candidate associated positioning data includes position information in which country information is the same as that in the default position information of the city, and the candidate associated positioning data includes position information in which province information is the same as that in the default position information of the city.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the positioning method according to the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions, when executed by a processor of a server, enable the server to perform the positioning method according to the first aspect.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product directly loadable into the internal memory of a computer, said memory being included in the server according to claim 13 and containing software code, and said computer program is loaded into and executed by the computer to implement the positioning method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the positioning method provided by the embodiment of the present disclosure, for an IP address of location information to be determined, one or more associated positioning data may be obtained, where the associated positioning data includes the IP address, a device identifier of an electronic device using the IP address, and location information of the electronic device when the IP address is used, and since the IP address is dynamically allocated, the same IP address may be allocated to different electronic devices in different time periods, and therefore, the device identifiers included in the obtained different associated positioning data may not be completely the same; a first number of electronic devices included in the one or more associated positioning data may be obtained according to the device identifier included in the one or more associated positioning data, that is, the IP address is used by a first number of electronic devices at different times. If the first number is greater than or equal to a first threshold, determining the location information of the IP address based on the location information included in the one or more associated positioning data. It can be understood that the larger the first number is, the more accurate the obtained location information of the IP address is based on the location information included in the one or more associated positioning data, and if the first number is greater than or equal to the first threshold, it indicates that more electronic devices have used the IP address, so that the accuracy of the obtained location information of the IP address is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is an architectural diagram illustrating a first implementation environment in accordance with an exemplary embodiment;
FIG. 2 is an architectural diagram illustrating a second implementation environment in accordance with an exemplary embodiment;
FIG. 3 is an architectural diagram illustrating a third implementation environment in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating a method of positioning according to an exemplary embodiment;
FIG. 5 is a block diagram illustrating a positioning device in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating a server in accordance with an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The embodiment of the disclosure provides a positioning method, a positioning device, a server, a medium and a product. Before the technical solutions provided by the embodiments of the present disclosure are introduced, the application environments and implementation environments related to the technical solutions provided by the embodiments of the present disclosure are introduced.
First, an application environment provided by the embodiment of the present disclosure is explained.
The method and the device can be used for accurately positioning the position information of the electronic equipment of the client in time, and are an important basis for providing corresponding services for the client by the server.
The client may be an application client or a web page version client, for example.
Illustratively, the client may be any one of a news client, a short video client, a video playing client, a payment client, a shopping client, and an instant messaging client.
The following description will take the client as a short video client as an example to explain that the location information of the electronic device is an important basis for providing corresponding services by the server.
A user watches live broadcast based on a short video client, and a server can determine position information corresponding to an IP address used by an electronic device operating the short video client, where the position information includes, for example, country information, province information, and city information where the electronic device is located, so that the server controls a city where the electronic device is located or a CDN (Content Delivery Network) server closest to the city to send live broadcast video streams to the electronic device.
It can be understood that the closer the CDN server is to the electronic device, the smoother the live video stream is provided for the short video client running on the electronic device, and the less the pause phenomenon occurs.
In the related art, a method of obtaining location information of an electronic device is: the location information corresponding to the IP address of the electronic device is queried from the IP address library, and if the location information corresponding to the IP address of the electronic device stored in the IP address library is missing, for example, city information and/or provincial information and/or national information is missing, or the location information corresponding to the IP address of the electronic device is not stored in the IP address library, it is impossible to provide accurate service for the electronic device. For example, a CDN server in a city where the electronic device is located or closest to the city cannot be controlled to send a live video stream for the electronic device.
At present, the loss of the location information of the IP address base is serious, for example, the location information corresponding to a certain IP address stored in the IP address base lacks city information and/or provincial information and/or national information, especially the IP address of the mobile base station, and the loss of the corresponding city information is serious, that is, the location information corresponding to a certain amount of IP addresses in the IP address base has a loss or does not correspond to location information. For these IP addresses, the electronic device cannot be located by the IP address used by the electronic device, and thus a better service cannot be provided for the user.
In the embodiment of the present disclosure, an IP address where corresponding location information is missing is referred to as an IP address of location information to be determined, for example, the IP address of the location information to be determined is an IP address where city information and/or provincial information and/or national information is missing, or an IP address that does not correspond to location information.
For example, the IP address library stores location information corresponding to each IP address, and the location information corresponding to each IP address may be stored in the IP address library in any form of a table, a function, and a linked list. The following description will be made by taking a table as an example. Table 1 shows the location information corresponding to each IP address stored in the IP address repository.
TABLE 1
In table 1, 192.2.5.3 lacking city information is the IP address of the location information to be determined; 192.3.0.0 lacking province information and city information is the IP address of the location information to be determined; 192.4.0.0 lacking country information, province information, and city information is the IP address of the location information to be determined. Illustratively, 192.4.0.0 lacking country information, province information and city information is an IP address to which no location information corresponds.
It can be understood that the IP addresses are dynamically allocated, one IP address is used by only one electronic device at a time, the same IP address may be allocated to different electronic devices at different times, and in the process of operating the client, the electronic device reports a data packet to a server corresponding to the client, where the data packet includes a device identifier of the electronic device, an IP address used by the electronic device, and location information of the electronic device when the IP address is used.
For example, the position information of an electronic device may be obtained based on GPS (Global Positioning System) Positioning, or BDS (BeiDou Navigation Satellite System, BeiDou Satellite Navigation System).
Based on this, if the location information corresponding to the IP address obtained from the IP address library is missing, for example, there is missing city information and/or province information and/or country information, then the embodiment of the present disclosure may be adopted to provide a positioning method, and for each IP address of the location information to be determined, the location information of the IP address may be determined based on the location information (the location information is perfect, that is, there is no missing information) where a plurality of electronic devices reporting the IP address use the IP address, so that accurate service may be provided for the electronic devices.
Next, description is made on implementation environments related to embodiments of the present disclosure, which are various, and the embodiments of the present disclosure provide, but are not limited to, the following two.
FIG. 1 is an architectural diagram of a first implementation environment, shown according to an exemplary embodiment, that includes: an IP address repository 11, a database 12 and a server 13.
Illustratively, the IP address repository 11 is a third party database.
Illustratively, the database 12 may be independent of the server 13; illustratively, the database 12 may belong to the server 13.
The server 13 may be, for example, one server, a server cluster composed of a plurality of servers, or a cloud computing server center.
Illustratively, the server 13 may establish a connection and communicate with the IP address repository 11 and the database 12, respectively, via a wired network or a wireless network.
The server 13 is configured to obtain an IP address of the location information to be determined from the IP address library 11, determine the location information of the IP address by using the positioning method provided in the embodiment of the present disclosure, and store the corresponding relationship between the IP address and the location information in the database 12.
For example, the IP address database 11 and the database 12 may be the same database or different databases.
The server 13 is configured to complete the IP address library 11, so that when the electronic device is provided with a service, the location information corresponding to the IP address used by the electronic device can be obtained based on the IP address library 11 or the database 12.
For example, the server 13 first queries the location information corresponding to the IP address used by the electronic device based on the IP address library 11, and then queries the location information corresponding to the IP address used by the electronic device based on the database 12 if the location information is not queried or is missing.
FIG. 2 is an architectural diagram of a second exemplary implementation environment, according to an exemplary embodiment, that includes: an IP address repository 11, an electronic device 21, and a server 23.
For the description of the IP address library 11, reference may be made to the first implementation environment, which is not described herein again.
For example, the electronic device 21 may be any electronic product capable of interacting with a user through one or more modes of a keyboard, a touch PAD, a touch screen, a remote controller, a voice interaction device, a handwriting device, and the like, for example, a mobile phone, a notebook computer, a tablet computer, a palm computer, a personal computer, a wearable device, a smart television, a PAD, a robot, and the like.
It should be noted that fig. 2 is only an example, the types of the electronic devices may be various and are not limited to the laptop, the smart phone, and the PAD in fig. 2, and the number of the electronic devices may be determined based on the actual situation and is not limited to 3 shown in fig. 2.
The server 23 may be, for example, one server, a server cluster composed of a plurality of servers, or a cloud computing server center.
In the second implementation environment, the server 23 will obtain the IP address used by the electronic device 21 only when there is a need to provide a service for the electronic device, and query the location information of the IP address from the IP address library 11; if the location information corresponding to the IP address obtained from the IP address repository 11 is missing, for example, city information and/or province information and/or country information is missing, or the location information corresponding to the IP address is not obtained from the IP address repository 11, the location information corresponding to the IP address may be determined (the determined location information is complete and lacks any information) by using the positioning method provided by the embodiment of the present disclosure, so as to provide services for the electronic device 21.
In a second implementation environment, when the electronic device sends a data packet to the server 23, the data packet may carry location information of the electronic device, for example, the electronic device obtains its own location information by positioning through a GPS or BDS, if the electronic device may have a missing location information by positioning through the GPS or BDS, or the electronic device has an error in its own location information by positioning through the GPS or BDS, or the data packet sent by the electronic device 21 is encrypted, so that the server cannot resolve the location information from the data packet sent by the electronic device 21, then the IP address used by the electronic device 21 may be obtained, and the location information of the IP address may be queried from the IP address library 11; if the location information corresponding to the IP address obtained from the IP address repository 11 is missing, or the location information corresponding to the IP address is not obtained from the IP address repository 11, the location information corresponding to the IP address may be determined by using the positioning method provided in the embodiment of the present disclosure.
In a second implementation environment, when the electronic device sends a data packet to the server 23, the data packet may not carry the location information of the electronic device, for example, the electronic device 21 has prohibited the GPS or BDS from performing the positioning, so the server 23 cannot obtain the location information of the electronic device based on the electronic device 21 itself, and may obtain the IP address used by the electronic device 21 and query the location information of the IP address from the IP address library 11; if the location information corresponding to the IP address obtained from the IP address repository 11 is missing, or the location information corresponding to the IP address is not obtained from the IP address repository 11, the location information corresponding to the IP address may be determined by using the positioning method provided in the embodiment of the present disclosure.
In summary, the IP address is one of the ways of positioning the electronic device, and has the advantage of high reporting rate, and any electronic device accessing the internet reports the IP address, but does not necessarily report the location information, that is, the ability of positioning by using the IP address is improved, and the electronic device can be better positioned, thereby providing better service for the electronic device.
The first implementation environment and the second implementation environment realize that when the position information corresponding to the IP address cannot be obtained through the IP address base or the position information corresponding to the IP address obtained through the IP address base is missing, the positioning can be performed through the positioning method provided by the present disclosure.
FIG. 3 is an architectural diagram illustrating a third exemplary implementation environment, according to an exemplary embodiment, that includes: database 12, electronic device 21, server 33, and server 34.
For a description of the database 12, reference may be made to the first embodiment, which is not described in detail herein. For a description of the electronic device 21, reference may be made to the second implementation environment, which is not described herein.
The server 33 may be, for example, one server, a server cluster composed of a plurality of servers, or a cloud computing server center.
The server 34 may be, for example, one server, a server cluster composed of a plurality of servers, or a cloud computing server center.
The server 33 is configured to determine location information corresponding to each IP address by using the positioning method provided in the embodiment of the present disclosure, and store the location information in the database 12.
A server 34 for acquiring an IP address used by the electronic device 21; the location information of the IP address is searched from the database 12, and the electronic device 21 is provided with a service based on the location information corresponding to the IP address.
Illustratively, the server 33 and the server 34 may be the same server or different servers.
The third implementation environment realizes a technical scheme of determining the position information corresponding to the IP address by using the own database without using the IP address database.
It will be understood by those skilled in the art that the foregoing electronic devices and servers are merely exemplary and that other existing or future electronic devices or servers may be suitable for use with the present disclosure and are intended to be included within the scope of the present disclosure and are hereby incorporated by reference.
The technical solution provided by the present disclosure is described below with reference to the above three implementation environments.
Fig. 4 is a flowchart illustrating a positioning method according to an exemplary embodiment, and as shown in fig. 4, the positioning method may be used in any server in the above implementation environment, and the method includes the following steps S41 to S44 in the implementation process.
In step S41, the internet protocol IP address of the location information to be determined is acquired.
For example, there are various implementations of step S41, and the embodiments of the present disclosure provide, but are not limited to, the following two.
First, an IP address to which the corresponding location information is missing or an IP address to which the location information is not corresponding is obtained from an IP address library.
The IP address with the missing position information or the IP address without the corresponding position information is the IP address of the position information to be determined.
And secondly, acquiring an IP address used by the electronic equipment from a data packet reported by the electronic equipment, wherein the IP address is the IP address of the position information to be determined.
In step S42, one or more associated positioning data are obtained, where the associated positioning data include the IP address, the device identifier of the electronic device using the IP address, and the location information of the electronic device when the IP address is used.
Illustratively, the associated positioning data obtained in step S42 includes perfect position information without any content, for example, the associated positioning data includes position information including country information, province information, and city information.
The position information included in the associated positioning data includes country information, province information, and city information, which are merely examples, and the embodiment of the present disclosure does not limit the specific content of the position information included in the associated positioning data. For example, the specific content of the location information included in the associated positioning data may be determined based on the minimum geographic location unit allocated by the operator for the IP address, and the following example describes the "minimum geographic location unit".
For example, if the minimum geographic location unit of the IP address allocated by the operator is a city, that is, different IP addresses are allocated to different cities, the location information included in the associated positioning data includes: country information, province information, city information; if the minimum geographic location unit of the IP address allocated by the operator is a certain area in the city, that is, the operator allocates different IP addresses to different city areas in the same city, for example, the north Heisei fixed city is divided into a show area and a high-open area, and if the IP addresses allocated to the show area and the high-open area are different, then the minimum geographic location unit is a certain area in the city, and the location information included in the associated positioning data includes: country information, province information, city information, and city region information.
In the embodiments of the present disclosure, "the location information is perfect" means that the location information contains all information from country information to the minimum geographical location unit. The absence of location information refers to the absence of one or more information from the country information to the smallest geographical location unit.
The operator may be, for example, a telecommunications operator or a mobile operator.
For example, the city information may be a city in direct jurisdiction or a city in non-direct jurisdiction, and the province information included in the location information including the city in direct jurisdiction is null. Exemplary, non-jurisdictional cities such as Hebei province baoding city; direct market such as Beijing.
For example, if the minimum geographic location unit is a city, then the positioning accuracy of the electronic device in the embodiment of the present disclosure is required to be the city, for example, beijing, shanghai, baoding, shijiazhuang, and the like.
For example, the Device Identifier of the electronic Device may be a Unique Device Identifier (UDID) or an International Mobile Equipment Identity (IMEI).
Illustratively, the one or more associated positioning data obtained in step S42 are positioning data reported by one or more electronic devices within a preset time period.
For example, the preset time period may be 10 days, 30 days, 50 days, and the like, and may be determined specifically based on actual conditions, which is not specifically limited in the embodiment of the present disclosure.
Illustratively, the preset time period ends at the current time. The preset time period is changed continuously as time passes, for example, if the current time is 9/1/2020 and the time period is 30 days, the preset time period is 8/3/2020 to 9/1/2020. If the current time is 29 days in 9 and 29 months in 2020 and the time period is 30 days, the preset time period is from 31 days in 8 and 31 months in 2020 to 29 days in 9 and 29 months in 2020.
For example, the preset time period may be a fixed time period; for example, the preset time period may be a non-fixed time period.
It is understood that the IP address allocated by the operator to the same city at different times may change, for example, assuming that the period for the operator to re-allocate the IP address to the city is 3 months, for example, during 1 month to 3 months in 2020, the IP address a is allocated to beijing city, and during 4 months to 6 months in 2020, the IP address a is allocated to hebei province shijiazhuan city. Therefore, the location information corresponding to the same IP address may be different at different times. The preset time period may be set appropriately, for example, the preset time period is less than or equal to the minimum period for the operator to re-allocate the IP address to the city, so that the associated positioning data obtained in step S42 are all accurate; or, if the time for the operator to reallocate the IP address is known, the starting time of the preset time period is later than or equal to the time for the operator closest to the current time to reallocate the IP address for the city.
Assuming that the operator reallocates the IP address to each city at 9/10/2020 and does not change the IP address, the operator closest to the current time (assuming that the current time is 9/29/2020) reallocates the IP address to each city at 9/10/2020. Then, the starting time of the preset time period may be later than or equal to 9/10 of 2020, for example, the preset time period may be from 10/9 of 2020 to 29/9 of 2020, or from 11/9 of 2020 to 29/9 of 2020.
In an alternative implementation, the preset time period may be randomly determined.
In step S43, a first number of electronic devices included in the one or more associated positioning data is obtained according to the device identifiers included in the one or more associated positioning data.
Assuming that the number of associated positioning data obtained in step S42 is 10, the associated positioning data is represented by a table, and the table is a table including 10 associated positioning data, as shown in table 2.
TABLE 2
One row includes one or more associated positioning data, and table 2 explains that one row includes one associated positioning data as an example, and it can be known from table 2 that, for the same IP address, the same electronic device may report associated positioning data for many times, for example, an electronic device with device identifier 01 reports associated positioning data twice, and an electronic device with device identifier 06 reports associated positioning data twice; for an IP address, an electronic device may report associated positioning data, for example, the electronic device with device id 02, the electronic device with device id 03, and so on.
Based on the device identifications included in the one or more associated positioning data obtained in step S42, a first number may be obtained, as shown in table 2, where 10 associated positioning data include 8 different device identifications, so that the first number is 8.
In step S44, if the first number is greater than or equal to a first threshold, the location information of the IP address is determined based on the location information included in the one or more associated positioning data.
For example, if the first number is smaller than the first threshold, the IP address is determined to be the IP address of the location information to be determined.
It is understood that the same IP address can be assigned to different electronic devices at different times, and the greater the first number, the more accurate the location information of the IP address determined at step S44. The smaller the first number, the less accurate the location information of the IP address determined at step S44. The reasons may be as follows:
in an optional implementation manner, the operator may allocate a policy to the IP address of the mobile base station as follows: an IP address is assigned to a city of a province. Under the allocation policy, for the same IP address, the location information in the associated positioning data reported by different electronic devices should be the same, but there are two cases that may cause the location information in the associated positioning data reported by different electronic devices to be different.
In the first case, the location information in the associated positioning data reported by the electronic device is the location information of the positioning error of the electronic device.
For example, the city in which the electronic device is located is the baoding city of Hebei province, but the city in which the electronic device for GPS or BDS positioning is located is the Beijing city. Then, the associated positioning data reported by the electronic device includes: the device identification of the electronic device, the IP address used by the electronic device and the position information comprise China and Beijing.
In the second case, the IP address in the associated location data reported by the electronic device is a false IP address set by the user of the electronic device.
For example, the city where the electronic device is located is the province's city of Hebei province, the real IP address used by the electronic device is IP address A, but the user held by the electronic device sets the IP address used by the electronic device to be a false IP address B, which is the IP address B allocated by the operator to Shanghai city. Then, the associated positioning data reported by the electronic device includes the device identifier of the electronic device, the IP address B used by the electronic device, and the location information includes china, north province, and baoding city.
However, the probability of occurrence of the two cases is low, so that the ratio of the number of the electronic devices in which the first case or the second case occurs to the first number is lower as the first number is larger, that is, a small number of the associated positioning data obtained in step S42 are wrong, and most of the associated positioning data are accurate, so that the accuracy of the position information corresponding to the IP address determined in step S43 is higher.
For example, the first threshold may be determined based on actual conditions, and the embodiment of the present application does not limit a specific value of the first threshold.
In the positioning method provided by the embodiment of the present disclosure, for an IP address of location information to be determined, one or more associated positioning data may be obtained, where the associated positioning data includes the IP address, a device identifier of an electronic device using the IP address, and location information of the electronic device when the IP address is used, and since the IP address is dynamically allocated, the same IP address may be allocated to different electronic devices in different time periods, and therefore, the device identifiers included in the obtained different associated positioning data may not be completely the same; a first number of electronic devices included in the one or more associated positioning data may be obtained according to the device identifier included in the one or more associated positioning data, that is, the IP address is used by a first number of electronic devices at different times. If the first number is greater than or equal to a first threshold, determining the location information of the IP address based on the location information included in the one or more associated positioning data. It can be understood that the larger the first number is, the more accurate the obtained location information of the IP address is based on the location information included in the one or more associated positioning data, and if the first number is greater than or equal to the first threshold, it indicates that more electronic devices have used the IP address, so that the accuracy of the obtained location information of the IP address is improved.
In an alternative implementation manner, there are various manners in which the server 13, the server 23, or the server 33 implements step S42, and the embodiment of the present disclosure provides, but is not limited to, the following manners. The first implementation of step S42 includes steps a1 through A3.
In step a1, at least one data packet reported by each of the plurality of electronic devices is obtained.
The data packet reported by the electronic equipment comprises the equipment identification of the electronic equipment, the IP address used by the electronic equipment and the position information of the electronic equipment when the IP address is used.
For example, the data packets reported by the electronic device may be reported by the client.
For example, in the process of operating the client, the electronic device may upload data based on the client, and the client uploads the data to the server by transmitting the data in the form of data packets.
Illustratively, the uploaded data may be at least one of User Generated Content (UGC), video, picture, text, audio for the User.
Illustratively, the user-generated content includes, but is not limited to, at least one of user comments, barracks, praises.
The following describes a process of reporting a data packet by a client, taking the client as a short video client as an example.
After the user performs the praise operation on the short video displayed by the client, the client generates a data packet and uploads the data packet to the server; when a user executes the operation of refreshing and displaying the video at a client, a data packet requesting the video is generated and uploaded to a server; after a user comments on the short video displayed by the client, a data packet is generated and uploaded to the server; after the user shoots the short video, the short video can be uploaded to the server in the form of a data packet.
In an optional implementation manner, the server 13, the server 23, or the server 33 may obtain a data packet reported by a corresponding client, for example, if the client is a wechat client, the server 13, the server 23, or the server 33 is a server corresponding to the wechat client; if the client is a short video client, the server 13, the server 23, or the server 33 may be a CDN server corresponding to the short video client. In the embodiment of the present disclosure, a server corresponding to a certain client refers to a server providing a service for the client.
In step a2, for each data packet, the data packet is parsed to obtain associated location data including a device identifier of the electronic device, an IP address used by the electronic device, and location information of the electronic device when the IP address is used.
For example, the reporting time of the data packet reported by the electronic device may also be obtained.
In an optional implementation manner, the associated positioning data corresponding to the plurality of reporting times may be stored, and the storage manner of the associated positioning data corresponding to the plurality of reporting times may be any one of a table, a function, and a linked list. The following description will be made by taking a table as an example. As shown in table 3, the associated positioning data tables correspond to a plurality of reporting times, respectively.
TABLE 3
In table 3, it is described by taking an example of associated positioning data corresponding to one row serving as one reporting time, for example, the associated positioning data may further include a user identifier, and for example, the user identifier may be a user account for logging in the client; for example, the associated positioning data may not include a user identification.
In step a3, associated positioning data including the IP address mentioned in step S41 is obtained from a plurality of associated positioning data. Alternatively, in step a3, the associated positioning data including the IP address mentioned in step S41 and the reporting time belonging to the preset time period are obtained from the associated positioning data corresponding to the reporting times, respectively.
The following describes the implementation of step S44. Step S44 relates to various situations in the implementation process, and the embodiment of the present disclosure provides, but is not limited to, the following two situations.
In the first case, if the location information included in the one or more associated positioning data obtained in step S42 is the same, it is determined that the location information of the IP address is the location information included in the one or more associated positioning data.
The second case, includes the following step C1 to step C3.
In step C1, if the position information included in the one or more associated positioning data is not exactly the same, the associated positioning data with the same position information is divided into the same position information set to obtain a plurality of position information sets.
Still taking table 2 as an example for explanation, the 10 associated positioning data in table 2 are divided into two position information sets, where the first position information set includes: {01, 192.0.0.0, china hebei province stone manor market }, {01, 192.0.0, china hebei province stone manor market }, {02, 192.0.0, china hebei province stone manor market }, {04, 192.0.0.0, china hebei province stone manor market }, {05, 192.0.0.0, china hebei province stone manor market }, {06, 192.0.0.0, china hebei province stone manor market }, {07, 192.0.0.0, china hebei province stone manor market }, {08, 192.0.0, and china hebei province stone manor market }; the second set of location information includes: {03, 192.0.0.0, Beijing, China }.
In step C2, a target position information set containing the largest number of associated positioning data is obtained from the plurality of position information sets.
Still taking the above table 2 as an example, the determined target position information set of the two position information sets is the first position information set.
In step C3, the location information of the IP address is determined based on the location information in the associated positioning data contained in the set of target location information.
In an alternative implementation, the implementation of step C3 is various, and the disclosed embodiment provides, but is not limited to, the following two.
The first step C3 is implemented by: and determining the position information in the associated positioning data contained in the target position information set as the position information of the IP address.
Still taking table 2 as an example, the location information corresponding to the IP address of the location information to be determined is china, hebei province, shijiazhuang city.
In an optional implementation manner, the IP address allocation policy of the operator to the mobile base station includes two types, a first allocation policy that one IP address is allocated to one city of one province, and a second allocation policy that one IP address is allocated to a plurality of cities of one province.
Under the first allocation policy, since an IP address is allocated to a city of a province, most of the location information in the associated positioning data including the same IP address reported by different electronic devices is the same (see the first and second cases involved in the description of step S44, which is not described herein again), the difference between the number of associated positioning data included in the target location information set and the number of associated positioning data included in other location information sets is very large, for example, the difference between the number of associated data included in the first location information set and the number of associated data included in the second location information set is 9, so that the accuracy of the result obtained by the implementation manner of the first step C3 is high.
Under the second allocation strategy, since the same IP address is allocated to multiple cities of a province, the probability that multiple electronic devices located in different cities report associated positioning data including the IP address is the same, and thus the difference between the numbers of associated positioning data included in different location information sets is not very large, for example, the number of associated positioning data included in one location information set and the number of associated positioning data included in a target location information set are only different by 1, and the accuracy of the result obtained by the implementation manner of the first step C3 is low.
Based on this, there is provided an implementation manner of the second step C3, the method includes steps C31 to C32.
In step C31, a ratio of a second quantity, which is the quantity of associated positioning data comprised by the set of target position information, to the quantity of the one or more associated positioning data is determined.
In step C32, if the ratio is greater than or equal to the second threshold, the location information in the associated positioning data included in the target location information set is determined as the location information of the IP address.
For example, if the ratio is greater than or equal to the second threshold, it indicates that the IP address allocation policy of the operator to the mobile base station should be the first allocation policy and not the second allocation policy, so the location information in the associated positioning data included in the target location information set may be determined as the location information of the IP address.
For example, the second threshold may be determined based on actual conditions, assuming that the second threshold is 80%.
Still taking table 2 as an example, the first position information set includes the number of associated positioning data, that is, the second number is 9, and the number of the associated positioning data is 10; the ratio is 9/10-90% > 80%, so the position information corresponding to the IP address is the Shijiazhuang city in Hebei province in China.
Exemplary, also include: in step C33, if the ratio is smaller than the second threshold, the IP address is determined as the IP address of the location information to be determined.
For example, if the ratio is smaller than the second threshold, it indicates that the IP address allocation policy of the operator for the mobile base station may be the second allocation policy, and therefore, the location information corresponding to the IP address cannot be determined.
It can be understood that, after the IP address is allocated to the electronic device, the electronic device may report the associated positioning data for many times frequently before the IP address is not released, where multiple associated positioning data reported by the electronic device are the same, and the multiple associated positioning data are redundant data, and if the one or more associated positioning data obtained in step S42 include multiple associated positioning data frequently reported when the same electronic device occupies the same IP address, the location information corresponding to the IP address obtained in step S42 is inaccurate.
Based on this, for example, the embodiment of the present disclosure provides the following specific implementation manner of step S42, which includes step E1 to step E4.
In step E1, a plurality of candidate associated positioning data and reporting times corresponding to the plurality of candidate associated positioning data are obtained, where the candidate associated positioning data includes the IP address, the device identifier of the electronic device using the IP address, and the location information of the electronic device when the IP address is used.
In step E2, the same candidate associated positioning data is divided into the same candidate data set to obtain at least one candidate data set, where at least one candidate associated positioning data included in the candidate data set is sorted according to the reporting time.
Since the plurality of candidate associated positioning data are all IP addresses containing the position information to be determined, the same candidate associated positioning data referred to in step E2 means that the device identifier and the position information are the same. Illustratively, the two candidate associated positioning data are the same, i.e. the device identifiers in the two candidate associated positioning data are the same, and the position information in the two candidate associated positioning data is the same.
It can be understood that the same candidate associated positioning data is reported by the same electronic device.
Illustratively, at least one candidate associated positioning data included in the candidate data set is sorted according to reporting time, and the sorting may be ascending sorting or descending sorting.
In step E3, an object candidate associated positioning data is extracted from at least one candidate associated positioning data included in each candidate data set at intervals of at least a preset reporting time period.
For example, assuming that at least one candidate associated positioning data included in the candidate data set is sorted according to ascending reporting time, the implementation procedure of step E3 may include step E31, step E35.
In step E31, a first time period is obtained, where a start time of the first time period is a reporting time corresponding to a first candidate associated positioning data in the candidate data set, and an end time of the first time period is a sum of a preset reporting time period and a reporting time corresponding to the first candidate associated positioning data in the candidate data set.
In step E32, an object candidate associated positioning data is extracted from one or more candidate associated positioning data reported in the candidate data set and having a first time period.
In step E33, an ith time period is obtained, where the start time of the ith time period is the end time of the ith-1 time period, and the end time of the ith time period is the sum of the end time of the ith-1 time period and a preset reporting time period.
The initial value of i is 2.
In step E34, an object candidate associated positioning data is extracted from one or more candidate associated positioning data whose reported time belongs to the ith time period in the candidate data set.
In step E35, i ═ i +1, return to step E33 until the maximum value of the i-th time period is greater than or equal to the maximum reporting time in the candidate data set.
For example, the preset reporting time period may be determined based on an actual situation, and the preset reporting time period is not limited in this disclosure, for example, the preset reporting time period is 3 days, 4 days, or 5 days.
It can be understood that, since at least one associated positioning data included in the candidate data set is sorted according to the reporting time, one target candidate associated positioning data can be extracted from the candidate data set every preset reporting time period, and the extracted target candidate associated positioning data is the associated positioning data.
Exemplarily, if the candidate data set includes a candidate associated positioning data, the candidate associated positioning data is the associated positioning data; if the candidate data set includes a plurality of candidate associated positioning data, if a difference between a maximum reporting time and a minimum reporting time in the plurality of candidate associated positioning data is smaller than a preset reporting time period, one target candidate associated positioning data may be extracted from the plurality of candidate associated positioning data included in the candidate data set. If the candidate data set includes a plurality of candidate associated positioning data, if a difference between a maximum reporting time and a minimum reporting time in the plurality of candidate associated positioning data is greater than or equal to a preset reporting time period, two or more target candidate associated positioning data may be extracted from the plurality of candidate associated positioning data included in the candidate data set.
Assuming that the preset reporting time period is 1 day, the candidate data set comprises: candidate associated positioning data 1{ device identifier a, IP address 1, location information 1} corresponding to 10 am at 9/2/2020, and candidate associated positioning data 2{ device identifier a, IP address 1, location information 1} corresponding to 10 am at 9/2/2020, are reported 30, and the first time period is [ 10 am at 9/2/2020, 10 am at 9/3/2020), because the reporting time of the two candidate associated positioning data all belongs to the first time period, a target candidate associated positioning data can be extracted from the candidate data set.
In step E4, the extracted target candidate associated positioning data is determined as the associated positioning data.
In an optional implementation manner, the IP address of the location information to be determined refers to location information that lacks city information and is obtained from an IP address base, and because the country information and the province information corresponding to the IP address that has been obtained from the IP address base, in the embodiment of the present disclosure, the country information and the province information included in the city default location information corresponding to the IP address that is obtained from the IP address base are considered to be accurate. Based on this, the step E1 of acquiring a plurality of candidate associated positioning data includes the following steps F1 to F3.
In step F1, a plurality of original associated positioning data is obtained, where the original associated positioning data includes the IP address, the device identifier of the electronic device using the IP address, and the location information of the electronic device when the IP address is used.
For example, the country information in the location information contained in the raw associated positioning data may be the same as or different from the country information in the default location information of the city; the province information in the location information contained in the original associated positioning data may be the same as or different from the province information in the default location information of the city.
In step F2, the city default location information corresponding to the IP address is obtained by querying from an address library, and the city default location information is composed of country information and province information.
For example, in the embodiment of the present disclosure, it is considered that the country information and province information included in the original associated positioning data should be the same as the country information and city information in the default location information of the city, and if they are different, it is considered that the original associated positioning data is incorrect, and then the original associated positioning data is excluded.
In step F3, the plurality of candidate associated positioning data are obtained from the plurality of original associated positioning data, the country information in the position information included in the candidate associated positioning data is the same as the country information in the default position information of the city, and the province information in the position information included in the candidate associated positioning data is the same as the province information in the default position information of the city.
The method is described in detail in the embodiments disclosed in the present application, and the method of the present application can be implemented by using various types of apparatuses, so that various apparatuses are also disclosed in the present application, and specific embodiments are given below for detailed description.
FIG. 5 is a block diagram illustrating a positioning device according to an exemplary embodiment. Referring to fig. 5, the apparatus includes a first obtaining module 51, a second obtaining module 52, a third obtaining module 53, and a first determining module 54.
A first obtaining module 51 configured to obtain an internet protocol IP address of the location information to be determined;
a second obtaining module 52, configured to obtain one or more associated positioning data, where the associated positioning data includes the IP address, a device identifier of an electronic device using the IP address, and location information of the electronic device when the IP address is used;
a third obtaining module 53, configured to obtain, according to the device identifier included in the one or more associated positioning data, a first number of electronic devices included in the one or more associated positioning data;
a first determining module 54 configured to determine location information of the IP address based on location information included in the one or more associated positioning data if the first number is greater than or equal to a first threshold.
In an optional implementation manner, the first determining module is specifically configured to:
a first determining unit, configured to determine, if the location information included in the one or more pieces of associated positioning data is the same, that the location information of the IP address is the location information included in the one or more pieces of associated positioning data;
the first dividing unit is configured to divide the associated positioning data with the same position information into the same position information set to obtain a plurality of position information sets if the position information included in the one or more associated positioning data is not completely the same;
a first acquisition unit configured to acquire a target position information set containing the largest number of associated positioning data from the plurality of position information sets;
a second determining unit configured to determine the location information of the IP address based on the location information in the associated positioning data included in the set of target location information.
In an optional implementation manner, the second determining unit is specifically configured to:
a first determining subunit configured to determine, as the location information of the IP address, the location information in the associated positioning data included in the target location information set.
In an optional implementation manner, the second determining unit is specifically configured to:
a second determining subunit configured to determine a ratio of a second quantity to the quantity of the one or more associated positioning data, the second quantity being the quantity of associated positioning data contained in the set of target position information;
a third determining subunit, configured to determine, if the ratio is greater than or equal to a second threshold, location information in the associated positioning data included in the target location information set as location information of the IP address.
In an optional implementation manner, the second determining unit further includes: a fourth determining subunit configured to determine the IP address as the IP address of the location information to be determined, if the ratio is smaller than the second threshold.
In an optional implementation manner, the second obtaining module is specifically configured to:
a second obtaining unit, configured to obtain a plurality of candidate associated positioning data and reporting times corresponding to the plurality of candidate associated positioning data, where the candidate associated positioning data includes the IP address, a device identifier of an electronic device using the IP address, and location information of the electronic device when the IP address is used;
the second dividing unit is configured to divide the same candidate associated positioning data into the same candidate data set to obtain at least one candidate data set, wherein the at least one associated positioning data included in the candidate data set is sorted according to the reporting time;
the extraction unit is configured to extract at least one target candidate associated positioning data every at least a preset reporting time period from at least one candidate associated positioning data included in each candidate data set;
a third determining unit configured to determine the extracted object candidate associated positioning data as the associated positioning data.
In an optional implementation manner, the location information included in the associated positioning data includes country information, province information, and city information, and the second obtaining unit is specifically configured to:
a third obtaining unit configured to obtain a plurality of original associated positioning data, where the original associated positioning data includes the IP address, a device identifier of an electronic device using the IP address, and location information of the electronic device when the IP address is used;
the inquiry unit is configured to acquire city default position information corresponding to the IP address from an address library, wherein the city default position information consists of country information and province information;
a fourth obtaining unit configured to obtain the plurality of candidate associated positioning data from the plurality of original associated positioning data, where the candidate associated positioning data includes position information in which country information is the same as that in the default position information of the city, and the candidate associated positioning data includes position information in which province information is the same as that in the default position information of the city.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 6 is a block diagram illustrating a server in accordance with an example embodiment. Servers include, but are not limited to: a processor 501, a memory 502, a network interface 503, an I/O controller 504, and a communication bus 505.
It should be noted that the structure of the server shown in fig. 5 is not limited to the server, and the server may include more or less components than those shown in fig. 5, or some components may be combined, or a different arrangement of components may be used, as will be understood by those skilled in the art.
The following describes each component of the server in detail with reference to fig. 5:
the processor 501 is a control center of the server, connects various parts of the entire server using various interfaces and lines, and performs various functions of the server and processes data by running or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, thereby performing overall monitoring of the server. Processor 501 may include one or more processing units; optionally, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 501.
the Memory 502 may include Memory, such as Random-Access Memory (RAM) 5021 and Read-Only Memory (ROM) 5022, and may also include a mass storage device 5023, such as at least 1 disk storage. Of course, the server may also include hardware needed for other services.
The memory 502 is used for storing the executable instructions of the processor 501. The processor 501 is configured to perform any one of the steps of the positioning method embodiments.
A wired or wireless network interface 503 is configured to connect the server to a network.
The processor 501, the memory 502, the network interface 503, and the I/O controller 504 may be connected to each other by a communication bus 505, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc.
In an exemplary embodiment, the server may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described electronic resource transmission method.
In an exemplary embodiment, a computer-readable storage medium comprising instructions, such as the memory 502 comprising instructions, executable by the processor 501 of the server to perform the method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer, wherein the memory is included in the memory 502 of the server and contains software codes, and the computer program can be loaded into the computer and executed to implement the positioning method as described above.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A method of positioning, comprising:
acquiring an Internet Protocol (IP) address of position information to be determined;
acquiring one or more associated positioning data, wherein the associated positioning data comprises the IP address, an equipment identifier of the electronic equipment using the IP address and position information of the electronic equipment when the IP address is used;
acquiring a first number of electronic devices included in the one or more associated positioning data according to the device identifiers included in the one or more associated positioning data;
if the first number is greater than or equal to a first threshold, determining the location information of the IP address based on the location information included in the one or more associated positioning data.
2. The positioning method of claim 1, wherein the determining the location information of the IP address based on the location information included in the one or more associated positioning data comprises:
if the position information contained in the one or more associated positioning data is the same, determining that the position information of the IP address is the position information contained in the one or more associated positioning data;
if the position information contained in the one or more associated positioning data is not completely the same, dividing the associated positioning data with the same position information into the same position information set to obtain a plurality of position information sets;
obtaining a target position information set containing the maximum number of associated positioning data from the plurality of position information sets;
and determining the position information of the IP address based on the position information in the associated positioning data contained in the target position information set.
3. The positioning method according to claim 2, wherein the step of determining the location information of the IP address based on the location information in the associated positioning data included in the set of target location information comprises:
and determining the position information in the associated positioning data contained in the target position information set as the position information of the IP address.
4. The positioning method according to claim 2, wherein the step of determining the location information of the IP address based on the location information in the associated positioning data included in the set of target location information comprises:
determining a ratio of a second quantity to a quantity of the one or more associated positioning data, the second quantity being a quantity of associated positioning data contained in the set of target location information;
and if the ratio is larger than or equal to a second threshold value, determining the position information in the associated positioning data contained in the target position information set as the position information of the IP address.
5. The positioning method according to any one of claims 1 to 4, wherein said step of obtaining one or more associated positioning data comprises:
acquiring a plurality of candidate associated positioning data and reporting time corresponding to the candidate associated positioning data, wherein the candidate associated positioning data comprises the IP address, an equipment identifier of electronic equipment using the IP address and position information of the electronic equipment when the IP address is used;
dividing the same candidate associated positioning data into the same candidate data set to obtain at least one candidate data set, wherein the at least one associated positioning data contained in the candidate data set is sorted according to the reporting time;
extracting at least one target candidate associated positioning data from at least one candidate associated positioning data contained in each candidate data set at intervals of at least a preset reporting time period;
and determining the extracted target candidate associated positioning data as the associated positioning data.
6. The positioning method according to claim 5, wherein the associated positioning data includes location information including country information, province information and city information, and the step of obtaining a plurality of candidate associated positioning data comprises:
acquiring a plurality of original associated positioning data, wherein the original associated positioning data comprise the IP address, an equipment identifier of the electronic equipment using the IP address and position information of the electronic equipment when the IP address is used;
inquiring and obtaining city default position information corresponding to the IP address from an address library, wherein the city default position information consists of country information and province information;
obtaining a plurality of candidate associated positioning data from the plurality of original associated positioning data, wherein the country information in the position information contained in the candidate associated positioning data is the same as the country information in the default position information of the city, and the province information in the position information contained in the candidate associated positioning data is the same as the province information in the default position information of the city.
7. A positioning device, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire an Internet Protocol (IP) address of position information to be determined;
the second acquisition module is configured to acquire one or more associated positioning data, wherein the associated positioning data comprises the IP address, the device identifier of the electronic device using the IP address and the position information of the electronic device when the IP address is used;
a third obtaining module configured to obtain a first number of electronic devices included in the one or more associated positioning data according to the device identifiers included in the one or more associated positioning data;
a first determining module configured to determine location information of the IP address based on location information included in the one or more associated positioning data if the first number is greater than or equal to a first threshold.
8. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the positioning method of any one of claims 1 to 6.
9. A computer-readable storage medium, wherein instructions, when executed by a processor of a server, enable the server to perform the positioning method of any one of claims 1 to 6.
10. A computer program product directly loadable into the internal memory of a computer, said memory being the memory comprised by the server according to claim 8 and containing software code, said computer program being loadable and executable via the computer to enable the positioning method according to any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110295660.7A CN113067913B (en) | 2021-03-19 | 2021-03-19 | Positioning method, device, server, medium and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110295660.7A CN113067913B (en) | 2021-03-19 | 2021-03-19 | Positioning method, device, server, medium and product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113067913A true CN113067913A (en) | 2021-07-02 |
CN113067913B CN113067913B (en) | 2022-12-09 |
Family
ID=76562342
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110295660.7A Active CN113067913B (en) | 2021-03-19 | 2021-03-19 | Positioning method, device, server, medium and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113067913B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115277823A (en) * | 2022-07-08 | 2022-11-01 | 北京达佳互联信息技术有限公司 | Positioning method, positioning device, electronic equipment and storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100125675A1 (en) * | 2008-11-17 | 2010-05-20 | Richardson David R | Updating routing information based on client location |
CN104253879A (en) * | 2014-09-15 | 2014-12-31 | 北京锐安科技有限公司 | IP (Internet protocol) address-based position calibration method and IP address-based position calibration device |
CN104935676A (en) * | 2014-03-17 | 2015-09-23 | 阿里巴巴集团控股有限公司 | Method and device for determining IP address fields and corresponding latitude and longitude |
CN107612946A (en) * | 2017-11-03 | 2018-01-19 | 北京奇艺世纪科技有限公司 | Detection method, detection means and the electronic equipment of IP address |
WO2019128355A1 (en) * | 2017-12-29 | 2019-07-04 | 北京京东尚科信息技术有限公司 | Method and device for determining accurate geographic location |
CN110300084A (en) * | 2018-03-22 | 2019-10-01 | 北京京东尚科信息技术有限公司 | A kind of IP address-based portrait method and apparatus |
CN111343301A (en) * | 2020-04-21 | 2020-06-26 | 北京字节跳动网络技术有限公司 | Positioning method, positioning device, electronic equipment and storage medium |
CN112153091A (en) * | 2019-06-27 | 2020-12-29 | 北京百度网讯科技有限公司 | Method and device for determining relevance of equipment |
-
2021
- 2021-03-19 CN CN202110295660.7A patent/CN113067913B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100125675A1 (en) * | 2008-11-17 | 2010-05-20 | Richardson David R | Updating routing information based on client location |
CN104935676A (en) * | 2014-03-17 | 2015-09-23 | 阿里巴巴集团控股有限公司 | Method and device for determining IP address fields and corresponding latitude and longitude |
CN104253879A (en) * | 2014-09-15 | 2014-12-31 | 北京锐安科技有限公司 | IP (Internet protocol) address-based position calibration method and IP address-based position calibration device |
CN107612946A (en) * | 2017-11-03 | 2018-01-19 | 北京奇艺世纪科技有限公司 | Detection method, detection means and the electronic equipment of IP address |
WO2019128355A1 (en) * | 2017-12-29 | 2019-07-04 | 北京京东尚科信息技术有限公司 | Method and device for determining accurate geographic location |
CN110300084A (en) * | 2018-03-22 | 2019-10-01 | 北京京东尚科信息技术有限公司 | A kind of IP address-based portrait method and apparatus |
CN112153091A (en) * | 2019-06-27 | 2020-12-29 | 北京百度网讯科技有限公司 | Method and device for determining relevance of equipment |
CN111343301A (en) * | 2020-04-21 | 2020-06-26 | 北京字节跳动网络技术有限公司 | Positioning method, positioning device, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115277823A (en) * | 2022-07-08 | 2022-11-01 | 北京达佳互联信息技术有限公司 | Positioning method, positioning device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113067913B (en) | 2022-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106534392B (en) | Positioning information acquisition method, positioning method and device | |
CN107786621B (en) | User information management method, access processing method, device and system | |
CN106534478B (en) | Map information display system based on asynchronous loading | |
CN110300084B (en) | IP address-based portrait method and apparatus, electronic device, and readable medium | |
CN110830604B (en) | DNS scheduling method and device | |
CN106210163B (en) | IP address-based localization method and device | |
CN112839067B (en) | Data synchronization method and device | |
CN106027693B (en) | IP address-based localization method and device | |
US9026489B2 (en) | Updating a conference invitation responsive to user location | |
CN113067913B (en) | Positioning method, device, server, medium and product | |
CN111988387A (en) | Interface request processing method, device, server, equipment and storage medium | |
CN106789147B (en) | Flow analysis method and device | |
TW202024964A (en) | User position determination method and apparatus, device, and computer readable storage medium | |
CN103874014A (en) | Terminal location information-based business service method, service provision device and terminal | |
CN111814020A (en) | Data acquisition method and device | |
CN107172129B (en) | Server configuration method and device | |
CN105871972A (en) | Video resource distributed cathe method, device and system | |
CN110401709A (en) | Processing method, device and the storage medium of session in a kind of instant messaging application | |
CN108696549B (en) | Load balancing method, device and system | |
CN109769202B (en) | Method and device for positioning flow data, storage medium and server | |
CN108763498B (en) | User identity identification method and device, electronic equipment and readable storage medium | |
CN107562815B (en) | Statistical method and device for client application platform | |
CN113190745B (en) | Information sending method, information sending device, electronic equipment and computer readable medium | |
CN108092785A (en) | A kind of big data analysis system based on NIWO social software systems | |
CN111049710A (en) | Method and device for accessing server |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |