Street-level IP positioning method, device, electronic device and storage medium

By constructing global heterogeneous graph and local graph models, the problems of low positioning coverage, difficulty in improving accuracy and low efficiency in the existing street-level IP positioning methods are solved, and more efficient and more accurate street-level IP positioning is achieved.

CN118646789BActive Publication Date: 2025-02-11TSINGHUA UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410880627.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2025-02-11
Estimated Expiration
2044-07-02

AI Technical Summary

Technical Problem

The existing street-level IP positioning methods have problems such as low positioning coverage, difficulty in improving positioning accuracy and low positioning efficiency.

Method used

By constructing a global heterogeneous graph based on geospatial graphs and cyberspace graphs, a global corpus is built and the initial pretrained model is trained to obtain the pretrained model. Then, based on the pre-trained model, the positioning representation vectors corresponding to the multiple related landmarks of the target IP address are determined, and a local graph model is constructed, and the street-level geographical location of the target IP address is finally predicted based on the local graph model.

Benefits of technology

It improves the positioning coverage, positioning accuracy and positioning efficiency of street-level IP positioning, and can be suitable for IP geolocation worldwide.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118646789B_ABST
    Figure CN118646789B_ABST
Patent Text Reader

Abstract

The present invention provides a street-level IP positioning method, device, electronic device and storage medium, and relates to the field of IP positioning technology. The method includes: constructing a global heterogeneous graph based on a geographic space graph and a network space graph; the geographic space graph includes multiple landmarks and the geographical distances between the landmarks, and the network space graph includes multiple landmarks and the network distances between the landmarks; constructing a global corpus based on the global heterogeneous graph, and training an initial pre-training model based on the global corpus to obtain a pre-training model; determining the positioning representation vectors corresponding to multiple relevant landmarks of a target IP address based on the pre-training model, and constructing a local graph model based on multiple relevant landmarks and the positioning representation vectors corresponding to multiple relevant landmarks; predicting the street-level geographical location of the target IP address based on the local graph model. The present invention can improve the positioning coverage, positioning accuracy and positioning efficiency of street-level IP positioning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of IP positioning technology, and in particular to a street-level IP positioning method, device, electronic equipment and storage medium. Background Art

[0002] At present, street-level Internet Protocol (IP) positioning technology analyzes landmark data containing geographic location information, and directly or indirectly calculates the geographic location of the target IP through network measurement, data mining, feature engineering and other technologies. It has a wide range of applications in the fields of precise online advertising delivery, privacy protection, tracking and tracing, information push, account protection and so on.

[0003] Common street-level IP positioning methods include: street-level IP positioning methods based on network measurement and street-level IP positioning methods based on machine learning. These methods have the problems of low street-level IP positioning coverage, difficulty in improving positioning accuracy, and low positioning efficiency. Summary of the invention

[0004] The present invention provides a street-level IP positioning method, device, electronic device and storage medium, which are used to achieve the purpose of improving the positioning coverage, positioning accuracy and positioning efficiency of street-level IP positioning.

[0005] The present invention provides a street-level IP positioning method, comprising:

[0006] Constructing a global heterogeneous graph based on a geographic space graph and a network space graph; the geographic space graph includes a plurality of landmarks and geographic distances between the landmarks, and the network space graph includes a plurality of landmarks and network distances between the landmarks;

[0007] Building a global corpus based on the global heterogeneous graph, and training an initial pre-trained model based on the global corpus to obtain a pre-trained model;

[0008] Determine, based on the pre-trained model, the location representation vectors corresponding to each of the multiple relevant landmarks of the target IP address, and construct a local graph model based on the multiple relevant landmarks and the location representation vectors corresponding to each of the multiple relevant landmarks;

[0009] A street-level geographic location of the target IP address is predicted based on the local graph model.

[0010] According to a street-level IP positioning method provided by the present invention, the positioning representation vectors corresponding to the multiple relevant landmarks of the target IP address are determined based on the pre-trained model, including:

[0011] Selecting the multiple relevant landmarks of the target IP address based on the global heterogeneous graph;

[0012] constructing a local corpus based on network measurement information of the plurality of relevant landmarks;

[0013] The local corpus is input into the pre-trained model for processing to obtain the positioning representation vectors corresponding to each of the multiple relevant landmarks.

[0014] According to a street-level IP positioning method provided by the present invention, the selecting the multiple relevant landmarks of the target IP address based on the global heterogeneous graph includes:

[0015] Select any one of the landmarks from the global heterogeneous graph, start traversing the global heterogeneous graph, and calculate the joint probability of the geographical distance and the network distance between the target IP address and the landmark;

[0016] The landmarks with the largest joint probability are selected in sequence from the joint probabilities as the relevant landmarks until the number of the selected landmarks reaches a preset number.

[0017] According to a street-level IP positioning method provided by the present invention, the global heterogeneous graph is constructed based on the geographic space graph and the network space graph, including:

[0018] Fusing the geographic space graph and the network space graph to obtain an initial global heterogeneous graph;

[0019] The edges in the initial global heterogeneous graph that do not meet the preset constraint conditions are pruned to obtain the global heterogeneous graph.

[0020] According to a street-level IP positioning method provided by the present invention, the fusion of the geographic space map and the network space map to obtain an initial global heterogeneous map includes:

[0021] The initial global heterogeneous graph is constructed with the multiple landmarks as nodes and the geographical distances and the network distances between the landmarks as edges.

[0022] According to a street-level IP positioning method provided by the present invention, the edges in the initial global heterogeneous graph that do not meet the preset constraint conditions are pruned to obtain the global heterogeneous graph, including:

[0023] The edges in the initial global heterogeneous graph that do not satisfy the conditions that the geographical distance is less than the geographical distance threshold and the network distance is less than the network distance threshold are pruned to obtain the global heterogeneous graph.

[0024] According to a street-level IP positioning method provided by the present invention, the global corpus is constructed based on the global heterogeneous graph, comprising:

[0025] A deep walk sampling is performed on the global heterogeneous graph to obtain the global corpus.

[0026] The present invention also provides a street-level IP positioning device, comprising:

[0027] A first construction module is used to construct a global heterogeneous graph based on a geographic space graph and a network space graph; the geographic space graph includes a plurality of landmarks and geographic distances between the landmarks, and the network space graph includes the plurality of landmarks and network distances between the landmarks;

[0028] A second construction module is used to construct a global corpus based on the global heterogeneous graph;

[0029] A model training module, used for training the initial pre-training model based on the global corpus to obtain a pre-training model;

[0030] A vector determination module, used to determine the positioning representation vectors corresponding to each of the multiple relevant landmarks of the target IP address based on the pre-trained model;

[0031] A third construction module is used to construct a local graph model based on the multiple relevant landmarks and the positioning representation vectors corresponding to the multiple relevant landmarks;

[0032] A positioning prediction module is used to predict the street-level geographic location of the target IP address based on the local graph model.

[0033] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a street-level IP positioning method as described above is implemented.

[0034] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the street-level IP positioning method as described in any one of the above is implemented.

[0035] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the street-level IP positioning method as described above is implemented.

[0036] The present invention provides a street-level IP positioning method, device, electronic device and storage medium. First, a global heterogeneous graph is constructed based on a geographic space graph and a network space graph. The geographic space graph includes a plurality of landmarks and the geographic distances between the landmarks. The network space graph includes a plurality of landmarks and the network distances between the landmarks. The network space graph is not limited to a certain geographic area and network area, has extremely high coverage, and is applicable to global IP geographic positioning. Then, a global corpus is constructed based on the global heterogeneous graph. The global corpus can be used to perform offline training on an initial pre-trained model to obtain a pre-trained model. Since the global heterogeneous graph integrates the geographic space graph and the network space graph, the accuracy of the pre-trained model can be improved. Then, based on the pre-trained model, the positioning representation vectors corresponding to each of the plurality of relevant landmarks of the target IP address are determined, and a local graph model is constructed based on the plurality of relevant landmarks and the positioning representation vectors corresponding to each of the plurality of relevant landmarks. The pre-trained model that has been pre-trained offline can be used to improve the real-time performance of constructing the local graph model. Finally, the street-level geographic location of the target IP address is predicted based on the local graph model, so that the positioning coverage, positioning accuracy and positioning efficiency of the street-level IP positioning can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 It is a flowchart of the street-level IP positioning method provided by an embodiment of the present invention.

[0039] Figure 2 It is a schematic diagram of the construction process of the global heterogeneous graph provided by an embodiment of the present invention.

[0040] Figure 3 It is a schematic diagram of the principle of the street-level IP positioning method provided by an embodiment of the present invention.

[0041] Figure 4 It is a schematic diagram of the construction process of the global corpus provided by an embodiment of the present invention.

[0042] Figure 5 It is a schematic diagram of the structure of a street-level IP positioning device provided by an embodiment of the present invention.

[0043] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0045] At present, common street-level IP positioning methods include: street-level IP positioning method based on network measurement and street-level IP positioning method based on machine learning. The following introduces these two methods respectively.

[0046] 1) Street-level IP positioning method based on network measurement (GeoCAM): First, camera positioning landmarks with street-level accuracy are mined from online webcam websites. Then, through network measurement methods and distributed network probes, network delay constraints between landmarks and between landmarks and targets are obtained. By fitting the relationship between network delay and geographic distance, the positioning problem is converted into a multi-constraint problem. The solution space of the multi-constraint problem is the possible geographic area of ​​the target IP.

[0047] The instability of network measurement in this method will lead to large errors in positioning results, and the overhead and cost of high-precision network measurement are high. In addition, the IP positioning method based on network measurement is highly dependent on landmarks, and the quality and accuracy of landmarks will directly determine the positioning effect.

[0048] 2) Street-level IP positioning method based on machine learning (GraphGeo): The target host IP and its nearby landmark nodes are constructed into a graph data structure. In this local graph, the geographic location is identified as one of the attributes of the node, and the edge is marked as whether there is a common last router between the two nodes. The machine learning method is used to reduce the impact of network fluctuations on the positioning results, and a two-layer graph convolutional neural network (GCN) network is used to predict the attributes of the node and complete the positioning calculation.

[0049] This method requires a large amount of historical data for training and fitting to obtain reliable positioning results. In practice, it is difficult to obtain such a data set. In addition, the IP positioning method based on machine learning has a large time overhead and cannot adapt to positioning scenarios with high response speed requirements. At the same time, the positioning results obtained based on historical data analysis have poor real-time performance and cannot cope with scenarios where IP locations change frequently.

[0050] The above two methods are usually designed for areas with well-developed networks or rich landmarks. When extended to areas with underdeveloped networks or lack of landmarks, the accuracy will be reduced or even unable to complete positioning. At the same time, the positioning technology of existing technologies has limited use of positioning information and positioning constraints, making it difficult to further improve the accuracy.

[0051] Based on this, the present invention provides a street-level IP positioning method, device, electronic device and storage medium, which are described in detail below.

[0052] First, combine the following Figure 1-Figure 4 The street-level IP positioning method of the present invention is described.

[0053] Please refer to Figure 1 , Figure 1 FIG. 1 is a flow chart of a street-level IP positioning method provided by an embodiment of the present invention. Figure 1 As shown, the method may include steps 101-104.

[0054] Step 101: construct a global heterogeneous graph based on a geographic space graph and a network space graph; the geographic space graph includes a plurality of landmarks and geographic distances between the landmarks, and the network space graph includes a plurality of landmarks and network distances between the landmarks.

[0055] Specifically, Figure 2 As shown in the figure, a geospatial graph is constructed with multiple landmarks as nodes and the geographical distances between landmarks as edges. A network space graph is constructed with multiple landmarks as nodes and the network distances between landmarks as edges. The attributes of the nodes can include IP fingerprints and the geographical locations of the landmarks, and the network distance can be represented by the minimum network delay between the landmarks. The global heterogeneous graph constructed using the geospatial graph and the network space graph is not limited to a certain geographical area and network area, has extremely high coverage, and can be applied to global IP geolocation.

[0056] In one embodiment, if Figure 3 As shown, step 101 may include:

[0057] Step 1011, merging the geographic space map and the network space map to obtain an initial global heterogeneous map;

[0058] Step 1012: Prune the edges in the initial global heterogeneous graph that do not meet the preset constraints to obtain a global heterogeneous graph.

[0059] In step 1011, the positioning information in the geographic space map and the network space map are merged to obtain an initial global heterogeneous map. The positioning information in the geographic space map refers to the geographic distance between multiple landmarks. The positioning information in the network space map refers to the network distance between multiple landmarks.

[0060] Optionally, an initial global heterogeneous graph is constructed with multiple landmarks as nodes and the geographical distances and network distances between landmarks as edges. For example, an edge can be represented as (geographic distance, network distance).

[0061] In step 1012, the appearance of a fully connected graph in the initial global heterogeneous graph greatly reduces the efficiency of node feature learning. Pruning the edges in the initial global heterogeneous graph that do not meet the preset constraints to obtain a global heterogeneous graph can improve the efficiency of node feature learning.

[0062] Optionally, edges in the initial global heterogeneous graph that do not satisfy the conditions that the geographical distance is less than the geographical distance threshold and the network distance is less than the network distance threshold are pruned to obtain a global heterogeneous graph.

[0063] In order to prevent any two nodes from having edges, the initial global heterogeneous graph is reduced by setting the geographic distance threshold and the network distance threshold. Specifically, the edge between two nodes can only constitute a valid edge if the geographic distance between the two nodes is less than the geographic distance threshold and the network distance is less than the network distance threshold. Otherwise, the length of the edge is set to infinity.

[0064] Step 102: construct a global corpus based on the global heterogeneous graph, and train the initial pre-trained model based on the global corpus to obtain a pre-trained model.

[0065] For example, Figure 3 As shown in the figure, the pre-trained model can use the BERT (Bidirectional Encoder Representations from Transformers) model to build a global corpus based on the global heterogeneous graph. Using the global corpus to pre-train the initial pre-trained model can enable the initial pre-trained model to learn the global positioning representation vector of each landmark in the global heterogeneous graph to obtain a pre-trained model. Since the global heterogeneous graph integrates the geographic space graph and the network space graph, the accuracy of the pre-trained model can be improved.

[0066] In one embodiment, building a global corpus based on a global heterogeneous graph includes: performing deep walk sampling on the global heterogeneous graph to obtain the global corpus.

[0067] For example, Figure 4 As shown in Figure 1, the global heterogeneous graph includes nodes (AF) and edges between nodes. A deep walk (DeepWalk) sampling is performed on the global heterogeneous graph to obtain a global corpus.

[0068] Step 103: determine the positioning representation vectors corresponding to each of the multiple relevant landmarks of the target IP address based on the pre-trained model, and construct a local graph model based on the multiple relevant landmarks and the positioning representation vectors corresponding to each of the multiple relevant landmarks.

[0069] Specifically, the pre-trained model trained offline in advance can be used to fine-tune the global positioning representation vectors corresponding to the multiple relevant landmarks of the target IP address to obtain the positioning representation vectors corresponding to the multiple relevant landmarks. The local graph model is constructed using multiple relevant landmarks and the positioning representation vectors corresponding to the multiple relevant landmarks, which can improve the real-time performance of the local graph model.

[0070] In one embodiment, if Figure 3 As shown, the positioning representation vectors corresponding to the multiple relevant landmarks of the target IP address are determined based on the pre-trained model in step 103, including:

[0071] Step 1031, selecting multiple relevant landmarks of the target IP address based on the global heterogeneous graph;

[0072] Step 1032: construct a local corpus based on network measurement information of multiple relevant landmarks;

[0073] Step 1033: input the local corpus into the pre-trained model for processing to obtain positioning representation vectors corresponding to multiple relevant landmarks.

[0074] In step 1031, a landmark decision algorithm is used to select multiple relevant landmarks of the target IP address from the global heterogeneous graph.

[0075] Optionally, step 1031 includes: selecting any landmark from the global heterogeneous graph, starting to traverse the global heterogeneous graph, and calculating the joint probability of the geographical distance and the network distance between the target IP address and the landmark; and selecting the landmark with the largest joint probability from each joint probability in turn as the relevant landmark until the number of selected landmarks reaches a preset number.

[0076] In step 1032, the probe is used to measure the network delay between the multiple related landmarks and the geographical distance between the landmarks as the network measurement information of the multiple related landmarks. The DeepWalk algorithm is used to sample the network measurement information of the multiple related landmarks to obtain a local corpus.

[0077] In step 1033, the local corpus is input into the pre-trained model for processing, and the pre-trained model pre-trained offline is used to fine-tune the global positioning representation vectors corresponding to multiple relevant landmarks of the target IP address to obtain the positioning representation vectors corresponding to multiple relevant landmarks.

[0078] Step 104: Predict the street-level geographic location of the target IP address based on the local graph model.

[0079] For example, Figure 3As shown, the local graph model can use a graph neural network (GNN) model to predict the street-level geographic location of the target IP address.

[0080] The embodiment of the present invention provides a street-level IP positioning method. First, a global heterogeneous graph is constructed based on a geographic space graph and a network space graph. The geographic space graph includes a plurality of landmarks and the geographic distances between the landmarks. The network space graph includes a plurality of landmarks and the network distances between the landmarks. The network space graph is not limited to a certain geographic area and network area, has extremely high coverage, and is applicable to global IP geographic positioning. Then, a global corpus is constructed based on the global heterogeneous graph. The global corpus can be used to perform offline training on an initial pre-trained model to obtain a pre-trained model. Since the global heterogeneous graph integrates the geographic space graph and the network space graph, the accuracy of the pre-trained model can be improved. Then, based on the pre-trained model, the positioning representation vectors corresponding to each of the plurality of relevant landmarks of the target IP address are determined, and a local graph model is constructed based on the plurality of relevant landmarks and the positioning representation vectors corresponding to each of the plurality of relevant landmarks. The pre-trained model that has been pre-trained offline can be used to improve the real-time performance of the construction of the local graph model, thereby improving the high real-time performance of the street-level IP positioning, and can cope with the situation of IP location changes. Finally, the street-level geographic location of the target IP address is predicted based on the local graph model, which can improve the positioning coverage, positioning accuracy and positioning efficiency of the street-level IP positioning.

[0081] Moreover, the graph representation method of the embodiment of the present invention is versatile and can be used for graph representation calculations in other scenarios. The embodiment of the present invention innovatively integrates the positioning information and positioning constraints of geographic space graphs and cyberspace graphs, and has a positioning effect above the street level. The positioning calculation speed of the embodiment of the present invention is fast, breaking the bottleneck of the high time overhead of the positioning method based on machine learning, and can be used in more scenarios and applications. The street-level IP positioning of the embodiment of the present invention has strong real-time performance and fast response speed. The positioning results are derived from offline landmark data learning and online network measurement, and have more reliable positioning results compared to other methods.

[0082] The street-level IP positioning device provided by the present invention is described below. The street-level IP positioning device described below and the street-level IP positioning method described above can be referenced to each other.

[0083] Please refer to Figure 5 , Figure 5 Schematic diagram of the structure of the street-level IP positioning device provided by the embodiment of the present invention. Figure 5 As shown, the device may include:

[0084] A first construction module 10 is used to construct a global heterogeneous graph based on a geographic space graph and a network space graph; the geographic space graph includes a plurality of landmarks and geographic distances between the landmarks, and the network space graph includes a plurality of landmarks and network distances between the landmarks;

[0085] A second construction module 20, for constructing a global corpus based on the global heterogeneous graph;

[0086] A model training module 30 is used to train the initial pre-training model based on the global corpus to obtain a pre-training model;

[0087] A vector determination module 40, configured to determine, based on a pre-trained model, positioning representation vectors corresponding to each of a plurality of relevant landmarks of a target IP address;

[0088] A third construction module 50 is used to construct a local graph model based on a plurality of relevant landmarks and positioning representation vectors corresponding to the plurality of relevant landmarks;

[0089] The location prediction module 60 is used to predict the street-level geographic location of the target IP address based on the local graph model.

[0090] In one embodiment, the vector determination module 40 includes:

[0091] A selection unit, used for selecting multiple relevant landmarks of the target IP address based on the global heterogeneous graph;

[0092] A construction unit, for constructing a local corpus based on network measurement information of multiple related landmarks;

[0093] The processing unit is used to input the local corpus into the pre-trained model for processing to obtain the positioning representation vectors corresponding to the multiple relevant landmarks.

[0094] In one embodiment, the selection unit is specifically used for:

[0095] Select a landmark from the global heterogeneous graph, start traversing the global heterogeneous graph, and calculate the joint probability of the geographical distance and network distance between the target IP address and the landmark;

[0096] The landmarks with the largest joint probability are selected in turn from each joint probability as relevant landmarks until the number of selected landmarks reaches a preset number.

[0097] In one embodiment, the first building block 10 comprises:

[0098] A fusion unit, used to fuse the geographic space map and the network space map to obtain an initial global heterogeneous map;

[0099] The pruning unit is used to prune the edges in the initial global heterogeneous graph that do not meet the preset constraints to obtain a global heterogeneous graph.

[0100] In one embodiment, the fusion unit is specifically used to construct an initial global heterogeneous graph using multiple landmarks as nodes and geographical distances and network distances between landmarks as edges.

[0101] In one embodiment, the pruning unit is specifically used to prune the edges in the initial global heterogeneous graph that do not satisfy the conditions that the geographical distance is less than the geographical distance threshold and the network distance is less than the network distance threshold, to obtain a global heterogeneous graph.

[0102] In one embodiment, the second construction module 20 is specifically used to perform deep walk sampling on the global heterogeneous graph to obtain a global corpus.

[0103] Figure 6 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the street-level IP positioning method, which includes constructing a global heterogeneous graph based on a geographic space graph and a network space graph; the geographic space graph includes a plurality of landmarks and the geographical distances between the landmarks, and the network space graph includes a plurality of landmarks and the network distances between the landmarks; constructing a global corpus based on the global heterogeneous graph, and training an initial pre-training model based on the global corpus to obtain a pre-training model; determining the positioning representation vectors corresponding to the plurality of relevant landmarks of the target IP address based on the pre-training model, and constructing a local graph model based on the plurality of relevant landmarks and the positioning representation vectors corresponding to the plurality of relevant landmarks; and predicting the street-level geographic location of the target IP address based on the local graph model.

[0104] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0105] On the other hand, the present invention also provides a computer program product, which includes a computer program, and the computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the street-level IP positioning method provided by the above-mentioned method embodiments, the method including constructing a global heterogeneous graph based on a geographic space map and a network space map; the geographic space map includes multiple landmarks and the geographical distances between the landmarks, and the network space map includes multiple landmarks and the network distances between the landmarks; constructing a global corpus based on the global heterogeneous graph, and training an initial pre-trained model based on the global corpus to obtain a pre-trained model; determining the positioning representation vectors corresponding to each of the multiple relevant landmarks of the target IP address based on the pre-trained model, and constructing a local graph model based on the multiple relevant landmarks and the positioning representation vectors corresponding to each of the multiple relevant landmarks; predicting the street-level geographic location of the target IP address based on the local graph model.

[0106] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the street-level IP positioning method provided by the above-mentioned method embodiments, the method comprising constructing a global heterogeneous graph based on a geographic spatial graph and a network spatial graph; the geographic spatial graph comprises a plurality of landmarks and the geographical distances between the landmarks, and the network spatial graph comprises a plurality of landmarks and the network distances between the landmarks; constructing a global corpus based on the global heterogeneous graph, and training an initial pre-trained model based on the global corpus to obtain a pre-trained model; determining the positioning representation vectors corresponding to each of the plurality of relevant landmarks of the target IP address based on the pre-trained model, and constructing a local graph model based on the plurality of relevant landmarks and the positioning representation vectors corresponding to each of the plurality of relevant landmarks; and predicting the street-level geographic location of the target IP address based on the local graph model.

[0107] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0108] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A street-level IP positioning method, characterized in that: include: Construct a global heterogeneous graph based on the geographic space graph and the network space graph; The geospatial graph includes a plurality of landmarks and geographic distances between the landmarks, and the network spatial graph includes a plurality of landmarks and network distances between the landmarks; the network distances are represented by minimum network delays between the landmarks; Building a global corpus based on the global heterogeneous graph, and training an initial pre-trained model based on the global corpus to obtain a pre-trained model; Determine, based on the pre-trained model, the location representation vectors corresponding to each of the multiple relevant landmarks of the target IP address, and construct a local graph model based on the multiple relevant landmarks and the location representation vectors corresponding to each of the multiple relevant landmarks; Predicting a street-level geographic location of the target IP address based on the local graph model; The local graph model is a graph neural network model; The method of determining the positioning representation vectors corresponding to the multiple relevant landmarks of the target IP address based on the pre-trained model includes: Selecting the multiple relevant landmarks of the target IP address based on the global heterogeneous graph; constructing a local corpus based on network measurement information of the plurality of relevant landmarks; Inputting the local corpus into the pre-trained model for processing to obtain the positioning representation vectors corresponding to each of the multiple relevant landmarks; The selecting the multiple relevant landmarks of the target IP address based on the global heterogeneous graph includes: Select any one of the landmarks from the global heterogeneous graph, start traversing the global heterogeneous graph, and calculate the joint probability of the geographical distance and the network distance between the target IP address and the landmark; The landmarks with the largest joint probability are selected in sequence from the joint probabilities as the relevant landmarks until the number of the selected landmarks reaches a preset number.

2. The street-level IP positioning method according to claim 1, characterized in that: The method of constructing a global heterogeneous graph based on a geographic space graph and a network space graph includes: Merging the geographic space graph and the network space graph to obtain an initial global heterogeneous graph; The edges in the initial global heterogeneous graph that do not meet the preset constraints are pruned to obtain the global heterogeneous graph.

3. The street-level IP positioning method according to claim 2, characterized in that: The step of fusing the geographic space graph and the network space graph to obtain an initial global heterogeneous graph includes: The initial global heterogeneous graph is constructed with the multiple landmarks as nodes and the geographical distances and the network distances between the landmarks as edges.

4. The street-level IP positioning method according to claim 3, characterized in that: The step of pruning the edges in the initial global heterogeneous graph that do not satisfy the preset constraint conditions to obtain the global heterogeneous graph includes: The edges in the initial global heterogeneous graph that do not satisfy the conditions that the geographical distance is less than the geographical distance threshold and the network distance is less than the network distance threshold are pruned to obtain the global heterogeneous graph.

5. The street-level IP positioning method according to claim 1, characterized in that: The constructing a global corpus based on the global heterogeneous graph includes: A deep walk sampling is performed on the global heterogeneous graph to obtain the global corpus.

6. A street-level IP positioning device, characterized in that: include: The first building module is used to build a global heterogeneous graph based on the geographic space graph and the network space graph; The geospatial graph includes a plurality of landmarks and geographic distances between the landmarks, and the network spatial graph includes a plurality of landmarks and network distances between the landmarks; the network distances are represented by minimum network delays between the landmarks; A second construction module is used to construct a global corpus based on the global heterogeneous graph; A model training module, used for training the initial pre-training model based on the global corpus to obtain a pre-training model; A vector determination module, used to determine the positioning representation vectors corresponding to each of the multiple relevant landmarks of the target IP address based on the pre-trained model; A third construction module is used to construct a local graph model based on the multiple relevant landmarks and the positioning representation vectors corresponding to the multiple relevant landmarks; A location prediction module, configured to predict the street-level geographic location of the target IP address based on the local graph model; The local graph model is a graph neural network model; Wherein, the vector determination module includes: A selection unit, configured to select the multiple relevant landmarks of the target IP address based on the global heterogeneous graph; A construction unit, configured to construct a local corpus based on network measurement information of the plurality of relevant landmarks; A processing unit, configured to input the local corpus into the pre-training model for processing, so as to obtain the positioning representation vectors corresponding to each of the plurality of relevant landmarks; The selection unit is specifically used for: Select any one of the landmarks from the global heterogeneous graph, start traversing the global heterogeneous graph, and calculate the joint probability of the geographical distance and the network distance between the target IP address and the landmark; The landmarks with the largest joint probability are selected in sequence from the joint probabilities as the relevant landmarks until the number of the selected landmarks reaches a preset number.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the street-level IP positioning method as described in any one of claims 1 to 5 is implemented.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the street-level IP positioning method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Street-level IP positioning method based on IP2vec model

    CN115102925A

  • Street-level IP address positioning method based on graph neural network

    CN115242868A