AS relation inference method and device based on graph neural network, and related equipment
Through a graph neural network-based method, routing table messages are converted into graph-structured data, and multi-dimensional graph convolution network models and semi-supervised learning strategies are used to solve the problems of existing AS relationship inference algorithms relying on assumptions and lack of generalization. Efficient AS relationship inference under changes in Internet topology is achieved.
Patent Information
- Application Number
- CN202410673518.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-03-28
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-28
AI Technical Summary
Existing AS relationship inference algorithms rely too much on Internet topology assumptions and lack absolutely real data sets, resulting in unbounded errors; deep learning algorithms cannot effectively utilize the structural features of topological graphs, and have insufficient interpretability and generalization capabilities, making it difficult to adapt to Internet topology. change.
A method based on graph neural network is used to convert routing table messages into graph structured data, a multi-dimensional graph convolution network model is used to extract node features and network topology information, and the attention mechanism is used for fusion processing, and a semi-supervised learning strategy is used to train the model. Dynamically adjust parameters to adapt to new topologies.
It realizes AS relationship inference under the condition of Internet topology changes, has good generalization and accuracy, can effectively utilize the structural characteristics of topological graph, and improves interpretability and adaptability.
Smart Images

Figure CN118569387A
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an AS relationship inference method, device and related equipment based on graph neural network. Background Art
[0002] The current AS (Autonomous system) relationship inference algorithm faces the following challenges. The first is that with the rapid development of the Internet and the deepening of hierarchical flattening, the data relationships between many ASs violate the traditional inherent cognition. The existing data relationship inference algorithms are overly dependent on the assumptions made about the Internet topology structure and lack absolutely real data sets. Heuristic inferences based on this will cause unbounded errors and no longer meet the needs of actual conditions. The second is that the existing deep learning algorithms consider using word embedding to infer data relationships in AS. The use of textual data cannot make good use of the graph structure characteristics of the topology itself. At the same time, the interpretability is not strong and the inferred relationship type is single. The third is that with the increasing changes in the Internet topology, the AS relationship will change. The inference algorithm needs to be generalized to adjust the inferred relationship in a timely manner, but the existing algorithms are mainly suitable for situations where the Internet hierarchy is fixed and the strategy is single. Summary of the invention
[0003] In view of this, the purpose of this application is to propose an AS relationship inference method, device and related equipment based on graph neural network to solve or partially solve the above-mentioned technical problems.
[0004] Based on the above objectives, this application provides an AS relationship inference method based on graph neural network, including:
[0005] Convert the collected routing table messages into graph structure data of the border gateway protocol;
[0006] Determine an AS organization mapping data set, add organization information to nodes in the graph structure data based on the AS organization mapping data set, and pre-add edge labels to some edges in the graph structure data after adding the organization information to obtain a border gateway graph;
[0007] Extracting node features from the border gateway graph, determining an original graph of the border gateway graph, extracting network topology information from the original graph using a multi-dimensional graph convolutional network model, and fusing the node features and the network topology information through an attention mechanism to obtain a fusion result;
[0008] Determine the imbalanced labels with and without edge labels in the border gateway graph, and train the multidimensional graph convolutional network model using a semi-supervised learning strategy based on the imbalanced labels and fusion results. Use the trained multidimensional graph convolutional network model to output edge categories corresponding to the border gateway graph, and determine the AS relationship based on the edge categories.
[0009] Based on the same inventive concept, the present disclosure also provides an AS relationship inference device based on a graph neural network, comprising:
[0010] A graph structure conversion module is configured to convert the collected routing table messages into graph structure data of the border gateway protocol;
[0011] An edge label generation module is configured to determine an AS organization mapping data set, add organization information to nodes in the graph structure data based on the AS organization mapping data set, and pre-add edge labels to some edges in the graph structure data after adding the organization information to obtain a border gateway graph;
[0012] A feature extraction and fusion module is configured to extract node features from the border gateway graph, determine an original graph of the border gateway graph, extract network topology information from the original graph using a multi-dimensional graph convolutional network model, and fuse the node features and the network topology information through an attention mechanism to obtain a fusion result;
[0013] The AS relationship conversion module is configured to determine the imbalanced labels with edge labels and without edge labels in the border gateway graph, and train the multidimensional graph convolutional network model using a semi-supervised learning strategy based on the imbalanced labels and fusion results, and use the trained multidimensional graph convolutional network model to output edge categories corresponding to the border gateway graph, and determine the AS relationship according to the edge categories.
[0014] Based on the same inventive concept, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.
[0015] Based on the same inventive concept, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described above.
[0016] Based on the same concept, the present disclosure also provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer is enabled to execute the above method.
[0017] From the above, it can be seen that the AS relationship inference method, device and related equipment based on graph neural network provided by this application can process routing table messages into graph structure data, use multi-dimensional graph convolutional network model to aggregate node features and label directed edges for classification, and infer the data relationship between ASs according to the classified edge categories. When the network topology information changes, the parameters of the multi-dimensional graph convolutional network model can be dynamically adjusted, so that AS relationship inference can be performed while adapting to the new network topology information, which has better generalization. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1A This is a flowchart of the AS relationship inference method based on graph neural network according to an embodiment of the present application;
[0020] Figure 1B A schematic diagram of the structure of a multi-dimensional graph convolutional network model according to an embodiment of the present application;
[0021] Figure 1C A schematic diagram of the structure of edge type inference in an embodiment of the present application;
[0022] Figure 2 A schematic diagram of the structure of an AS relationship inference device based on a graph neural network according to an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0025] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0026] Based on the above background technology, the following is a detailed description of the relevant technology:
[0027] Semi-supervised learning
[0028] Semi-supervised learning is a machine learning method that combines supervised learning and unsupervised learning. Its core idea is to make full use of labeled data and unlabeled data to train the model to improve the performance and generalization ability of the model. The goal of semi-supervised learning is to enable the model to better generalize to new and unseen data by reasonably combining labeled and unlabeled data.
[0029] There are three commonly used basic assumptions in semi-supervised learning to establish the relationship between prediction examples and learning objectives: smoothness assumption, clustering assumption and manifold assumption. In essence, these three types of assumptions are consistent, but they focus on different aspects. Among them, the popular assumption is more universal.
[0030] There are many methods for semi-supervised learning, including label propagation, autoencoders, generative adversarial networks (GANs), semi-supervised graph neural networks, etc. The characteristics of semi-supervised learning include high data utilization, strong generalization ability, robustness to label noise, domain adaptability, etc., especially when dealing with challenges of large-scale data and lack of labeled data, semi-supervised learning will continue to play its important role.
[0031] Graph Neural Networks
[0032] Graph Neural Network (GNN) is a deep learning technology for processing graph data. The main goal of GNN is to extend deep learning methods to the very flexible field of graph data, so that the model can understand and mine the complex relationships between nodes and edges in the graph. Graph data is composed of nodes and edges. Nodes represent entities or objects, and edges represent the relationship between nodes. The simplest way is to use an adjacency matrix to represent the graph structure, thereby capturing the correlation between nodes and edges in the graph. Graph neural networks can better process non-Euclidean data such as graph structures, avoiding the shortcomings of traditional neural network processing in processing such data.
[0033] Graph neural network is a connection model. Its core is to obtain the dependency relationship in the graph by transferring information between nodes in the network. GNN updates the node state from the neighbors at any depth of the node. Currently, graph neural networks are generally divided into five categories: Graph Convolution Networks (GCN), Graph Attention Networks, Graph Autoencoders, Graph Generative Networks, and Graph Spatial-temporal Networks.
[0034] Graph Convolution Networks (GCN)
[0035] Graph Convolutional Network (GCN) is a deep learning model for processing graph structure data. It generalizes convolution operations from traditional data (such as images) to graph data. It mainly learns a function mapping f(.) through which nodes v in the mapping graph are mapped. i can aggregate its own features x i With its neighbor feature x j (j∈N(v i )) to generate the node v i The core idea is to aggregate the neighbor information of nodes through multi-layer convolution operations to capture the global structure and local features of the graph. Graph convolutional networks are the basis of many complex graph neural network models, including autoencoder-based models, generative models, and spatiotemporal networks.
[0036] The spatial-based GCN method represents graph convolution as aggregating feature information from neighborhoods. When the graph convolution network algorithm runs at the node level, the graph pooling module can be interleaved with the graph convolution layer to coarsen the graph into a high-level substructure. This approach allows the model to gradually understand the complexity of the graph from the node level to the higher-level substructure level and generate more informative representations, thereby improving performance in various tasks.
[0037] AS relationship inference
[0038] AS relationship inference is a technology that describes routing announcement rules by inferring data relationships based on routing policies between ASs. Common AS relationship roles mainly include the following four types: provider, client, peer, and brother. The data relationship between two ASs is mainly divided into: transmission relationship (provider-client, client-provider), peer relationship, and brother relationship. The no-valley principle is mainly an abstraction of commonly used economic policies in the network, which can be summarized as routes from providers and peers can only be announced to customers, while the announcement of routes from customers is not restricted. AS relationships are mainly used in inter-domain security detection, and whether routing leaks have occurred can be detected based on the no-valley principle. However, the AS relationship itself is confidential, so a technology is needed to infer non-public data relationships. This technology plays a key role in detecting the occurrence of routing leaks and maintaining the security of the global Internet infrastructure.
[0039] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0040] This embodiment proposes an AS relationship inference method based on a graph neural network, such as Figure 1A As shown, the method includes:
[0041] Step 101, converting the collected routing table messages into graph structure data of the border gateway protocol.
[0042] Step 102, determine the AS organization mapping data set, add organization information to the nodes in the graph structure data based on the AS organization mapping data set, and pre-add edge labels to some edges in the graph structure data after adding the organization information to obtain a border gateway graph (BGP graph).
[0043] Step 103: extract node features from the border gateway graph, determine the original graph of the border gateway graph, use a multi-dimensional graph convolutional network model to extract network topology information from the original graph, and fuse the node features and the network topology information through an attention mechanism to obtain a fusion result.
[0044] Step 104, determine the imbalanced labels with edge labels and without edge labels in the border gateway graph, and train the multidimensional graph convolutional network model using a semi-supervised learning strategy based on the imbalanced labels and fusion results, use the trained multidimensional graph convolutional network model to output the edge categories corresponding to the border gateway graph, and determine the AS relationship based on the edge categories.
[0045] Through the above scheme, the routing table message can be processed into graph structure data, and the node features can be aggregated using the multi-dimensional graph convolutional network model and the directed edges can be labeled and classified. According to the classified edge categories, the data relationship between ASs can be inferred. When the network topology information changes, the parameters of the multi-dimensional graph convolutional network model can be dynamically adjusted, so that the AS relationship can be inferred while adapting to the new network topology information, which has better generalization.
[0046] In some embodiments, step 101 includes:
[0047] Step 1011, downloading the routing table message from the public data collection platform RIPE according to the scheduled collection time.
[0048] In the specific implementation, the routing table messages are downloaded from the public data collection platform RIPE, and the data collection time is set to the routing table messages of the first three days of each month. Since the routing table messages are updated every 8 hours, a total of 9 message files can be collected within the collection window. If you need to collect data for January 2023, you will collect routing table data from 0:00 on January 1, 2023 to 23:59:59 on January 3, 2023.
[0049] Step 1012: parse the format of the routing table message into a readable format using a border gateway processing tool to obtain a routing table message in a readable format.
[0050] During specific implementation, the border gateway processing (bgpdump) tool is used to parse the collected routing table messages from the MRT format into a readable format.
[0051] Step 1013: Convert the routing table message data in a readable format into graph structure data using an open source graph deep learning framework DGL, wherein the graph structure data includes nodes and directed edges between two adjacent nodes.
[0052] In specific implementation, each file in the readable format routing table message contains a lot of BGP routing information, and each routing information contains an AS path to a specific network prefix. Traverse all paths of the routing table message data, where the AS is converted into a corresponding node. If two ASs are adjacent in at least one BGP route, a directed edge between the two ASs is constructed in the graph. Each node is weighted by the prefix count initiated by the AS as the weight of the node. The higher the weight, the more prefixes the AS has. In addition, the node V of the graph structure data also has an attribute called ASN to record the number of the AS.
[0053] In some embodiments, step 102 includes:
[0054] Step 1021, obtaining an AS organization mapping data set corresponding to the collection time of the collected routing table messages, and adding organization information to the nodes in the graph structure data based on the AS organization mapping data set.
[0055] In the specific implementation, the AS-organization mapping data set in CAIDA at the corresponding time is obtained to add organizational information to the nodes of the organization in the known graph structure data. Since the sibling relationship only exists when two ASs belong to the same organization, this additional attribute is helpful to increase the amount of information that can be mined by the model.
[0056] The collection time refers to the month corresponding to the time to which the downloaded routing table message belongs. For example, if the downloaded routing table message is data within the time range from 0:00 on January 1, 2023 to 23:59:59 on January 3, 2023, then the corresponding time is January 2023, that is, the AS-organization mapping dataset corresponding to January 2023 needs to be downloaded.
[0057] Step 1022, input the routing table message into the AS_Rank algorithm model, the Problink algorithm model and the Toposcope algorithm model respectively, and obtain the first inference result output by the AS_Rank algorithm model, the second inference result output by the Problink algorithm model and the third inference result output by the Toposcope algorithm model.
[0058] Step 1023: Select consensus data of the first inference result, the second inference result, and the third inference result as a consensus result.
[0059] Step 1024, determine some edges in the graph structure data after adding the organization information that correspond to the consensus result, and add edge labels to some edges in the graph structure data after adding the organization information according to the consensus result to obtain a border gateway graph.
[0060] In specific implementation, since the consensus result does not include all business relationships between ASs, only some business relationships between ASs are included in the consensus result, only the edges corresponding to the edge types in the consensus result are pre-labeled.
[0061] In order to enhance the credibility of existing edge labels as much as possible, each edge type is represented as a unique vector, and the dimension of the vector is equal to the number of categories. This solution finally obtains a border gateway graph (BGP graph) containing the above basic information.
[0062] In some embodiments, step 103 includes:
[0063] Step 1031, determine the node feature graph corresponding to the border gateway graph, and use a multi-dimensional graph convolutional network model to extract node features based on the node feature graph to obtain node features, wherein each node feature corresponds to a node in the border gateway graph.
[0064] Here we use the k-nearest neighbor graph G generated from the node information in the border gateway graph. f As the node feature graph, G f The adjacency matrix of f , when performing adjacency information aggregation, the overall feature iteration formula is:
[0065]
[0066] in is the normalized adjacency matrix, is the adjacency matrix A f The degree matrix, H f i represents the feature matrix of the i-th iteration, W f i is the hidden layer weight matrix at the i-th iteration. Finally, the output of the last layer of the GCN is represented as the node feature Z F .
[0067] Step 1032: for the graph structure data after adding the organizational information, a multi-dimensional graph convolutional network model (such as Figure 1B As shown) aggregate information processing is performed to obtain network topology information, wherein each network topology information corresponds to a node in the border gateway graph.
[0068] In the specific implementation, the network topology graph is processed by using the original graph structure data G after adding the organization information obtained in step 1021 above. n , using a multi-dimensional graph convolutional network model for information aggregation, and obtaining the output network topology information Z of the last layer through a learning method similar to the node feature graph N .
[0069] Step 1033, the node features corresponding to the adjacent nodes of each edge of the border gateway graph and the network topology information are concatenated and fused through an attention mechanism to obtain a fusion result.
[0070] In the specific implementation, it is necessary to make the node features corresponding to each edge of the border gateway graph and the network topology information jointly represent the information mined in the border gateway graph. Therefore, the attention mechanism fusion is introduced to represent the corresponding nodes of the border gateway graph.
[0071] For two node features Z F and network topology information Z N , for a node i, its representation in node characteristics and network topology information is and Since the ultimate goal of this embodiment is to achieve edge classification, it is necessary to use the feature representations of two nodes connected by an edge as the feature representation of the edge. The specific splicing method is as follows: Figure 1C As shown, for an edge e, its two node features and Represented as and Here, the attention mechanism is introduced to fuse the two features, and we can get Represents the weights in learning q represents the shared attention vector, T represents the matrix transpose, and W F It's Z F The corresponding weight matrix, b represents the bias. Replace with You can get
[0072] After softmax activation Similarly, Therefore, the final edge feature (fusion result) is expressed as Z = α N ·Z N +α F ·Z F .
[0073] In some embodiments, step 103 further includes:
[0074] Step 1034, the fusion result is subjected to consistency constraint processing to obtain an optimization objective function corresponding to the multi-dimensional graph convolutional network model.
[0075] In order to make the features learned by the multi-dimensional graph convolutional network model in the node feature graph and the structure graph of the network topology information as similar as possible, a consistency constraint is introduced to define two nodes x i 、x jThe cosine similarity of For the output Z of two graph convolutions F and Z N , using their similarity matrix S N and S F As the consistency constraint condition, the loss function is defined as Γ c =||S T -S F || 2 .
[0076] Since the ultimate goal is to achieve multi-classification of edges, a softmax classifier is designed to output the predicted probability values of various edge categories, and then determine the category label of the edge as W represents the weight matrix, Z represents the feature matrix, b represents the bias, Indicates the category label of the output edge, such as 0, 1, 2, etc.
[0077] The loss is calculated using the cross entropy loss function E represents the edge set, e represents the edge taken out, C represents the edge category set, Y e represents the edge category with a label, Represents the edge category of edge e output by the softmax classifier.
[0078] So far, the objective function of the model optimization is Γ=Γ t +γΓ c , where γ is the hyperparameter corresponding to the consistency constraint.
[0079] In some embodiments, step 104 utilizes proxy edge labels to improve learning effects under data imbalance conditions: since pre-labeling cannot guarantee that the distribution of categories is balanced and meets actual conditions, it is necessary to consider the impact of data imbalance on semi-supervised learning. Therefore, the value of information that unlabeled data can provide in classification is considered, that is, proxy labels are generated for some unlabeled data (that is, features without edge labels) based on the classification results, and the loss function of the proxy edge labels is added to the optimized objective function for better learning.
[0080] Step 104 specifically includes:
[0081] Step 1041, train the multi-dimensional graph convolutional network model using the fusion results of the edges with edge labels in the border gateway graph, and continuously calculate the optimization target value based on the optimization target function during the training process, and continuously update the parameter weights of the multi-dimensional graph convolutional network model according to the optimization target value to obtain the first multi-dimensional graph convolutional network model after training.
[0082] Step 1042, using the first multi-dimensional graph convolutional network model to assign corresponding proxy edge labels to the edges without edge labels in the border gateway graph, and mixing the fusion results of the edges with proxy edge labels and the fusion results of the edges with edge labels to obtain a mixed result.
[0083] Step 1043, continue to train the first multi-dimensional graph convolutional network model using the mixed result, use the optimization objective function to calculate the first error of the fusion result of the edge with the proxy edge label and the second error of the fusion result of the edge with the edge label, and determine the loss function value according to the first error and the second error.
[0084] Step 1044: adjust the parameters of the first multi-dimensional graph convolutional network model based on the loss function value.
[0085] Due to the addition of proxy edge labels, it is necessary to calculate the loss separately for the error of the fusion result of the edge with edge labels and the error of the fusion result of the edge with proxy edge labels. The objective optimization function is as follows Where n represents the number of edges with labeled edge labels, n' represents the number of edges with proxy edge labels, m represents the value from n or n', and f represents the output of the first multi-dimensional graph convolutional network model. represents the cross entropy loss function value of the edge with the labeled edge label, The cross entropy loss value of the edge representing the proxy edge label.
[0086] However, in order to balance the contribution of the error (i.e., loss value) of the edge with the proxy edge label and the error (i.e., loss value) of the edge with the edge label to the loss, α(t) is introduced, and its formula is expressed as:
[0087]
[0088] α f represents the maximum weight, T 1 and T 2 Represent two stages respectively. When t <T 1 When t>T , it is the initial stage, and the edges with proxy edge labels do not participate in the evaluation of the loss value. At this time, the first multi-dimensional graph convolutional network model is trained entirely by the edges with annotated edge labels. 2 When it is in the fine-tuning stage, the edge of the proxy edge label participates in the training of the first multi-dimensional graph convolutional network model through a maximum weight αf. When it is in the intermediate stage, that is, T 1 <=t<=T 2 , gradually increase the weight of the loss value of the edge of the proxy edge label.
[0089] As the training time increases, α(t) will increase linearly from zero to a saturation value α f, the edges corresponding to the proxy edge labels will also be gradually released. Here, the Adm optimizer is used to update the first multi-dimensional graph convolutional network model parameters to reduce the loss function.
[0090] Step 1045: Based on the fusion results of the edges without edge labels, the adjusted first multi-dimensional graph convolutional network model is continuously used to assign corresponding proxy edge labels until all edges without edge labels are assigned corresponding proxy edge labels.
[0091] Step 1046, determine the edge category according to the proxy edge label and the original edge label, convert the edge category into the form of AS, and map the node number corresponding to the border gateway graph with AS.
[0092] Step 1047, searching for the AS relationship corresponding to the edge category according to the node attributes in the graph structure data.
[0093] In specific implementation, according to the category of the obtained directed edge (that is, the edge category corresponding to the border gateway graph), it is also necessary to convert it into the form of AS1|AS2|relationship. At this time, the mapping of node number and ASN is involved. The node attribute named "ASN" stored when building the border gateway graph is used to find the corresponding ASN, and the corresponding AS relationship (for example, AS business relationship) is restored as output according to the edge category.
[0094] The current AS relationship inference method relies on the assumptions made about the Internet hierarchy. The heuristic method used for inference is prone to cause unbounded errors. At the same time, with the rapid development of the Internet, the hierarchy is becoming increasingly flat, and the previously highly relied-on hierarchy assumptions and empirical rules are no longer applicable. In addition. Existing deep learning-based algorithms attempt to embed ASNs into low-dimensional vector spaces and use neural networks for classification, but they can only achieve the most basic relationship inference and have average performance, and do not have strong interpretability. Therefore, this method is the first method to attempt to use graph neural networks for AS relationship inference, which is a brand new attempt.
[0095] This method describes an AS relationship inference algorithm based on a graph neural network. First, the consensus results of several classic data relationship inference algorithms are used as edge labels for some AS relationships, and the organization information is extracted from the AS-organization mapping data set in CAIDA as a reference condition for whether the two ASs can be brothers. This method processes BGP path information into graph structure data, and uses the graph convolution network of the graph neural network to aggregate adjacency information and classify directed edges (i.e., edge categories). According to the probability value of the classification, the data relationship between ASs can be inferred. When the Internet topology (i.e., network topology information) changes, the parameters of the generation algorithm can be dynamically adjusted, so that AS relationship inference can be performed while adapting to the new Internet topology, which has better generalization.
[0096] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0097] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0098] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides an AS relationship inference device based on graph neural network.
[0099] refer to Figure 2 , the device comprises:
[0100] A graph structure conversion module 21, configured to convert the collected routing table messages into graph structure data of the border gateway protocol;
[0101] The edge label generation module 22 is configured to determine the AS organization mapping data set, add organization information to the nodes in the graph structure data based on the AS organization mapping data set, and pre-add edge labels to some edges in the graph structure data after adding the organization information to obtain a border gateway graph;
[0102] The feature extraction and fusion module 23 is configured to extract node features from the border gateway graph, determine the original graph of the border gateway graph, extract network topology information from the original graph using a multi-dimensional graph convolutional network model, and fuse the node features and the network topology information through an attention mechanism to obtain a fusion result;
[0103] The AS relationship conversion module 24 is configured to determine the imbalanced labels with edge labels and without edge labels in the border gateway graph, and train the multidimensional graph convolutional network model using a semi-supervised learning strategy based on the imbalanced labels and fusion results, and use the trained multidimensional graph convolutional network model to output edge categories corresponding to the border gateway graph, and determine the AS relationship based on the edge categories.
[0104] In some embodiments, the graph structure conversion module 21 is further configured to:
[0105] Download routing table messages from the public data collection platform RIPE according to the scheduled collection time;
[0106] Parsing the format of the routing table message into a readable format using a border gateway processing tool to obtain a routing table message in a readable format;
[0107] The routing table message data in a readable format is converted into graph structure data using the open source graph deep learning framework DGL, wherein the graph structure data includes nodes and directed edges between two adjacent nodes.
[0108] In some embodiments, the edge label generation module 22 is further configured to:
[0109] Acquire an AS organization mapping data set corresponding to the collection time of the collected routing table messages, and add organization information to the nodes in the graph structure data based on the AS organization mapping data set;
[0110] Input the routing table message into the AS_Rank algorithm model, the Problink algorithm model and the Toposcope algorithm model respectively, and obtain a first inference result output by the AS_Rank algorithm model, a second inference result output by the Problink algorithm model and a third inference result output by the Toposcope algorithm model;
[0111] Selecting consensus data of the first inference result, the second inference result, and the third inference result as a consensus result;
[0112] Part of the edges in the graph structure data after adding the organization information corresponding to the consensus result is determined, and according to the consensus result, edge labels are added to the part of the edges in the graph structure data after adding the organization information to obtain a border gateway graph.
[0113] In some embodiments, the feature extraction and fusion module 23 is further configured to:
[0114] Determine a node feature graph corresponding to the border gateway graph, and extract node features using a multidimensional graph convolutional network model according to the node feature graph to obtain node features, wherein each node feature corresponds to a node of the border gateway graph;
[0115] For the graph structure data after adding the organization information, a multi-dimensional graph convolutional network model is used to aggregate the information to obtain network topology information, wherein each network topology information corresponds to a node of the border gateway graph;
[0116] The node features corresponding to the adjacent nodes of each edge of the border gateway graph and the network topology information are spliced and fused through the attention mechanism to obtain a fusion result.
[0117] In some embodiments, the feature extraction and fusion module 23 is further configured to:
[0118] The fusion result is subjected to consistency constraint processing to obtain an optimization objective function corresponding to the multi-dimensional graph convolutional network model.
[0119] In some embodiments, the AS relationship conversion module 24 is further configured to:
[0120] The multi-dimensional graph convolutional network model is trained using the fusion results of the edges with edge labels in the border gateway graph, and the optimization target value is continuously calculated based on the optimization target function during the training process, and the parameter weights of the multi-dimensional graph convolutional network model are continuously updated according to the optimization target value to obtain a first multi-dimensional graph convolutional network model after training;
[0121] Using the first multi-dimensional graph convolutional network model, assigning corresponding proxy edge labels to the edges without edge labels in the border gateway graph, and mixing the fusion results of the edges with the proxy edge labels with the fusion results of the edges with the edge labels to obtain a mixed result;
[0122] Continue to train the first multi-dimensional graph convolutional network model using the mixed result, calculate a first error of the fusion result of the edge with the proxy edge label and a second error of the fusion result of the edge with the edge label using the optimization objective function, and determine a loss function value according to the first error and the second error;
[0123] Adjusting parameters of the first multi-dimensional graph convolutional network model based on the loss function value;
[0124] Based on the fusion results of the edges without edge labels, the corresponding proxy edge labels are continuously assigned using the adjusted first multi-dimensional graph convolutional network model until all the edges without edge labels are assigned corresponding proxy edge labels;
[0125] Determine the edge category according to the proxy edge label and the original edge label, convert the edge category into the form of AS, and map the node number corresponding to the border gateway graph with AS;
[0126] Find the AS relationship corresponding to the edge category based on the node attributes in the graph structure data.
[0127] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0128] The device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0129] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any of the above embodiments when executing the program.
[0130] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0131] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0132] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0133] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0134] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0135] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0136] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0137] The electronic device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0138] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in any of the above embodiments.
[0139] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0140] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0141] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the method described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.
[0142] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0143] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0144] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0145] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0146] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0147] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0148] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0149] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for inferring AS relationship based on graph neural network, characterized in that: include: Convert the collected routing table messages into graph structure data of the border gateway protocol; Determine an AS organization mapping data set, add organization information to nodes in the graph structure data based on the AS organization mapping data set, and pre-add edge labels to some edges in the graph structure data after adding the organization information to obtain a border gateway graph; Extracting node features from the border gateway graph, determining an original graph of the border gateway graph, extracting network topology information from the original graph using a multi-dimensional graph convolutional network model, and fusing the node features and the network topology information through an attention mechanism to obtain a fusion result; Determine the imbalanced labels with and without edge labels in the border gateway graph, and train the multidimensional graph convolutional network model using a semi-supervised learning strategy based on the imbalanced labels and fusion results. Use the trained multidimensional graph convolutional network model to output edge categories corresponding to the border gateway graph, and determine the AS relationship based on the edge categories.
2. The method according to claim 1, characterized in that The collected routing table messages are converted into graph structure data of the border gateway protocol, including: Download routing table messages from the public data collection platform RIPE according to the scheduled collection time; Parsing the format of the routing table message into a readable format using a border gateway processing tool to obtain a routing table message in a readable format; The routing table message data in a readable format is converted into graph structure data using the open source graph deep learning framework DGL, wherein the graph structure data includes nodes and directed edges between two adjacent nodes.
3. The method according to claim 1, characterized in that The determining of the AS organization mapping data set, adding organization information to nodes in the graph structure data based on the AS organization mapping data set, and adding edge labels to some edges in the graph structure data after adding the organization information to obtain a border gateway graph, includes: Acquire an AS organization mapping data set corresponding to the collection time of the collected routing table messages, and add organization information to the nodes in the graph structure data based on the AS organization mapping data set; Input the routing table message into the AS_Rank algorithm model, the Problink algorithm model and the Toposcope algorithm model respectively, and obtain a first inference result output by the AS_Rank algorithm model, a second inference result output by the Problink algorithm model and a third inference result output by the Toposcope algorithm model; Selecting consensus data of the first inference result, the second inference result, and the third inference result as a consensus result; Part of the edges in the graph structure data after adding the organization information corresponding to the consensus result is determined, and according to the consensus result, edge labels are added to the part of the edges in the graph structure data after adding the organization information to obtain a border gateway graph.
4. The method according to claim 3, characterized in that The step of extracting node features from the border gateway graph and determining an original graph of the border gateway graph, extracting network topology information from the original graph using a multi-dimensional graph convolutional network model, and fusing the node features and the network topology information through an attention mechanism to obtain a fusion result includes: Determine a node feature graph corresponding to the border gateway graph, and extract node features using a multidimensional graph convolutional network model according to the node feature graph to obtain node features, wherein each node feature corresponds to a node of the border gateway graph; For the graph structure data after adding the organization information, a multi-dimensional graph convolutional network model is used to aggregate the information to obtain network topology information, wherein each network topology information corresponds to a node of the border gateway graph; The node features corresponding to the adjacent nodes of each edge of the border gateway graph and the network topology information are spliced and fused through the attention mechanism to obtain a fusion result.
5. The method according to claim 4, characterized in that Also includes: The fusion result is subjected to consistency constraint processing to obtain an optimization objective function corresponding to the multi-dimensional graph convolutional network model.
6. The method according to claim 5, characterized in that The method comprises: determining unbalanced labels with edge labels and without edge labels in the border gateway graph, training the multidimensional graph convolutional network model using a semi-supervised learning strategy based on the unbalanced labels and the fusion results, outputting edge categories corresponding to the border gateway graph using the trained multidimensional graph convolutional network model, and determining AS relationships according to the edge categories, including: The multi-dimensional graph convolutional network model is trained using the fusion results of the edges with edge labels in the border gateway graph, and the optimization target value is continuously calculated based on the optimization target function during the training process, and the parameter weights of the multi-dimensional graph convolutional network model are continuously updated according to the optimization target value to obtain a first multi-dimensional graph convolutional network model after training; Using the first multi-dimensional graph convolutional network model, assigning corresponding proxy edge labels to the edges without edge labels in the border gateway graph, and mixing the fusion results of the edges with the proxy edge labels with the fusion results of the edges with the edge labels to obtain a mixed result; Continue to train the first multi-dimensional graph convolutional network model using the mixed result, calculate a first error of the fusion result of the edge with the proxy edge label and a second error of the fusion result of the edge with the edge label using the optimization objective function, and determine a loss function value according to the first error and the second error; Adjusting parameters of the first multi-dimensional graph convolutional network model based on the loss function value; Based on the fusion results of the edges without edge labels, the corresponding proxy edge labels are continuously assigned using the adjusted first multi-dimensional graph convolutional network model until all the edges without edge labels are assigned corresponding proxy edge labels; Determine the edge category according to the proxy edge label and the original edge label, convert the edge category into the form of AS, and map the node number corresponding to the border gateway graph with AS; Find the AS relationship corresponding to the edge category based on the node attributes in the graph structure data.
7. An AS relationship inference device based on graph neural network, characterized in that: include: A graph structure conversion module is configured to convert the collected routing table messages into graph structure data of the border gateway protocol; An edge label generation module is configured to determine an AS organization mapping data set, add organization information to nodes in the graph structure data based on the AS organization mapping data set, and pre-add edge labels to some edges in the graph structure data after adding the organization information to obtain a border gateway graph; A feature extraction and fusion module is configured to extract node features from the border gateway graph, determine an original graph of the border gateway graph, extract network topology information from the original graph using a multi-dimensional graph convolutional network model, and fuse the node features and the network topology information through an attention mechanism to obtain a fusion result; The AS relationship conversion module is configured to determine the imbalanced labels with edge labels and without edge labels in the border gateway graph, and train the multidimensional graph convolutional network model using a semi-supervised learning strategy based on the imbalanced labels and fusion results, and use the trained multidimensional graph convolutional network model to output edge categories corresponding to the border gateway graph, and determine the AS relationship according to the edge categories.
8. 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 program, the method according to any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.
10. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for verifying houndary gateway protocol route strategy based on autonomous system recation
CN101005500A
Multi-label image identification method and system based on DCGAN and GCN
CN113378965A
Method and system for inferring various AS relationships based on a graph neural network
CN113919414A
Social robot detection method and device based on multi-dimensional feature fusion and residual image neural network
CN116738331A
Time sequence heterogeneous graph embedded Internet AS relationship inference method
CN117171637A
Cited By
Boundary backbone route determination method and device, electronic equipment and storage medium
CN119341970A
Method, device, electronic device and storage medium for determining border backbone routing
CN119341970B
Route leakage detection method based on probabilistic reasoning and path scoring
CN121309118A
