summaryrefslogtreecommitdiff
path: root/script/neo4jcommand.py
diff options
context:
space:
mode:
authorhandingkang <[email protected]>2024-01-19 17:50:57 +0800
committerhandingkang <[email protected]>2024-01-19 17:50:57 +0800
commitc423b3072b19c34a7f777cfa7e019baac6c3d7f1 (patch)
tree60fb4edd5df29a4cb835211ce6c2d0b0ac8b5250 /script/neo4jcommand.py
parent54a5df53fb0c69c3a812234702335451c356c369 (diff)
增加fx接口集HEADmain
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'''