Enhanced IP geographic positioning method based on uncertainty quantization
By introducing deep learning models and uncertainty quantification technology into IP geolocation technology, the problems of unstable and unreliable positioning in dynamic network environments are solved, and higher robustness and reliability are achieved.
Patent Information
- Application Number
- CN202411823650.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-03-14
AI Technical Summary
The performance of existing IP geolocation technologies in dynamic network environments is degraded and the lack of systematic assessment of uncertainty in predicted results leads to unstable and unreliable positioning.
Using an enhanced IP geolocation method based on deep learning, the DEGeo and EBGeo models combined with uncertainty quantization technology is used to construct feature tensors for geolocation modeling, and the model performance is optimized through deep integration and energy regression methods.
It improves the robustness and reliability of IP geolocation, provides stable positioning results in a dynamic network environment, and evaluates predictive confidence through uncertainty quantitative indicators to avoid wrong decisions.
Smart Images

Figure CN119629151A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of IP positioning technology, and more specifically to an enhanced IP geographic positioning method based on uncertainty quantification. Background Art
[0002] IP geolocation technology is a core supporting technology in the fields of network security, content distribution, e-commerce and targeted advertising. Its task is to determine the geographic location of network devices using Internet Protocol (IP) addresses. This technology is essential for applications such as detecting network attacks, optimizing data flow routing, and implementing regional content restrictions. Early IP geolocation methods were mainly based on passive data mining or network delay measurement, such as relying on IP registration records or user-provided geographic information; another type of method uses network delay and topology information to infer the target IP location through simple triangulation. These methods have poor adaptability to network environments. With the development of machine learning technology, research in recent years has begun to try to use models such as deep learning and graph neural networks to improve the accuracy of IP geolocation. For example, the complex relationship between IP address and geographic location is modeled based on neural networks to improve the accuracy and robustness of positioning. However, it still shows obvious limitations when facing dynamic network environments (such as network delay fluctuations and packet loss).
[0003] In recent years, GraphGeo and TrustGeo models represent the latest progress based on graph neural networks. These models can capture the topological relationship between IP hosts and significantly improve positioning accuracy. However, these models still have shortcomings in dealing with the uncertainty in network measurement information and lack a systematic mechanism to quantify and process uncertainty, which limits their robustness in dynamic network environments. The following are the technical characteristics of the two: (1) GraphGeo: This method uses graph neural networks to model the topological relationship of IP addresses, which can significantly improve positioning accuracy. However, GraphGeo still lacks an effective response mechanism for dynamically changing network environments, especially when the network fluctuates greatly. (2) TrustGeo: It adopts a similar graph neural network structure and attempts to improve robustness by introducing uncertainty modeling. However, in practical applications, its ability to handle confidence assessment and high-uncertainty data is still limited, and it does not use clear uncertainty quantification indicators to measure the quality of the model.
[0004] Despite advances in IP geolocation methods, they still face challenges, especially in addressing prediction confidence and reliability. (1) Most existing methods prioritize accuracy but ignore uncertainty, resulting in unstable and unreliable positioning, especially in variable network environments where topology changes or traffic fluctuations affect accuracy. (2) Despite advances such as GraphGeo and TrustGeo, these models have difficulty fully quantifying uncertainty, limiting their adaptability and robustness under dynamic network conditions. For example, positioning accuracy may be reduced when faced with situations such as packet loss or network latency fluctuations, and the model's uncertainty is insufficiently quantified.
[0005] Current IP geolocation technologies have common problems in many aspects: (1) Accuracy issues: Early IP geolocation methods rely on a fixed relationship between network latency and geographic distance, which can easily fail in complex and dynamic network environments. For example, when there is network congestion or path changes, positioning accuracy drops significantly. (2) Robustness issues: Even advanced methods based on machine learning rely on static or quasi-static network characteristics. When the network environment changes, these models often cannot adapt, resulting in significant performance degradation. (3) Lack of uncertainty assessment: Most current methods prioritize improving the average accuracy of positioning while ignoring the quantification of uncertainty in the prediction. For example, when there is a large error in the model output, it is difficult for the system to issue a timely warning. This neglect can lead to serious wrong decisions, especially in network security scenarios.
[0006] Therefore, it is necessary to propose an enhanced IP geolocation method based on uncertainty quantification to solve the above problems. Summary of the invention
[0007] The purpose of the present invention is to solve the problems of performance degradation of the prior art in a dynamic environment and lack of evaluation of the uncertainty of prediction results.
[0008] In order to achieve the above-mentioned purpose, the present invention specifically adopts the following technical solutions:
[0009] The enhanced IP geolocation method based on uncertainty quantification includes the following steps:
[0010] Step 1: Collect network data and build static and dynamic data sets;
[0011] Step 2: Feature extraction and feature tensor construction: extract multi-dimensional features from the dataset, including the attribute information of the landmarks. a , network measurement information lm m and geographic location information p , the attribute information of the target IP a and network measurement information tgm , construct a feature tensor for geolocation modeling f;
[0012] Step 3: Deep learning model training: input the feature tensor into two deep learning models to complete geolocation modeling based on deep integration and energy regression methods respectively;
[0013] Step 4: Model output and uncertainty quantitative evaluation: output the predicted geographic location and uncertainty quantitative indicators through two deep learning models;
[0014] Step 5: Model optimization and testing: Use dynamic data sets to test model performance, evaluate its adaptability in different network environments, and adjust model parameters based on uncertainty quantification results to improve the robustness of geolocation.
[0015] Furthermore, the static data set includes the characteristics of the delay matrix and the network topology map under a fixed network environment; the dynamic data set is used to record the dynamic changes of network delay, routing fluctuations and data packet loss information.
[0016] Furthermore, the two deep learning models are DEGeo and EBGeo.
[0017] Furthermore, the DEGeo model is deeply integrated through 5 independent sub-models, each of which consists of two layers of multi-layer perceptrons, and uses ReLU activation function to extract target features. The model processes input data including the following steps:
[0018] Step 31, jointly modeling the attribute information and the delay matrix characteristics;
[0019] Step 32: Generate the mean and variance of multiple predicted values through deep integration, and output includes predicted geographic location and uncertainty quantitative indicators;
[0020] Its loss function is defined as:
[0021]
[0022] Where: μ(x) is the input feature x n The average value, σ 2 (x) is the input feature x n The variance of y n The location information of the target IP;
[0023] The EBGeo model constructs a geographic positioning model by introducing an energy function, and uses the energy function to optimize the mapping relationship between input features and output target IP. The model uses Monte Carlo sampling technology to generate multiple sets of perturbation samples to quantify prediction uncertainty. Its loss function is:
[0024]
[0025] where f θ (x n ,y n ) is the input feature x n and the target IP location information n The energy function.
[0026] Furthermore, the predicted geographic location in step 4: output the predicted latitude and longitude coordinates of the target IP
[0027] Furthermore, the calculation of the uncertainty quantification standard in step 4 includes the following steps:
[0028] Step 41, negative log likelihood (NLL): evaluate the matching degree between the predicted value and the actual value;
[0029] Step 42, calibration error (CE): measures the consistency between the predicted confidence and the actual accuracy;
[0030] Step 43, Area under Sparseness Error (AUSE): quantifies the error distribution under different confidence rankings.
[0031] Furthermore, the uncertainty quantitative index calculation is as follows: for each target IP, the uncertainty quantitative index is calculated based on the model prediction result, specifically:
[0032] Step 41, negative log likelihood (NLL):
[0033]
[0034] Where: μ(x) and σ 2 (x) is the input feature x n The mean and variance of y n The target IP location information;
[0035] Step 42, calibration error (CE):
[0036]
[0037] in: is the model prediction confidence, and pk is the actual accuracy;
[0038] Step 43, area under sparsification error (AUSE):
[0039]
[0040] Where: y n is the target IP location information, The target IP location information predicted by the model;
[0041]
[0042] Where: S is the size of the data set, S v (α) is a subset of the data set S, YesS v Uncertainty calculation of (α).
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] 1. Most existing IP geolocation technologies focus on improving positioning accuracy, but often ignore the robustness issues under network noise and data uncertainty. The present invention not only ensures positioning accuracy, but also introduces uncertainty quantification methods to evaluate prediction confidence under different network environments, thereby ensuring the stability and reliability of the model in complex and dynamic network environments. Compared with existing technologies, DEGeo and EBGeo can provide a balance between accuracy and uncertainty under variable network conditions, rather than simply optimizing a certain indicator.
[0045] 2. Most traditional IP geolocation methods rely on a single model or simple regression technology to predict geographic location, while this application uses the prediction results of multiple models to optimize the final output through two strategies: deep integration and energy regression. In particular, through uncertainty quantification, the model can automatically evaluate and calibrate the credibility of the prediction results, which is not common in the prior art. This innovative quantification method can significantly improve the ability to manage uncertainty in geolocation tasks, especially in the face of large network noise or unstable measurement data quality, and can provide users with more robust positioning results.
[0046] 3. Compared with traditional static positioning methods, DEGeo and EBGeo can dynamically adjust positioning accuracy and adapt to changes in different network environments through the adaptive capabilities of deep learning technology and energy regression. For example, in the case of large changes in network topology or incomplete data measurement, the present invention can automatically identify and adjust strategies through the built-in uncertainty management mechanism to avoid the accumulation and expansion of positioning errors. This adaptability makes the present invention more flexible than the existing technology and can cope with more complex and changeable network environments.
[0047] 4. Existing IP geolocation methods often require a lot of computing resources, especially when using complex machine learning models, the model training and reasoning speed is slow. The present invention not only improves the positioning accuracy and robustness, but also ensures the efficient use of computing resources through the design of deep integration and energy regression, and combines efficient uncertainty quantification strategies. Compared with traditional methods, DEGeo and EBGeo can significantly reduce the computing burden and shorten the model training and reasoning time at similar accuracy, which is particularly suitable for the real-time positioning needs of large-scale network data.
[0048] In summary, the present invention has obvious advantages in positioning accuracy, robustness, uncertainty quantification and computational efficiency. Especially in complex and dynamic network environments, the technical solution of the present invention provides a positioning solution that is better than the existing technology. By innovatively combining the deep integration model, energy regression model and uncertainty quantification technology, the present invention can provide more efficient and robust geolocation services in different application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 Process diagram for the DEGeo model implementation.
[0050] Figure 2 Diagram of the EBGeo model implementation process.
[0051] Figure 3 To prioritize experimental effects that cannot be quantified with certainty.
[0052] Figure 4 To give priority to the experimental effect of error optimization. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0054] Combination Figure 1-Figure 4, this paper proposes an enhanced IP geolocation method based on uncertainty quantification, which includes two innovative IP geolocation methods: DEGeo and EBGeo. These two methods are based on the Deep Ensembles (DE) and Energy-Based Regression (∈BR) models, respectively, and combined with the uncertainty quantification (UQ, Uncertainty Quantification) technology, aiming to enhance the robustness and reliability of the geolocation model. Specifically, the DEGeo and EBGeo models successfully cope with the uncertainty challenges in network measurement information by directly modeling the complex relationship between IP addresses and geographic locations. The introduced UQ metric tool effectively quantifies and evaluates the prediction uncertainty of the model, thereby optimizing its adaptability and performance in different network environments. Experimental results show that DEGeo and EBGeo demonstrate excellent uncertainty management capabilities when processing complex network data, ensuring the stability of the model while also providing higher geolocation accuracy. Compared with existing methods, the present invention has obvious advantages in balancing reliability and accuracy, making it a more robust and efficient positioning solution.
[0055] The data set used in the present invention consists of N data points, including N1 landmarks and N2 target IPs. Each landmark provides three types of information: attribute information lm a , network measurement information lm m and location information extracted from the Internet p A data-driven model f is proposed, which integrates the attribute information tg of the target IP a and network measurement information tg m , to precisely locate the target IP and estimate the associated uncertainty
[0056]
[0057] In this task, i∈[1, N1] represents the index of the landmark, and j∈[1, N2] represents the index of the target IP. n Includes all information from the landmark, as well as tg from the target IP a and tg m Output y j Indicates the actual geographic location of the target IP. The predicted location of the target IP is recorded as Uncertainty quantifies the confidence of the model's predictions. All learnable parameters are denoted by θ. For simplicity in the following expressions, we use the input-output pair (x n ,y n) is used to represent the data set, where n = 1, ..., N, to more clearly illustrate the structure of the input and output of the model.
[0058] The model organizes the input data in a tabular format and forms a data set containing features and labels after preprocessing. Features include attribute information of landmarks and target IPs from the WHOIS database, such as IP registration details, organizational information, etc. These attributes provide basic knowledge about IP addresses and their backgrounds. In addition, network measurement information (such as latency, ping, and traceroute measurement paths) is used to capture the impact of network topology, thereby further enhancing the model's understanding of the network environment. The labels are geographic coordinates (including latitude and longitude), which guide the model to learn the mapping relationship between input features and geographic locations. By processing these multi-dimensional data, the deep learning models (DEGeo and EBGeo) proposed in this invention can effectively capture the complex relationship between features and geographic locations, thereby significantly improving the accuracy and stability of geographic location prediction. This comprehensive input data processing method enables the model to make more accurate geolocation predictions in a diverse and dynamic network environment. In particular, by combining network measurement information with IP attribute knowledge, the model can not only learn the basic distribution laws of geographic locations, but also deeply explore the impact of network topology and data transmission paths on geolocation. This data fusion method significantly enhances the model's adaptability to network uncertainty and changes.
[0059] Specifically, the DEGeo and EBGeo models can share information and learn the interaction of different features between multiple sub-models through deep integrated learning and energy regression mechanisms. This enables the model to maintain efficient learning capabilities when faced with network data with complex dependencies, and to demonstrate higher robustness and accuracy in geolocation predictions. In this way, the deep learning model of the present invention can utilize rich multidimensional data, including landmark attributes, network measurement information, and geographic coordinate tags, to provide a robust solution that effectively improves the accuracy and reliability of IP geolocation, especially when dealing with incomplete and uncertain network measurement information, showing significant advantages.
[0060] To model the uncertainty in IP geolocation tasks, deep learning models for handling network measurement uncertainties are explored.
[0061] (1)DEGeo
[0062] The deep ensemble model is a simple and efficient deep learning method that has attracted widespread attention for its excellent robustness. This paper combines uncertainty quantification (UQ) technology with the deep ensemble method in IP geolocation tasks for the first time and proposes a new model called DEGeo. Figure 1 As shown. The core idea of DEGeo is to train multiple independent sub-models (M is set to 5 in the present invention), the composition of the sub-model includes multiple hidden layers, and the input features (such as longitude and latitude and delay) are extracted through linear transformation (Layer1 and Layer2) and ReLU activation function. DEGeo inputs the features of the landmark and target IP (attribute information and network measurement information) into the model, and outputs the prediction results, including mean and variance, after a series of layer processing. The model also includes calculating the negative log-likelihood (NLL) loss function, which is used to optimize the prediction accuracy during training. Then in the prediction stage, DEGeo averages the outputs, thereby using the variance of the prediction results between models to improve the stability and reliability of the prediction. Specifically, for a set of input-output pairs (where is the number of samples), DEGeo generates multiple prediction results for each input and calculates its mean and variance. DEGeo can not only provide a prediction value, but also measure the credibility of the model prediction through the variance, thereby bringing more robust and accurate results to the geolocation task. The loss function is defined as follows:
[0063]
[0064] This loss function takes into account both the average error and uncertainty estimation of the predicted values, allowing DEGeo to provide accurate predictions while maintaining good uncertainty calibration. In this way, DEGeo is particularly efficient in dealing with complex geolocation tasks. DEGeo achieves an excellent balance between model accuracy and computational efficiency. Compared with more complex models, it can provide high-quality positioning results while maintaining lower parameter complexity and computational cost, demonstrating its superior performance and practicality.
[0065] (2)EBGeo
[0066] The EBGeo model introduces the energy function f θ (x, y) to simulate the relationship between input features and target variables, thereby improving the accuracy and reliability of geolocation prediction. The core innovation of the model is that it can identify areas in the feature space that are highly correlated with the target variable through the learning of energy functions, and optimize predictions under uncertain network environments. Specifically, the EBGeo model first assumes that the dataset consists of a set of input-output pairs. where n is the index of the sample and N is the total number of samples in the dataset. Each sample consists of the input feature x n and the target value y n By using the energy function f θ(x, y), EBGeo is able to find the area that is most closely associated with the target variable for each input sample. The design of the energy function defines an optimization problem so that the area where the input features are highly correlated with the target variable has a lower energy value, thereby enhancing the prediction ability of the model. On this basis, EBGeo not only learns the mapping relationship between input and output, but also captures the potential uncertainty in the data through the energy function. This approach improves the adaptability and reliability of the model under complex network conditions, especially in the presence of noise or instability.
[0067] The innovation of EBGeo lies in identifying characteristic areas with strong correlation with the target variable through energy functions, and improving the prediction accuracy by optimizing these areas. In addition, the uncertainty quantification method enables the model to provide more reliable prediction results in an environment with high uncertainty. This method not only enhances the accuracy of the prediction, but also improves the stability and adaptability of the model under dynamically changing network conditions. The specific implementation process is as follows: Figure 2 shown.
[0068] During the training process of EBGeo, the original loss function calculation formula is:
[0069]
[0070] Because the integral is difficult to calculate, the present invention generates the disturbance sample y by Monte Carlo sampling. (m) (where m∈[1,M]) to simulate random noise and uncertainty in the target value. Specifically, these perturbation samples y (m) From a value with mean 0 and variance σ 2 is extracted from the Gaussian distribution and denoted as y (m) ~N(0,σ 2 ). Where σ is the target value y n The standard deviation of reflects the uncertainty of the prediction. These perturbation samples are generated by randomly sampling from M Gaussian component models to simulate the target variable under different noise conditions. In this process, the generated perturbation samples y (m) is added to the target value y n On the top, we get the final target sample y s , and serves as the basic data for energy function evaluation and uncertainty quantification during training. By introducing perturbation samples, EBGeo can effectively consider the noise in the target value during training, thereby enhancing the model's robustness and ability to handle uncertainty.
[0071] In addition, the probability density of the perturbation sample in the Gaussian mixture model is expressed by the function q(y (m)) describes the probability of the sample being within the distribution. Through this step, EBGeo incorporates noise and uncertainty into the model evaluation process, so that the model can maintain robust and reliable prediction capabilities in the face of inevitable noise in practical applications. This process ensures that the model's predictions are not only accurate but also well adaptable to uncertainty by simulating the probability distribution of samples with different disturbances. (m) ) is calculated as follows:
[0072]
[0073] Here, σ is the standard deviation. This formula is used to calculate the probability density of samples in the Gaussian mixture model and evaluate these perturbed samples y (m) possibility.
[0074] During the training process, the partition function Z plays a vital role. It is responsible for normalizing the output of the Gaussian mixture model, ensuring that the generated probability density is stable and consistent, and that reasonable probability estimates can be made. The calculation of the partition function ensures that the sum of the probability densities of all perturbed samples is 1, so that the probability estimates of the model output are statistically reasonable. Specifically, the partition function balances the contributions of different Gaussian components to ensure that all perturbed samples during training can reasonably reflect the distribution characteristics of the target variable. Therefore, by introducing the mechanism of perturbed samples and partition functions, EBGeo not only accurately captures the uncertainty of the target value during the training process, but also can effectively estimate the probability density of the perturbed samples, further improving the accuracy of the prediction. The formula for logZ is:
[0075]
[0076] In the calculation of log Z, the first term calculates the energy function f by weighted sum θ (x n ,y s ), which measures the compatibility between the input features and the target samples. To ensure numerical stability, the energy function is calculated by subtracting the maximum value maxf θ (x n ,y s ) to avoid overflow while maintaining the score difference, making the calculation process more stable. The model is adjusted by emphasizing the possibility of perturbation samples sampled under the Gaussian component model. More possible perturbation samples will contribute more, thereby affecting the training process of the model. The -logM term normalizes the partition function by the number of Monte Carlo samples, thereby ensuring unbiased estimation.
[0077] Then, by calculating the perturbation sample y (m)The actual probability density under the target distribution further refines the output of the model. Specifically, the actual probability density p(y (em) ) is calculated as:
[0078]
[0079] Here, P(y (m) ) represents the logarithmic probability of the disturbance term under the Gaussian component model, which is composed of y n The standard deviation σ of is parameterized. This step exponentially modifies the log probability of the perturbation term to obtain the actual probability density of sampling the perturbation term under the target distribution. The purpose is to evaluate whether the generated perturbation samples are consistent with the target distribution and ensure that the model can provide reliable predictions in the face of uncertainty.
[0080] Finally, the loss function is defined as follows:
[0081]
[0082] The performance of the model is obtained by using The final performance is evaluated by averaging the weighted scores of all M samples, and the L(θ) loss provides a measure of the overall prediction performance.
[0083] In the EBGeo test process, in order to obtain accurate prediction results, the gradient ascent refinement method was used. Specifically, the model first calculates the initial estimate y * Test, or on a set of randomly initialized Multiple tests are performed on the estimate of to explore different prediction paths and obtain more precise results Here, T represents the number of random initializations, which means that each experiment may start from a different starting point, thereby increasing the chance of the model obtaining the global optimal solution.
[0084] Once the initial estimate y = y is determined * 0, the model will perform the iterative process of gradient ascent Gradually optimize the prediction results Here, N iter Represents the number of gradient ascent iterations. In each iteration, the gradient ascent algorithm adjusts the parameters based on the gradient information of the current model parameters to minimize the value of the loss function. Each step in the gradient ascent process is based on a fixed step size η, which is a hyperparameter that controls the speed of parameter update. Through multiple iterations, the model can gradually approach the optimal solution, thereby refining its predictions and ultimately obtaining accurate output.
[0085] The innovation of this process is that EBGeo not only uses a single initialization for gradient ascent, but also increases the breadth of the search space through multiple random initializations. In this way, the model can avoid falling into the local optimal solution, ensuring better exploration of the potential solution space, and further improving the accuracy and stability of the prediction. This method of combining multiple random initializations with gradient ascent improves the robustness and adaptability of the model in complex and high-noise environments, especially in tasks such as geolocation prediction, which can effectively handle diverse input features and complex network environments.
[0086] When evaluating the performance of DEGeo and EBGeo models, the present invention adopts a variety of error and uncertainty quantification indicators to fully verify their accuracy, reliability and robustness.
[0087] (1) Error index
[0088] In order to quantify the prediction accuracy of the model, traditional indicators such as Root Mean Square Error (RMSE), Mean Absolute Error (MAE) and Median are used. ①RMSE measures the difference between the model prediction results and the actual values. It provides a measure of the overall error by calculating the mean of the sum of squares of all prediction errors and taking the square root. ②MAE measures the average prediction error of the model, is less sensitive to outliers, and provides a more robust error measure. ③Median focuses on the median of the data. By reflecting the median difference between the predicted value and the actual value, it can effectively avoid the interference of extreme values on the results. These error indicators help evaluate the accuracy and consistency of DEGeo and EBGeo in geolocation tasks.
[0089] (2) Uncertain vectorization index
[0090] In addition to traditional error assessment, DEGeo and EBGeo also evaluate the reliability of model predictions through uncertainty quantification, especially when dealing with complex and highly uncertain data. To measure the uncertainty of predictions, the model introduces uncertainty quantification indicators, which quantify the performance of the model at different confidence levels and help identify potential error areas. Common uncertainty quantification indicators include: ① Negative Log-Likelihood (NLL), NLL measures the degree of mismatch between the probability distribution predicted by the model and the actual observations. Smaller NLL values indicate that the prediction results are more consistent with the actual observations, thus reflecting the prediction reliability of the model. ② Area Under the Sparsification Error (AUSE), AUSE measures the prediction consistency of the model at different sparsification levels. Specifically, AUSE evaluates whether the confidence ranking of the model matches the actual error by gradually reducing the samples in the dataset and observing the prediction errors of the remaining samples. Smaller AUSE values indicate that the confidence ranking of the model is more accurate and can better reflect which predictions are more reliable. ③ Calibration Error (CE), CE measures the consistency between the confidence of the model prediction and the actual accuracy. If the model prediction confidence is high but the actual error is large, the CE value is high, indicating that the model is overconfident in some areas. A low CE value indicates that the prediction confidence is more consistent with the actual accuracy, which enhances the reliability of the model.
[0091] Through these uncertainty vectorization indicators, DEGeo and EBGeo can more comprehensively evaluate the performance of the model under different uncertainty conditions and optimize the robustness and reliability of the prediction. These indicators not only help identify potential error areas, but also guide the further optimization of the model, thereby providing more robust prediction results in a dynamic and uncertain network environment.
[0092] The present invention uses three real-world IP geolocation datasets, from New York, Los Angeles, and Shanghai. The sizes of these datasets are 91,808, 92,804, and 126,258 IP addresses, respectively. To ensure that the experiment has a wide geographical coverage and a diverse network environment, these datasets have been processed as necessary. The data processing follows the aforementioned process. Specifically, the dataset is randomly divided into 80% of the IP addresses as a training set and the remaining 20% as a test set. During the training process, 70% of the IP addresses are used as landmark data, and the remaining 30% are used as target IP addresses for prediction. During the test process, the training set is used as a landmark dataset, and the other addresses are used as target IP addresses to report the test results of the model.
[0093] In order to evaluate the performance of the EBGeo model in handling uncertainty, two strong baseline models were selected for comparison: ① GraphGeo establishes neighborhood relationships by considering the topological and semantic relationships between IP hosts. GraphGeo is able to use network structure information to optimize the accuracy of geolocation. ② TrustGeo incorporates sources of uncertainty into the graph learning process, aiming to improve the accuracy and credibility of IP geolocation, especially in the presence of noise and uncertainty. These two comparative models provide valuable references and help verify the advantages of DEGeo and EBGeo in uncertainty handling and positioning accuracy.
[0094] For DEGeo, 5 separate networks were used, each with a 2-layer multilayer perceptron (MLP) architecture. The activation function ReLU was used after each layer, with a size of 66 for the first layer and 33 for the last layer, except for the last one. For EBGeo, a similar 6-layer MLP was used, with ReLU activation function for the first two layers and tanh activation function for the last four layers. The size of the hidden layers was always 64, except for the last layer. Training consisted of sampling twice from a proposal distribution consisting of two Gaussian distributions, whose standard deviation was based on the variance of the target variable. All models were implemented using the PyTorch library and trained on a GeForce RTX 4090 GPU. The Adam optimizer was used during training. During the testing phase, the number of random initializations (T) and the number of gradient ascent iterations (N) were proportional to each other. iter ) are set to (10,20), (30,10) and (20,10) respectively. Meanwhile, the step size (η) of gradient ascent for all datasets is fixed at 5×10 -5 .
[0095] Figure 3 and Figure 4 The geolocalization performance of different models on the New York, Los Angeles, and Shanghai datasets is summarized, evaluated under the conditions of prioritizing UQ and prioritizing error optimization, respectively.
[0096] Figure 3 The performance comparison of different models on the New York, Los Angeles, and Shanghai datasets is shown, with a focus on the case where uncertainty quantification (UQ) is prioritized. As can be seen from the table, TrustGeo performs well in accuracy-related indicators such as RMSE and MAE, especially on the New York dataset, with RMSE of 2.3092 and MAE of 1.3177, both of which are the best. However, despite TrustGeo's outstanding performance in accuracy, it is relatively weak in UQ indicators such as NLL and CE, which means that its ability in uncertainty quantification is not as good as other models.
[0097] In contrast, EBGeo performs extremely well in terms of UQ. In particular, on the Shanghai dataset, the NLL is -0.0445 and the CE is 0.0017, both of which are the lowest values among all models. This advantage of EBGeo enables it to provide a more reliable assessment of prediction confidence under noisy conditions, thereby enhancing the robustness and practicality of the model. Therefore, EBGeo is very suitable for practical application scenarios that require accurate uncertainty assessment. Although DEGeo is slightly inferior in accuracy indicators such as RMSE and MAE, especially on the New York dataset, the RMSE is 2.7440 and the MAE is 1.9441, its performance in UQ indicators such as AUSE and CE is still very robust. For example, on the New York dataset, DEGeo's performance in AUSE is relatively outstanding, showing its advantage in uncertainty quantification. DEGeo adopts a deep integration model to effectively capture the complex relationships of the data and enhance the ability to model data uncertainty, especially in dynamic environments. These results show that EBGeo and DEGeo undoubtedly show strong adaptability in tasks that prioritize UQ, especially in tasks that require high robustness and accurate uncertainty assessment, EBGeo and DEGeo provide more excellent solutions.
[0098] Figure 4 The focus is on error optimization (such as RMSE and MAE). In this case, EBGeo still performs well, especially in the New York dataset, with RMSE and MAE results of 2.2859 and 1.4326, respectively, which are comparable to or even slightly better than TrustGeo. However, although EBGeo's accuracy performance is excellent, its performance on the UQ indicator is slightly inferior. In contrast, DEGeo's performance on accuracy indicators is relatively weak, with an RMSE of 2.5203 and a MAE of 1.6354 (on the New York dataset), but its performance on UQ indicators such as AUSE and CE is relatively robust, showing good comprehensive performance. DEGeo can effectively capture the complex relationships of data and enhance the modeling capabilities of uncertainty sources through deep integration methods, especially with strong adaptability in dynamic environments.
[0099] From the data in the two tables, we can see that EBGeo provides a good balance between accuracy and uncertainty quantification, especially in tasks that focus on UQ. DEGeo, with its deep integration advantage, provides better uncertainty modeling capabilities, although it is slightly inferior in some accuracy indicators. Overall, these complementary results emphasize the adaptability of different models according to specific application requirements. Whether in scenarios where accuracy is prioritized or in tasks that require accurate uncertainty estimation, EBGeo and DEGeo can provide powerful and flexible solutions.
[0100] In this work, two new DEGeo and EBGeo methods are proposed, which combine DE and EBR models with uncertainty quantification indicators to improve the robustness and reliability of geolocation accuracy. DEGeo and EBGeo can effectively capture the complex relationship between IP addresses and geographic locations. In addition, they systematically quantify and evaluate the uncertainty of the prediction. Comprehensive experiments on benchmark datasets demonstrate the efficiency and robustness of the methods in processing complex network data. Through experiments, it can be concluded that if the core goal of the task is to improve accuracy, TrustGeo may be the most suitable choice; however, when the task needs to pay more attention to uncertainty quantification, EBGeo and DEGeo are undoubtedly more advantageous, especially in the ability to accurately model uncertainty in complex environments. Future work can explore extending this method to real-time network applications.
[0101] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.
Claims
1. An enhanced IP geolocation method based on uncertainty quantification, characterized in that: The following steps are involved: Step 1: Collect network data and build static and dynamic data sets; Step 2: Feature extraction and feature tensor construction: extract multi-dimensional features from the dataset, including the attribute information of the landmarks. a , network measurement information lm m and geographic location information p , the attribute information of the target IP a and network measurement information tg m , construct a feature tensor for geolocation modeling f; Step 3: Deep learning model training: input the feature tensor into two deep learning models to complete geolocation modeling based on deep integration and energy regression methods respectively; Step 4: Model output and uncertainty quantitative evaluation: output the predicted geographic location and uncertainty quantitative indicators through two deep learning models; Step 5: Model optimization and testing: Use dynamic data sets to test model performance, evaluate its adaptability in different network environments, and adjust model parameters based on uncertainty quantification results to improve the robustness of geolocation.
2. The enhanced IP geolocation method based on uncertainty quantification according to claim 1, characterized in that: The static data set includes features of a delay matrix and a network topology map in a fixed network environment; The dynamic data set is used to record information about dynamic changes in network delay, routing fluctuations, and packet loss.
3. The enhanced IP geolocation method based on uncertainty quantification according to claim 2, characterized in that: The two deep learning models are DEGeo and EBGeo.
4. The enhanced IP geolocation method based on uncertainty quantification according to claim 3 is characterized in that: The DEGeo model is integrated by multiple independent sub-models, each of which is composed of two layers of multi-layer perceptrons and uses ReLU activation function to extract target features.
5. The enhanced IP geolocation method based on uncertainty quantification according to claim 4 is characterized in that: The processing of input data by the DEGeo model includes the following steps: Step 31, jointly modeling the attribute information and the delay matrix characteristics; Step 32: Generate the mean and variance of multiple predicted values through deep integration, and output includes predicted geographic location and uncertainty quantitative indicators; Its loss function is defined as: Where: μ(x) is the input feature x n The average value, σ 2 (x) is the input feature x n The variance of y n The location information of the target IP.
6. The enhanced IP geolocation method based on uncertainty quantification according to claim 3, characterized in that: The EBGeo model introduces an energy function to construct a geographic positioning model, and uses the energy function to optimize the mapping relationship between input features and output target IP.
7. The enhanced IP geolocation method based on uncertainty quantification according to claim 6, characterized in that: The EBGeo model uses Monte Carlo sampling technology to generate multiple sets of perturbation samples to quantify prediction uncertainty, and its loss function is: where f θ (x n ,y n ) is the input feature x n and the target IP location information n The energy function.
8. The enhanced IP geolocation method based on uncertainty quantification according to claim 1, characterized in that: Predicted geographic location in step 4: Output the predicted latitude and longitude coordinates of the target IP 9. The enhanced IP geolocation method based on uncertainty quantification according to claim 8, characterized in that: The calculation of the uncertainty quantification standard in step 4 includes the following steps: Step 41, negative log likelihood, evaluating the matching degree between the predicted value and the actual value; Step 42, calibration error, measuring the consistency between the prediction confidence and the actual accuracy; Step 43: Sparsely calculate the area under the error to quantify the error distribution under different confidence rankings.
10. The enhanced IP geolocation method based on uncertainty quantification according to claim 9, characterized in that: Calculation of uncertainty quantitative index: For each target IP, the uncertainty quantitative index is calculated based on the model prediction results, specifically: Step 41, negative log-likelihood: Where: μ(x) and σ 2 (x) is the input feature x n The mean and variance of y n The target IP location information; Step 42, calibration error: in: is the model prediction confidence, and pk is the actual accuracy; Step 43: Area under the sparsification error: Where: y n is the target IP location information, The target IP location information predicted by the model; Where: S is the size of the data set, S V (α) is a subset of the data set S, YesS V Uncertainty calculation of (α).