Open ljy278 opened 1 year ago
Hi,
You rigth I have to work on the documentation...
Such heterogeneous graph extraction is not implemented in BML, but you can write your own transformation as explained here : https://kevinhoarau.github.io/BML/#custom-data-transformation
You can take the Graph
transformation as an example :
https://github.com/KevinHoarau/BML/blob/main/BML/transform/graph.py
I think you only need to customize the buildGraph
function.
Otherwise, if you give me a clear description of what you need, maybe I can implement the transformation.
I hope it helps.
Dear authors,
My heterogeneous graph has two types of nodes(AS and Prefix) and two types of edges (AS -AS, AS - prefix). In simple terms, on the basis of establishing the BGP topology, add the prefix declared by the AS. For example, updates.data has BGP4MP|1669872300|A|23.129.32.61|49134|103.163.242.0/24|49134 53356 6939 9583 141561 141561|IGP|23.129.32.61|0|0||NAG||. BML build BGP topology by AS Path. I need to add the edge between 141561 and 103.163.242.0/24.
How should I customize the buildGraph function?
I really need your help. Thanks!!!
Hello,
I've attached an example of implementation and usage of this transformation. HeterogeneousGraph.zip
Regards,
Dear authors,
Thank you very much! I have successfully run the code. First, I put HeterogeneousGraph.py into BML.transform, and reinstalled BML. And I successed. Later, I found that I could directly place HeterogeneousGraph.py in the project directory... There were some twists and turns, but it eventually succeeded.
Now I have a new questions. Does setting Period to 1 mean generating a new chart every minute(The code is as follows.)? For example, if there is data for two minutes now, will I get two separate charts, rather than generating the second chart based on the first chart with the data. Can I understand it this way?
datTran.setParams({ "global":{ "Period": 1, "SkipIfExist": False } })
Glad it works on your side.
When applying a transformation to BGP data in BML, Period
is the interval in minutes between each transformation.
For example, if you collect BGP data for 60 minutes, and apply the HeterogeneousGraph
transformation with a Period
of 1. Then you will get a sequence of 60 graphs.
This sequence is stored (serialized) in a file named HeterogeneousGraph_1.pickle
as a python list. Each element of the list is a networkx graph.
For more details, please read the BML paper.
I hope I answered your question, if not don't hesitate to ask again.
Regards,
Dear authors,
I am doing some research about BGP anomaly detection, and I have read your BML paper these days. I need to build a heterogeneous graph, but I do not know how to do that. BML seems to provide only the interface to build the topological graph of the BGP network. And the documentation for the data transformation chapter is not complete.
Thanks!