Network threat detection and identification remains a fundamental task in the defense of cyberspace. Graphs are capable of capturing rich structural information while retaining content, and they have wide applications in the field of threat detection. However, existing graph-based threat detection approaches are complex, time-consuming, and challenging to apply to real network scenarios with invisible or incomplete topologies. Therefore, we propose an efficient threat detection method based on large-scale graph parallelized learning to address these application difficulties. This method addresses the potential challenges of network topology invisibility and incompleteness by leveraging bidirectional inference between flow and behavior to construct a semantic similarity graph, where flows serve as nodes and similarity relationships between flows serve as edges. In order to improve the low efficiency of existing graph learning approaches, a non-linked subgraph sampling mechanism is introduced. This mechanism removes edge connections, induces nodes based on intimate relationships, and divides the constructed semantic similarity graph into subgraphs for parallel learning. To improve upon the issue that existing graph learning approaches embed single representations, we propose four feature embedding modes: original feature embedding, global role embedding, area position embedding, and balanced distance embedding. Subsequently, at the subgraph level, we input nodes’ four types of feature embeddings into a BERT model for learning behavior detection and classification based on updated node representations. We have validated the efficacy of the method across four publicly available datasets. Furthermore, the evaluation results demonstrate that the method achieved detection accuracies of 97.84%, 98.46%, 100%, and 96.59% on the ISCX IDS2012, CIC DDoS2019, CIC IOT2022, and USTC-TFC2016 public datasets respectively, while also exhibiting high efficiency as a characteristic. The code is available on: https://github.com/sixteen23333/LSGLM.