Method, electronic device and storage medium for detecting VPN tunnel

By constructing the indicator vector of VPN tunnels and determining outliers, the problem of inaccurate VPN tunnel anomaly detection is solved, the accuracy of detection results is improved, and false detections and missed detections are reduced.

CN114513435BActive Publication Date: 2024-08-27SANGFOR TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210042904.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-14
Publication Date
2024-08-27
Estimated Expiration
2042-01-14

AI Technical Summary

Technical Problem

The anomaly detection results of VPN tunnels in the existing technology are inaccurate, and there are cases of false detection and missed detection.

Method used

By obtaining the indicator information of VPN tunnels, constructing indicator vectors, and determining outliers to identify abnormal VPN tunnels. Indicator information includes operators, latitude and longitude, and performance indicators, such as average packet loss, delay, bandwidth, etc. One-hot encoding and normalization are used to construct an indicator vector, and density clustering algorithm or isolation forest algorithm is used to determine outliers.

Benefits of technology

It improves the accuracy of VPN tunnel anomaly detection, reduces false detections and missed detections, and enhances the credibility of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114513435B
    Figure CN114513435B
Patent Text Reader

Abstract

The present application discloses a method for detecting a VPN tunnel, an electronic device, and a storage medium. The method for detecting a VPN tunnel comprises: obtaining indicator information corresponding to each monitored VPN tunnel; the indicator information comprises an operator, longitude and latitude, and an indicator value of at least one set performance indicator; constructing a corresponding indicator vector based on the indicator information corresponding to each VPN tunnel; determining outliers in the indicator vector based on all constructed indicator vectors; and determining an abnormal VPN tunnel based on all determined outliers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a method for detecting a VPN tunnel, an electronic device, and a storage medium. Background Art

[0002] A Virtual Private Network (VPN) is a technology that establishes a private network on a public network. VPN supports the establishment of a VPN tunnel between the communicating parties, thereby encrypting the communication through the VPN tunnel and improving the transmission security.

[0003] After establishing a VPN tunnel, it is necessary to detect whether the VPN tunnel is abnormal. However, in the related art, the method for detecting abnormal VPN tunnels has the problem of false detection, and the detection result is inaccurate. Summary of the invention

[0004] In view of this, embodiments of the present application provide a method, an electronic device, and a storage medium for detecting a VPN tunnel, so as to solve the problem of inaccurate abnormality detection results of a VPN tunnel in the prior art.

[0005] To achieve the above purpose, the technical solution of this application is implemented as follows:

[0006] The present invention provides a method for detecting a VPN tunnel, including:

[0007] Obtaining indicator information corresponding to each monitored VPN tunnel; the indicator information includes the operator, longitude and latitude, and an indicator value of at least one set performance indicator;

[0008] Based on the indicator information corresponding to each VPN tunnel, a corresponding indicator vector is constructed;

[0009] Based on all constructed indicator vectors, outliers in the indicator vectors are determined;

[0010] Based on all the identified outliers, abnormal VPN tunnels are identified.

[0011] In the above solution, the at least one set performance indicator includes at least one of the following:

[0012] Average number of packet losses;

[0013] Average delay;

[0014] Delay jitter;

[0015] The rate at which packets are sent;

[0016] The rate at which packets are received;

[0017] bandwidth.

[0018] In the above solution, the construction of the corresponding indicator vector includes:

[0019] Based on the indicator information corresponding to each VPN tunnel and the set threshold range corresponding to each first set indicator, all monitored VPN tunnels are divided into a first VPN tunnel, a second VPN tunnel and a third VPN tunnel;

[0020] Based on the indicator information corresponding to each third VPN tunnel, a corresponding indicator vector is constructed; wherein,

[0021] The first setting indicator represents the key performance indicator included in the setting performance indicator;

[0022] The first VPN tunnel represents an abnormal VPN tunnel;

[0023] The second VPN tunnel represents a normal VPN tunnel, and the indicator value of the first set indicator corresponding to the second VPN tunnel is less than the minimum threshold of the corresponding set threshold range, or is within the corresponding set threshold range;

[0024] The third VPN tunnel represents a VPN tunnel other than the first VPN tunnel and the second VPN tunnel among the monitored VPN tunnels.

[0025] In the above solution, when constructing the corresponding indicator vector, the method includes:

[0026] Perform one-hot encoding on the operator corresponding to the VPN tunnel to obtain the encoding value;

[0027] Normalizing the longitude and latitude corresponding to the VPN tunnel to obtain a first normalized value;

[0028] Normalizing the indicator value of the set performance indicator corresponding to the VPN tunnel to obtain a second normalized value;

[0029] An indicator vector corresponding to the VPN tunnel is constructed based on the encoding value, the first normalized value, and the second normalized value corresponding to the VPN tunnel.

[0030] In the above solution, the normalization of the longitude and latitude corresponding to the VPN tunnel to obtain a first normalized value includes:

[0031] Based on the first set value and the longitude value corresponding to the VPN tunnel, obtain a normalized value of the longitude corresponding to the VPN tunnel;

[0032] Based on the second set value and the latitude value corresponding to the VPN tunnel, a normalized value of the latitude corresponding to the VPN tunnel is obtained.

[0033] In the above solution, the normalization of the indicator value of the set performance indicator corresponding to the VPN tunnel to obtain the second normalized value includes:

[0034] Based on the indicator value of the set performance indicator corresponding to the VPN tunnel and the corresponding average indicator value, and based on the standard deviation corresponding to the set performance indicator, a second normalized value of the set performance indicator corresponding to the VPN tunnel is determined.

[0035] In the above solution, when the number of performance indicators is set to be greater than or equal to 2, the outliers in the indicator vectors are determined based on all constructed indicator vectors, including one of the following:

[0036] Based on all constructed first indicator vectors, determining outliers in the first indicator vectors;

[0037] Based on all the constructed second indicator vectors, outliers in the second indicator vectors are determined; wherein,

[0038] Each first indicator vector is constructed by the operator, longitude and latitude corresponding to the VPN tunnel, and an indicator value of a set performance indicator;

[0039] The second indicator vector is constructed by the indicator values ​​of the operator, longitude and latitude corresponding to the VPN tunnel and all set performance indicators.

[0040] The present application provides a device for detecting a VPN tunnel, including:

[0041] An acquisition unit, configured to acquire index information corresponding to each monitored VPN tunnel; the index information includes an operator, longitude and latitude, and an index value of at least one set performance index;

[0042] A construction unit, configured to construct a corresponding indicator vector based on the indicator information corresponding to each VPN tunnel;

[0043] A first determining unit, configured to determine outliers in the indicator vector based on all constructed indicator vectors;

[0044] The second determining unit is configured to determine an abnormal VPN tunnel based on all determined outliers.

[0045] An embodiment of the present application further provides an electronic device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein the processor is used to execute the steps of the above-mentioned method for detecting a VPN tunnel when running the computer program.

[0046] The embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned method for detecting a VPN tunnel are implemented.

[0047] In an embodiment of the present application, the indicator information corresponding to each monitored VPN tunnel is obtained; the indicator information includes the operator, longitude and latitude, and the indicator value of at least one set performance indicator; based on the indicator information corresponding to each VPN tunnel, a corresponding indicator vector is constructed; based on all the constructed indicator vectors, outliers in the indicator vector are determined; based on all the determined outliers, abnormal VPN tunnels are determined. Since different VPN tunnels have similar service qualities in the same operator environment and similar geographical location environment, the abnormal indicator vectors corresponding to VPN tunnels with the same operator and similar longitude and latitude will deviate from the uniformly distributed indicator vector. In other words, the VPN tunnels corresponding to the outliers are VPN tunnels with large differences in service quality. Therefore, the abnormal VPN tunnels can be accurately determined through the outliers, which can reduce the cases of false detection and missed detection, and improve the accuracy of the abnormal detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of the implementation flow of the method for detecting a VPN tunnel provided in an embodiment of the present application;

[0049] Figure 2 A schematic diagram of the implementation process of constructing an indicator vector in the method for detecting a VPN tunnel provided in an embodiment of the present application;

[0050] Figure 3 A schematic diagram of an implementation flow of constructing an indicator vector in a method for detecting a VPN tunnel provided in another embodiment of the present application;

[0051] Figure 4 A schematic diagram of the implementation flow of the method for detecting VPN tunnels provided in the application embodiment of the present application;

[0052] Figure 5 A schematic diagram of the structure of a device for detecting a VPN tunnel provided in an embodiment of the present application;

[0053] Figure 6 A schematic diagram of the hardware composition of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] Software Defined Wide Area Network (SD-WAN) is a service formed by applying software defined network (SDN) technology to wide area network scenarios. This service is used to connect enterprise networks, data centers, Internet applications and cloud services over a wide geographical range.

[0055] The vigorous development of SD-WAN technology has accelerated the application of VPN tunnel technology in actual enterprise environments. Rapid and accurate detection and evaluation of the service quality of VPN tunnels can effectively identify tunnels with poor or abnormal service quality. Operation and maintenance personnel can thus promptly troubleshoot and maintain abnormal VPN tunnels, or formulate strategies such as automatic routing and intelligent quality of service (QoS) assurance to maximize the service quality of user services.

[0056] In related technologies, VPN tunnel anomaly detection is usually performed in the following two ways:

[0057] Method 1: Compare the index value of the performance index of the VPN tunnel with the set threshold, and determine whether the VPN tunnel is abnormal based on the comparison result. For example, when the actual packet loss rate of the VPN tunnel is higher than the specified threshold, it is determined that the VPN tunnel is abnormal, and an alarm information about the VPN tunnel is generated. However, the index value of the VPN tunnel has the characteristic of dynamic change. For example, the business is relatively busy during the day compared to the night. The index value corresponding to the same performance index during the day is significantly higher than the index value corresponding to the night. The detection result obtained in this way is inaccurate, and there are cases of false detection or missed detection.

[0058] Method 2: Select a specific performance indicator of the VPN tunnel, and determine whether the VPN tunnel is abnormal based on the indicator value and corresponding historical data corresponding to the performance indicator. For example, the predicted value corresponding to the current moment is predicted through the historical data corresponding to the specific performance indicator. When the difference between the actual indicator value and the predicted value is greater than the set difference, it indicates that the actual indicator value is abnormal and the VPN tunnel is abnormal. However, this method strictly depends on the quantity and quality of historical data, and in actual applications, insufficient or missing historical data often occurs, resulting in inaccurate detection results.

[0059] In summary, the above-mentioned method for detecting anomalies in VPN tunnels has a low accuracy of detection results, and there are cases of false detection or missed detection.

[0060] Based on this, the embodiment of the present application provides a method for detecting VPN tunnels, obtaining the indicator information corresponding to each monitored VPN tunnel; the indicator information includes the operator, longitude and latitude, and the indicator value of at least one set performance indicator; based on the indicator information corresponding to each VPN tunnel, a corresponding indicator vector is constructed; based on all the constructed indicator vectors, outliers in the indicator vector are determined; based on all the determined outliers, abnormal VPN tunnels are determined. Because different VPN tunnels have similar service quality in the same operator environment and similar geographical location environment, and the VPN tunnels corresponding to the outliers are VPN tunnels with large differences in service quality, therefore, based on the determined outliers, the abnormal VPN tunnels are determined, which can improve the accuracy of the abnormal detection results.

[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0062] Figure 1 The following is a schematic diagram of the implementation process of the method for detecting VPN tunnels provided in the embodiment of the present application, wherein the execution subject of the process is an electronic device such as a terminal or a server. Figure 1 As shown, the method for detecting a VPN tunnel includes:

[0063] Step 101: Obtain indicator information corresponding to each monitored VPN tunnel; the indicator information includes the operator, longitude and latitude, and an indicator value of at least one set performance indicator.

[0064] Here, the electronic device obtains the indicator information corresponding to each monitored VPN tunnel when it is necessary to perform abnormality detection on the monitored VPN tunnel. In actual application, the electronic device can perform abnormality detection on the monitored VPN tunnel at a set time interval.

[0065] Among them, the electronic device can obtain the indicator information corresponding to the VPN tunnel in the following ways:

[0066] Method 1: The VPN device can report the indicator information corresponding to each monitored VPN tunnel to the electronic device in real time (e.g., one-click detection) or according to a set period. The electronic device receives the indicator information corresponding to each VPN tunnel reported by each NPN device. Among them, the VPN device represents the device used to deploy the VPN tunnel. In actual application, the set monitoring software is deployed in the VPN device, and the VPN device collects the indicator information corresponding to the monitored VPN tunnel through the monitoring software.

[0067] Method 2: The electronic device can also send request information to the VPN device in real time (eg, one-click detection) or at a set period to request to obtain the indicator information corresponding to each monitored VPN tunnel.

[0068] The operator in the indicator information includes the operator corresponding to each of the two ends of the VPN tunnel. The longitude and latitude in the indicator information includes the longitude and latitude corresponding to each of the two ends of the VPN tunnel.

[0069] It should be noted that the operators corresponding to the two ends of the same VPN tunnel can be the same or different.

[0070] In order to improve the accuracy of the anomaly detection result, in some embodiments, the at least one set performance indicator includes at least one of the following:

[0071] Average number of packet losses;

[0072] Average delay;

[0073] Delay jitter;

[0074] The rate at which packets are sent;

[0075] The rate at which packets are received;

[0076] bandwidth.

[0077] Here, the average number of packet losses and the average delay are calculated based on the set period.

[0078] In practical applications, the number of performance indicators can be one or at least two. Since different performance indicators have nonlinear dependencies, the more performance indicators are set, the higher the accuracy and credibility of the anomaly detection results obtained.

[0079] Step 102: Based on the indicator information corresponding to each VPN tunnel, a corresponding indicator vector is constructed.

[0080] Here, the electronic device constructs a corresponding indicator vector based on the operator, longitude and latitude corresponding to each VPN tunnel and the indicator value of at least one set performance indicator. The indicator vector is a multi-dimensional vector.

[0081] It should be noted that in the process of constructing the indicator vector, it is necessary to quantify the operators corresponding to the VPN tunnels.

[0082] When the number of performance indicators is greater than or equal to 2, the electronic device can construct a corresponding indicator vector according to the operator, longitude and latitude corresponding to the VPN tunnel and the indicator value of a performance indicator. Thus, at least two indicator vectors corresponding to the VPN tunnel can be constructed, and the number of indicator vectors corresponding to the same VPN tunnel is the same as the number of performance indicators.

[0083] When the number of performance indicators is greater than or equal to 2, the electronic device may also construct a corresponding indicator vector according to the operator, longitude and latitude corresponding to the VPN tunnel and the indicator values ​​of all performance indicators. In this case, each VPN tunnel corresponds to one indicator vector.

[0084] In practical applications, when the performance indicators are set to include average packet loss, average delay, delay jitter, data packet sending rate, data packet receiving rate and bandwidth, for any i-th VPN Li, the indicator vector constructed based on the indicator information corresponding to time t can be expressed as: <drop,delay,jitter,rr,sr,bw,cs,rs,C lo , C la , R lo , R la >. Among them, drop represents the average number of packet losses; delay represents the average delay; jitter represents the delay jitter; rr represents the rate at which packets are sent; sr represents the rate at which packets are received; bw represents the bandwidth; cs and rs represent the operators of the VPN devices connected at both ends of the VPN tunnel respectively; C lo and C la Respectively represents the longitude of the VPN devices connected at both ends of the VPN tunnel; R lo and R la Respectively characterize the latitude of the VPN devices connected at both ends of the VPN tunnel.

[0085] In order to improve the recall rate of the abnormal detection results, the recall rate represents the ratio of the number of abnormal VPN tunnels detected to the number of abnormal VPN tunnels actually existing. Figure 2 As shown, the construction of the corresponding indicator vector includes steps 201 to 202, which are as follows:

[0086] Step 201: Based on the indicator information corresponding to each VPN tunnel and the set threshold range corresponding to each first set indicator, all monitored VPN tunnels are divided into a first VPN tunnel, a second VPN tunnel and a third VPN tunnel.

[0087] Wherein, the first setting indicator represents the key performance indicator included in the setting performance indicator;

[0088] The first VPN tunnel represents an abnormal VPN tunnel;

[0089] The second VPN tunnel represents a normal VPN tunnel, and the indicator value of the first set indicator corresponding to the second VPN tunnel is less than the minimum threshold of the corresponding set threshold range, or is within the corresponding set threshold range;

[0090] The third VPN tunnel represents a VPN tunnel other than the first VPN tunnel and the second VPN tunnel among the monitored VPN tunnels.

[0091] Here, the key performance indicators include at least one of the following:

[0092] Average number of packet losses;

[0093] Average delay;

[0094] Delay jitter;

[0095] The rate at which packets are sent;

[0096] The rate at which packets are received.

[0097] In step 201, the electronic device determines the first VPN tunnel with abnormal service quality and the second VPN tunnel with good service quality based on the indicator information corresponding to each VPN tunnel and the set threshold range corresponding to each first set indicator; among all monitored VPN tunnels, after eliminating the first VPN tunnel and the second VPN tunnel, the remaining VPN tunnel is the third VPN tunnel. Each first set indicator corresponds to a set threshold range, and different first set indicators may correspond to different set threshold ranges.

[0098] In actual application, when the first set indicator is the average number of packet losses, average delay or delay jitter, the indicator value of the first set indicator corresponding to the first VPN tunnel is greater than the maximum threshold of the corresponding set threshold range; the indicator value of the first set indicator corresponding to the second VPN tunnel is less than the minimum threshold of the corresponding set threshold range.

[0099] When the first set indicator is the sending rate of data packets or the receiving rate of data packets, the indicator value of the first set indicator corresponding to the first VPN tunnel is outside the corresponding set threshold range; the indicator value of the first set indicator corresponding to the second VPN tunnel is within the corresponding set threshold range.

[0100] It should be noted that, when the key performance indicators include average packet loss, average delay, delay jitter, data packet sending rate and data packet receiving rate, at any time t, the average packet loss, average delay or delay jitter corresponding to the first VPN tunnel is greater than the maximum threshold of the corresponding set threshold range, or the data packet sending rate or data packet receiving rate corresponding to the first VPN tunnel is outside the corresponding set threshold range; at any time t, the average packet loss, average delay and delay jitter corresponding to the second VPN tunnel are all less than the minimum threshold of the corresponding set threshold range, and the data packet sending rate and data packet receiving rate corresponding to the first VPN tunnel are both within the corresponding set threshold range. At this time, the first VPN tunnel is a high-quality VPN tunnel.

[0101] Step 202: construct a corresponding indicator vector based on the indicator information corresponding to each third VPN tunnel.

[0102] Here, the method for the electronic device to construct the indicator vector corresponding to the third VPN tunnel based on the indicator information corresponding to the third VPN tunnel, please refer to the above description of constructing the indicator vector, which is not repeated here.

[0103] In this embodiment, among all the monitored VPN tunnels, the first VPN tunnel and the second VPN tunnel are eliminated, and a part of abnormal VPN tunnels and NPN tunnels with high service quality can be eliminated. Based on the indicator information corresponding to the remaining third VPN tunnel, an indicator vector corresponding to the third VPN tunnel is constructed, so that outliers can be determined based on the indicator vector corresponding to the third VPN tunnel, and then the abnormal VPN tunnel is determined again based on the determined outliers. Since the interference of the second VPN tunnel with a certain abnormality and the second VPN tunnel with high service quality on the abnormal detection result is excluded, the probability of false detection or missed detection can be reduced, and the recall rate of the abnormal detection result can be improved.

[0104] In order to facilitate the detection of outliers and improve the accuracy of anomaly detection results, the indicator information corresponding to the VPN tunnel is preprocessed before constructing the indicator vector. Figure 3 As shown, in step 102 or 202, when constructing the corresponding indicator vector, the method includes steps 301 to 304, which are as follows:

[0105] Step 301: One-hot encode the operator corresponding to the VPN tunnel to obtain an encoding value.

[0106] Here, the electronic device performs unique-hot encoding on the operators of the VPN devices connected at both ends of each VPN tunnel, and obtains the encoding value corresponding to the corresponding VPN tunnel. Among them, unique-hot encoding is also called one-hot encoding. For example, when all VPN tunnels have three operators, namely China Unicom, China Mobile and China Telecom, the values ​​of these three operators after one-hot encoding are (001, 010, 100) respectively.

[0107] It should be noted that, in steps 301 to 304 , the VPN tunnel may be the VPN tunnel in step 102 , or may be the third VPN tunnel in step 202 .

[0108] Step 302: normalize the longitude and latitude corresponding to the VPN tunnel to obtain a first normalized value.

[0109] Here, the first normalized value corresponding to the VPN tunnel includes a normalized value corresponding to the longitude and a normalized value corresponding to the latitude.

[0110] The electronic device normalizes the longitude corresponding to the VPN tunnel to obtain a normalized value of the longitude corresponding to the VPN tunnel, and normalizes the latitude corresponding to the VPN tunnel to obtain a normalized value of the latitude corresponding to the VPN tunnel. The normalized value is any value between 0 and 1.

[0111] In order to standardize the indicator vector and further improve the accuracy of the anomaly detection result, in some embodiments, the latitude and longitude corresponding to the VPN tunnel are normalized to obtain a first normalized value, including:

[0112] Based on the first set value and the longitude value corresponding to the VPN tunnel, obtain a normalized value of the longitude corresponding to the VPN tunnel;

[0113] Based on the second set value and the latitude value corresponding to the VPN tunnel, a normalized value of the latitude corresponding to the VPN tunnel is obtained.

[0114] Here, the electronic device respectively calculates the longitude C at both ends of the VPN tunnel in the following manner: lo and R lo Perform normalization:

[0115] When the VPN devices connected at either end of the VPN tunnel are located at x degrees east longitude, the normalized value of the longitude corresponding to the VPN tunnel is x / 180.

[0116] When the VPN devices connected at either end of the VPN tunnel are located at x degrees west longitude, the normalized value of the longitude corresponding to the VPN tunnel is -x / 180.

[0117] The electronic device respectively registers the latitude C at both ends of the VPN tunnel in the following manner:la and R la Perform normalization:

[0118] When the VPN devices connected at either end of the VPN tunnel are located at y degrees north latitude, the normalized value of the latitude corresponding to the VPN tunnel is y / 90.

[0119] When the VPN devices connected to either end of the VPN tunnel are at a south latitude of y degrees, the normalized value of the latitude corresponding to the VPN tunnel is -y / 90.

[0120] Step 303: normalize the index value of the set performance index corresponding to the VPN tunnel to obtain a second normalized value.

[0121] Here, the electronic device normalizes the indicator value of the set performance indicator corresponding to the VPN tunnel based on the set normalization formula to obtain a second normalized value of the set performance indicator corresponding to the VPN tunnel.

[0122] In some embodiments, the step of normalizing the indicator value of the set performance indicator corresponding to the VPN tunnel to obtain a second normalized value includes:

[0123] Based on the indicator value of the set performance indicator corresponding to the VPN tunnel and the corresponding average indicator value, and based on the standard deviation corresponding to the set performance indicator, a second normalized value of the set performance indicator corresponding to the VPN tunnel is determined.

[0124] Here, the electronic device calculates an average index value corresponding to the corresponding set performance indicator and a standard deviation corresponding to the corresponding set performance indicator based on the index value of the set performance indicator corresponding to each VPN tunnel; calculates the difference between the index value of the set performance indicator corresponding to the VPN tunnel and the corresponding average index value; and determines a second normalized value of the set performance indicator corresponding to the VPN tunnel based on the difference and the corresponding standard deviation.

[0125] In actual application, the electronic device determines the second normalized value of each set performance indicator corresponding to the VPN tunnel based on the following formula:

[0126]

[0127] in, Characterizes the second normalized value; x k Characterize the k-th set performance index; Characterizes the index value corresponding to the kth set performance index of any i-th VPN tunnel at time t; Characterizes the average index value of the kth set performance index corresponding to all VPN tunnels; Characterizes the standard deviation of the kth set performance indicator corresponding to all VPN tunnels.

[0128] Thus, the electronic device can determine the second normalized value corresponding to the set performance indicator corresponding to each VPN tunnel.

[0129] Step 304: construct an indicator vector corresponding to the VPN tunnel based on the encoding value, the first normalized value, and the second normalized value corresponding to the VPN tunnel.

[0130] Here, when the electronic device determines the coding value, the first normalized value and the second normalized value corresponding to the VPN tunnel, the electronic device constructs an indicator vector corresponding to the VPN tunnel based on the coding value, the first normalized value and the second normalized value corresponding to the VPN tunnel.

[0131] Step 103: Based on all constructed indicator vectors, outliers in the indicator vectors are determined.

[0132] Here, the electronic device determines the outliers in the indicator vector based on all constructed indicator vectors by using a set anomaly detection algorithm, wherein the set anomaly detection algorithm is used to detect outliers.

[0133] In practical applications, the anomaly detection algorithms set include the isolation forest algorithm, the anomaly detection algorithm based on Gaussian distribution or the density clustering algorithm. The density-based clustering algorithm includes the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm. The implementation process of detecting outliers based on the existing isolation forest algorithm or density clustering algorithm is not described here.

[0134] In practical applications, the electronic device constructs a vector set θ from all constructed indicator vectors, and the indicator vector corresponding to each VPN tunnel is a sample in the vector set θ; the electronic device performs density clustering on the vector set θ based on the DBSCAN algorithm to obtain a clustering result, and determines outliers from the clustering result. The clustering result includes at least two clusters.

[0135] It should be noted that an outlier point may also be referred to as an isolated point. In this embodiment, an outlier point represents an abnormal index vector that deviates from a uniformly distributed index vector.

[0136] It should be noted that the number of outlier sets can be one or at least two. In the case where the indicator vector is constructed by the operator, longitude and latitude corresponding to the VPN tunnel, and the indicator values ​​of all performance indicators, the number of outlier sets is one. In the case where the indicator vector is constructed by the operator, longitude and latitude corresponding to the VPN tunnel, and the indicator value of a performance indicator, the number of outlier sets is at least two, and each performance indicator corresponds to one outlier set.

[0137] Considering that in actual application, the number of set performance indicators may be multiple, in some embodiments, when the number of set performance indicators is greater than or equal to 2, the outliers in the indicator vector are determined based on all constructed indicator vectors, including one of the following:

[0138] Based on all constructed first indicator vectors, determining outliers in the first indicator vectors;

[0139] Based on all the constructed second indicator vectors, outliers in the second indicator vectors are determined; wherein,

[0140] Each first indicator vector is constructed by the operator, longitude and latitude corresponding to the VPN tunnel, and an indicator value of a set performance indicator;

[0141] The second indicator vector is constructed by the indicator values ​​of the operator, longitude and latitude corresponding to the VPN tunnel and all set performance indicators.

[0142] Here, when the number of set performance indicators is greater than or equal to 2, the electronic device constructs a first indicator vector corresponding to the VPN tunnel based on the operator, longitude and latitude corresponding to the VPN tunnel, and an indicator value of a set performance indicator, and then determines the outliers in the first indicator vector based on all the constructed first indicator vectors through a set anomaly detection algorithm. Or,

[0143] After constructing a second indicator vector corresponding to the VPN tunnel based on the operator, longitude and latitude corresponding to the VPN tunnel and the indicator values ​​of all set performance indicators, the electronic device determines the outliers in the second indicator vector based on the constructed second indicator vector.

[0144] Step 104: Based on all the determined outliers, determine the abnormal VPN tunnels.

[0145] Here, when the second indicator vector corresponding to the VPN tunnel is constructed based on the operator, longitude and latitude corresponding to the VPN tunnel and the indicator values ​​of all set performance indicators, the number of outlier sets determined is one. At this time, the VPN tunnel corresponding to the indicator vector corresponding to each outlier is determined to be an abnormal VPN tunnel.

[0146] When the number of performance indicators is greater than or equal to 2, and each performance indicator corresponds to an outlier set, the determined outlier sets can be unioned, and the VPN tunnel corresponding to each outlier in the union can be determined as an abnormal VPN tunnel; or, based on all outlier sets, the occurrence probability of the VPN tunnel corresponding to each outlier can be determined, and the VPN tunnel with an occurrence probability greater than or equal to the set probability can be determined as an abnormal VPN tunnel.

[0147] It should be noted that, in the case where an abnormal VPN tunnel is determined, the electronic device may also output warning information about the abnormal VPN tunnel.

[0148] In this embodiment, the indicator information corresponding to each monitored VPN tunnel is obtained; the indicator information includes the operator, longitude and latitude, and the indicator value of at least one set performance indicator; based on the indicator information corresponding to each VPN tunnel, a corresponding indicator vector is constructed; based on all the constructed indicator vectors, outliers in the indicator vector are determined; based on all the determined outliers, abnormal VPN tunnels are determined. Since different VPN tunnels have similar service qualities in the same operator environment and similar geographical location environment, the abnormal indicator vectors corresponding to VPN tunnels with the same operator and similar longitude and latitude will deviate from the uniformly distributed indicator vector. In other words, the VPN tunnels corresponding to the outliers are VPN tunnels with large differences in service quality. Therefore, the abnormal VPN tunnels can be accurately determined through the outliers, which can reduce the cases of false detection and missed detection, and improve the accuracy of the abnormal detection results.

[0149] Figure 4 A schematic diagram of the implementation flow of the method for detecting a VPN tunnel provided in the application embodiment of the present application is as follows: Figure 4 As shown, the method for detecting a VPN tunnel includes:

[0150] Step 401: Obtain indicator information corresponding to each monitored VPN tunnel; the indicator information includes the operator, longitude and latitude, and an indicator value of at least one set performance indicator.

[0151] The implementation process of step 401 please refer to the relevant description of step 101, which will not be repeated here.

[0152] Step 402: Based on the indicator information corresponding to each VPN tunnel and the set threshold range corresponding to each first set indicator, all monitored VPN tunnels are divided into a first VPN tunnel, a second VPN tunnel and a third VPN tunnel.

[0153] The implementation process of step 402 please refer to the relevant description of step 201, which will not be repeated here.

[0154] Step 403: Based on the indicator information corresponding to each third VPN tunnel, a corresponding indicator vector is constructed. When constructing the corresponding indicator vector, the method includes:

[0155] Perform one-hot encoding on the operator corresponding to the VPN tunnel to obtain the encoding value;

[0156] Normalizing the longitude and latitude corresponding to the VPN tunnel to obtain a first normalized value;

[0157] Normalizing the indicator value of the set performance indicator corresponding to the VPN tunnel to obtain a second normalized value;

[0158] An indicator vector corresponding to the VPN tunnel is constructed based on the encoding value, the first normalized value, and the second normalized value corresponding to the VPN tunnel.

[0159] It should be noted that the implementation process of step 403 refers to the relevant description of step 202 and steps 301 to 304, which will not be repeated here.

[0160] Step 404: Based on all constructed indicator vectors, outliers in the indicator vectors are determined.

[0161] Step 405: Based on all the determined outliers, determine the abnormal VPN tunnels.

[0162] In order to implement the method for detecting a VPN tunnel in the embodiment of the present application, the embodiment of the present application also provides a device for detecting a VPN tunnel, such as Figure 5 As shown, the device for detecting a VPN tunnel includes:

[0163] The acquisition unit 51 is used to acquire the indicator information corresponding to each monitored VPN tunnel; the indicator information includes the operator, the longitude and latitude, and the indicator value of at least one set performance indicator;

[0164] A construction unit 52, configured to construct a corresponding indicator vector based on the indicator information corresponding to each VPN tunnel;

[0165] A first determining unit 53, configured to determine outliers in the indicator vector based on all constructed indicator vectors;

[0166] The second determining unit 54 is configured to determine an abnormal VPN tunnel based on all determined outliers.

[0167] In some embodiments, the at least one set performance indicator includes at least one of the following:

[0168] Average number of packet losses;

[0169] Average delay;

[0170] Delay jitter;

[0171] The rate at which packets are sent;

[0172] The rate at which packets are received;

[0173] bandwidth.

[0174] In some embodiments, the construction unit 52 is specifically used to:

[0175] Based on the indicator information corresponding to each VPN tunnel and the set threshold range corresponding to each first set indicator, all monitored VPN tunnels are divided into a first VPN tunnel, a second VPN tunnel and a third VPN tunnel;

[0176] Based on the indicator information corresponding to each third VPN tunnel, a corresponding indicator vector is constructed; wherein,

[0177] The first setting indicator represents the key performance indicator included in the setting performance indicator;

[0178] The first VPN tunnel represents an abnormal VPN tunnel;

[0179] The second VPN tunnel represents a normal VPN tunnel, and the indicator value of the first set indicator corresponding to the second VPN tunnel is less than the minimum threshold of the corresponding set threshold range, or is within the corresponding set threshold range;

[0180] The third VPN tunnel represents a VPN tunnel other than the first VPN tunnel and the second VPN tunnel among the monitored VPN tunnels.

[0181] In some embodiments, the construction unit 52 is specifically used to:

[0182] Perform one-hot encoding on the operator corresponding to the VPN tunnel to obtain the encoding value;

[0183] Normalizing the longitude and latitude corresponding to the VPN tunnel to obtain a first normalized value;

[0184] Normalizing the indicator value of the set performance indicator corresponding to the VPN tunnel to obtain a second normalized value;

[0185] An indicator vector corresponding to the VPN tunnel is constructed based on the encoding value, the first normalized value, and the second normalized value corresponding to the VPN tunnel.

[0186] In some embodiments, the construction unit 52 is specifically used to:

[0187] Based on the first set value and the longitude value corresponding to the VPN tunnel, obtain a normalized value of the longitude corresponding to the VPN tunnel;

[0188] Based on the second set value and the latitude value corresponding to the VPN tunnel, a normalized value of the latitude corresponding to the VPN tunnel is obtained.

[0189] In some embodiments, the construction unit 52 is specifically used to determine a second normalized value of the set performance indicator corresponding to the VPN tunnel based on the indicator value and the corresponding average indicator value of the set performance indicator corresponding to the VPN tunnel, and based on the standard deviation corresponding to the set performance indicator.

[0190] In some embodiments, when the number of performance indicators is set to be greater than or equal to 2, the first determining unit 53 is specifically used for one of the following:

[0191] Based on all constructed first indicator vectors, determining outliers in the first indicator vectors;

[0192] Based on all the constructed second indicator vectors, outliers in the second indicator vectors are determined; wherein,

[0193] Each first indicator vector is constructed by the operator, longitude and latitude corresponding to the VPN tunnel, and an indicator value of a set performance indicator;

[0194] The second indicator vector is constructed by the indicator values ​​of the operator, longitude and latitude corresponding to the VPN tunnel and all set performance indicators.

[0195] In actual application, the acquisition unit 51, the construction unit 52, the first determination unit 53 and the second determination unit 54 can be implemented by a processor in the device for detecting the VPN tunnel, such as a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU) or a programmable gate array (FPGA).

[0196] It should be noted that: the device for detecting VPN tunnels provided in the above embodiment only uses the division of the above program modules as an example when detecting VPN tunnels. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the device for detecting VPN tunnels provided in the above embodiment and the method embodiment for detecting VPN tunnels belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0197] Based on the hardware implementation of the above program modules and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides an electronic device. Figure 6 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 6 As shown, the electronic device 6 includes:

[0198] Communication interface 61, capable of exchanging information with other devices such as network devices;

[0199] The processor 62 is connected to the communication interface 61 to implement information exchange with other devices, and is used to execute the method for detecting VPN tunnels provided by one or more technical solutions when running a computer program. The computer program is stored in the memory 63.

[0200] Of course, in actual application, the various components in the electronic device 6 are coupled together through the bus system 64. It can be understood that the bus system 64 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 64 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 6 Various buses are labeled as bus system 64.

[0201] The memory 63 in the embodiment of the present application is used to store various types of data to support the operation of the electronic device 6. Examples of such data include: any computer program used to operate on the electronic device 6.

[0202] It can be understood that the memory 63 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memory 63 described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.

[0203] The method disclosed in the above embodiment of the present application can be applied to the processor 62, or implemented by the processor 62. The processor 62 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 62 or the instruction in the form of software. The above processor 62 can be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 62 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 63, and the processor 62 reads the program in the memory 63 and completes the steps of the above method in combination with its hardware.

[0204] Optionally, when the processor 62 executes the program, it implements the corresponding processes implemented by the terminal in each method of the embodiments of the present application, which will not be described here for the sake of brevity.

[0205] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 63 storing a computer program, and the computer program can be executed by a processor 62 of the terminal to complete the steps of the aforementioned method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.

[0206] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0207] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0208] In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0209] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.

[0210] It should be noted that the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0211] It should be noted that the term "and / or" in the embodiments of the present invention is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent the three situations that A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" in this article represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0212] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for detecting a VPN tunnel, characterized in that: include: Obtain the indicator information corresponding to each monitored virtual private network VPN tunnel; The indicator information includes the operator, longitude and latitude, and an indicator value of at least one set performance indicator; Based on the indicator information corresponding to each VPN tunnel, all monitored VPN tunnels are divided into a first VPN tunnel, a second VPN tunnel and a third VPN tunnel; wherein the first VPN tunnel represents an abnormal VPN tunnel; the second VPN tunnel represents a normal VPN tunnel; and the third VPN tunnel represents a VPN tunnel other than the first VPN tunnel and the second VPN tunnel among the monitored VPN tunnels; Based on the preprocessing result of the indicator information corresponding to each third VPN tunnel, a corresponding indicator vector is constructed; the preprocessing result represents a numerical value; Based on all constructed indicator vectors, outliers in the indicator vectors are determined; Based on all the identified outliers, abnormal VPN tunnels are identified.

2. The method according to claim 1, characterized in that The at least one set performance indicator includes at least one of the following: Average number of packet losses; Average delay; Delay jitter; The rate at which packets are sent; The rate at which packets are received; bandwidth.

3. The method according to claim 1, characterized in that The method of dividing all monitored VPN tunnels into a first VPN tunnel, a second VPN tunnel, and a third VPN tunnel based on the indicator information corresponding to each VPN tunnel includes: Based on the indicator information corresponding to each VPN tunnel and the set threshold range corresponding to each first set indicator, all monitored VPN tunnels are divided into a first VPN tunnel, a second VPN tunnel and a third VPN tunnel; The first set indicator represents a key performance indicator included in the set performance indicator; the indicator value of the first set indicator corresponding to the second VPN tunnel is less than the minimum threshold of the corresponding set threshold range, or is within the corresponding set threshold range.

4. The method according to claim 1 or 3, characterized in that: When constructing a corresponding indicator vector based on the preprocessing result of the indicator information corresponding to each third VPN tunnel, the method includes: Perform one-hot encoding on the operator corresponding to the VPN tunnel to obtain an encoding value; the VPN tunnel is a third VPN tunnel; Normalizing the longitude and latitude corresponding to the VPN tunnel to obtain a first normalized value; Normalizing the indicator value of the set performance indicator corresponding to the VPN tunnel to obtain a second normalized value; An indicator vector corresponding to the VPN tunnel is constructed based on the encoding value, the first normalized value, and the second normalized value corresponding to the VPN tunnel.

5. The method according to claim 4, characterized in that The normalizing the longitude and latitude corresponding to the VPN tunnel to obtain a first normalized value includes: Based on the first set value and the longitude value corresponding to the VPN tunnel, obtain a normalized value of the longitude corresponding to the VPN tunnel; Based on the second set value and the latitude value corresponding to the VPN tunnel, a normalized value of the latitude corresponding to the VPN tunnel is obtained.

6. The method according to claim 4, characterized in that The step of normalizing the index value of the set performance index corresponding to the VPN tunnel to obtain a second normalized value includes: Based on the indicator value of the set performance indicator corresponding to the VPN tunnel and the corresponding average indicator value, and based on the standard deviation corresponding to the set performance indicator, a second normalized value of the set performance indicator corresponding to the VPN tunnel is determined.

7. The method according to any one of claims 1 to 3, 5 to 6, characterized in that: When the number of performance indicators is set to be greater than or equal to 2, the outliers in the indicator vectors are determined based on all constructed indicator vectors, including one of the following: Based on all constructed first indicator vectors, determining outliers in the first indicator vectors; Based on all the constructed second indicator vectors, outliers in the second indicator vectors are determined; wherein, Each first indicator vector is constructed by the operator, longitude and latitude corresponding to the VPN tunnel, and an indicator value of a set performance indicator; The second indicator vector is constructed by the indicator values ​​of the operator, longitude and latitude corresponding to the VPN tunnel and all set performance indicators.

8. A device for detecting a VPN tunnel, characterized in that: include: An acquisition unit, used to acquire indicator information corresponding to each monitored VPN tunnel; The indicator information includes the operator, longitude and latitude, and an indicator value of at least one set performance indicator; A construction unit, configured to divide all monitored VPN tunnels into a first VPN tunnel, a second VPN tunnel, and a third VPN tunnel based on the indicator information corresponding to each VPN tunnel; Based on the preprocessing result of the indicator information corresponding to each third VPN tunnel, a corresponding indicator vector is constructed; wherein the first VPN tunnel represents an abnormal VPN tunnel; the second VPN tunnel represents a normal VPN tunnel; the third VPN tunnel represents a VPN tunnel other than the first VPN tunnel and the second VPN tunnel in the monitored VPN tunnels; the preprocessing result represents a numerical value; A first determining unit, configured to determine outliers in the indicator vector based on all constructed indicator vectors; The second determining unit is configured to determine an abnormal VPN tunnel based on all determined outliers.

9. An electronic device, characterized in that: include: a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the steps of the method for detecting a VPN tunnel according to any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting a VPN tunnel according to any one of claims 1 to 7 are implemented.