summaryrefslogtreecommitdiff
path: root/script/neo4jcommand.py
diff options
context:
space:
mode:
Diffstat (limited to 'script/neo4jcommand.py')
-rw-r--r--script/neo4jcommand.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/script/neo4jcommand.py b/script/neo4jcommand.py
index b12d509..64cf051 100644
--- a/script/neo4jcommand.py
+++ b/script/neo4jcommand.py
@@ -33,8 +33,19 @@ CALL gds.pageRank.stream('myGraph')
YIELD nodeId, score
with gds.util.asNode(nodeId) as n
WHERE n.IPType contains "6"
-RETURN n.IP as ip, n.ISP as isp,n.CCODE as ccode,n.COU as cou,n.PROV as prov, score
-ORDER BY score DESC, ip ASC,isp ASC,ccode ASC,cou ASC,prov ASC limit 30'''
+RETURN n.IP as ip, n.ISP as isp,n.CCODE as ccode,n.COU as cou,n.PROV as prov, n.LAT as lat,n.LNG as lng ,score
+ORDER BY score DESC limit %s'''
+
+# 高危节点邻居
+dnode_neighbor = '''
+CALL gds.pageRank.stream('myGraph')
+YIELD nodeId, score
+WHERE gds.util.asNode(nodeId).IPType contains "6"
+with gds.util.asNode(nodeId) AS no, score ORDER BY score DESC limit %s
+with collect(no) as nlist
+MATCH (m:NodeResolver53)-[r:IP_LINK]->(n:NodeResolver53)
+WHERE n in nlist and m.IPType contains "4"
+RETURN n.IP,r.W,m'''
# 节点邻居
node_neighbors = '''MATCH(n:NodeResolver53{IP:'%s'})-[]->(m:NodeResolver53) RETURN m'''