IP street-level positioning method and device based on graph neural network
By representing the measurement data of the computer network as an attribute graph and utilizing the encoder and decoder of the graph neural network, the problem of insufficient IP street-level positioning accuracy in the existing technology is solved, and higher positioning accuracy and generalization capabilities are achieved. .
Patent Information
- Application Number
- CN202211144672.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-08-30
- Filing Date
- 2022-09-20
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-09-20
AI Technical Summary
Existing IP street-level positioning technology has low positioning accuracy in actual networks and cannot effectively depict the complex relationship between measurement data and geographical location. It is especially deficient in modeling the topology of computer networks.
Using a graph neural network-based method, the original traceroute measurement data of the computer network is represented as an attribute graph. The graph node embedding is generated and optimized through the encoder and decoder. The message passing mechanism is used to inject geographical location information. Through backpropagation and gradient Reduce and optimize model parameters to improve geographical location prediction accuracy.
The accuracy of IP street-level positioning is significantly improved. Experimental results show that the median error distance on different data sets is 16% to 28% better than the state-of-the-art rule-based and learning-based baselines, improving the generalization ability of positioning.
Smart Images

Figure CN115529290B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target IP positioning, and in particular to a method and device for IP street-level positioning based on graph neural network. Background Art
[0002] The target IP street-level positioning is to further find the more accurate location of the IP address within the city based on the IP city-level positioning or the known IP city location. IP street-level positioning has practical needs in many fields such as tracing the source of network attacks and providing localized services. However, most of the existing methods are only applicable to ideal network environments. In actual networks, the positioning accuracy is not high because the relationship between the measured data and the geographic location does not meet the assumptions of the existing methods. Therefore, how to develop IP street-level positioning technology with higher accuracy in actual networks is of great value.
[0003] According to how to characterize the "measurement data-geographic location" mapping relationship, IP street-level positioning technology can be divided into rule-based IP street-level positioning technology and deep learning-based IP street-level positioning technology.
[0004] IP street-level positioning technology based on predefined rules generally assumes that there is a strong correlation between measurement data such as latency or routing path and geographic distance, and defines the conversion rules from measurement data to geographic distance based on the corresponding assumptions. The advantage of this type of method is that it is easy to understand. However, since the assumptions of this type of method often do not conform to the actual situation of most actual networks, the accuracy is generally not high.
[0005] Recently, some scholars have tried to use deep learning to model the mapping relationship between measurement data and geographic location. Deep learning is good at describing the nonlinear relationship between multiple measurement data and geographic distance from a large amount of data, and is more adaptable to the complex situation of the actual network. The patent applicant has proposed that the delay and routing information of the target network can be input into the multi-layer perceptron MLP, and after MLP processing, the geographic location of the target IP can be predicted. This type of method has higher positioning accuracy than positioning technology based on predefined rules. However, the MLP method cannot model the topological structure of the computer network, and the positioning accuracy still needs to be improved. Summary of the invention
[0006] In view of the problem that the positioning accuracy of the existing IP street-level positioning technology still needs to be improved, the present invention proposes an IP street-level positioning method and device based on graph neural network, which alleviates the convergence problem of GNN by considering prior knowledge and improves the accuracy of geographic location prediction.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions:
[0008] On the one hand, the present invention proposes an IP street-level positioning method based on a graph neural network, comprising:
[0009] Step 1, represent the traceroute raw measurement data of a computer network into an attributed graph;
[0010] Step 2, generating an initial graph node embedding of each IP address based on the attributed graph through an encoder; the IP address includes a landmark IP address, and the geographical location corresponding to the landmark IP address is known;
[0011] Step 3, injecting geographic location information into the initial graph node embedding by modeling the link information between computer network nodes;
[0012] Step 4: embed and map the graph node processed in step 3 to the geographic location corresponding to the graph node, i.e., the IP address, through a decoder;
[0013] Step 5: Compare the difference between the mapped geographic location and the actual geographic location, and optimize the model parameters through back propagation and gradient descent;
[0014] Step 6: Predict the geographic location of other IP addresses with unknown geographic locations in the computer network based on the optimized model.
[0015] Furthermore, the step 1 comprises:
[0016] Step 1.1, build a network topology diagram:
[0017] The topology of a computer network is represented by using IP addresses and links between them. All IP addresses in the traceroute raw measurement data of a computer network are converted into graph nodes. i Distinguish by node ID, the node ID value is 1 to N V , where N V It is the number of all IP addresses in the original traceroute measurement data;
[0018] Convert the direct physical link between two IP addresses into a graph edge;
[0019] Step 1.2, attribute extraction:
[0020] Each graph node is associated with two node attributes: node delay and node IP address; for each node, the detection host repeatedly measures the delay multiple times and selects the smallest one as the node delay; finally, the node ID and node attributes are combined as the initial features of the node;
[0021] Each edge is associated with the edge delay, the head node IP address, and the tail node IP address. The node close to the detection host is used as the head node of the edge, and the other node of the edge is used as the tail node. The edge delay is calculated by subtracting the node delay of the head node from the tail node.
[0022] Furthermore, in step 1.1, during the traceroute process, when the IP address and delay of a router cannot be obtained by the detection host, there are two methods for establishing an edge on the above router: (i) ignoring the above router and establishing an edge between the two routers before and after the above router on the routing path; (ii) mapping the above router to an IP address found in other remeasured routing paths.
[0023] Furthermore, the step 3 comprises:
[0024] For node v i and its adjacent nodes v j , from v j to v i The message is defined as
[0025]
[0026] Where m i←j v j Send to v i The news, message is the message function, represents the adjacent node embedding, e ij Represents node v i and node v j The edges formed by f message Implemented as:
[0027]
[0028] The edge network f edge is a two-layer MLP that embeds the edge Convert to a matrix Used to calculate adjacent node embeddings f edge The architecture is:
[0029]
[0030] in As weights, used to control the embedding of adjacent nodes Impact on node i; and is the weight matrix of the two layers of MLP;
[0031] The initial edge is first embedded into Convert it into a temporary embedding, then convert the temporary embedding into a one-dimensional weight embedding, and reconstruct the one-dimensional weight embedding into a two-dimensional orientation weight matrix To control the neighbor node v j For node v i The influence of,ReLU activation function is used to capture nonlinear relationships;
[0032] U vi Indicates v i The neighbor node set of aggregate Collect all from Propagate to v i message, update function f update Using the collected messages Update v i The embedding of i The aggregate update function is defined as:
[0033]
[0034]
[0035] in Represents node v i Updated embeddings after the encoder’s initial node embeddings;
[0036] The update function is implemented as follows:
[0037]
[0038] Update the previous embedding by summarizing the node and aggregated messages from neighbors To update node v i Embedding, using Relu for nonlinear feature transformation.
[0039] Furthermore, in step 5, the following loss function is used:
[0040]
[0041] Where N(v) train represents all nodes in the training dataset, They represent the true geographic location and predicted geographic location of the IP in the training set after the decoder transformation, and Θ represents the trainable model parameters.
[0042] Another aspect of the present invention provides an IP street-level positioning device based on a graph neural network, comprising:
[0043] A preprocessing module, used to represent the raw measurement data of a computer network traceroute into an attributed graph;
[0044] An encoding module, configured to generate an initial graph node embedding of each IP address based on an attributed graph through an encoder; the IP address includes a landmark IP address, and the geographical location corresponding to the landmark IP address is known;
[0045] A message passing module for injecting geographic location information into the initial graph node embedding by modeling the link information between computer network nodes;
[0046] A decoding module, used for embedding and mapping the graph nodes processed by the message delivery module to the geographic locations corresponding to the graph nodes, i.e., the IP addresses, through a decoder;
[0047] Model training and optimization module, which is used to compare the difference between the mapped geographic location and the actual geographic location, and optimize the model parameters through back propagation and gradient descent;
[0048] The geographic location prediction module is used to predict the geographic location of other IP addresses with unknown geographic locations in the computer network based on the optimized model.
[0049] Furthermore, the preprocessing module is specifically used for:
[0050] Step 1.1, build a network topology diagram:
[0051] The topology of a computer network is represented by using IP addresses and links between them. All IP addresses in the traceroute raw measurement data of a computer network are converted into graph nodes. i Distinguish by node ID, the node ID value is 1 to N V , where N V It is the number of all IP addresses in the original traceroute measurement data;
[0052] Convert the direct physical link between two IP addresses into a graph edge;
[0053] Step 1.2, attribute extraction:
[0054] Each graph node is associated with two node attributes: node delay and node IP address; for each node, the detection host repeatedly measures the delay multiple times and selects the smallest one as the node delay; finally, the node ID and node attributes are combined as the initial features of the node;
[0055] Each edge is associated with the edge delay, the head node IP address, and the tail node IP address. The node close to the detection host is used as the head node of the edge, and the other node of the edge is used as the tail node. The edge delay is calculated by subtracting the node delay of the head node from the tail node.
[0056] Furthermore, in step 1.1, during the traceroute process, when the IP address and delay of a router cannot be obtained by the detection host, there are two methods for establishing an edge on the above router: (i) ignoring the above router and establishing an edge between the two routers before and after the above router on the routing path; (ii) mapping the above router to an IP address found in other remeasured routing paths.
[0057] Furthermore, the message transmission module is specifically used for:
[0058] For node v i and its adjacent nodes v j , from v j to v i The message is defined as
[0059]
[0060] Where m i←j v j Send to v i The news, message is the message function, represents the adjacent node embedding, e ij Represents node v i and node v j The edges formed by f message Implemented as:
[0061]
[0062] The edge network f edge is a two-layer MLP that embeds the edge Convert to a matrix Used to calculate adjacent node embeddings f edge The architecture is:
[0063]
[0064] in As weights, used to control the embedding of adjacent nodes Impact on node i; and is the weight matrix of the two layers of MLP;
[0065] The initial edge is first embedded into Convert it into a temporary embedding, then convert the temporary embedding into a one-dimensional weight embedding, and reconstruct the one-dimensional weight embedding into a two-dimensional orientation weight matrix To control the neighbor node v j For node v i The influence of,ReLU activation function is used to capture nonlinear relationships;
[0066] U vi Indicates v i The neighbor node set of aggregate Collect all from Propagate to v i message, update function f update Using the collected messages Update v i The embedding of i The aggregate update function is defined as:
[0067]
[0068]
[0069] in Represents node v i Updated embeddings after the encoder’s initial node embeddings;
[0070] The update function is implemented as follows:
[0071]
[0072] Update the previous embedding by summarizing the node and aggregated messages from neighbors To update node v i Embedding, using Relu for nonlinear feature transformation.
[0073] Furthermore, in the model training optimization module, the following loss function is used:
[0074]
[0075] Where N(v) train represents all nodes in the training dataset, They represent the true geographic location and predicted geographic location of the IP in the training set after the decoder transformation, and Θ represents the trainable model parameters.
[0076] Compared with the prior art, the present invention has the following beneficial effects:
[0077] The present invention uses graph neural networks to improve the generalization ability of IP location. First, the traceroute raw measurement data of a computer network is represented as an attributed graph; then, the attributed graph is converted into an initial node embedding through an encoder; then, the initial node embedding is refined by modeling the connection information; finally, the decoder maps the refined embedding to the node location. The present invention alleviates the convergence problem of graph neural networks by considering prior knowledge, thereby improving the accuracy of geographic location prediction. Experiments on different real data sets show that the present invention outperforms the most advanced rule-based and learning-based baselines by 16% to 28% in the median error distance of all data sets. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 The present invention provides a flowchart of an IP street-level positioning method based on a graph neural network.
[0079] Figure 2 A schematic diagram of mapping a computer network into an attributed graph according to an embodiment of the present invention;
[0080] Figure 3 This is a schematic diagram of a framework of an IP street-level positioning method based on a graph neural network according to an embodiment of the present invention;
[0081] Figure 4 This is a schematic diagram of the structure of an IP street-level positioning device based on a graph neural network according to an embodiment of the present invention. DETAILED DESCRIPTION
[0082] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0083] like Figure 1 As shown, a graph neural network-based IP street-level positioning method (abbreviated as GNN-GEO) includes:
[0084] Step S101, representing raw traceroute measurement data of a computer network into an attributed graph;
[0085] Step S102, generating initial graph node embedding of each IP address based on the attributed graph by an encoder; the IP address includes a landmark IP address, and the geographical location corresponding to the landmark IP address is known;
[0086] Step S103, injecting geographic location information into the initial graph node embedding by modeling the link information between computer network nodes;
[0087] Step S104, embedding and mapping the graph node processed in step S103 to the geographic location corresponding to the graph node, i.e., the IP address, through a decoder;
[0088] Step S105, comparing the difference between the mapped geographical location and the actual geographical location, and optimizing the parameters of the model through back propagation and gradient descent;
[0089] Step S106: Predicting the geographical locations of other IP addresses with unknown geographical locations in the computer network based on the optimized model.
[0090] Specifically, this patent studies IP street-level positioning technology in the complex environment of the actual Internet, converts IP positioning into a graph node attribute prediction problem from a deep learning perspective, and uses a graph neural network architecture to solve the attribute prediction problem, thereby locating the target IP.
[0091] 1. IP positioning problem conversion
[0092] The present invention first redefines the measurement-based IP street-level positioning problem in the field of graph deep learning as an attribute prediction problem for attributed graph nodes.
[0093] like Figure 1 As shown, the present invention uses IP addresses and links between IP addresses to represent the topological structure of a computer network. A link refers to a direct physical link between two IP addresses. The location of each IP address is represented as a pair of (latitude, longitude). In addition, each IP address is associated with a measurable attribute, such as the delay from the detection source to this IP address. Each link is also associated with a measurable attribute, such as the delay of this link. All IP addresses can be divided into four groups: detection host IP address, landmark IP address, target IP address, and router IP address. Among them, the detection host is generally a detection host or server controlled by researchers and installed with network measurement software, and the geographical location and IP address of the landmark are also known; the target is a network device with an unknown geographical location, a known IP address, and a geographical location that needs to be estimated by a positioning algorithm; the router is an intermediate router discovered when the detection host obtains the measurement data of the landmark and the target IP. Thus, a computer network can be mapped into an attributed graph G = {V, E, X}. Among them, the node v represents an IP address, the edge e represents a link, and x represents the measurable attributes of the node and edge (such as delay, etc.). Assume that longitude and latitude are used to represent the geographical location of a node v. v , and the node sets belonging to the landmark and the target host are V l ,V t , then the measurement-based IP positioning can be formalized as finding a prediction function f that can predict the target location:
[0094]
[0095] in, is the estimated location of the target IP, and the input is the geographical location of the landmark, the nodes, edges, and measurement attributes of the graph G. The process of finding the prediction function f is a typical graph node attribute prediction problem.
[0096] In order to solve the problem of predicting the attributes of nodes in this graph, it is necessary to accurately model this attributed graph, that is, to accurately describe the real location of the measurement data G and the target IP {l v ,v∈V t}, and obtain the node feature representation that can contain signals related to the geographic location, so that the correct geographic location can be estimated based on the node feature representation.
[0097] 2. GNN-GEO Method Framework
[0098] The GNN-GEO method framework is as follows Figure 3 As shown in Figure 1, the framework consists of four components: a preprocessing layer, an encoder, a message passing (MP) layer, and a decoder. The preprocessing layer maps the raw measurement data of the computer network into a graph representation G = (V, E, XV, XE). The encoder generates the initial feature embedding of G, the MP layer refines the initial feature embedding using the graph signal and outputs the refined embedding for all nodes V, and finally the decoder maps the refined node embedding to the location. We will describe each component one by one, followed by the optimization details. It is worth mentioning that by changing some details of each component, we can obtain different GNN-based IP geolocation methods from the GNN-Geo framework.
[0099] 1. Preprocessing layer: The measurement data of this patent is mainly the tracking data from the detection host to the landmark and the target. The task of the preprocessing layer is to convert the original traceroute data into the initial embedding G = (V, E, XV, XE) of the encoder. It mainly includes two subtasks: (i) constructing the graph G with graph nodes V and links E; (ii) extracting node attributes XV and link attributes XE.
[0100] (1) Build a network topology diagram
[0101] Node: Use IP addresses and links between IP addresses to represent the topology of a computer network. Therefore, all IP addresses in the original traceroute data are converted into graph nodes. Each node v i Distinguished by node ID. Value ranges from 1 to N. V , where N V It is the number of all IP addresses in the traceroute data.
[0102] Edge: If the probing host finds a direct physical link between two IP addresses, then this link is converted into a graph edge. jDuring the traceroute process, the probing host may not be able to obtain the IP addresses and delays of some routers, which are called "anonymous routers". There are two ways to establish edges on "anonymous routers": (i) ignore the anonymous routers and establish edges between the two routers before and after the anonymous router on the routing path; (ii) map the anonymous router to the IP address found in other re-measured routing paths.
[0103] (2) Attribute extraction
[0104] Node attributes: In this patent, each graph node is associated with two node attributes: node delay and node IP address. Node delay is the direct delay from the probe host to the node. For each node, the probe host repeatedly measures the delay multiple times. The smallest one is selected as the node delay because it contains the smallest congestion and is closer to the actual propagation delay. Finally, the node ID and node attributes are combined as the initial features of the node. i Represents node v i , V represents the initial features of all nodes.
[0105] Edge properties: Each edge can be associated with several features, such as edge delay, head node IP address, and tail node IP address. Here, the node close to the probing host is called the head node of the edge, and the other node is called the tail node. The edge delay is calculated by subtracting the node delay of the head node from the tail node. We keep the edge delay even though it may be negative.
[0106] 2. Encoder
[0107] The purpose of the encoder is to form initial low-dimensional graph node and edge embeddings for the MP layer. The initial node features V and initial edge features E from the preprocessor are used to generate graph node and edge embeddings.
[0108] For each non-zero feature in V and E, we associate it with an embedding vector. We can then obtain a set of low-dimensional embeddings for graph nodes and graph edges, respectively. We concatenate the embedding of a node (or edge) to a vector to describe the node (or edge). Specifically, the node v i and edge j The low-dimensional embedding of is:
[0109]
[0110]
[0111] In the formula, Q v ∈R Nv×G represents the embedding matrix of all nodes V, Q v ∈R Ne×K represents the embedding matrix of all edges E, NV N represents the number of node features, and G represents the embedding size. e represents the number of edge features, and K represents the embedding size. Then the encoder will and h E The input is sent to the next component MP layer for embedding enhancement.
[0112] 3. Message Passing (MP) Layer
[0113] This is the core component of the GNN-Geo framework. The input is a graph node and side h E Its purpose is to augment the initial graph node embedding by explicitly modeling the edges between nodes and graph / edge attributes The final graph node embeddings will be sent to the decoder for position estimation. The MP layer consists of message, aggregation, and update functions.
[0114] Message function: For node v i and its adjacent nodes v j , from v j to v i The message is defined as
[0115]
[0116] Where m i←j v j Send to v i The news, message is the message function. message The input is: (i) adjacent node embedding h vj ; (ii) v i , v j The edge between two nodes ij In this embodiment, f message Implemented as:
[0117]
[0118] The edge network f edge is a two-layer MLP that embeds the edge Convert to a matrix Messages used to calculate neighbor nodes The architecture is:
[0119]
[0120] in As weights, used to control neighbor embedding Impact on node i. and are the weight matrices of the two layers of the MLP. They first embed the initial edge (size K) into a temporary embedding (size 2K), and then the temporary embedding is converted into a one-dimensional embedding. The one-dimensional weight embedding is reconstructed into a two-dimensional orientation weight matrix W eij (size G×G) to control the neighbor node v j For node v i The ReLU activation function is used to capture the nonlinear relationship.
[0121] Aggregation and update functions: U vi Indicates v i The neighbor node set of aggregate Collect all from Propagate to v i message, update function f update Using the collected messages Update v i The embedding of i The aggregate update function is defined as:
[0122]
[0123]
[0124] in Represents node v i Updated embedding after the encoder's initial node embedding. Aggregation function f aggregate It can be a simple symmetric function such as Mean, Max or Sum. The update function is implemented as follows:
[0125]
[0126] We do this by summing up the previous embeddings of the nodes and the messages it aggregates from its neighbors To update node v i . Use Relu for nonlinear feature transformation.
[0127] 4. Decoder
[0128] The goal of the decoder is to embed the nodes in a refined way To estimate the position. We need to predict two values (latitude and longitude) for all nodes. Our decoder is implemented as follows:
[0129]
[0130] in is the estimated position matrix of all nodes V after transformation, Sigmoid is an activation function whose output is [0,1]. If the input value is too large, Sigmoid may become saturated, which makes learning more difficult. BatchNorm refers to batch normalization. W loc is the weight parameter matrix of the fully connected layer in the decoder, b loc is the bias parameter matrix of the fully connected layer in the decoder. In order to alleviate the saturation problem of the Sigmoid function and prevent overfitting, this embodiment adopts the batch normalization method. Then we compare the real geographical location of the IP in the training set (after transformation) And the predicted geographic location of the training set IP (after transformation) To train GNN-Geo. After training, the geographic location of the target IP The transformed geographic location can be obtained by using two "0-1 scalers" in reverse Converted.
[0131] 5. Model Training
[0132] To learn the model parameters, we use loc train and The mean square error loss (MSE) between . In this patent, we optimize the L2 regularized MSE loss as follows:
[0133]
[0134] Where N(v) train Represents all nodes in the training dataset. Θ contains all trainable model parameters of GNN-Geo. Deep learning methods often suffer from overfitting problems. In addition to batch normalization in the decoder, we also use L2 regularization to prevent overfitting. Please note that batch normalization is only used during training and must be disabled during testing. λ controls the L2 regularization strength. The prediction model is optimized using the Adam optimizer, and the model parameters are updated using the gradient of the loss function. The optimization of the model is stopped until the final loss is minimized. At this time, the obtained model can be applied to locate other IPs with unknown geographic locations in the network.
[0135] To verify the effect of the present invention, the following experiment was performed:
[0136] Table 1 Comparison of GNN-Geo method and baseline method (unit: km)
[0137]
[0138] Note: The bold lines represent GNN-G eo’s performance, the underlined lines represent the best metric among the baselines, while the italicized lines represent the best baseline method at which the mean error distance lies.
[0139] As shown in Table 1, the results clearly show that the average error distance, median error distance, and maximum error distance of the GNN-Geo method on all three regional datasets are better than all baseline methods, that is, the positioning accuracy of GNN-Geo in all three indicators is higher than the baseline. At the same time, it can be found that the best baseline methods in these three regions are different. Therefore, it can be concluded that compared with previous methods, GNN-Geo shows better generalization ability in different network environments.
[0140] Based on the above embodiments, Figure 4 As shown, the present invention, on the other hand, proposes an IP street-level positioning device based on a graph neural network, comprising:
[0141] A preprocessing module, used to represent the raw measurement data of a computer network traceroute into an attributed graph;
[0142] An encoding module, configured to generate an initial graph node embedding of each IP address based on an attributed graph through an encoder; the IP address includes a landmark IP address, and the geographical location corresponding to the landmark IP address is known;
[0143] A message passing module for injecting geographic location information into the initial graph node embedding by modeling the link information between computer network nodes;
[0144] A decoding module, used for embedding and mapping the graph nodes processed by the message delivery module to the geographic locations corresponding to the graph nodes, i.e., the IP addresses, through a decoder;
[0145] Model training and optimization module, which is used to compare the difference between the mapped geographic location and the actual geographic location, and optimize the model parameters through back propagation and gradient descent;
[0146] The geographic location prediction module is used to predict the geographic location of other IP addresses with unknown geographic locations in the computer network based on the optimized model.
[0147] Furthermore, the preprocessing module is specifically used for:
[0148] Step 1.1, build a network topology diagram:
[0149] The topology of a computer network is represented by using IP addresses and links between them. All IP addresses in the traceroute raw measurement data of a computer network are converted into graph nodes. i Distinguish by node ID, the node ID value is 1 to NV , where N V It is the number of all IP addresses in the original traceroute measurement data;
[0150] Convert the direct physical link between two IP addresses into a graph edge;
[0151] Step 1.2, attribute extraction:
[0152] Each graph node is associated with two node attributes: node delay and node IP address; for each node, the detection host repeatedly measures the delay multiple times and selects the smallest one as the node delay; finally, the node ID and node attributes are combined as the initial features of the node;
[0153] Each edge is associated with the edge delay, the head node IP address, and the tail node IP address. The node close to the detection host is used as the head node of the edge, and the other node of the edge is used as the tail node. The edge delay is calculated by subtracting the node delay of the head node from the tail node.
[0154] Furthermore, in step 1.1, during the traceroute process, when the IP address and delay of a router cannot be obtained by the detection host, there are two methods for establishing an edge on the above router: (i) ignoring the above router and establishing an edge between the two routers before and after the above router on the routing path; (ii) mapping the above router to an IP address found in other remeasured routing paths.
[0155] Furthermore, the message transmission module is specifically used for:
[0156] For node v i and its adjacent nodes v j , from v j to v i The message is defined as
[0157]
[0158] Where m i←j v j Send to v i The news, message is the message function, represents the adjacent node embedding, e ij Represents node v i and node v j The edges formed by f message Implemented as:
[0159]
[0160] The edge network f edgeis a two-layer MLP that embeds the edge Convert to a matrix Used to calculate adjacent node embeddings f edge The architecture is:
[0161]
[0162] in As weights, used to control the embedding of adjacent nodes Impact on node i; and is the weight matrix of the two layers of MLP;
[0163] The initial edge is first embedded into Convert it into a temporary embedding, then convert the temporary embedding into a one-dimensional weight embedding, and reconstruct the one-dimensional weight embedding into a two-dimensional orientation weight matrix To control the neighbor node v j For node v i The influence of,ReLU activation function is used to capture nonlinear relationships;
[0164] U vi Indicates v i The neighbor node set of aggregate Collect all from Propagate to v i message, update function f update Using the collected messages Update v i The embedding of i The aggregate update function is defined as:
[0165]
[0166]
[0167] in Represents node v i Updated embeddings after the encoder’s initial node embeddings;
[0168] The update function is implemented as follows:
[0169]
[0170] Update the previous embedding by summarizing the node and aggregated messages from neighbors To update node v i Embedding, using Relu for nonlinear feature transformation.
[0171] Furthermore, in the model training optimization module, the following loss function is used:
[0172]
[0173] Where N(v) train represents all nodes in the training dataset, They represent the true geographic location and predicted geographic location of the IP in the training set after the decoder transformation, and Θ represents the trainable model parameters.
[0174] In summary, the present invention uses graph neural networks to improve the generalization ability of IP positioning. First, the traceroute raw measurement data of a computer network is represented as an attributed graph; then, the attributed graph is converted into an initial node embedding through an encoder; subsequently, the initial node embedding is refined by modeling the connection information; finally, the decoder maps the refined embedding to the node position. The present invention alleviates the convergence problem of graph neural networks by considering prior knowledge, thereby improving the accuracy of geographic location prediction. Experiments on different real data sets show that the present invention outperforms the most advanced rule-based and learning-based baselines by 16% to 28% in the median error distance of all data sets.
[0175] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A street-level IP location method based on graph neural network, It is characterized in that include: Step 1, represent the traceroute raw measurement data of a computer network into an attributed graph; Step 2, generating an initial graph node embedding of each IP address based on the attributed graph through an encoder; the IP address includes a landmark IP address, and the geographical location corresponding to the landmark IP address is known; Step 3, injecting geographic location information into the initial graph node embedding by modeling the link information between computer network nodes; Step 4: embed and map the graph node processed in step 3 to the geographic location corresponding to the graph node, i.e., the IP address, through a decoder; Step 5: Compare the difference between the mapped geographic location and the actual geographic location, and optimize the model parameters through back propagation and gradient descent; Step 6, predicting the geographical location of other IP addresses with unknown geographical locations in the computer network based on the optimized model; The step 3 comprises: For node v i and its adjacent nodes v j , from v j to v i The message is defined as Where m i←j v j Send to v i The news, message is the message function, represents the adjacent node embedding, e ij Represents node v i and node v j The edges formed by f message Implemented as: The edge network f edge is a two-layer MLP that embeds the edge Convert to a matrix Used to calculate adjacent node embeddings f edge The architecture is: in As weights, used to control the embedding of adjacent nodes Impact on node i; and is the weight matrix of the two layers of MLP; The initial edge is first embedded into Convert it into a temporary embedding, then convert the temporary embedding into a one-dimensional weight embedding, and reconstruct the one-dimensional weight embedding into a two-dimensional orientation weight matrix To control the neighbor node v i For node v i The influence of,ReLU activation function is used to capture nonlinear relationships; U vi Indicates v i The neighbor node set of aggregate Collect all from Propagate to v i message, update function f update Using the collected messages Update v i The embedding of i The aggregate update function is defined as: in Represents node v i Updated embeddings after the encoder’s initial node embeddings; The update function is implemented as follows: Update the previous embedding by summarizing the node and aggregated messages from neighbors To update node v i Embedding, using Relu for nonlinear feature transformation.
2. According to claim 1, the IP street-level positioning method based on graph neural network, It is characterized in that The step 1 comprises: Step 1.1, build a network topology diagram: The topology of a computer network is represented by using IP addresses and links between them. All IP addresses in the traceroute raw measurement data of a computer network are converted into graph nodes. i Distinguish by node ID, the node ID value is 1 to N V , where N V It is the number of all IP addresses in the original traceroute measurement data; Convert the direct physical link between two IP addresses into a graph edge; Step 1.2, attribute extraction: Each graph node is associated with two node attributes: node delay and node IP address; for each node, the detection host repeatedly measures the delay multiple times and selects the smallest one as the node delay; finally, the node ID and node attributes are combined as the initial features of the node; Each edge is associated with the edge delay, the head node IP address, and the tail node IP address. The node close to the detection host is used as the head node of the edge, and the other node of the edge is used as the tail node. The edge delay is calculated by subtracting the node delay of the head node from the tail node.
3. According to claim 2, the IP street-level positioning method based on graph neural network, It is characterized in that In step 1.1, during the traceroute process, when the IP address and delay of a router cannot be obtained by the detection host, there are two methods for establishing an edge on the router: (i) ignoring the router and establishing an edge between the two routers before and after the router on the routing path; (ii) Map the above routers to the IP addresses found in other re-measured routing paths.
4. The IP street-level positioning method based on graph neural network according to claim 1, It is characterized in that In step 5, the following loss function is used: Where N(v) train represents all nodes in the training dataset, They represent the true geographic location and predicted geographic location of the IP in the training set after the decoder transformation, and Θ represents the trainable model parameters.
5. An IP street-level positioning device based on graph neural network, It is characterized in that include: A preprocessing module, used to represent the raw measurement data of a computer network traceroute into an attributed graph; An encoding module, configured to generate an initial graph node embedding of each IP address based on an attributed graph through an encoder; the IP address includes a landmark IP address, and the geographical location corresponding to the landmark IP address is known; A message passing module for injecting geographic location information into the initial graph node embedding by modeling the link information between computer network nodes; A decoding module, used for embedding and mapping the graph nodes processed by the message delivery module to the geographic locations corresponding to the graph nodes, i.e., the IP addresses, through a decoder; Model training and optimization module, which is used to compare the difference between the mapped geographic location and the actual geographic location, and optimize the model parameters through back propagation and gradient descent; A geographic location prediction module is used to predict the geographic location of other IP addresses with unknown geographic locations in the computer network based on the optimized model; The message transmission module is specifically used for: For node v i and its adjacent nodes v j , from v j to v i The message is defined as Where m i←j v j Send to v i The news, message is the message function, represents the adjacent node embedding, e ij Represents node v i and node v j The edges formed by f message Implemented as: The edge network f edge is a two-layer MLP that embeds the edge Convert to a matrix Used to calculate adjacent node embeddings f edge The architecture is: in As weights, used to control the embedding of adjacent nodes Impact on node i; and is the weight matrix of the two layers of MLP; The initial edge is first embedded into Convert it into a temporary embedding, then convert the temporary embedding into a one-dimensional weight embedding, and reconstruct the one-dimensional weight embedding into a two-dimensional orientation weight matrix To control the neighbor node v j For node v i The influence of,ReLU activation function is used to capture nonlinear relationships; U vi Indicates v i The neighbor node set of aggregate Collect all from Propagate to v i message, update function f update Using the collected messages Update v i The embedding of i The aggregate update function is defined as: in Represents node v i Updated embeddings after the encoder’s initial node embeddings; The update function is implemented as follows: Update the previous embedding by summarizing the node and aggregated messages from neighbors To update node v i Embedding, using Relu for nonlinear feature transformation.
6. The IP street-level positioning device based on graph neural network according to claim 5, It is characterized in that The preprocessing module is specifically used for: Step 1.1, build a network topology diagram: The topology of a computer network is represented by using IP addresses and links between them. All IP addresses in the traceroute raw measurement data of a computer network are converted into graph nodes. i Distinguish by node ID, the node ID value is 1 to N V , where N V It is the number of all IP addresses in the original traceroute measurement data; Convert the direct physical link between two IP addresses into a graph edge; Step 1.2, attribute extraction: Each graph node is associated with two node attributes: node delay and node IP address; for each node, the detection host repeatedly measures the delay multiple times and selects the smallest one as the node delay; finally, the node ID and node attributes are combined as the initial features of the node; Each edge is associated with the edge delay, the head node IP address, and the tail node IP address. The node close to the detection host is used as the head node of the edge, and the other node of the edge is used as the tail node. The edge delay is calculated by subtracting the node delay of the head node from the tail node.
7. The IP street-level positioning device based on graph neural network according to claim 6, It is characterized in that In step 1.1, during the traceroute process, when the IP address and delay of a router cannot be obtained by the detection host, there are two methods for establishing an edge on the router: (i) ignoring the router and establishing an edge between the two routers before and after the router on the routing path; (ii) Map the above routers to the IP addresses found in other re-measured routing paths.
8. The IP street-level positioning device based on graph neural network according to claim 5, It is characterized in that In the model training optimization module, the following loss function is used: Where N(v) train represents all nodes in the training dataset, They represent the true geographic location and predicted geographic location of the IP in the training set after the decoder transformation, and Θ represents the trainable model parameters.
Citation Information
Patent Citations
Graph embedding link prediction method fusing topological structure and node attributes
CN111709474A
Node embedding method based on network link and node attribute information
CN112286996A
Social network link prediction method based on perceptual neural network
CN112508085A
Software defined network performance intelligent prediction method
CN113158543A
