In order to solve the current problems in domain long text classification tasks, namely, the long length of a document, which makes it difficult for the model to capture key information, and the lack of expert domain knowledge, which leads to insufficient classification accuracy, a domain long text classification model based on a knowledge graph and a graph convolutional neural network is proposed. BERT is used to encode the text, and each word’s corresponding vector is used as a node for the graph convolutional neural network so that the initialized vector contains rich semantic information. Using the trained entity–relationship extraction model, the entity-to-entity–relationships in the document are extracted and used as the edges of the graph convolutional neural network, together with syntactic dependency information. The graph structure mask is used to learn about edge relationships and edge types to further enhance the learning ability of the model for semantic dependencies between words. The method further improves the accuracy of domain long text classification by fusing knowledge features and data features. Experiments on three long text classification datasets—IFLYTEK, THUCNews, and the Chinese corpus of Fudan University—show accuracy improvements of 8.8%, 3.6%, and 2.6%, respectively, relative to the BERT model.
Extracting Chinese Cyber Threat Intelligence (CTI) under increasingly complex advanced persistent threat scenarios is crucial, yet challenging due to domain-specific term ambiguity and frequent long, nested entities. To address polysemy, nested-label conflicts, and cross-sentence semantic discontinuity, we propose an enhanced Transformer-based entity recognition method formulated as a pointer network. On the encoder side, we build a RoBERTa model with Rotary Positional Embeddings. To handle complex positions and boundaries of heterogeneous entity types, we introduce tokenization compensation and positional-parameter compression to sharpen boundary sensitivity. In the decoder, we refine GlobalPointer and model recognition as 2D head–tail span matching, enabling direct detection of overlapping and nested entities. To mitigate long-tail bias, we introduce an entity-frequency-aware dynamic threshold and a reweighted zero-boundary log-loss to improve recall for rare entities. Experiments demonstrate an overall F1 improvement of 6.32% over baselines on Chinese CTI datasets, with absolute gains reaching 19.7% specifically on nested and long entities. These results validate the model’s effectiveness in Chinese-specific named entity recognition and its utility for high-accuracy automated CTI analysis.
Most existing log parsers are static. When parsing logs with a static parser, the accuracy tends to fluctuate significantly. To overcome this issue, this paper proposes a dynamic log parser named DLogParser. The core idea of DLogParser is to select different parsing policies based on log features. DLogParser first parses a small batch of sample log messages, then analyzes log characteristics from the parsing results, and determines an appropriate parsing policy for the current logs. Then it parses all remaining logs according to the determined policy. To support dynamic parsing policies, DLogParser incorporates 5 grouping criteria for log features, including length, punctuation, first token, last token, and key token, and establishes 7 rules for parsing policy generation. We evaluated DLogParser on public datasets from LogHub. The experimental results demonstrate that compared to 11 existing log parsers, DLogParser achieves an accuracy of 90.3% with an acceptable performance loss.