A method, apparatus and electronic device for monitoring BGP routing data

By performing feature analysis and clustering analysis on BGP routing data, combined with hash bucketing and rule-based flow merging techniques, the problems of high false positive rate and real-time performance in BGP routing monitoring are solved, achieving efficient and accurate routing data monitoring and real-time protection.

CN116318800BActive Publication Date: 2026-11-27CHINA TELECOM NETWORK SECURITY TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211667889.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-23
Publication Date
2026-11-27
Estimated Expiration
2042-12-23

AI Technical Summary

Technical Problem

Existing technologies have a high false positive rate in BGP routing information monitoring, making it difficult to achieve accurate and real-time monitoring of BGP routing data and effectively prevent route hijacking attacks.

Method used

By acquiring BGP routing data, analyzing its characteristics, and performing cluster analysis with historical data, combined with hash bucketing and rule-based flow merging techniques, the reliability of routing data is determined, invalid data is cleaned up, and the accuracy and real-time performance of monitoring are improved.

Benefits of technology

It enables efficient and accurate monitoring of BGP routing data, reduces the false positive rate, improves network security and real-time intervention capabilities, and enhances protection against route hijacking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116318800B_ABST
    Figure CN116318800B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network information security, and in particular to a BGP routing data monitoring method and device and electronic equipment. In the method, BGP routing data is acquired. The BGP routing data is parsed to obtain a first feature of the BGP routing data. According to a routing prefix of the BGP routing data, a first feature of historical BGP routing data is acquired. The first feature of the BGP routing data and the first feature of the historical BGP routing data are clustered to obtain a clustering result. According to the clustering result, the credibility of the BGP routing data is determined. In the case that the credibility meets a preset rule, the BGP routing data is determined as abnormal BGP routing data. The above scheme fully combines the first feature of the BGP routing data and the first feature of the historical BGP routing data, monitors the BGP routing data, realizes monitoring of the BGP routing data, and improves the monitoring efficiency of the BGP routing data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network information security technology, and in particular to a method, apparatus, and electronic device for monitoring BGP routing data. Background Technology

[0002] In real-world networks, the changes in routing information from the Border Gateway Protocol (BGP) are highly complex, including both normal route adjustments and abnormal route hijacking, resulting in a wide variety of changes in routing information.

[0003] Currently, the indicators for judging abnormal routing information are limited. Using simple rules or traffic percentages to determine whether routing information is abnormal can easily lead to misjudgments and cannot meet the monitoring needs of BGP routing data. Summary of the Invention

[0004] This application provides a method, apparatus, and electronic device for monitoring BGP routing data, thereby improving the monitoring efficiency of BGP routing data.

[0005] In a first aspect, embodiments of this application provide a method for monitoring BGP routing data. The method includes: acquiring BGP routing data; parsing the BGP routing data to obtain a first feature of the BGP routing data, wherein the first feature of the BGP routing data includes elements within the BGP routing data; acquiring a first feature of historical BGP routing data based on the routing prefix of the BGP routing data, wherein the first feature of the historical BGP routing data includes elements within the historical BGP routing data; clustering the first feature of the BGP routing data and the first feature of the historical BGP routing data to obtain a clustering result, wherein the clustering result is used to characterize the dispersion of BGP routing data in terms of elements; determining the reliability of the BGP routing data based on the clustering result; and determining the BGP routing data as abnormal BGP routing data if the reliability meets a preset rule.

[0006] Compared to traditional methods that monitor BGP routing data through model classification, this application fully integrates the first characteristics of BGP routing data and historical BGP routing data to improve the accuracy of BGP routing data monitoring. Furthermore, this application fully leverages the streaming characteristics of BGP routing data, enhancing the real-time performance of BGP routing data monitoring. This facilitates rapid intervention and processing by users based on abnormal BGP routing data, thereby improving network security.

[0007] Optionally, the above method further includes: identifying BGP routing data containing preset invalid values; deleting BGP routing data containing preset invalid values; identifying BGP routing data missing generally accepted mandatory attributes. These generally accepted mandatory attributes include the Autonomous System Path (AS_Path) attribute, the Route Origin attribute, and the Next Hop attribute. Deleting BGP routing data missing these generally accepted mandatory attributes.

[0008] In the above method, by deleting BGP route data that includes preset invalid values ​​and BGP route data that is missing generally accepted mandatory attributes, unusable data in BGP route data can be cleaned up, leaving normal and usable data, and identifiable errors in BGP route data can be corrected.

[0009] Optionally, the above method also includes: normalizing the BGP routing data.

[0010] In the above method, normalizing BGP routing data can reduce the impact of the size, characteristics, and distribution differences of BGP routing data on the clustering results, making the clustering results more accurate.

[0011] Optionally, the above method further includes: obtaining historical BGP routing data based on the routing prefix; comparing the BGP routing data with the historical BGP routing data; deleting duplicate BGP routing data to obtain BGP routing change data, which includes the BGP routing change data.

[0012] The above method compares BGP routing data with historical BGP routing data and removes duplicate BGP routing data to obtain BGP routing change data. This reduces the amount of data the system needs to process, facilitating faster processing to improve the reliability of BGP routing change data and increasing the efficiency of BGP routing data monitoring.

[0013] Optionally, the above method further includes: hashing the BGP route change data according to the route prefix to obtain multiple hash buckets. The route prefixes of the BGP route change data included in any hash bucket are the same. The BGP route change data and the corresponding credibility of the BGP route change data are stored in the route incremental database according to the grouping of the multiple hash buckets.

[0014] In the above method, BGP route change data is hash-bucketed, which balances the load and facilitates subsequent lookups and comparisons. This improves data processing efficiency and increases parallelism when users analyze BGP route data. Using hash bucketing to store BGP route change data also reduces storage space consumption and occupies less memory resources.

[0015] Optionally, the above method also includes: grouping BGP routing data according to different preset standards to obtain multiple groups of BGP routing data.

[0016] In the above method, by grouping BGP routing data, system overhead can be reduced and the reliability of BGP routing data can be determined more quickly when the server monitors the BGP routing data, thereby improving monitoring efficiency.

[0017] Optionally, the above method further includes: using the Connect operator to merge the rule flow and packet flow for statistical analysis, obtaining an abnormal BGP route data set. The rule flow and packet flow are obtained by grouping BGP route data. The abnormal BGP route data set is stored in an abnormal route database.

[0018] In the above method, the Connect operator is used to merge rule flows and packet flows to perform statistical analysis, resulting in an abnormal BGP route data set. This abnormal BGP route data set is then stored in an abnormal route database. This facilitates users in subsequent analysis of the abnormal BGP route data set and allows for real-time collection and monitoring of abnormal BGP route information.

[0019] Optionally, the above method also includes: copying BGP routing data. The copied BGP routing data is then stored in a full routing database.

[0020] In the above method, by storing BGP routing data in a full routing database, it is convenient to perform other analyses on the BGP routing data in the full routing database based on other user needs.

[0021] Optionally, the credibility of BGP routing data can be determined based on the clustering results, specifically by mapping the clustering results to a user-preset credibility range to obtain the credibility of the BGP routing data.

[0022] In the above method, the credibility of BGP routing data is obtained by mapping the clustering results to a user-preset credibility range. This allows for timely acquisition of the credibility of BGP routing data, facilitating subsequent monitoring of the data based on its credibility.

[0023] Optionally, the above method also includes storing the first characteristics of the BGP routing data in a database.

[0024] In the above method, the first characteristic of BGP routing data is stored in a database. This facilitates the timely acquisition of the first characteristic of historical BGP routing data during subsequent monitoring, thereby improving the efficiency of BGP routing data monitoring.

[0025] Secondly, embodiments of this application also provide a BGP routing data monitoring device, the device comprising:

[0026] The acquisition module is used to obtain BGP routing data;

[0027] The parsing module is used to parse BGP routing data to obtain the first feature of the BGP routing data, which includes the elements in the BGP routing data.

[0028] The processing module is used to obtain the first feature of historical BGP routing data based on the routing prefix of the BGP routing data. The first feature of historical BGP routing data includes elements in the historical BGP routing data.

[0029] The processing module is also used to cluster the first feature of BGP routing data and the first feature of historical BGP routing data to obtain clustering results. The clustering results are used to characterize the degree of dispersion of BGP routing data in terms of elements.

[0030] The processing module is also used to determine the reliability of BGP routing data based on the clustering results;

[0031] The processing module is also used to determine whether BGP routing data is abnormal BGP routing data if the credibility meets the preset rules.

[0032] Thirdly, embodiments of this application also propose an electronic device including a processor and a memory, wherein the memory stores program code that, when executed by the processor, causes the processor to perform the steps of the BGP routing data monitoring method described in the first aspect.

[0033] Fourthly, embodiments of this application also propose a computer-readable storage medium including program code, which, when run on an electronic device, causes the electronic device to perform the steps of the BGP routing data monitoring method described in the first aspect.

[0034] Fifthly, embodiments of this application also provide a computer program product, which, when invoked by a computer, causes the computer to execute the BGP routing data monitoring method steps as described in the first aspect. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0036] Figure 1An exemplary illustration shows an application scenario diagram of a BGP routing data monitoring method applicable to embodiments of this application;

[0037] Figure 2 An exemplary illustration shows a schematic diagram of the implementation process of a BGP routing data monitoring method provided in an embodiment of this application;

[0038] Figure 3 An exemplary schematic diagram of a first feature of BGP routing data provided in an embodiment of this application is shown;

[0039] Figure 4 An exemplary illustration shows a schematic diagram of the implementation process of a BGP routing data monitoring method provided in an embodiment of this application;

[0040] Figure 5 An exemplary schematic diagram of a BGP routing data monitoring device provided in an embodiment of this application is shown;

[0041] Figure 6 An exemplary schematic diagram of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.

[0043] It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. A connected to B can represent: A and B directly connected, or A and B connected through C. Furthermore, in the description of this application, terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0044] The technical solutions provided by the embodiments of this application will be explained and described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only for illustration and explanation of this application and are not intended to limit this application. Furthermore, the embodiments of this application and the features in the embodiments can be combined with each other without conflict.

[0045] BGP (Browser Gateway Protocol) is a decentralized dynamic routing protocol used between Autonomous Systems (AS) that forms part of our modern networks. BGP allows different ASs on a network to automatically exchange Internet Protocol (IP) addresses, routing information, and reachability information. Its primary function is to control route propagation and select the optimal route, and it also features redundancy and loop elimination. While BGP plays a crucial role in the Internet, its security is vulnerable. Generally, between two ASs interconnected via BGP, there is a lack of effective authentication mechanisms for received IP prefix routes, leading to the unconditional acceptance or propagation of routes from neighboring ASs. This can result in the potential reception of erroneous routes advertised by attackers.

[0046] BGP route hijacking refers to an attacker maliciously altering the routing of internet traffic. Attackers achieve this by claiming ownership of incorrect route prefixes. BGP route hijacking can cause a "black hole" effect on the victim's traffic, disrupting normal access, increasing network latency, and even allowing the victim's traffic to be monitored or attacked by man-in-the-middle attacks, or redirected to fake websites to steal data.

[0047] Currently, IP prefix hijacking is generally monitored, located, and mitigated through methods such as collecting and analyzing existing network data and proactive network probing. Although monitoring and mitigation technologies are currently highly practical, existing solutions still have certain limitations in terms of real-time performance and coverage, cannot avoid missed and false alarms, and are difficult to prevent security incidents from occurring.

[0048] It is evident that due to the complexity and sheer volume of routing data, the real-time requirements for feedback on route hijacking attacks are high, posing a significant challenge to data processing performance. The accuracy and timeliness of real-time monitoring of BGP route hijacking need improvement. How to achieve real-time monitoring of BGP routing data and improve its accuracy is a pressing issue that needs to be addressed.

[0049] In view of this, this application proposes a method for monitoring BGP routing data in real time, comprising: acquiring BGP routing data; parsing the BGP routing data to obtain a first feature of the BGP routing data, wherein the first feature of the BGP routing data includes elements in the BGP routing data; acquiring a first feature of historical BGP routing data based on the routing prefix of the BGP routing data, wherein the first feature of historical BGP routing data includes elements in historical BGP routing data; clustering the first feature of the BGP routing data and the first feature of historical BGP routing data to obtain a clustering result, the clustering result being used to characterize the dispersion of BGP routing data in terms of elements; determining the reliability of the BGP routing data based on the clustering result; and determining the BGP routing data as abnormal BGP routing data if the reliability meets a preset rule.

[0050] Figure 1 The illustration shows an application scenario diagram of an optional BGP route monitoring method of this application. The scenario includes a server 100 and a terminal 101. The server 100 and the terminal 101 can be connected to each other through a network to realize the BGP route data monitoring method of this application.

[0051] Users can interact with terminal 101 via a network using server 100, such as receiving or sending messages. Terminal 101 can have various client applications installed, such as programming applications, web browser applications, search applications, etc. Terminal 101 can be various electronic devices with a display screen and web browsing support, including but not limited to smartphones, tablets, desktop computers, etc. Server 100 can be a standalone server or a server cluster consisting of multiple servers.

[0052] Server 100 is used to obtain BGP routing data. The BGP routing data is parsed to obtain its first feature. This first feature includes elements within the BGP routing data. Based on the routing prefix of the BGP routing data, the first features of historical BGP routing data are obtained. These first features include elements from the historical BGP routing data. The first features of both the BGP routing data and the historical BGP routing data are clustered to obtain clustering results. These clustering results characterize the dispersion of elements in the BGP routing data. Based on the clustering results, the reliability of the BGP routing data is determined. If the reliability meets preset rules, the BGP routing data is determined to be abnormal.

[0053] It is understood that the BGP routing data monitoring method provided in this application embodiment can be executed by the server 100.

[0054] like Figure 2 The flowchart shown in this embodiment illustrates a method for monitoring BGP routing data, which may include the following operations. The following description uses the server as the execution subject.

[0055] S201: The server obtains BGP routing data.

[0056] In one possible implementation, the server can access the backbone website of the basic network operator and obtain BGP routing data in real time via Kafka. The BGP routing data obtained by the server is stored in binary format using a Multi-threaded Routing Toolkit (MRT). The server can then transmit the obtained BGP routing data to a distributed (Flink) big data platform via Kafka for subsequent streaming processing and monitoring of the BGP routing data.

[0057] Basic network operators can include China Mobile, China Unicom, and other basic network operators. Kafka is a high-throughput distributed publish-subscribe messaging system that can process all action stream data from consumers on a website. Flink is a distributed processing engine framework used for stateful computation on unbounded and bounded data streams, possessing extremely high fault recovery and tolerance performance. Stream computing is a high-frequency, incremental, real-time data processing mode with strong real-time characteristics. Stream computing can process continuously generated data in real time, preventing data backlog and loss.

[0058] Optionally, after obtaining the BGP routing data, the server can bypass the real-time BGP routing data stream using the Process operator. That is, the server can copy the aforementioned BGP routing data and use a time window to import the real-time BGP routing data into the full routing database. The full routing database can be a fully column-oriented distributed database (ClickHouse).

[0059] In the above method, by storing BGP routing data in a full routing database, it is convenient to perform other analyses on the BGP routing data in the full routing database based on other user needs.

[0060] S202. The server parses the BGP routing data and obtains the first characteristic of the BGP routing data.

[0061] The first characteristic of BGP routing data includes the elements in the BGP routing data.

[0062] Because some elements in BGP routing data change during route hijacking, the server can determine whether route hijacking has occurred based on these changed elements, thus monitoring BGP routing data more accurately. For example, IP prefix hijacking causes changes in prefix information. If 1.0.0.1 / 24 was historically advertised by AS1 but suddenly becomes advertised by AS2, this could be considered suspicious behavior, requiring further investigation to determine if route hijacking has occurred. This unusual behavior involves changes in both the prefix and the AS path.

[0063] In one possible implementation, the server can parse the BGP routing data using the FlatMap operator based on the BGP routing protocol corresponding to the obtained BGP routing data to obtain the first feature of the BGP routing data. For example, the first feature of the BGP routing data may include the routing prefix, next-hop IP address, Autonomous System Path (ASPath), Local-Pref attribute, Multi-Exit Discriminators (MED) attribute, and Community attribute.

[0064] Optionally, to determine whether the historical BGP routing data corresponding to the routing prefix of the BGP routing data has changed, the first feature may also include the number of routing entries, the Autonomous System path length, the number of adjacent tuples of the AS path, the AS in-degree, and the AS out-degree. Here, the number of routing entries refers to the number of BGP routing data entries containing the routing prefix.

[0065] It is understandable that the first feature of BGP routing data may also include other information that can be obtained from BGP routing data and can characterize the elements of BGP routing data, in addition to the information mentioned above.

[0066] S203: The server obtains the first characteristic of historical BGP routing data based on the routing prefix of the BGP routing data.

[0067] The first characteristic of historical BGP routing data includes the elements in the historical BGP routing data.

[0068] In one possible embodiment, the server can obtain the first feature of historical BGP routing data from the routing incremental database based on the routing prefix of the BGP routing data. The first feature of the historical BGP routing data may include the routing prefix, next hop, IP address, AS path, Local-Pref, MED attribute, Community attribute, and the corresponding Autonomous System path length, AS path, number of adjacent tuples, AS in-degree, and AS out-degree of the historical BGP routing data.

[0069] like Figure 3 As shown in the illustration, this application provides a schematic diagram of the characteristics of BGP routing data. Figure 3 In BGP routing data, the first characteristic includes Prefix, AS Path, Next Hop, Local-Pref, MED, Community, the number of routing entries corresponding to Prefix, the length of the AS path corresponding to Prefix, the number of adjacent tuples of the AS path corresponding to Prefix, the AS in-degree corresponding to Prefix, and the AS out-degree corresponding to Prefix.

[0070] Optionally, after determining the first characteristic of the BGP routing data, the server can also store this first characteristic in a database. For example, the server can store the first characteristic of the BGP routing data in a routing incremental database. In the above method, storing the first characteristic of the BGP routing data in a database facilitates timely acquisition of the first characteristic of historical BGP routing data during subsequent monitoring, thus improving the efficiency of BGP routing data monitoring.

[0071] like Figure 3 As shown, this application embodiment provides a schematic diagram of a first feature of BGP routing data. Figure 3 In BGP routing data, the first characteristics include Prefix, AS Path, Next Hop, Local-Pref, MED, and Community. The first characteristics of BGP routing data also include the number of routing entries corresponding to the Prefix, the length of the AS path corresponding to the Prefix, the number of adjacent tuples of the AS path corresponding to the Prefix, the AS in-degree corresponding to the Prefix, and the AS out-degree corresponding to the Prefix.

[0072] In some embodiments, after the server determines the first feature of the BGP routing data and the first feature of the historical BGP routing data, before clustering the first feature of the BGP routing data and the first feature of the historical BGP routing data to obtain the clustering results, the server can group the BGP routing data according to different preset criteria to obtain multiple groups of BGP routing data. It is understood that the preset criteria can be empirical values ​​pre-set by those skilled in the art based on the BGP routing protocol, and can be reasonably set according to specific application scenarios. For example, the server can divide the BGP routing data into four groups: open packets, keepalive packets, update packets, and notification packets. As another example, the server can group the BGP routing data to obtain rule flows and packet flows.

[0073] In the above method, by grouping BGP routing data, system overhead can be reduced and the reliability of BGP routing data can be determined more quickly when the server monitors the BGP routing data, thereby improving monitoring efficiency.

[0074] In other embodiments, the server can also clean the BGP routing data. This includes checking the validity of the data. For example, the server can identify BGP routing data containing preset invalid values ​​and delete such data. The server can also identify BGP routing data missing generally accepted mandatory attributes and delete such data. These generally accepted mandatory attributes include the Autonomous System Path (AS_Path) attribute, the Origin attribute, and the Next Hop attribute.

[0075] It is understood that the preset invalid values ​​can be empirical values ​​pre-set by those skilled in the art, and can be reasonably set according to specific application scenarios. Examples include private network IP addresses, IP addresses with unreachable next hops, and other values. This application does not specifically limit the method by which the server checks the legality of data. For example, keywords in BGP routing data can be used to check the legality of BGP routing data.

[0076] In the above method, by deleting BGP route data that includes preset invalid values ​​and BGP route data that is missing generally accepted mandatory attributes, unusable data in BGP route data can be cleaned up, leaving normal and usable data, and identifiable errors in BGP route data can be corrected.

[0077] In other embodiments, before the server clusters the first feature of the BGP routing data and the first feature of historical BGP routing data to obtain the clustering result, the server can also normalize the BGP routing data. For example, the BGP routing data can be normalized to the [0,1] interval. In the above method, by normalizing the BGP routing data, the impact of the size, features, and distribution differences of the BGP routing data on the clustering result can be reduced, making the clustering result more accurate.

[0078] S204. The server clusters the first feature of the BGP routing data and the first feature of the historical BGP routing data to obtain the clustering results.

[0079] The clustering results are used to characterize the dispersion of BGP routing data across features.

[0080] In one possible embodiment, the server can use the k-means clustering algorithm to cluster the first feature of the BGP routing data and the first feature of the historical BGP routing data to obtain the clustering result.

[0081] It should be noted that the embodiments of this application do not limit the clustering algorithm. The server may also use other clustering algorithms, such as mean drift clustering algorithm, hierarchical clustering algorithm, etc., to cluster the first feature of BGP routing data and the first feature of historical BGP routing data.

[0082] S205. The server determines the reliability of BGP routing data based on the clustering results.

[0083] Clustering results can contain multiple clusters. Each cluster can be viewed as being composed of points in a multidimensional space. These points can be considered as the first features of the BGP routing data and the first features of historical BGP routing data. Each cluster has a centroid. It can be understood that the centroid might be a point corresponding to the first feature of the BGP routing data or the first feature of the historical BGP routing data. Alternatively, the centroid might be a virtual point determined based on the points within the cluster.

[0084] In one possible implementation, the server can map the clustering results to a preset confidence interval according to a preset mapping relationship to obtain the confidence level of the BGP routing data. For example, suppose the preset mapping relationship between clustering results and confidence level includes multiplying the distance of the first feature point in the clustering results from the centroid by a factor of 10 to obtain the confidence level. In the clustering results of BGP route data 1.0.0.1 / 24, the distance of the first feature point from the centroid is 0.21. Then, the server can multiply the distance from the centroid by a factor of 10 according to the preset mapping relationship between clustering results and confidence level to obtain a confidence level of 2.1 for the BGP routing data. As another example, suppose the preset mapping relationship between clustering results and confidence level includes reducing the distance of the first feature point in the clustering results from the centroid by a factor of 5 to obtain the confidence level. In the clustering results of BGP route data 1.0.0.1 / 26, the distance of the first feature point from the centroid is 20. The server can then reduce the distance to the centroid by a factor of 5 based on the preset mapping relationship between clustering results and credibility, resulting in a credibility of 4 for the BGP routing data. This method maps the clustering results to a user-preset credibility range to obtain the credibility of the BGP routing data. This allows for timely acquisition of the credibility of BGP routing data, facilitating subsequent monitoring of BGP routing data based on credibility.

[0085] It is understandable that the mapping relationship between clustering results and credibility can be a pre-set empirical value by those skilled in the art, and can be reasonably set according to specific application scenarios. Alternatively, the mapping relationship between clustering results and credibility can be determined by a route prefix credibility model trained by the server based on a large amount of historical BGP routing data.

[0086] In another possible implementation, the server can also determine the number of elements contained in the clustering result and thus determine the confidence level. For example, the number of adjacent AS path pairs corresponding to the prefix in the first feature of BGP routing data and the first feature of historical BGP routing data can be preset to be in the range [a, b], then the confidence level is determined to be c, and so on.

[0087] S206. If the trustworthiness meets the preset rules, the server determines that the BGP routing data is abnormal BGP routing data.

[0088] In one possible scenario, the default rule can be that routing data satisfying an abnormal confidence interval is considered abnormal BGP routing data. For example, suppose the default rule is that routing data satisfying an abnormal confidence interval is considered abnormal BGP routing data. The abnormal confidence interval is a score range [2-4]. The server determines the confidence level of the BGP routing data to be 2. Then, if the confidence level of the BGP routing data is 2, satisfying the abnormal confidence interval, the server can determine that the BGP routing data is abnormal BGP routing data.

[0089] In another possible scenario, the preset rule could also define BGP routing data with a confidence level not exceeding a first threshold as abnormal. For example, suppose the preset rule defines BGP routing data with a confidence level not exceeding a first threshold as abnormal. The first threshold is 5. Then, if the confidence level of BGP routing data (3) does not exceed the first threshold (5), the server can determine that the BGP routing data is abnormal.

[0090] It is understood that the above-mentioned preset rules can be pre-set by those skilled in the art and can be reasonably set according to specific application scenarios.

[0091] After determining the trustworthiness of BGP routing data on the server side, in one possible scenario, the server can aggregate the BGP routing data and its corresponding trustworthiness. The server can rank the trustworthiness of the BGP routing data from highest to lowest value and store the BGP routing data and its corresponding trustworthiness according to this ranking. This method can dynamically update the trustworthiness ranking of BGP routing data in real time, improving the accuracy of BGP routing data monitoring.

[0092] Optionally, the server can also retrieve historical BGP routing data from the routing incremental database based on the routing prefix. The server then compares the new BGP routing data with the historical BGP routing data, removing duplicates to obtain the BGP routing change data. This BGP routing data includes the BGP routing change data. After obtaining the BGP routing change data, the method for monitoring its reliability is the same as described above, and will not be repeated here. The routing incremental database can be a distributed file system (Hadoop Distributed File System, HDFS).

[0093] For example, the server can compare the first characteristic of the BGP routing data with the first characteristic in historical BGP routing data. That is, the server can compare the BGP routing data with the Prefix, AS Path, Next Hop, Local-Pref, MED, and Community attributes in historical BGP routing data. Furthermore, the server can identify duplicate BGP routing data, delete the duplicates, and obtain the BGP routing change data.

[0094] The above method compares BGP routing data with historical BGP routing data and removes duplicate BGP routing data to obtain BGP routing change data. This reduces the amount of data the system needs to process, facilitates faster processing of subsequent data to improve the reliability of BGP routing change data, and enhances the real-time performance of BGP routing data monitoring.

[0095] In BGP routing data monitoring, rapid querying and data partitioning significantly impact real-time performance. Therefore, after determining the reliability of BGP routing change data, the server can hash-bin the data based on its routing prefix, resulting in multiple hash buckets. Within any hash bucket, the routing prefixes of the BGP routing change data are identical. The server can then store the BGP routing change data and its corresponding reliability in the incremental routing database, grouped by hash bucket. For example, the server can hash-bin the BGP routing change data based on the first 8 bits of the routing prefix, resulting in multiple hash buckets.

[0096] The method described above, which uses hash bucketing to store BGP route change data, balances the load while facilitating subsequent lookups and comparisons. This improves data processing efficiency and increases parallelism when users analyze BGP route data. Using hash bucketing to store BGP route change data also reduces storage space consumption and occupies less memory resources.

[0097] In another possible scenario, since the rapid querying and data partitioning of BGP routing data significantly impacts real-time monitoring, the server can also use the Connect operator to merge rule flows and packet flows for statistical analysis, resulting in an abnormal BGP routing data set. The rule flows and packet flows are derived by grouping BGP routing data. The server can then store this abnormal BGP routing data set in an abnormal routing database. For example, the abnormal routing database could be a relational database management system (MySQL).

[0098] In the above method, the Connect operator is used to merge rule flows and packet flows to perform statistical analysis, resulting in an abnormal BGP route data set. This abnormal BGP route data set is then stored in an abnormal route database. This facilitates users in subsequent analysis of the abnormal BGP route data set and allows for real-time collection and monitoring of abnormal BGP route information.

[0099] In another possible embodiment, the server may also send the identified abnormal BGP routing data back to the user. For example, the server could send the abnormal BGP routing data to the user via SMS. Alternatively, the server could send the abnormal BGP routing data to the terminal, which, upon receiving the data, displays it on an electronic screen for the user to view. This application does not specifically limit the method by which the server sends the abnormal BGP routing data back to the user.

[0100] In the above method, by promptly feeding back abnormal BGP routing data to the user, it is possible for the user to analyze abnormal BGP routing data in a timely manner, thereby improving the efficiency of network security protection and enhancing the user experience.

[0101] This application employs machine learning techniques to evaluate the reliability of routing prefixes. The reliability of BGP routing data is comprehensively assessed based on its features. This reliability is then used to determine whether route hijacking has occurred. Compared to existing technology models that classify and monitor BGP routing data, this approach offers higher accuracy. Furthermore, this application improves routing data search and query efficiency, increases throughput, and enhances the real-time performance of route hijacking detection and judgment by hashing and binning the BGP routing data, facilitating rapid intervention and handling.

[0102] The following is about Figure 2 The implementation method is illustrated with examples.

[0103] For example, the server utilizes the data acquisition capabilities of a basic network operator to obtain real-time BGP routing data via Kafka. The acquired BGP routing data, in MRT format, is then transmitted to the Flink big data platform via Kafka. After obtaining the BGP routing data, the server replicates the data and uses a Windows time window to store the replicated BGP routing data in the full routing database, Clickhouse.

[0104] The server then retrieves historical BGP routing data based on the routing prefix. It compares this retrieved BGP routing data with the historical BGP routing data, removing duplicates to obtain the BGP routing change data. The server then groups this BGP routing change data into multiple service flow groups using different standards via Key By.

[0105] The server can use the FlatMap operator to parse BGP routing data and obtain its first feature. This first feature includes the prefix, AS Path, Next Hop, Local-Pref, MED, Community, the number of routing entries corresponding to the prefix, the length of the AS path corresponding to the prefix, the number of adjacent tuples in the AS path corresponding to the prefix, the AS in-degree of the prefix, and the AS out-degree of the prefix. Based on the routing prefix of this changed BGP routing data, the server can obtain the first feature of historical BGP routing data. This historical first feature includes the prefix, AS Path, Next Hop, Local-Pref, MED, Community, the number of routing entries corresponding to the prefix, the length of the AS path corresponding to the prefix, the number of adjacent tuples in the AS path corresponding to the prefix, the AS in-degree of the prefix, and the AS out-degree of the prefix.

[0106] The server cleans and normalizes the BGP route change data, checks its validity, and deletes any BGP route change data containing preset invalid values. The server also deletes any BGP route change data missing generally accepted mandatory attributes.

[0107] The server normalizes the BGP route change data to the [0,1] interval and uses the K-means algorithm to cluster the first feature of the BGP route change data and the first feature of historical BGP route data, obtaining the clustering result. The server maps this clustering result to a preset mapping relationship between clustering results and confidence intervals, resulting in a confidence level of 3 for the BGP route change data. Assume the abnormal confidence interval is [2,4]. Since the confidence level of this BGP route change data matches the abnormal confidence interval, this BGP route change data is considered abnormal.

[0108] The server can also hash and bucket the BGP route change data according to the first 8 bits of the route prefix, and store the BGP data in the corresponding hash bucket's route incremental database HDFS. The server then uses the Connect operator to merge the rule flow and the packet flow obtained from the grouping to perform data statistics and extract the BGP abnormal route data set. The server then stores this BGP abnormal route data set in the abnormal route database MySQL.

[0109] like Figure 4As shown, this application provides an exemplary flowchart for BGP routing data monitoring.

[0110] S401, Obtain BGP routing data;

[0111] S402. Parse the BGP routing data to obtain the first characteristic of the BGP routing data;

[0112] S403, Copy BGP routing data;

[0113] S404. Store the copied BGP route data in the full route database;

[0114] S405. Obtain historical BGP routing data based on the routing prefix;

[0115] S406. Compare the BGP routing data with the historical BGP routing data, delete duplicate BGP routing data, and obtain the BGP routing change data.

[0116] S407. Based on the routing prefix of the BGP routing data, obtain the first feature of the historical BGP routing data;

[0117] S408. Group the BGP route change data according to different preset standards to obtain multiple groups of BGP route change data.

[0118] S409. Determine BGP route change data that includes preset invalid values;

[0119] S410. Delete BGP route change data that includes preset invalid values;

[0120] S411. Identify BGP route change data that is missing a generally recognized mandatory attribute;

[0121] S412. Delete BGP route change data that is missing a recognized mandatory attribute.

[0122] S413. Normalize the BGP route change data after deleting BGP route change data including preset invalid values ​​and BGP route change data missing generally accepted mandatory attributes.

[0123] The clustering results are obtained by combining the first features of S414 and BGP routing data with the first features of historical BGP routing data.

[0124] S415. Map the clustering results to a preset confidence interval to obtain the confidence level of the BGP routing data;

[0125] S416. Divide the BGP route change data into hash buckets according to the route prefix to obtain multiple hash buckets;

[0126] S417. Store BGP route change data and the corresponding credibility of BGP route change data in the route incremental database according to multiple hash buckets.

[0127] S418. If the trustworthiness meets the preset rules, determine that the BGP routing data is abnormal BGP routing data;

[0128] S419. Use the Connect operator to merge the rule flow and the packet flow for statistical analysis to obtain an abnormal BGP route data set. The rule flow and the packet flow are obtained by grouping the BGP route data.

[0129] S420. Store the abnormal BGP route data set in the abnormal route database.

[0130] Furthermore, based on the same technical concept, this application embodiment also provides a BGP routing data monitoring device, which is used to implement the above-described BGP routing data monitoring method flow of this application embodiment. See also... Figure 5 As shown, the BGP routing data monitoring device includes: an acquisition module 501, a parsing module 502, and a processing module 503, wherein:

[0131] Module 501 is used to obtain BGP routing data;

[0132] Parsing module 502 is used to parse the BGP routing data to obtain a first feature of the BGP routing data, wherein the first feature of the BGP routing data includes elements in the BGP routing data;

[0133] Processing module 503 is used to obtain a first feature of historical BGP routing data based on the routing prefix of the BGP routing data, wherein the first feature of historical BGP routing data includes elements in the historical BGP routing data;

[0134] The processing module 503 is further configured to cluster the first feature of the BGP routing data and the first feature of the historical BGP routing data to obtain a clustering result, wherein the clustering result is used to characterize the degree of dispersion of the BGP routing data on the feature;

[0135] The processing module 503 is also used to determine the reliability of BGP routing data based on the clustering results;

[0136] The processing module 503 is also used to determine that BGP routing data is abnormal BGP routing data if the credibility meets the preset rules.

[0137] Optionally, the processing module 503 is also used for:

[0138] Identify BGP routing data that includes BGP routing data with preset invalid values;

[0139] Delete BGP route data that includes preset invalid values;

[0140] Identify BGP routing data that is missing generally accepted mandatory attributes. These generally accepted mandatory attributes include the Autonomous System Path (AS_Path) attribute, the Origin attribute, and the Next Hop attribute.

[0141] Delete BGP route data that is missing attributes that are generally considered essential.

[0142] Optionally, the processing module 503 is also used for:

[0143] Normalize BGP routing data.

[0144] Optionally, before parsing the BGP routing data and obtaining the first characteristic of the BGP routing data, the processing module 503 is also used for:

[0145] Based on the routing prefix, obtain the historical BGP routing data;

[0146] The BGP routing data is compared with historical BGP routing data, and duplicate BGP routing data is deleted to obtain BGP routing change data. The BGP routing data includes BGP routing change data.

[0147] Optionally, the processing module 503 is also used for:

[0148] The BGP route change data is hashed and bucketed according to the route prefix, resulting in multiple hash buckets. The route prefix of the BGP route change data included in any hash bucket is the same.

[0149] BGP route change data and the corresponding credibility of BGP route change data are stored in the route incremental database in groups of multiple hash buckets.

[0150] Optionally, the processing module 503 is also used for:

[0151] The BGP routing data is grouped according to different preset standards to obtain multiple groups of BGP routing data.

[0152] Optionally, the processing module 503 is also used for:

[0153] The Connect operator is used to merge rule flows and packet flows for statistical analysis, resulting in a set of abnormal BGP route data. Rule flows and packet flows are obtained by grouping BGP route data.

[0154] The abnormal BGP route data set is stored in the abnormal route database.

[0155] Optionally, the processing module 503 is also used for:

[0156] Copy BGP routing data;

[0157] The copied BGP route data is stored in the full route database.

[0158] Optionally, based on the clustering results, the reliability of the BGP routing data is determined. Processing module 503 is used for:

[0159] The clustering results are mapped to a preset confidence interval to obtain the confidence level of the BGP routing data.

[0160] Optionally, the processing module 503 is also used for:

[0161] The first characteristic of the BGP routing data is stored in the database.

[0162] Based on the same technical concept, embodiments of this application also provide an electronic device that can implement the BGP routing data monitoring method flow provided in the above embodiments of this application. In one embodiment, the electronic device can be a server, a terminal device, or other electronic devices. Figure 6 As shown, the electronic device may include:

[0163] At least one processor 601 and a memory 602 connected to at least one processor 601. In this embodiment, the specific connection medium between the processor 601 and the memory 602 is not limited. Figure 6 The example shown is the connection between processor 601 and memory 602 via bus 600. Bus 600 is... Figure 6 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. The 600 bus can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 6 The term 601 is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 601 can also be called a controller; there is no restriction on the name.

[0164] In this embodiment, memory 602 stores instructions executable by at least one processor 601. By executing the instructions stored in memory 602, at least one processor 601 can perform a BGP routing data monitoring method described above. Processor 601 can implement... Figure 5 The functions of each module in the device shown.

[0165] The processor 601 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 602 and calling data stored in memory 602, the processor can perform various functions and process data, thereby monitoring the device as a whole.

[0166] In one possible design, processor 601 may include one or more processing units. Processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 601. In some embodiments, processor 601 and memory 602 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.

[0167] Processor 601 can be a general-purpose processor, such as a CPU, digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the BGP routing data monitoring method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0168] Memory 602, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 602 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 602 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 602 may also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0169] By designing and programming the processor 601, the code corresponding to the BGP routing data monitoring method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute the code during runtime. Figure 2 The illustrated embodiment describes the steps of a BGP routing data monitoring method. How to design and program the processor 601 is a technique well-known to those skilled in the art and will not be elaborated upon here.

[0170] Based on the same inventive concept, embodiments of this application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a BGP routing data monitoring method described above.

[0171] In some possible implementations, various aspects of the BGP routing data monitoring method provided by this application can also be implemented in the form of a program product, which includes program code that, when the program product is run on a device, causes the control device to perform the steps in the BGP routing data monitoring method according to various exemplary embodiments of this application described above.

[0172] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0173] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0174] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0175] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for monitoring BGP routing data, characterized in that, The method includes: Obtain BGP routing data; Parse the BGP routing data to obtain the first feature of the BGP routing data. The first feature of the BGP routing data includes the elements in the BGP routing data, including the number of routing entries, the path length of the Autonomous System (AS), the number of adjacent tuples of the AS path, the AS in-degree, and the AS out-degree. Based on the routing prefix of the BGP routing data, a first feature of the historical BGP routing data is obtained, wherein the first feature of the historical BGP routing data includes elements in the historical BGP routing data; Clustering is performed on the first feature of the BGP routing data and the first feature of the historical BGP routing data to obtain clustering results, which are used to characterize the degree of dispersion of the BGP routing data on the features; Based on the clustering results, the reliability of the BGP routing data is determined; If the credibility meets the preset rules, the BGP routing data is determined to be abnormal BGP routing data; The acquisition of BGP routing data specifically includes: Real-time acquisition of BGP routing data based on Kafka; After obtaining the BGP routing data, the method further includes: Based on Kafka, the BGP routing data is transmitted to the distributed big data platform; The BGP routing data is copied based on the bypass output of the processing operator, and the copied BGP routing data is stored in the full routing database based on the time window. The full routing database is a fully column-oriented distributed database. Before parsing the BGP routing data to obtain the first feature of the BGP routing data, the method further includes: Based on the routing prefix, obtain the historical BGP routing data; The BGP routing data is compared with the historical BGP routing data, and duplicate BGP routing data is deleted to obtain BGP routing change data, which includes the BGP routing change data. The method further includes: The BGP route change data is hashed and bucketed according to the route prefix to obtain multiple hash buckets. The route prefix of the BGP route change data included in any of the multiple hash buckets is the same. The BGP route change data and the corresponding credibility of the BGP route change data are stored in the route incremental database according to the grouping of the multiple hash buckets.

2. The method according to claim 1, characterized in that, The method further includes: The BGP routing data is determined to include BGP routing data with preset invalid values; Delete the BGP routing data that includes preset invalid values; Identify BGP routing data that lacks universally recognized mandatory attributes, including the Autonomous System Path (AS_Path) attribute, the Origin attribute, and the Next Hop attribute. Delete the BGP route data that lacks the generally accepted mandatory attributes.

3. The method according to claim 1 or 2, characterized in that, The method further includes: Normalize the BGP routing data.

4. The method according to claim 1, characterized in that, The method further includes: The BGP routing data is grouped according to different preset standards to obtain multiple groups of BGP routing data.

5. The method according to claim 4, characterized in that, The method further includes: The Connect operator is used to merge the rule flow and the packet flow for statistical analysis, resulting in an abnormal BGP route data set. The rule flow and the packet flow are obtained by grouping the BGP route data. The abnormal BGP route data set is stored in the abnormal route database.

6. The method according to claim 1, characterized in that, The method further includes: Copy the BGP routing data; The copied BGP route data is stored in the full route database.

7. The method according to claim 1, wherein determining the reliability of the BGP routing data based on the clustering results is characterized in that, Specifically, it includes: The clustering results are mapped to a preset confidence interval to obtain the confidence level of the BGP routing data.

8. The method according to claim 1, characterized in that, The method further includes: The first characteristic of the BGP routing data is stored in the database.

9. A monitoring device for BGP routing data, characterized in that, include: The acquisition module is used to obtain BGP routing data; The parsing module is used to parse the BGP routing data to obtain the first feature of the BGP routing data. The first feature of the BGP routing data includes the elements in the BGP routing data, including the number of routing entries, the Autonomous System path length, the number of adjacent tuples of the Autonomous System AS path, the AS in-degree, and the AS out-degree. The processing module is configured to obtain a first feature of historical BGP routing data based on the routing prefix of the BGP routing data, wherein the first feature of historical BGP routing data includes elements in the historical BGP routing data; The processing module is further configured to cluster the first feature of the BGP routing data and the first feature of the historical BGP routing data to obtain a clustering result, wherein the clustering result is used to characterize the degree of dispersion of the BGP routing data on the feature; The processing module is further configured to determine the reliability of the BGP routing data based on the clustering results; The processing module is further configured to determine that the BGP routing data is abnormal BGP routing data if the credibility meets the preset rules; The module for acquiring BGP routing data is specifically used to: acquire BGP routing data in real time based on Kafka. After obtaining the BGP routing data, the processing module is further configured to transmit the BGP routing data to the distributed big data platform based on Kafka. The BGP routing data is copied based on the bypass output of the processing operator, and the copied BGP routing data is stored in the full routing database based on the time window. The full routing database is a fully column-oriented distributed database. Before parsing the BGP routing data and obtaining the first feature of the BGP routing data, the processing module is also used to obtain the historical BGP routing data based on the routing prefix; compare the BGP routing data with the historical BGP routing data, delete duplicate BGP routing data, and obtain BGP routing change data, wherein the BGP routing data includes the BGP routing change data; The processing module is further configured to hash and bucket the BGP route change data according to the route prefix, resulting in multiple hash buckets, wherein the route prefix of the BGP route change data included in any hash bucket is the same; and to store the BGP route change data and the corresponding credibility of the BGP route change data in the route incremental database according to the grouping of multiple hash buckets.

10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Realization method of efficient distributed routing list realizing method

    CN102739526A

  • Router threat sensing method and system based on traffic statistical characteristics

    CN113132352A

  • Routing anomaly detection method, device, system and computer storage medium

    CN113225194A

  • Rule engine-based rule event dynamic loading and updating method and related equipment

    CN115129736A