Heterogeneous graph and meta path-based traceability graph abnormal node detection method
By constructing heterogeneous graph structures and using heterogeneous graph neural networks and metapaths, combined with SVDD algorithm, the problem of difficult detection of abnormal nodes in the existing technology is solved, and the precise identification and positioning of abnormal nodes in the traceability diagram is achieved, which improves the Generalization ability and stability of detection.
Patent Information
- Application Number
- CN202410529852.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2024-11-05
AI Technical Summary
The existing APT anomaly detection method based on traceability map is difficult to detect abnormal nodes, especially when an attacker uses zero-day attacks, and the rule-based method lacks generalization capabilities and cannot accurately locate abnormal nodes in the traceability map.
Using the traceability graph abnormal node detection method based on heterogeneous graph and metapath, by constructing a heterogeneous graph structure, using heterogeneous graph neural network and metapath to mine semantic information, perform node-level anomaly detection, and use SVDD algorithm to train benign data models , identify the exception node.
It realizes accurate detection and positioning of abnormal nodes in the traceability diagram, improves detection generalization capabilities, and maintains high efficiency when changes in network environment and attack methods, avoiding the impact of data class imbalance problem.
Smart Images

Figure CN118900187A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computer technology, and in particular relates to an abnormal node detection method. Background Art
[0002] At present, more and more related research works use traceability graphs to record the behavior of the system, and use traceability graphs to perform APT attack detection, attack tracing and other tasks. Currently, there are two main approaches to APT anomaly detection based on traceability graphs: one is rule-based detection, and the other is anomaly-based detection.
[0003] The rule-based APT detection method mainly develops rule strategies based on known attacks to detect anomalies. Most of these methods use knowledge or rules related to network attacks such as CTI, attack chain, and ATT&CK. These knowledge and rules can provide high accuracy in APT attack anomaly detection, but the design of rules is very difficult and relies on previous attack and defense experience. Many rules can only achieve ideal results in specific environments. POIROT uses APT attack reports to manually build threat query graphs and detect threats based on graph alignment and matching traceability graphs. The SLEUTH method combines the motivations and means of attackers and defines 5 rules that trigger warnings. It uses a label-based approach. If a piece of data or code has an unknown label, it is an untrusted source.
[0004] Anomaly-based APT detection methods are based on a feature library of benign behavior patterns, and determine whether there are anomalies by matching unknown data with the behavior patterns in the library. The anomaly detection system UNICORN analyzes streaming provenance graphs. The detection system learns dynamic execution models as the host system evolves, thereby capturing behavioral changes in the model. This learning method makes it suitable for detecting long-running persistent threats. ProvDetector proposes to explore the provenance graph path to detect malware, embed the path path into the provenance graph, and use the local outlier factor method to detect malware. APT attacks usually do not appear in the complete path, and it is difficult for path-based methods to detect anomalies. SteamSpot models the host-level APT detection problem as a clustering-based anomaly detection task in a streaming heterogeneous graph. Considering the frequency of occurrence of different substructures in the graph, a similarity function based on shingling with a timestamp type graph is proposed to represent heterogeneous ordered graphs, and streamhash is designed to maintain these summaries. An online clustering and anomaly detection scheme based on centroid is adopted.
[0005] The methods closest to this article are Unicorn and APT-KGL. UNICORN uses graph sketching technology to analyze traceability graphs containing rich context and historical information in long-running systems, thereby identifying unknown and slow attacks; APT-KGL uses heterogeneous graph embedding technology. This method constructs a heterogeneous traceability graph structure based on the entities in the log and the relationships between entities, embeds nodes in the heterogeneous traceability graph to obtain the semantic vector of the system process, and uses graph convolution algorithm and subgraph sampling to classify the system process.
[0006] In APT attacks, attackers may constantly change their attack modes, and they are more inclined to use zero-day attacks. Rule-based anomaly detection lacks generalization capabilities and is difficult to adapt to changes in network environments and attack methods. APT attacks are carried out by a series of system entities working together. Many existing anomaly-based detection methods only look at the characteristics of a single system entity or consider the characteristics of the entire traceability graph. These methods can perform detection at the level of the entire graph, but it is difficult to locate specific abnormal nodes. Therefore, existing APT anomaly detection research faces the following challenges: (1) Attackers are more inclined to use zero-day attacks, so rule-based anomaly detection methods are insufficient in detecting unknown threats. (2) Many existing traceability graph-based anomaly detection methods extract features of the entire graph. These methods cannot accurately detect abnormal nodes in the traceability graph. (3) Nodes in the traceability graph are interrelated. When analyzing the traceability graph, it is necessary to fully explore semantic information and not just look at the characteristics of a single system entity. Summary of the invention
[0007] In view of this, the present invention proposes a method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths. The technical problems to be solved by the present invention are: first, training benign data of the traceability graph, modeling a large amount of benign data, and performing anomaly detection by judging whether the data belongs to the benign data model; second, performing node-level anomaly detection, identifying and locating all abnormal nodes in the traceability graph as much as possible; third, using heterogeneous graph neural networks and meta-paths to mine the rich semantic information in the traceability graph and obtain the embedded features of the nodes.
[0008] The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths includes:
[0009] 1) Obtain log data and convert it into traceability data;
[0010] 2) The traceability data is constructed into a heterogeneous graph structure, which defines three types of nodes and four corresponding edge relationships. The nodes include process nodes and entity nodes.
[0011] 3) Perform process node anomaly detection on the heterogeneous graph to obtain a set of abnormal process nodes;
[0012] 4) Identify abnormal process nodes and reconstruct the heterogeneous graph;
[0013] 5) Perform entity node anomaly detection on the reconstructed heterogeneous graph to obtain a set of abnormal entity nodes;
[0014] 6) All the corresponding abnormal nodes in the heterogeneous graph and the edges connecting these nodes are extracted. After extraction, one or more subgraphs will be formed. All isolated nodes are removed, and the final subgraph is the attack path.
[0015] Furthermore, the acquisition method of log data is based on the terminal-side system-level log collection, and the system kernel-level logs are collected by deploying CamFlow and SPADE tools;
[0016] Log data is stored in the W3C-PORV format, thereby constructing logs into traceability data. The W3C-PORV data format defines a series of system entities, system activities, and the relationships involving these entities and activities in the log.
[0017] Further, the three types of nodes include:
[0018] Process node Process, which represents all processes recorded in the log;
[0019] Entity node Object, which represents all entities in the log that are operated or generated by the process;
[0020] The entity type node Label indicates what type an entity corresponds to;
[0021] The four types of edge relationships include:
[0022] Inform: The relationship between processes, indicating the derivation relationship between processes;
[0023] Gnerate: The relationship between a process and an entity, indicating that a process creates an entity;
[0024] Used: The relationship between an entity and a process, indicating that an entity is used by a process;
[0025] Typed: The relationship between an entity and a type, indicating the prov:type type corresponding to an entity.
[0026] Furthermore, the anomaly detection process includes:
[0027] Step 1: Use the meta-path and heterogeneous graph attention network HAN to embed the nodes in the heterogeneous graph and obtain the embedded feature vector of the node;
[0028] HAN consists of two key components: node-level attention mechanism and cross-type attention mechanism. The node-level attention mechanism is used to obtain the embedding of nodes under each meta-path, and the cross-type attention mechanism is used to obtain the embedded feature vector of the node.
[0029] Among them, the p-th element path Φ p The embedding expression of the next i-th node is as follows:
[0030]
[0031] in,
[0032] p=1,…,P,P represents the total number of meta-paths;
[0033] σ represents the activation function;
[0034] Indicates that node i is in the meta-path Φ p The neighbor set below,
[0035] Represents the meta-path Φ p The attention of node i’s neighbor j passing messages to node i,
[0036] h′ i is the linear transformation of the initial eigenvector of node i;
[0037] Furthermore,
[0038]
[0039] in, Represents the linear transformation matrix
[0040]
[0041] Among them, h i is the initial feature vector of node i, obtained by hashing the attributes of node i, where the attributes of the node are the attributes of the system entity defined in the traceability data. Represents the linear transformation matrix, obtained by model training;
[0042] Furthermore, the embedded feature vector z of the i-th node i The embedding expression is as follows:
[0043]
[0044] in, represents the normalized importance of the p-th meta-path,
[0045] Furthermore,
[0046]
[0047] in, represents the importance of the p-th meta-path;
[0048] Furthermore,
[0049]
[0050] Where v represents the node set of the heterogeneous graph, |v| is the number of nodes, W is the weight matrix, b is the bias vector, and q is the semantic attention vector;
[0051] In the second step, SVDD is used to perform node anomaly detection on the embedded feature vector Z of the node. When a node is always detected as abnormal within the set time, it is regarded as an abnormal node, thereby obtaining a set of abnormal nodes;
[0052] Furthermore, SVDD finds a hypersphere in the benign data during training to enclose all benign data, and the outlier data points outside the hypersphere are judged as abnormal nodes.
[0053] Furthermore, when detecting anomalies in process nodes, the meta-path and heterogeneous graph attention network HAN are used to embed the process nodes in the heterogeneous graph to obtain the embedded feature vector of the process node. The meta-path is used to learn the semantic information related to the process nodes in the heterogeneous graph. The meta-path includes:
[0054] Path P1 : Indicates that there is a derivative relationship between the two processes;
[0055] Path P2 : Indicates that two processes use the same system entity;
[0056] Path P3 : Indicates that the system entities generated by two processes are used by the same process;
[0057] Path P4 : Indicates that two processes generate the same type of system entity;
[0058] Path P5 : Indicates that two processes use the same type of system entity;
[0059] Path P6 : Indicates that the derived processes of two processes use the same type of system entity.
[0060] Furthermore, the reconstruction method of the heterogeneous graph is: add a node of the Class type, where Class is used to identify the process node category. Class has two nodes, Benign and Anomalous. The benign process node is connected to the Benign node, and the abnormal process node is connected to the Anomalous node.
[0061] Furthermore, when detecting entity node anomalies, the meta-path corresponding to the reconstructed heterogeneous graph and the heterogeneous graph attention network HAN are used to embed the entity nodes in the reconstructed heterogeneous graph to obtain the embedded feature vector of the entity node. The meta-path includes:
[0062] Path O1 : Indicates that the two entities are of the same type;
[0063] Path O2 : Indicates that two entities are used by the same type of process;
[0064] Path O3 : Indicates that the two entities are generated by the same type of process;
[0065] Path O4 : Indicates that two entities are used by the same process.
[0066] Beneficial Effects
[0067] 1. The present invention proposes a heterogeneous graph structure constructed according to W3C-PROV format data to represent a traceability graph, and designs multiple meta-paths of process nodes and entity nodes according to the heterogeneous graph structure.
[0068] 2. The present invention proposes an anomaly detection method based on meta-path and heterogeneous graph, uses SVDD to train a benign data model, first detects abnormal process nodes, identifies abnormal process nodes in the heterogeneous graph, and then performs entity node anomaly detection based on the identified heterogeneous graph to obtain abnormal entity nodes.
[0069] 3. The present invention designs different meta-paths for different types of nodes. The designed multiple meta-paths can fully mine the semantic information between nodes and obtain the embedded features of nodes. The present invention mainly divides nodes into two categories: process nodes and entity nodes. First, the process nodes are embedded and abnormal nodes are detected. Then the process nodes in the graph are identified, and the entity nodes are also embedded and abnormal detection is performed. All types of nodes in the traceability graph are fully analyzed.
[0070] 4. The present invention uses SVDD to train a model of normal data to determine whether new data is abnormal, which can achieve better results in anomaly detection than using a machine learning model for data classification. Because in real APT attack events, normal data far outweighs abnormal data, node classification will be seriously affected by data class imbalance, resulting in unstable actual detection results. SVDD is an abnormal data detection algorithm that can be used in unbalanced data, so it can achieve better detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 , a flow chart of the method of the present invention;
[0072] Figure 2 ,Schematic diagram of heterogeneous graph structure;
[0073] Figure 3 , schematic diagram of the heterogeneous graph structure after labeling. DETAILED DESCRIPTION
[0074] The present invention provides a method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths. The method is divided into seven steps: Figure 1 shown.
[0075] Step 1: Acquisition of log data: The method of acquiring log data in the present invention is based on system-level log collection on the terminal side, and system kernel-level logs are collected by deploying CamFlow and SPADE tools. CamFlow is an independent framework in the strict sense, which realizes system-level log collection and is easy to expand. In recent years, Camflow has often been used as a data collection tool in anomaly detection research based on traceability graphs. SPADE is a distributed system log audit tool that supports platform applications. The SPADE tool can well call the CamFlow tool to build, analyze and process log data. We set the log data output by CamFlow to be stored in the W3C-PORV format. The W3C-PORV data format defines a series of system entities, system activities and the relationships involving these entities and activities in the log, thereby constructing the log into traceability data.
[0076] The method used in this paper to obtain traceability data is to collect system-level logs on the terminal side. This paper deploys two log tools, CamFlow and SPADE, to collect system kernel-level logs. CamFlow is a module integrated into the Linux kernel that is used to automatically capture traceability data of system activities. It is a strictly independent framework that implements system log collection. CamFlow is simple to deploy and easy to expand. In recent years, CamFlow has been often used as a data collection tool in anomaly detection research based on traceability graphs.
[0077] SPADE is a platform for log data collection, storage, and analysis, which supports multiple data sources and storage backends. SPADE is designed to provide a flexible and scalable environment to meet the needs of various traceability data. The SPADE tool can well call CamFlow to build, analyze, and process traceability graphs.
[0078] CamFlow uses the W3C-PROV standard to convert log data into specific traceability data and output json files. SPADE can convert the data collected by CamFlow into a more intuitive form while retaining the W3C-PROV entity attribute values.
[0079] Step 2 is to construct a heterogeneous graph. The present invention constructs all the data in the W3C-PROV traceability data into a heterogeneous graph structure, defines three types of nodes and four corresponding edge relationships. Figure 2 And as shown in Table 1.
[0080] The process node Process represents all processes recorded in the log; the entity node Object represents all entities in the log that are operated or generated by the process; the entity type node Label represents what type an entity corresponds to (such as file, socket, etc.). For example, all file nodes will be connected to the Label type node with the value of "File". Label is a redundant node. Designing the Label node can reduce the complexity of meta-path design and also speed up the efficiency of graph learning based on meta-path. Hash the attributes of each node to obtain the initial feature vector h of the node. i , the attributes of the node are the attributes of the system entity defined in the traceability data.
[0081] 1)Inform: The relationship between processes, indicating the derivation relationship between processes.
[0082] 2)Gnerate: The relationship between a process and an entity, indicating that a process creates an entity.
[0083] 3) Used: The relationship between an entity and a process, indicating that an entity is used by a process.
[0084] 4) Typed: The relationship between an entity and a type, indicating the prov:type type corresponding to an entity, including files, sockets, etc.
[0085] Table 1 Relationship between nodes and edges in heterogeneous graphs
[0086] Edge From To Inform Process Process Generate Process Object Used Object Process Typed Object Label
[0087] Since the present invention first detects abnormal process nodes, in order to extract the features of the Process nodes, multiple meta-paths are designed to learn the semantic information related to the Process nodes in the heterogeneous graph. The meta-paths of the defined Process nodes are shown in Table 2 below:
[0088] Table 2 Process metapath
[0089]
[0090] Path P1 : Indicates that there is a derivative relationship between two processes, then the two processes are related.
[0091] Path P2 : Indicates that two processes use the same system entity, so the two processes are related.
[0092] Path P3 : Indicates that if the system entities generated by two processes are used by the same process, then the two processes are related.
[0093] Path P4 : Indicates that if two processes generate the same type of system entities, then the two processes are related.
[0094] Path P5 : Indicates that if two processes use the same type of system entity, the two processes are related.
[0095] Path P6 : Indicates that if the derived processes of two processes use the same type of system entity, then the two processes are related.
[0096] Step 3 is process node embedding based on heterogeneous graph attention network: The present invention uses heterogeneous graph attention network HAN to embed process nodes. The purpose is to embed process nodes using meta-path and HAN to obtain the embedded feature vector of process nodes.
[0097] HAN can effectively capture the complex relationships between different types of nodes in heterogeneous graphs. The advantage of HAN algorithm over traditional heterogeneous graph embedding methods is that HAN can process multiple meta-paths, calculate the weights of different meta-paths, and then fuse the node embeddings under multiple meta-paths. HAN mainly consists of two key components: node-level attention mechanism and cross-type attention mechanism.
[0098] Node-level attention mechanism: For each node type, HAN uses an attention mechanism to learn the weights between a node and its neighbors. This enables the model to dynamically focus on different neighbor nodes in the graph, thereby better capturing the relationships between nodes. The attention mechanism formula usually contains a learned weight vector that is used to calculate the weight of each neighbor node.
[0099] For process node embedding, the process is as follows:
[0100] First, perform a linear transformation on the initial feature vector of the process node:
[0101]
[0102] Among them, i represents the i-th process node, h i is the initial feature vector of process node i obtained in step 2, Represents the linear transformation matrix obtained by model training.
[0103] Φ represents the set of meta-paths designed in step 2, Φ p represents the p-th meta-path;
[0104] Metapath Φ p Under this condition, the attention calculation formula of the neighbor node j of process node i passing the message to i is:
[0105]
[0106] in Indicates that process node i is in the meta-path Φ p The neighbor set below, Represents the meta-path Φ p Next, the neighbor j of node i pays attention to the message passed to node i. represents the linear transformation matrix (obtained by model training), and σ is the activation function.
[0107] Perform a weighted sum calculation using attention as the weight to obtain the node embedding based on the meta-path. p Under this condition, the embedding of process node i The formula is as follows:
[0108]
[0109] Semantic-level attention mechanism: Since heterogeneous graphs contain multiple node types, HAN introduces a semantic attention mechanism to handle the relationships between nodes of different types. This level of attention mechanism allows the model to dynamically learn weights between different node types to better understand the complex structures in heterogeneous graphs.
[0110] For process node embedding, the process is as follows:
[0111] First, we need to calculate the importance of each meta-path, meta-path Φ p The importance of
[0112]
[0113] Where v represents the set of process nodes in the heterogeneous graph, |v| is the number of process nodes, W is the weight matrix, b is the bias vector, and q is the semantic attention vector. After obtaining the importance of each meta-path, it is normalized by the softmax function to obtain The normalized result is:
[0114]
[0115] The weights are used as coefficients to fuse these semantic embeddings to obtain the embedded feature vector of each process node, where the expression of the embedded feature vector of the i-th process node is as follows:
[0116]
[0117] The entire HAN model gradually aggregates information of different node types by stacking these two attention mechanisms in multiple layers. Each layer can improve the model's ability to represent heterogeneous graphs by learning node-level and cross-type weights. The output is Z.
[0118] Step 4 is the process node anomaly detection. Because the number of benign nodes in the traceability data is far greater than that of abnormal nodes, abnormal data is identified by modeling the benign data and judging whether the node belongs to the benign data model. Because the traceability graph data is generally unbalanced and contains noisy data, the SVDD (Support Vector Data Description) algorithm is used to implement anomaly detection. SVDD finds a hypersphere in the trained benign data to surround all benign data. This hypersphere is as close to the data point as possible and excludes outliers. The hypersphere determined by the support vector is the description model of the benign data, and the points outside the hypersphere are judged as outlier data points that do not belong to benign data.
[0119] During the anomaly detection process, a subgraph is constructed based on the input traceability data. When the number of edges in the heterogeneous graph constructed by the traceability data reaches a threshold Size, a subgraph is constructed based on the Size number of edges and the corresponding nodes, and we perform node embedding in the subgraph. For example, Size = 10000, which means that when the number of edges in the heterogeneous graph reaches 10000, we pause the input of traceability data, perform node embedding on the current heterogeneous graph, and then continue to input traceability data. When the number of edges in the heterogeneous graph reaches 20000, data input is paused, a subgraph is constructed for the newly input 10000 edges, and node embedding is performed on the subgraph. Each time the node is embedded in the heterogeneous graph, it contains at most 10000 edges. The embedded feature vector Z of the Process node is obtained through node embedding, and anomaly detection is performed on the Process node in the subgraph. Because the characteristics of the node will change with the addition of edges, benign nodes may become abnormal nodes after a period of time, and abnormal nodes may also become benign nodes. Therefore, an event threshold T is set. t , when a node is detected as abnormal, it is marked and continuously detected. t If the node does not transform into a benign node, it is considered an abnormal node. The input of this step is the embedded feature vector Z of the node, and the output is the set of abnormal process nodes.
[0120] In real situations, anomaly detection is a real-time process, and nodes may be detected multiple times. The feature vector of a node, that is, the embedding result of the node, will change with the addition of new nodes and edges, so it is impossible to re-embed the node every time a node is added. To solve the problem that the node type may change, a subgraph is constructed for detection. When inputting the test set data, it is set to build a subgraph based on these edges when the number of edges reaches a threshold of 100,000, and the node embedding is performed on the subgraph to obtain the embedded feature vector of the test data. That is, for every 100,000 edges input, a heterogeneous graph node embedding operation and anomaly detection operation are performed.
[0121] Step 5 is to identify abnormal nodes. After obtaining the abnormal process node set in step 4, the abnormal process nodes are identified. The identification method is to reconstruct the previous heterogeneous graph into Figure 3 The structure shown.
[0122] Specifically, a Class type node is added to identify the Process node category. Class has two nodes: Benign and Anomalous. Benign process nodes are connected to Benign nodes, and abnormal process nodes are connected to Anomalous nodes.
[0123] Step 6: Detect anomalies of entity object nodes. In order to extract the embedded feature vector of the object node through HAN, multiple meta-paths of object types are also designed. The predefined meta-paths of the object node are shown in Table 3 below.
[0124] Table 3 Object meta path
[0125]
[0126] Path O1 : Indicates that if two entities are of the same type, then the two entities are related.
[0127] Path O2 : Indicates that two entities are related if they are used by the same type of processes.
[0128] Path O3 : Indicates that if two entities are generated by the same type of process, then the two entities are related.
[0129] Path O4 : Indicates that if two entities are used by the same process, then the two entities are related.
[0130] Based on the identified heterogeneous graph, the same operation as in step 3 is performed on the Object type nodes to obtain entity node embedding. Then, the same SVDD anomaly detection method as in step 4 is used to detect the entity nodes to obtain the abnormal entity nodes in the identified heterogeneous graph.
[0131] Step 7 is to obtain the attack path. Steps 4 and 6 obtain the abnormal process nodes and abnormal entity nodes respectively. The corresponding abnormal nodes in the heterogeneous graph and the edges connecting these nodes are all extracted. After extraction, one or more subgraphs will be formed. All isolated nodes are removed, and the final subgraph is the attack path.
Claims
1. A method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths, characterized by: 1) Obtain log data and convert it into traceability data; 2) The traceability data is constructed into a heterogeneous graph structure, which defines three types of nodes and four corresponding edge relationships. The nodes include process nodes and entity nodes. 3) Perform process node anomaly detection on the heterogeneous graph to obtain a set of abnormal process nodes; 4) Identify abnormal process nodes and reconstruct the heterogeneous graph; 5) Perform entity node anomaly detection on the reconstructed heterogeneous graph to obtain a set of abnormal entity nodes; 6) All the corresponding abnormal nodes in the heterogeneous graph and the edges connecting these nodes are extracted. After extraction, one or more subgraphs will be formed. All isolated nodes are removed, and the final subgraph is the attack path.
2. The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths according to claim 1 is characterized in that: The method of obtaining log data is based on terminal-side system-level log collection, and the system kernel-level logs are collected by deploying CamFlow and SPADE tools; Log data is stored in the W3C-PORV format, thereby constructing logs into traceability data. The W3C-PORV data format defines a series of system entities, system activities, and the relationships involving these entities and activities in the log.
3. The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths according to claim 1 or 2, characterized in that: The three types of nodes include: Process node Process, which represents all processes recorded in the log; Entity node Object, which represents all entities in the log that are operated or generated by the process; The entity type node Label indicates what type an entity corresponds to; The four types of edge relationships include: Inform: The relationship between processes, indicating the derivation relationship between processes; Gnerate: The relationship between a process and an entity, indicating that a process creates an entity; Used: The relationship between an entity and a process, indicating that an entity is used by a process; Typed: The relationship between an entity and a type, indicating the prov:type type corresponding to an entity.
4. The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths according to claim 3 is characterized in that: The process of anomaly detection includes: Step 1: Use the meta-path and heterogeneous graph attention network HAN to embed the nodes in the heterogeneous graph and obtain the embedded feature vector of the node; HAN consists of two key components: node-level attention mechanism and cross-type attention mechanism. The node-level attention mechanism is used to obtain the embedding of nodes under each meta-path, and the cross-type attention mechanism is used to obtain the embedded feature vector of the node. Among them, the p-th element path Φ p The embedding expression of the next i-th node is as follows: in, p=1,…,P,P represents the total number of meta-paths; σ represents the activation function; Indicates that node i is in the meta-path Φ p The neighbor set below, Represents the meta-path Φ p The attention of node i’s neighbor j passing messages to node i, h′ i is the linear transformation of the initial eigenvector of node i; Furthermore, in, Represents a linear transformation matrix Among them, h i is the initial feature vector of node i, obtained by hashing the attributes of node i, where the attributes of the node are the attributes of the system entity defined in the traceability data. Represents the linear transformation matrix, obtained by model training; Furthermore, the embedding feature vector Z of the i-th node i The embedding expression is as follows: in, represents the normalized importance of the p-th meta-path, Furthermore, in, represents the importance of the p-th meta-path; Furthermore, Where v represents the node set of the heterogeneous graph, |v| is the number of nodes, W is the claim weight matrix, b is the bias vector, and q is the semantic attention vector; Step 2: Use SVDD to perform node anomaly detection on the node’s embedded feature vector Z. When a node is always detected as abnormal within a set time, it is regarded as an abnormal node, thus obtaining a set of abnormal nodes.
5. The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths according to claim 4 is characterized in that: SVDD finds a hypersphere in the benign data during training to enclose all benign data, and the outlier data points outside the hypersphere are judged as abnormal nodes.
6. The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths according to claim 5 is characterized in that: When detecting process node anomalies, the meta-path and heterogeneous graph attention network HAN are used to embed the process nodes in the heterogeneous graph to obtain the embedded feature vector of the process node. The meta-path is used to learn the semantic information related to the process node in the heterogeneous graph. The meta-path includes: Path P1 : Indicates that there is a derivative relationship between the two processes; Path P2 : Indicates that two processes use the same system entity; Path P3 : Indicates that the system entities generated by two processes are used by the same process; Path P4 : Indicates that two processes generate the same type of system entity; Path P5 : Indicates that two processes use the same type of system entity; Path P6 : Indicates that the derived processes of two processes use the same type of system entity.
7. The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths according to claim 6 is characterized by: The reconstruction method of the heterogeneous graph is: add nodes of the Class type. Class is used to identify the process node category. Class has two nodes, Benign and Anomalous. Benign process nodes are connected to Benign nodes, and abnormal process nodes are connected to Anomalous nodes.
8. The method for detecting abnormal nodes in a traceability graph based on heterogeneous graphs and meta-paths according to claim 7 is characterized in that: When detecting entity node anomalies, the meta-path corresponding to the reconstructed heterogeneous graph and the heterogeneous graph attention network HAN are used to embed the entity nodes in the reconstructed heterogeneous graph to obtain the embedded feature vector of the entity node. The meta-path includes: Path O1 : Indicates that the two entities are of the same type; Path O2 : Indicates that two entities are used by the same type of process; Path O3 : Indicates that the two entities are generated by the same type of process; Path O4 : Indicates that two entities are used by the same process.
Citation Information
Cited By
Oil and gas data evaluation and pollution tracing method and system based on attention mechanism
CN121032324A
