Network security entity relationship joint extraction method based on graph feature aggregation

Through the method based on graph feature aggregation, the graph convolution network and attention mechanism are used to extract entity relationships of network threat intelligence data, which solves the problem of insufficient utilization of complex semantics in the prior art and improves the accuracy and robustness of extraction.

CN120106070APending Publication Date: 2025-06-06NANJING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510255234.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art cannot effectively utilize the complex semantics in cyber threat intelligence data for entity relationship extraction, resulting in insufficient accuracy and robustness of extraction.

Method used

The joint extraction method of network security entity relationships based on graph feature aggregation is adopted. By collecting and annotating network threat intelligence data, dependent syntax analysis and graph construction are carried out, and the graph convolution network and attention mechanism are used to jointly extract entity relationships.

Benefits of technology

It improves the accuracy and robustness of joint extraction of network security entity relationships, can effectively use syntactic information to process edges with dependencies and non-dependencies, and enhances the ability to identify complex network security relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120106070A_ABST
    Figure CN120106070A_ABST
Patent Text Reader

Abstract

The invention discloses a network security entity relationship joint extraction method based on graph feature aggregation. The method comprises the following steps: collecting data and labeling to generate a sample data set; performing dependency syntactic analysis and BERT pre-training model training on the data in sequence to generate a dependency adjacency matrix of the sequence and perform word embedding; a joint extraction model is constructed, a complex dependency relationship is processed by using a graph attention mechanism, and feature representation of nodes is updated by combining contextual information aggregated by a graph convolutional network; training by using the training data and optimizing the model by using a cross entropy loss function; and processing new network threat intelligence to generate a dependency adjacency matrix and word embedding representation, inputting the final model obtained by training, and performing entity relationship joint extraction. According to the method, the complex dependency relationship between the network threat intelligence entities can be effectively captured, the influence of the adjacent nodes with or without the dependency relationship is respectively considered, the joint extraction of the network security entity relationship is realized, and the effective automatic identification of the entities and the relationships can be realized in large-scale threat intelligence data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a network security entity relationship joint extraction method based on graph feature aggregation, and belongs to the technical field of cyberspace security and deep learning. Background Art

[0002] With the increasing complexity of network attack methods and the rapid growth of information in the era of big data, a large amount of unstructured text data has been generated in network security information, such as security incident reports, vulnerability announcements, attack method analysis, threat intelligence, etc. These data contain a wealth of security entities (such as attackers, vulnerabilities, tools, targets, etc.) and the complex relationships between them, which are crucial for network defense and the effective acquisition of threat intelligence. Therefore, how to efficiently extract network security entities and their relationships from a large amount of text data has become one of the key issues in network security research.

[0003] Research methods for entity and relationship extraction can be divided into two categories: one is the pipeline method, which divides entity relationship extraction into two subtasks: entity recognition and relationship classification, and performs them sequentially; the other is the joint extraction method, which performs entity recognition and relationship classification simultaneously in the same network architecture. In the field of network security, the entity recognition task needs to extract key security entities from complex technical descriptions, and the relationship extraction needs to find effective connections from the semantic relationships between these entities. Since entities and relationships usually depend on context, performing these two tasks separately is prone to error accumulation. The joint extraction model uses a shared context representation to learn the potential relationships between entities while processing entities, effectively reducing the error propagation between steps and improving the overall accuracy of the extraction.

[0004] In cybersecurity reports or vulnerability announcements, entities and their relationships are often scattered in long sentences or complex contexts. Traditional deep learning models, such as convolutional neural networks (CNNs), have difficulty in processing long-distance dependencies and are prone to information loss. Although recurrent neural networks (RNNs) and their extended models LSTM can capture long-term dependencies in context, the gradual attenuation of information is still inevitable. Syntactic structures can clearly display dependency relationships led by verbs or prepositions through clear dependency paths. Even if the entities are far apart, they can capture the grammatical relationship between them, helping the model to better identify the interaction between attackers and targets. At present, some studies have used graph neural networks to jointly extract entities and relationships, and used dependencies to process complex relationships and structures. However, current methods only aggregate adjacent nodes with direct dependencies and cannot process adjacent nodes without dependencies. Summary of the invention

[0005] The purpose of the present invention is to provide a network security entity relationship joint extraction method based on graph feature aggregation to solve the problem that the existing technology cannot effectively utilize the complex semantics in network threat intelligence data to extract entity relationships.

[0006] The solution of the present invention is:

[0007] A network security entity relationship joint extraction method based on graph feature aggregation, comprising the following steps:

[0008] S1, collect open source network threat intelligence data, standardize entity types and relationship types according to Structured Threat Information Expression (STIX), annotate the collected network threat intelligence as sample data, and divide it into training set and test set according to the proportion;

[0009] S2, processes the annotated threat intelligence data, performs dependency syntactic analysis on the sequence S to generate a dependency tree, and converts it into a dependency syntactic adjacency matrix. The pre-trained BERT model is used to encode the sequence S to obtain the word embedding representation X;

[0010] S3, build a network security entity relationship joint extraction model based on graph feature aggregation;

[0011] S4, using the training set data to train the constructed joint extraction model, using the cross entropy loss function to calculate the loss value between the prediction result and the real data, and updating the model parameters through the optimization algorithm;

[0012] S5, divide the network threat intelligence into sentences and process each sentence, and input the obtained adjacency matrix and word vector into the model obtained in step S4 to jointly extract entity relationships.

[0013] Furthermore, in step S1, the entity types and relationship types defined in the Structured Threat Information Expression (STIX) standard are as follows:

[0014] S11, five entity types, including Attacker (the attacker, including the person, group or organization that carries out a specific malicious attack), Tools (tools used by the attacker to carry out the attack, such as malware, for a specific field), Industry (the target industry of the attacker), Region (the target region of the attacker or the region to which the attacker belongs) and Campaign (a specific attack campaign launched by the attacker);

[0015] S12, eleven types of relationships, including alias of (alias, including the same attacker, tool and attack activity described in different threat intelligence), related to (entities are related to a certain extent but the specific relationship cannot be determined), uses (usage relationship), target at (attacker or tool targets specific attack targets), originated from (the region where the attacker originated), launch (the attacker carries out attack activities), kin (tools are of the same type), consists of (there is a dependency relationship between regions), operating in (industry produced or operated in a certain region), cooperate with (cooperative relationship) and develop (attacker develops tools, malware or scripts).

[0016] Furthermore, in step S2, the dependency tree is converted into a dependency syntactic adjacency matrix, and the specific steps are as follows:

[0017] S21, initialize an all-zero adjacency matrix N represents the length of the sequence;

[0018] S22, traverse each node i from the root node of the dependency tree, traverse all nodes j of the subtree with node i as the root, and calculate the distance between node i and node j;

[0019] S23, using the distance between nodes to calculate the dependency weight coefficient and update the adjacency matrix, and finally obtain the dependency adjacency matrix;

[0020] In step S23, the dependency weight coefficients between nodes are calculated and the adjacency matrix is ​​updated. The expression is:

[0021]

[0022] Where e is the Euler number, d ij Represents the distance between node i and node j.

[0023] Furthermore, in step S3, a network security entity relationship joint extraction model based on graph feature aggregation is constructed, which includes a graph construction layer, an attention layer, a graph volume base layer, and a relationship classification layer, as follows:

[0024] S31, graph construction layer, uses the dependency adjacency matrix of the network threat intelligence sequence as structural information and word embedding representation as node information to build the graph structure of the sequence;

[0025] S32, attention layer, assigns different attention mechanisms to the edges that exist and those that do not exist in the dependency adjacency matrix, and updates the node features according to the attention scores;

[0026] S33, graph convolution layer, aggregates the features of neighboring nodes based on the adjacency relationship of nodes, captures the logical dependencies between nodes, and updates the feature representation of nodes;

[0027] S34, the relationship classification layer, uses pooling operations to generate a global representation of network security entity pairs, which is input into the fully connected layer for classification. The probabilities of possible relationship categories are calculated through the softmax function, and the category with the highest probability is selected as the final prediction result.

[0028] Furthermore, in step S32, different attention mechanisms are assigned to edges that exist and edges that do not exist in the dependency adjacency matrix to update node features. The specific steps are as follows:

[0029] S321, divide the dependency adjacency matrix into two parts, A + Indicates the edge with non-zero weight (i.e., the edge with direct dependency), A - Represents an edge with a weight of 0 (i.e., an edge without a direct dependency);

[0030] S322, defining different attention mechanisms for edges with non-zero weights and edges with zero weights, respectively, and calculating corresponding correlation coefficients;

[0031] In step S322, the expressions for calculating attention for dependent edges and non-dependent edges are:

[0032]

[0033] In the formula, h i and h j is the feature representation of node i and node j, W + and W - are the weight matrices for node feature transformation with and without dependent edges, and are the attention weight vectors with and without dependent edges, respectively. || represents the feature concatenation operation, and LeakyReLU is the activation function.

[0034] S323, normalize the correlation coefficients of different edges to obtain attention weights;

[0035] S324, use different attention weights to aggregate neighborhood information, calculate the node features with dependent edges and without dependent edges respectively, and perform weighted summation to obtain the final node representation.

[0036] Furthermore, in step S323, each type of edge is normalized, and the expression is:

[0037]

[0038] In the formula, and Respectively represent the neighbor node sets with and without dependency edges of node i;

[0039] Furthermore, in step S324, the expression for updating node features using attention weight is:

[0040]

[0041] In the formula, λ + +λ - =1,λ + and λ - Represent the weight influence of the two edges respectively.

[0042] Furthermore, in step S33, the features of neighbor nodes are aggregated using a graph convolutional neural network. The specific expression is:

[0043]

[0044] Where H is the node feature matrix of each layer, A=A+I is the adjacency matrix A plus the identity matrix I, D is the degree matrix of A, σ(·) is the nonlinear activation function, and l is the number of iterative layers of the graph convolutional network;

[0045] Furthermore, in step S34, the features of the entity pair and the related neighbor nodes are pooled to generate a global representation, and the category probability is calculated by classification, and the expression is:

[0046] h pool =maxpool[h e1 ,h e2 ,h neighbors ]

[0047] p=softmax(W r h pool +b)

[0048] In the formula, h e1 and h e2 Represent the characteristics of the two entities, h neighbors Represents the features of the neighbor nodes of two entities, W r is a learnable weight matrix and b is a bias vector.

[0049] Furthermore, in step S4, the expression of the cross entropy loss function is:

[0050]

[0051] In the formula, C represents the number of relationship categories, y c represents the true label of category c, p cIt represents the predicted probability that the model predicts that the sample belongs to category c.

[0052] The beneficial effects of the present invention are:

[0053] (1) The definitions of network security entity types and relationship types in the present invention are derived from the Structured Threat Information Expression (STIX) standard, which can cover most of the content of threat intelligence, fully express the important information in threat intelligence, and have high applicability;

[0054] (2) The model input of the present invention is constructed by syntactic dependencies. The syntactic structure can clearly convey the dependencies led by verbs or prepositions through clear dependency paths, helping the model to better identify the interactions between target entities, thereby improving the accuracy and robustness of the model.

[0055] (3) Compared with the existing network security entity relationship extraction methods, the network security entity relationship joint extraction method based on graph feature aggregation can effectively utilize syntactic information and assign different attention mechanisms to edges with dependency relationships and edges without dependency relationships, effectively improving the ability of network security entity relationship joint extraction. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 This is a flow chart of a method for joint extraction of network security entity relationships based on graph feature aggregation in an embodiment of the present invention.

[0057] Figure 2 It is a schematic diagram of five network security entity types and their corresponding eleven relationship types in an embodiment of the present invention.

[0058] Figure 3 This is an architecture diagram of a network security entity relationship joint extraction model based on graph feature aggregation in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings.

[0060] The embodiment of the present invention provides a network security entity relationship joint extraction method based on graph feature aggregation, such as Figure 1 As shown, the following steps S1-S5 are included:

[0061] S1, collect open source network threat intelligence data, standardize entity types and relationship types according to Structured Threat Information Expression (STIX), annotate the collected network threat intelligence as sample data, and divide it into training set and test set according to the proportion.

[0062] S2 processes the annotated threat intelligence data, performs dependency syntactic analysis on the sequence S to generate a dependency tree, and converts it into a dependency syntactic adjacency matrix. The pre-trained BERT model is used to encode the sequence S to obtain the word embedding representation X.

[0063] S3, builds a network security entity relationship joint extraction model based on graph feature aggregation.

[0064] S4, use the training set data to train the constructed joint extraction model, use the cross entropy loss function to calculate the loss value between the prediction result and the real data, and update the model parameters through the optimization algorithm.

[0065] S5, divide the network threat intelligence into sentences and process each sentence, and input the obtained adjacency matrix and word vector into the model obtained in step S4 to jointly extract entity relationships.

[0066] The definitions of network security entity types and relationship types in the embodiments of the present invention are derived from the Structured Threat Information Expression (STIX) standard, which can cover most of the content of threat intelligence, fully express the important information in threat intelligence, and have high applicability. The input of the network security entity relationship joint extraction model based on graph feature aggregation is constructed by syntactic dependencies, and the dependency paths can clearly convey the dependencies led by verbs or prepositions, helping the model to better identify the interactions between target entities. This method can effectively utilize syntactic information, assign different attention mechanisms to edges with dependencies and edges without dependencies, and effectively improve the ability of network security entity relationship joint extraction.

[0067] For step S1, Figure 2 As shown, it includes the following sub-steps S11-S12:

[0068] S11, five entity types, including Attacker (attacker, including people, groups or organizations that carry out specific malicious attacks), Tools (tools used by attackers to carry out attacks, such as malware, for specific fields), Industry (the target industry attacked by attackers), Region (the target region attacked by attackers or the region to which the attackers belong) and Campaign (specific attack activities launched by attackers).

[0069] S12, eleven types of relationships, including alias of (alias, including the same attacker, tool and attack activity described in different threat intelligence), related to (entities are related to a certain extent but the specific relationship cannot be determined), uses (usage relationship), target at (attacker or tool targets specific attack targets), originated from (the region where the attacker originated), launch (the attacker carries out attack activities), kin (tools are of the same type), consists of (there is a dependency relationship between regions), operating in (industry produced or operated in a certain region), cooperate with (cooperative relationship) and develop (attacker develops tools, malware or scripts).

[0070] The definitions of network security entity types and relationship types in the embodiment of the present invention are derived from the Structured Threat Information Expression (STIX) standard, which can cover most of the content of threat intelligence, fully express the important information in threat intelligence, and have high applicability.

[0071] Step S2 includes the following sub-steps S21-S23:

[0072] S21, initialize an all-zero adjacency matrix N represents the length of the sequence.

[0073] S22, traverse each node i from the root node of the dependency tree, traverse all nodes j of the subtree with node i as the root, and calculate the distance between node i and node j.

[0074] A dependency tree refers to a tree structure generated by syntactic analysis in natural language processing. The nodes of a dependency tree generally correspond to words in a sentence, and each node represents a vector representation of a word. The partial structure consisting of a node of a dependency tree and all its child nodes is called a subtree with the node as the root, indicating that there is a grammatical dependency relationship between the nodes of the subtree and the node.

[0075] Figure 2 The established structure is the ontology of relationship extraction, which means that the result of entity relationship joint extraction through this method includes these contents. For example, in the result (APT37, target at, USA), it means that APT37 is the Attacker (attacker identity) and its target is the USA (United States).

[0076] S23, using the distance between nodes to calculate the dependency weight coefficient and update the adjacency matrix, and finally obtain the dependency adjacency matrix.

[0077] In step S23, the dependency weight coefficients between nodes are calculated and the adjacency matrix is ​​updated. The expression is:

[0078]

[0079] Where e is the Euler number, d ij Represents the distance between node i and node j.

[0080] The embodiment of the present invention calculates the dependency weight coefficient as an element of the dependency adjacency matrix according to the distance between nodes in the dependency analysis tree. The closer the distance between two nodes, the larger the dependency weight coefficient, and vice versa. If two nodes are directly connected, the weight between them is 1. The obtained dependency adjacency matrix clearly shows the dependency relationship guided by verbs or prepositions, helping the model to better identify the interaction between target entities, thereby improving the accuracy and robustness of the model.

[0081] For step S3, Figure 3 As shown, it includes the following sub-steps S31-S34:

[0082] S31, the graph construction layer, uses the dependency adjacency matrix of the network threat intelligence sequence as structural information and word embedding representation (word embedding representation is a method in natural language processing that is used to represent words in vector form to facilitate subsequent model training and optimization) as node information to build the graph structure of the sequence.

[0083] S32, the attention layer, assigns different attention mechanisms to the edges that exist and those that do not exist in the dependency adjacency matrix, and updates the node features according to the attention scores.

[0084] S33, graph convolution layer, aggregates the features of neighboring nodes based on the adjacency relationship of the nodes, captures the logical dependencies between nodes, and updates the feature representation of the nodes.

[0085] S34, the relationship classification layer, uses pooling operations to generate a global representation of network security entity pairs, which is input into the fully connected layer for classification. The probabilities of possible relationship categories are calculated through the softmax function, and the category with the highest probability is selected as the final prediction result.

[0086] The model input of the embodiment of the present invention is constructed by syntactic dependencies. The syntactic structure can clearly convey the dependencies led by verbs or prepositions through clear dependency paths, helping the model to better identify the interactions between target entities, thereby improving the accuracy and robustness of the model. The network security entity relationship joint extraction method based on graph feature aggregation can effectively utilize syntactic information, assign different attention mechanisms to edges with dependencies and edges without dependencies, and effectively improve the ability of network security entity relationship joint extraction.

[0087] Step S32 includes the following sub-steps S321-S324:

[0088] S321, divide the dependency adjacency matrix into two parts, A + Indicates the edge with non-zero weight (i.e., the edge with direct dependency), A - Represents an edge with a weight of 0 (i.e., an edge without a direct dependency).

[0089] S322, define different attention mechanisms for edges with non-zero weights and edges with zero weights, and calculate corresponding correlation coefficients.

[0090] S323, normalize the correlation coefficients of different edges to obtain attention weights.

[0091] S324, use different attention weights to aggregate neighborhood information, calculate the node features with dependent edges and without dependent edges respectively, and perform weighted summation to obtain the final node representation.

[0092] In step S322, the expressions for calculating attention for dependent edges and non-dependent edges are:

[0093]

[0094] In the formula, h i and h j is the feature representation of node i and node j, W + and W - are the weight matrices for node feature transformation with and without dependent edges, and are the attention weight vectors with dependent edges and without dependent edges respectively, || represents the feature concatenation operation, and LeakyReLU is the activation function.

[0095] In step S323, each type of edge is normalized, and the expression is:

[0096]

[0097] In the formula, and They represent the sets of neighbor nodes with and without dependency edges of node i respectively.

[0098] In step S324, the expression for updating node features using attention weight is:

[0099]

[0100] In the formula, λ + +λ - =1,λ + and λ - Represent the weight influence of the two edges respectively.

[0101] The embodiment of the present invention effectively utilizes syntactic information, assigns different attention mechanisms to edges with dependencies and edges without dependencies, uses different attention weights to aggregate neighborhood information, calculates node features with dependencies and edges without dependencies respectively, and performs weighted summation to obtain the final node representation, and considers the influence of adjacent nodes with dependencies and nodes without dependencies respectively, thereby effectively improving the ability to jointly extract network security entity relationships.

[0102] For step S33, the features of neighbor nodes are aggregated using a graph convolutional neural network. The specific expression is:

[0103]

[0104] Where H is the node feature matrix of each layer, A=A+I is the adjacency matrix A plus the identity matrix I, D is the degree matrix of A, σ(·) is the nonlinear activation function, and l is the number of iterative layers of the graph convolutional network.

[0105] The embodiment of the present invention utilizes a graph convolutional neural network to aggregate the features of neighbor nodes and combines the information of each node with the information of its syntactically adjacent neighbor nodes, thereby obtaining more concentrated semantic information.

[0106] For step S34, the features of the entity pair and the related neighbor nodes are pooled to generate a global representation, and the category probability is calculated by classification, and the expression is:

[0107] h pool =maxpool[h e1 ,h e2 ,h neighbors ]

[0108] p=softmax(W r h pool +b)

[0109] In the formula, h e1 and h e2 Represent the characteristics of the two entities, h neighbors Represents the features of the neighbor nodes of two entities, W r is a learnable weight matrix and b is a bias vector.

[0110] The embodiment of the present invention generates a global representation of entity pairs through a pooling operation, which can effectively summarize the features of each entity and its neighboring nodes, thereby capturing more comprehensive semantic information, improving the accuracy of classification results, and ensuring that the model can handle complex multi-entity and multi-relationship scenarios.

[0111] For step S4, the expression of the cross entropy loss function is:

[0112]

[0113] In the formula, C represents the number of relationship categories, y c represents the true label of category c, p c It represents the predicted probability that the model predicts that the sample belongs to category c.

[0114] The cross entropy loss function of the embodiment of the present invention can measure the difference between the probability distribution predicted by the model and the actual category distribution, ensuring that the model gradually approaches the true label in multi-category classification tasks. By minimizing the cross entropy loss, the model can improve the accuracy of classification and help improve the model's prediction ability for complex multi-category relationships.

[0115] The above description is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiment. Any equivalent modifications or changes made by ordinary technicians in this field based on the contents disclosed by the present invention should be included in the protection scope recorded in the claims.

Claims

1. A network security entity relationship joint extraction method based on graph feature aggregation, characterized by: The following steps are included: S1, collect open source network threat intelligence data, standardize entity types and relationship types according to the structured threat information representation STIX, annotate the collected network threat intelligence as sample data, and divide it into training set and test set according to the proportion; S2, processes the annotated threat intelligence data, performs dependency syntactic analysis on the sequence S to generate a dependency tree, and converts it into a dependency syntactic adjacency matrix. The pre-trained BERT model is used to encode the sequence S to obtain the word embedding representation X; S3, build a network security entity relationship joint extraction model based on graph feature aggregation; S4, using the training set data to train the constructed joint extraction model, using the cross entropy loss function to calculate the loss value between the prediction result and the real data, and updating the model parameters through the optimization algorithm; S5, divide the network threat intelligence into sentences and process each sentence, and input the obtained adjacency matrix and word vector into the model obtained in step S4 to jointly extract entity relationships.

2. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 1 is characterized by: In step S1, the entity types and relationship types defined in the STIX standard are expressed according to the structured threat information. The specific contents are as follows: S11, five entity types, including attackers (people, groups or organizations that carry out specific malicious attacks), tools used by attackers to carry out attacks, such as malware, targeted at specific fields, target industries, target regions or regions to which attackers belong, and specific attack campaigns initiated by attackers; S12, eleven relationship types, including alias of including the same attacker, tool and attack activity described in different threat intelligence, related to, uses, attacker or tool targeting a specific target at, region originated from, attacker launches attack activity, tools belong to the same type, dependencies between regions consist of, industries producing or operating in a certain region, cooperate with, and attacker develops tools, malware or scripts.

3. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 1 is characterized by: In step S2, the dependency tree is converted into a dependency syntactic adjacency matrix. The specific steps are as follows: S21, initialize an all-zero adjacency matrix A∈ N×N , N represents the length of the sequence; S22, traverse each node i from the root node of the dependency tree, traverse all nodes j of the subtree with node i as the root, and calculate the distance between node i and node j; Traverse each node, take the node as the root node i, perform depth-first traversal, record the path from i to j, and the path length is the distance between node i and node j S23, using the distance between nodes to calculate the dependency weight coefficient and update the adjacency matrix, and finally obtain the dependency adjacency matrix; In step S23, the dependency weight coefficients between nodes are calculated and the adjacency matrix is ​​updated. The expression is: Where e is the Euler number, d ij Represents the distance between node i and node j.

4. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 1 is characterized by: In step S3, a network security entity relationship joint extraction model based on graph feature aggregation is constructed, which includes a graph construction layer, an attention layer, a graph volume base layer, and a relationship classification layer, as follows: S31, graph construction layer, uses the dependency adjacency matrix of the network threat intelligence sequence as structural information and word embedding representation as node information to build the graph structure of the sequence; S32, attention layer, assigns different attention mechanisms to the edges that exist and those that do not exist in the dependency adjacency matrix, and updates the node features according to the attention scores; S33, graph convolution layer, aggregates the features of neighboring nodes based on the adjacency relationship of nodes, captures the logical dependencies between nodes, and updates the feature representation of nodes; S34, the relationship classification layer, uses pooling operations to generate a global representation of network security entity pairs, which is input into the fully connected layer for classification. The probabilities of possible relationship categories are calculated through the softmax function, and the category with the highest probability is selected as the final prediction result.

5. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 4 is characterized by: In step S32, different attention mechanisms are assigned to update node features for edges that exist and edges that do not exist in the dependency adjacency matrix. The specific steps are as follows: S321, divide the dependency adjacency matrix into two parts, A + Indicates the edge with non-zero weight, that is, the edge with direct dependency, A - Represents an edge with a weight of 0, that is, an edge without direct dependency; S322, defining different attention mechanisms for edges with non-zero weights and edges with zero weights, respectively, and calculating corresponding correlation coefficients; In step S322, the expressions for calculating attention for dependent edges and non-dependent edges are: In the formula, h i and h j is the feature representation of node i and node j, W + and W - are the weight matrices for node feature transformation with and without dependent edges, and are the attention weight vectors with and without dependent edges, respectively. || represents the feature concatenation operation, and LeakyReLU is the activation function. S323, normalize the correlation coefficients of different edges to obtain attention weights; S324, use different attention weights to aggregate neighborhood information, calculate the node features with dependent edges and without dependent edges respectively, and perform weighted summation to obtain the final node representation.

6. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 5 is characterized by: In step S323, each type of edge is normalized, and the expression is: In the formula, and They represent the sets of neighbor nodes with and without dependent edges of node i respectively; k represents the indexes of all neighbor nodes when weighted summation is performed on the neighbor nodes of a node j. By traversing k, the sum of the weighted indexes of all neighbor nodes is calculated.

7. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 5 is characterized by: In step S324, the expression for updating node features using attention weight is: In the formula, λ + +λ - =1,λ + and λ - They represent the weight influence of the two edges respectively, and σ(·) is a nonlinear activation function.

8. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 4 is characterized by: In step S33, the graph convolutional neural network is used to aggregate the features of neighbor nodes. The specific expression is: Where H is the node feature matrix of each layer, A=A+I is the adjacency matrix A plus the identity matrix I, D is the degree matrix of A, σ(·) is the nonlinear activation function, and l is the number of iterative layers of the graph convolutional network.

9. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 4 is characterized by: In step S34, the features of the entity pair and the related neighbor nodes are pooled to generate a global representation, and the category probability is calculated by classification, and the expression is: h pool =maxpool[h e1 ,h e2 ,h neighbors ] p=softmax(W r h pool +b) In the formula, h e1 and h e2 Represent the characteristics of the two entities, h neighbors Represents the features of the neighbor nodes of two entities, W r is a learnable weight matrix and b is a bias vector.

10. The network security entity relationship joint extraction method based on graph feature aggregation according to claim 1 is characterized by: In step S4, the expression of the cross entropy loss function is: In the formula, C represents the number of relationship categories, y c represents the true label of category c, p c It represents the predicted probability that the model predicts that the sample belongs to category c.