Compression and anomaly detection method and device based on flow interaction graph
It measures and summarizes traffic data through hardware devices, generates compressed flow interaction graphs, and performs anomaly detection, which solves the problem of low throughput of flow interaction graph detection in the existing technology and achieves efficient anomaly detection in 100GE Ethernet scenarios.
Patent Information
- Application Number
- CN202410812115.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-22
AI Technical Summary
The existing anomaly detection method based on traffic interaction graph relies on software implementation, resulting in low throughput, unable to meet the needs of 100GE Ethernet, and poor practicality.
Measure the traffic data of each time window through the preset passive traffic measurement hardware device, use Bloom filter and CM-Sketch to summarize the total in-degree and total out-degree of each IP node in the original traffic interaction graph, classify and merge it Operation, generate compressed flow interaction graph, and perform anomaly detection based on unsupervised anomaly detection model.
Without losing detection accuracy, the throughput rate of anomaly detection is improved. It is highly practical and can be deployed in high-speed traffic scenarios to meet the needs of 100GE Ethernet.
Smart Images

Figure CN118827162A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security technology, and in particular to a compression and anomaly detection method and device based on a flow interaction graph. Background Art
[0002] Network anomaly detection is a key component of network security systems (such as enterprise network gateways, intrusion detection systems in cloud data centers, WAN routers, and other network security middleware) to ensure the security, functionality, and performance of all services conducted over the network. Traditional network anomaly detection methods mainly rely on predefined signatures or rules (such as firewalls and deep packet inspection) and are widely deployed. However, with the popularity of encrypted network traffic, attackers can circumvent the above traditional methods by encrypting malicious traffic, adding noise, and disguising it as normal traffic.
[0003] The abnormal traffic detection method based on flow interaction graph has become increasingly attractive because it is suitable for encrypted network traffic. This method does not rely on the payload of the traffic, but only relies on basic information such as the non-encryptable traffic source IP, destination IP, number of traffic packets, number of bytes, etc. The basic interaction information of the flow is constructed through this information to judge abnormal traffic. It has excellent resistance to encrypted traffic and good user privacy protection.
[0004] The abnormal traffic detection process based on the flow interaction graph is usually as follows: after the network packet is parsed by the network card, the software is used to extract features; then the traffic interaction graph is constructed. Specifically, the source IP and destination IP are used as the vertices of the graph to construct a directed graph or a bipartite graph, and the extracted features are used as the features of the edges of the graph; finally, detection based on the abnormal traffic interaction pattern is performed to identify whether there are abnormal features by analyzing the features of the graph, thereby detecting abnormal traffic, such as Figure 1 shown.
[0005] The existing technical solutions are generally similar to the above-mentioned abnormal traffic detection based on flow interaction graphs in terms of process, but they differ in feature extraction and graph analysis, mainly because different solutions will use different graph analysis methods, which require different flow features, but in terms of the overall process, they basically follow the hardware parsing package, and the software performs all subsequent operations. For example, the existing technology can use a bipartite graph to construct traffic interaction features and use one-mode projection to analyze traffic behavior, but this solution was proposed earlier and the analysis method is relatively simple; in addition, the existing technology can also use Egonet (a subgraph consisting of a vertex and its neighbors) to analyze social behavior graphs, which can be analogized to traffic interaction graphs.
[0006] All current methods based on traffic interaction graphs are software-based solutions. Since software feature extraction, traffic interaction graph construction, and abnormal traffic interaction pattern detection are all based on software implementation, especially traffic interaction graph and abnormal traffic interaction pattern detection, both require the construction of two-dimensional features, which is very complex and hinders the improvement of throughput. In addition, even for traffic feature extraction, if the number of flows is N, its complexity is O(N). Under 100GE, there is no software solution that can measure and extract line speed at a low cost, resulting in extremely low software processing throughput of the solution, which is far from meeting the requirements of 100GE Ethernet (at least 148Mpps). For example, HyperVision, based on DPDK technology, has a composition throughput of only about 5.7Mpps and an analysis throughput of only 0.94Mpps.
[0007] In summary, the existing software-implemented anomaly detection method based on traffic interaction graph has low throughput and poor practicality, and cannot meet the requirements of 100GE Ethernet, which needs to be solved urgently. Summary of the invention
[0008] The present application provides a compression and anomaly detection method and device based on a flow interaction graph to solve the problems of low throughput, poor practicality, and inability to meet 100GE Ethernet requirements of the existing anomaly detection method based on a flow interaction graph implemented by software.
[0009] The first aspect of the present application provides a compression and anomaly detection method based on a flow interaction graph, comprising the following steps: measuring the flow data of each time window by a preset passive flow measurement hardware device, and summarizing the total in-degree and total out-degree of each IP node in the preset original flow interaction graph by using a preset Bloom filter and two CM-Sketch; based on the total in-degree, the total out-degree and the flow data, enabling the target software to classify the total in-degree and the total out-degree of each IP node and obtain a classification result, and performing a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, and obtaining and maintaining the point features and edge features of the compressed flow interaction graph; obtaining the graph features of the compressed flow interaction graph according to the point features and the edge features, and generating the anomaly detection result corresponding to the compressed flow interaction graph based on the graph features and a preset unsupervised anomaly detection model.
[0010] Optionally, in one embodiment of the present application, the total in-degree and total out-degree of each IP node in the original traffic interaction graph are summarized according to the traffic data, the preset Bloom filter and the CM-Sketch, including: extracting each traffic data in the traffic data, and judging whether each traffic data satisfies the preset new flow condition of the Bloom filter; if the currently extracted traffic data satisfies the preset new flow condition, hashing the source IP and destination IP in the tuple corresponding to the currently extracted traffic data to each counter of src-Sketch and dst-Sketch in the CM-Sketch respectively, and performing an increment operation on each counter to obtain the new in-degree and new out-degree corresponding to each IP node; if the currently extracted traffic data does not meet the preset new flow condition, no operation is performed on each counter of the src-Sketch and the dst-Sketch; iteratively judging each traffic data in the traffic data until the judgment of each traffic data in the traffic data is completed, so as to obtain the total in-degree and total out-degree of each IP node.
[0011] Optionally, in one embodiment of the present application, the target software is made to classify the total in-degree and total out-degree of each IP node and obtain a classification result, and each IP node is merged or deleted based on the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, including: querying the src-Sketch and the dst-Sketch according to each flow data in the flow data to obtain the total in-degree and total out-degree of the IP node corresponding to each flow data; using a preset threshold parameter to classify the total in-degree and total out-degree of the IP node corresponding to each flow data, if the total in-degree or total out-degree of the IP node is greater than the preset threshold parameter, the IP node is classified as a Point, otherwise the IP nodes whose total in-degree or total out-degree is not greater than the preset threshold parameter are aggregated into a Group; obtaining the number of members in the Group, and deleting the Group with only one member to generate a compressed flow interaction graph corresponding to the original flow interaction graph.
[0012] Optionally, in one embodiment of the present application, the graph features of the compressed stream interaction graph are obtained according to the point features and the edge features, and based on the graph features and a preset unsupervised anomaly detection model, an anomaly detection result corresponding to the compressed stream interaction graph is generated, including: determining an anomaly detection type based on preset network traffic social characteristics and network attack patterns, wherein the anomaly detection types include Flood type, Brute force type, Replication type and Botnets type; obtaining egocentric network features corresponding to the point features of the compressed stream interaction graph, and identifying the graph pattern corresponding to the compressed stream interaction graph by combining the egocentric network features and the point features, and extracting graph features corresponding to the graph pattern, wherein the graph pattern includes Star pattern, Unevenness pattern, Clique pattern and Botnets pattern; generating mixed features by combining the graph features, the point features and the edge features, and inputting the mixed features into the unsupervised anomaly detection model to obtain the anomaly detection type corresponding to the compressed stream interaction graph.
[0013] The second aspect of the present application provides a compression and anomaly detection device based on a flow interaction graph, including: a summary module, which is used to measure the flow data of each time window through a preset passive flow measurement hardware device, and use a preset Bloom filter and two CM-Sketch to summarize the total in-degree and total out-degree of each IP node in the preset original flow interaction graph; a compression module, which is used to enable the target software to classify the total in-degree and total out-degree of each IP node based on the total in-degree, the total out-degree and the flow data, and obtain a classification result, and perform a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, and obtain and maintain the point features and edge features of the compressed flow interaction graph; a detection module, which is used to obtain the graph features of the compressed flow interaction graph according to the point features and the edge features, and generate the anomaly detection result corresponding to the compressed flow interaction graph based on the graph features and a preset unsupervised anomaly detection model.
[0014] Optionally, in one embodiment of the present application, the aggregation module includes: a judgment unit, used to extract each flow data in the flow data, and judge whether each flow data satisfies the preset new flow condition of the Bloom filter; a first processing unit, used to hash the source IP and destination IP in the tuple corresponding to the currently extracted flow data to each counter of src-Sketch and dst-Sketch in the CM-Sketch if the currently extracted flow data satisfies the preset new flow condition, and perform a plus one operation on each counter to obtain a new in-degree and a new out-degree corresponding to each IP node; a second processing unit, used to not perform any operation on each counter of the src-Sketch and the dst-Sketch if the currently extracted flow data does not meet the preset new flow condition; an iteration unit, used to iteratively judge each flow data in the flow data until the judgment of each flow data in the flow data is completed, so as to obtain the total in-degree and total out-degree of each IP node.
[0015] Optionally, in one embodiment of the present application, the compression module includes: a query unit, used to query the src-Sketch and the dst-Sketch according to each traffic data in the traffic data to obtain the total in-degree and total out-degree of the IP node corresponding to each traffic data; an aggregation unit, used to classify the total in-degree and total out-degree of the IP node corresponding to each traffic data using a preset threshold parameter, if the total in-degree or total out-degree of the IP node is greater than the preset threshold parameter, the IP node is classified as a Point, otherwise the IP nodes whose total in-degree or total out-degree is not greater than the preset threshold parameter are aggregated into a Group; a first generation unit, used to obtain the number of members in the Group, and delete the Group with only one member to generate a compressed flow interaction graph corresponding to the original flow interaction graph.
[0016] Optionally, in one embodiment of the present application, the detection module includes: a determination unit, used to determine the anomaly detection type based on preset network traffic social characteristics and network attack patterns, wherein the anomaly detection types include Flood type, Brute force type, Replication type and Botnets type; an identification unit, used to obtain the egocentric network features corresponding to the point features of the compressed flow interaction graph, and combine the egocentric network features and the point features to identify the graph pattern corresponding to the compressed flow interaction graph, and extract the graph features corresponding to the graph pattern, wherein the graph pattern includes Star mode, Unevenness mode, Clique mode and Botnets mode; a second generation unit, used to generate a hybrid feature by combining the graph features, the point features and the edge features, and input the hybrid feature into the unsupervised anomaly detection model to obtain the anomaly detection type corresponding to the compressed flow interaction graph.
[0017] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the compression and anomaly detection method based on the flow interaction graph as described in the above embodiment.
[0018] The fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the above-mentioned compression and anomaly detection method based on the flow interaction graph.
[0019] Therefore, the embodiments of the present application have the following beneficial effects:
[0020] The embodiment of the present application can measure the flow data of each time window through a preset passive flow measurement hardware device, and use a preset Bloom filter and two CM-Sketch to summarize the total in-degree and total out-degree of each IP node in the preset original flow interaction graph; based on the total in-degree, total out-degree and flow data, the target software classifies the total in-degree and total out-degree of each IP node, and obtains the classification result, and performs a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, and obtains and maintains the point features and edge features of the compressed flow interaction graph; the graph features of the compressed flow interaction graph are obtained according to the point features and edge features, and the anomaly detection results corresponding to the compressed flow interaction graph are generated based on the graph features and the preset unsupervised anomaly detection model. The present application can improve the throughput of anomaly detection based on flow interaction graph without losing detection accuracy, has high practicality, and can be deployed in application scenarios such as high-speed flow. Therefore, the existing anomaly detection method based on flow interaction graph implemented by software has low throughput, poor practicality, and cannot meet the requirements of 100GE Ethernet.
[0021] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0023] Figure 1 It is a schematic diagram of the execution logic of a traditional abnormal traffic detection method of a flow interaction graph;
[0024] Figure 2 A flowchart of a compression and anomaly detection method based on a flow interaction graph provided according to an embodiment of the present application;
[0025] Figure 3 A schematic diagram of the logical architecture of a compression and anomaly detection method based on a flow interaction graph provided for one embodiment of the present application;
[0026] Figure 4 A logical schematic diagram for counting the in-degree and out-degree of each IP through a Bloom filter and two CM-Sketch is provided for one embodiment of the present application;
[0027] Figure 5 A schematic diagram of original traffic interaction provided for an embodiment of the present application;
[0028] Figure 6 A characteristic schematic diagram of vertex maintenance provided for an embodiment of the present application;
[0029] Figure 7 A characteristic schematic diagram of edge maintenance provided for an embodiment of the present application;
[0030] Figure 8 A schematic diagram of an algorithm for performing partial feature maintenance provided for an embodiment of the present application;
[0031] Fig. 9 A schematic diagram of an algorithm for implementing final graph construction provided for an embodiment of the present application;
[0032] Fig.10 A schematic diagram of a flow interaction diagram analysis process of an ICAD provided for an embodiment of the present application;
[0033] Fig.11 A schematic diagram of an abnormal graph mode provided for an embodiment of the present application;
[0034] Fig.12 is an example diagram of a compression and anomaly detection device based on a flow interaction graph according to an embodiment of the present application;
[0035] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0036] Among them, 10-compression and anomaly detection device based on flow interaction graph; 100-aggregation module, 200-compression module, 300-detection module; 1301-memory, 1302-processor, 1303-communication interface. DETAILED DESCRIPTION
[0037] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0038] The following describes the compression and anomaly detection method and device based on the flow interaction graph of the embodiment of the present application with reference to the accompanying drawings. In response to the problems mentioned in the above background technology, the present application provides a compression and anomaly detection method based on the flow interaction graph, in which the flow data of each time window is measured by a preset passive flow measurement hardware device, and the total in-degree and total out-degree of each IP node in the preset original flow interaction graph are summarized by using a preset Bloom filter and two CM-Sketch; based on the total in-degree, total out-degree and flow data, the target software classifies the total in-degree and total out-degree of each IP node, and obtains the classification result, and performs a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, and obtains and maintains the point features and edge features of the compressed flow interaction graph; the graph features of the compressed flow interaction graph are obtained according to the point features and edge features, and based on the graph features and the preset unsupervised anomaly detection model, the anomaly detection result corresponding to the compressed flow interaction graph is generated. The present application can improve the throughput of anomaly detection based on traffic interaction graph without losing detection accuracy, has high practicality, and can be deployed in application scenarios such as high-speed traffic. Thus, the existing anomaly detection method based on traffic interaction graph implemented by software has low throughput, poor practicality, and cannot meet the requirements of 100GE Ethernet.
[0039] Specifically, Figure 2 A flowchart of a compression and anomaly detection method based on a stream interaction graph provided in an embodiment of the present application.
[0040] like Figure 2 As shown, the compression and anomaly detection method based on the flow interaction graph includes the following steps:
[0041] In step S201, the traffic data of each time window is measured by a preset passive traffic measurement hardware device, and the total in-degree and total out-degree of each IP node in the preset original traffic interaction graph are summarized by using a preset Bloom filter and two CM-Sketch.
[0042] In the embodiment of the present application, ICAD can use hardware to accelerate both flow feature extraction and flow interaction diagram construction, such as Figure 3As shown, the hardware module of ICAD includes a passive traffic measurement hardware device (i.e., a passive traffic measurement device), such as FASTeller on SmartNICs, to measure the traffic data of each time window; in addition, an embodiment of the present application may also provide ICAD using a Bloom filter and two CM-Sketch (including src-Sketch and dst-Sketch) to summarize the total in-degree and total out-degree of each IP node in the original traffic interaction graph, wherein CM-Sketch is a counter for estimating IP out-degree / in-degree, src-Sketch can count the out-degree of an IP node, and dst-Sketch can count the in-degree of an IP node.
[0043] In addition, in the embodiments of the present application, the time window and various parameters of ICAD can be modified to ensure a reasonable window size and a balanced workload of ICAD.
[0044] Therefore, the embodiments of the present application measure the traffic data of each time window through hardware and summarize the total in-degree and total out-degree of each IP node, which not only can achieve line-speed processing, speed up the processing speed, eliminate the cost of compressed graphs, but also provide reliable data support for the construction and compression of subsequent flow interaction graphs.
[0045] Optionally, in one embodiment of the present application, the total in-degree and total out-degree of each IP node in the original traffic interaction graph are summarized according to the traffic data, the preset Bloom filter and the CM-Sketch, including: extracting each traffic data in the traffic data, and judging whether each traffic data satisfies the preset new flow condition of the Bloom filter; if the currently extracted traffic data satisfies the preset new flow condition, the source IP and the destination IP in the tuple corresponding to the currently extracted traffic data are hashed to each counter of src-Sketch and dst-Sketch in CM-Sketch respectively, and each counter is incremented by one to obtain the new in-degree and the new out-degree corresponding to each IP node; if the currently extracted traffic data does not meet the preset new flow condition, no operation is performed on each counter of src-Sketch and dst-Sketch; each traffic data in the traffic data is judged iteratively until each traffic data in the traffic data is judged to obtain the total in-degree and the total out-degree of each IP node.
[0046] It should be noted that the above-mentioned FASTeller can count the information of all flows. In the embodiment of the present application, a flow can be defined as a (source IP, destination IP) tuple. Packets with the same tuple belong to the same flow. ICAD only needs to provide FASTeller with the number of packets and bytes of the statistical flow.
[0047] The following is a description of the specific process of using Bloom filter and CM-Sketch to count the total in-degree and total out-degree of each IP node:
[0048] 1. Use the Bloom filter to distinguish whether a flow (source IP, destination IP) is "encountered" for the first time, that is, to determine whether each flow data meets the preset new flow conditions of the Bloom filter, such as Figure 4 As shown, if the preset new flow conditions are met, the flow will be processed by CM-Sketch, otherwise it will not be processed;
[0049] It should be noted that, since the Bloom filter has a certain misjudgment rate, it can only judge a new flow as "already encountered" and cannot judge an old flow as "not encountered". Therefore, the error of the Bloom filter can be ignored by selecting appropriate parameters.
[0050] 2. For a new flow (source IP, destination IP), the embodiment of the present application can regard it as a new edge, then the out-degree of the vertex where the source IP is located needs to be increased by one, and the in-degree of the vertex where the destination IP is located needs to be increased by one;
[0051] For src-Sketch, the source IP will be hashed to each counter of Sketch, and the counter will be incremented by one, thereby updating the out-degree of the source IP; similarly, for dst-Sketch, the destination IP will be hashed to each counter of Sketch, and the counter will be incremented by one, thereby updating the in-degree of the destination IP;
[0052] 3. For old flows, their in-degree and out-degree are not affected, so only new flows can pass through the Bloom filter and be counted by CM-Sketch.
[0053] It should be noted that, in the actual implementation process, those skilled in the art may also use methods similar to Bloom filter and CM-Sketch for hardware acceleration, which is not specifically limited here.
[0054] Therefore, the embodiments of the present application use passive traffic measurement hardware devices, Bloom filters and CM-Sketch to obtain traffic data for each time window, and summarize the total in-degree and total out-degree of each IP node, thereby greatly improving the speed of building the compressed flow interaction graph.
[0055] In step S202, based on the total in-degree, total out-degree and traffic data, the target software classifies the total in-degree and total out-degree of each IP node and obtains the classification result, and performs a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original traffic interaction graph, and at the same time obtains and maintains the point features and edge features of the compressed flow interaction graph.
[0056] After obtaining the traffic data of each time window and summarizing the total in-degree and total out-degree of each IP node, further, when each window time ends, the contents of the above two CM-Sketch and the traffic data captured by the passive measurement device will be pushed to the subsequent software. The software receives the passively measured traffic data and the statistical information of CM-Sketch to build a traffic interaction graph.
[0057] In the specific implementation process, the embodiment of the present application can merge the connected low out-degree or in-degree IP nodes into a Group vertex through ICAD, and delete the Group vertex containing only one node, so as to directly construct a compressed flow interaction graph and maintain the point features and edge features of the graph. If there is no CM-Sketch information, the software needs to use depth-first search (DFS) or breadth-first search (BFS) for additional graph scanning.
[0058] Optionally, in one embodiment of the present application, the target software classifies the total in-degree and total out-degree of each IP node and obtains the classification result, and performs a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, including: querying src-Sketch and dst-Sketch according to each flow data in the flow data to obtain the total in-degree and total out-degree of the IP node corresponding to each flow data; using a preset threshold parameter to classify the total in-degree and total out-degree of the IP node corresponding to each flow data, if the total in-degree or total out-degree of the IP node is greater than the preset threshold parameter, the IP node is classified as a Point, otherwise the IP nodes whose total in-degree or total out-degree is not greater than the preset threshold parameter are aggregated into a Group; obtaining the number of members in the Group, and deleting the Group with only one member to generate a compressed flow interaction graph corresponding to the original flow interaction graph.
[0059] In the actual execution process, the embodiment of the present application can first obtain a flow (source IP, destination IP) from the passively measured traffic data through software; secondly, the software queries src-Sketch and dst-Sketch through the source IP, and queries src-Sketch and dst-Sketch through the destination IP to read the out-degree or in-degree of the IP node, and determine whether the source IP and the destination IP are high out-degree or high in-degree, so as to distinguish between Point and Group, wherein all Points are normally graphed, and all Groups need to perform connectivity judgment based on union-find.
[0060] It should be noted that in the CM-Sketch method, the software can set or adjust the threshold parameter θ. If the out-degree or in-degree of the IP node exceeds θ, it is judged as a Point with a high out-degree or high in-degree; if both are lower than θ, it is judged to belong to a certain Group. It should be noted that the value returned by CM-Sketch will be overestimated relative to the true value, but ICAD guarantees that if an IP is judged as a Group by CM-Sketch, it must belong to the Group (both the out-degree and the in-degree are less than the threshold), so the ICAD Group will definitely not contain a Point.
[0061] It should be noted that those skilled in the art may also compress the original flow interaction graph based on the basic strategy of grouping, merging or deleting nodes according to connectivity and in-degree in the embodiments of the present application in combination with other related methods, which are not specifically limited here.
[0062] In the specific implementation process, the embodiment of the present application can compress the traffic interaction graph through ICAD using the two solutions of Grouping and Pruning.
[0063] Figure 5 It is a schematic diagram of the original traffic interaction, such as Figure 5 As shown, assuming that each circle represents an IP node, the IP represented by the red circle has a relatively large out-degree or in-degree (which can be judged by the above threshold), which means that there are many other IP nodes connected to it; the IP nodes represented by the blue circle have relatively small out-degree and in-degree. Therefore, the embodiment of the present application can classify the IPs with relatively small out-degree and in-degree and interconnected into a Group through the dotted circle, and abstract this Group into a node of a graph, that is, perform Group compression, so that a large number of nodes are replaced by one vertex.
[0064] In addition, the second compression method is Pruning, such as Figure 5 As shown, the embodiment of the present application deletes the single-point group with only one IP after distinguishing the groups in the original traffic interaction graph.
[0065] In the embodiment of the present application, the vertex B connected to a vertex A belonging to Group and also classified in Group belongs to the same Group, so it can be merged into the same set by the union-find method. Different sets are disjoint Groups; finally, all single-point groups are deleted, thereby completing the construction of all vertices of the compressed graph.
[0066] In summary, the advantages of using the Grouping and Pruning solutions to compress the original traffic interaction graph in the embodiment of the present application are as follows:
[0067] 1. High compression rate: Since network flows have a large number of small flows, the Pruning method can reduce the size of the interaction graph by at least 50%. 90% of the flows have less than 8 packets. Therefore, when a suitable threshold is selected, the Grouping method can also significantly compress the flow interaction graph.
[0068] 2. Network behavior characteristics can be preserved as much as possible: ICAD has two key insights into the flow interaction graph; first, Points with large in-degree or out-degree may be servers providing public services under normal circumstances. A Group is usually a small network that mainly communicates within the Group and requests public services from the Point when needed; for example, P2P host clusters exhibit this interaction characteristic; by analyzing the communication behavior between Points and Groups, certain anomalies can be detected. For example, ICAD will regard a host with a large number of connections as a well-known host (such as a Web server) and observe the number of Points and Groups connected to the host; if the host is connected to a large number of Groups but only a few Points, or vice versa, because well-known servers should not be in Groups and If there is a clear deviation between the Points, ICAD will consider it abnormal; similarly, if the connection of the host shows a certain skewed pattern (for example, only a few connections have a lot of traffic, while the rest of the connections have almost no communication), ICAD will also consider this abnormal, because well-known servers should provide uniform services to all hosts connected to them. On the contrary, the Group only requests services from the server when needed. For example, in p2p seed applications, the host will request services from the tracker; if a Group has a large number of connections, ICAD will consider this abnormal because the Group is large in size and the members in the Group communicate with a large number of Points. This behavior arouses suspicion of potential botnet activities. The social characteristics of the pruned Group can be retained by the Points connected to it;
[0069] If the point it is connected to is an attacker or a victim, the pruned group can still be identified in further review; otherwise, the pruning of the group will not affect the final judgment. By mining the graphic patterns related to the anomaly, ICAD can achieve high accuracy with a minimum feature set;
[0070] 3. Easy to accelerate with hardware: The compression scheme adopted by ICAD is suitable for hardware acceleration, thereby eliminating the additional cost brought by the compressed flow interaction graph; at the same time, ICAD's flow interaction graph analysis method completes packet parsing, feature extraction and partial compression interaction graph construction at hardware line speed, and its speed is much faster than software.
[0071] Furthermore, the embodiment of the present application can maintain the point features and edge features of the compressed flow interaction graph, wherein the features maintained by the vertices are as follows: Figure 6 As shown, the edge maintenance features are as follows Figure 7 shown.
[0072] In the embodiments of the present application, Figure 3 The (c)Group pre-process of the Graph Construction Stage uses Figure 8 The maintenance algorithm shown first performs maintenance on a portion of the features. Thus, in addition to features Go and Gi, the embodiment of the present application has calculated the features of all point vertices. The complexity of the algorithm is O(R), where R represents the number of records passed to the software, and the maintenance of the set can be considered as O(1).
[0073] Afterwards, the embodiments of the present application can be Figure 3 (d) FinalGraph Construction of the Graph Construction Stage uses Fig. 9 The maintenance algorithm shown in the figure performs the final graph construction. In this process, the overall complexity can be approximated to O(nm), where n is the number of IPs in the group and m is the number of points connected to it. Since the group containing only one host will be pruned and deleted, n and m are much lower than the number of IPs at the time.
[0074] It is understandable that any compression or pruning optimization of the traffic interaction graph, if implemented by software, will undoubtedly increase the complexity of building the traffic interaction graph and still fail to meet the requirements of line-speed processing. Therefore, the embodiment of the present application designs a compression solution that is easy to offload by hardware, so as to utilize SmartNIC with FPGA for acceleration, thereby eliminating the cost of traffic interaction graph compression; in addition, since SmartNIC with FPGA has been deployed in large quantities in cloud networks, the embodiment of the present application can be easily deployed on existing cloud networks.
[0075] Therefore, the embodiments of the present application can enable ICAD to offload a large number of processes to hardware line-speed processing according to the corresponding compression algorithm to reduce the software burden and improve throughput; in addition, the embodiments of the present application compress the traffic interaction graph, thereby greatly reducing the complexity, significantly improving the throughput and compression rate, retaining more information, and easy to accelerate with hardware.
[0076] In step S203, the graph features of the compressed flow interaction graph are obtained according to the point features and the edge features, and based on the graph features and a preset unsupervised anomaly detection model, an anomaly detection result corresponding to the compressed flow interaction graph is generated.
[0077] In the embodiment of the present application, the flow interaction diagram analysis method of ICAD is as follows: Fig.10As shown, ICAD completes the packet parsing, feature extraction and partial compressed interaction graph construction by hardware, and the software completes a small part of the compressed interaction graph construction and the entire interaction graph analysis, which greatly reduces the tasks processed by the software and thus improves the throughput.
[0078] Therefore, after obtaining the compressed flow interaction graph, the embodiment of the present application can further obtain the graph features of the compressed flow interaction graph based on the point features and edge features, and combine the unsupervised anomaly detection model to generate anomaly detection results corresponding to the compressed flow interaction graph.
[0079] Optionally, in one embodiment of the present application, graph features of the compressed stream interaction graph are obtained according to point features and edge features, and based on the graph features and a preset unsupervised anomaly detection model, an anomaly detection result corresponding to the compressed stream interaction graph is generated, including: determining the anomaly detection type based on preset network traffic social characteristics and network attack patterns, wherein the anomaly detection types include Flood type, Brute force type, Replication type, and Botnets type; obtaining egocentric network features corresponding to the point features of the compressed stream interaction graph, and identifying the graph pattern corresponding to the compressed stream interaction graph by combining the egocentric network features and the point features, and extracting the graph features corresponding to the graph pattern, wherein the graph pattern includes Star pattern, Unevenness pattern, Clique pattern, and Botnets pattern; generating hybrid features by combining the graph features, point features, and edge features, and inputting the hybrid features into the unsupervised anomaly detection model to obtain the anomaly detection type corresponding to the compressed stream interaction graph.
[0080] After the graph analysis part of ICAD receives the compressed graph, the embodiment of the present application will extract the shape features of the compressed graph as much as possible to improve the accuracy of anomaly detection; in addition, ICAD can use the social characteristics of network traffic and combine it with network attack patterns to improve ICAD's classification of anomalies into Flood type, Brute force type, Replication type and Botnets type, etc. Fig.11 As shown, each type corresponds to a specific abnormal graph pattern. The following is a detailed description of each abnormal type:
[0081] Flood: Reconnaissance activities initiated by an attacker (e.g. scanning for potential victims or vulnerable targets) may appear as stars in the interaction graph, such as Fig.11 As shown in (a), flood-based attacks, including DDoS attacks, can also lead to star graph patterns;
[0082] Brute force: Once a target is selected, the attacker will use various techniques, such as traffic injection and brute force, to bypass the victim's defenses. These repeated attempts cause a surge in traffic on a specific edge, while the communication level on the adjacent edge is very low. This pattern is called asymmetry, such as Fig.11 As shown in (b), password cracking and XSS detection and injection can be classified into this type;
[0083] Replication: Once some malicious attacks or applications invade the victim (such as worms), they will replicate themselves or broadcast data packets. Therefore, their interactions are manifested in a complete graph pattern, such as Fig.11 As shown in (c);
[0084] Botnets: Fig.11 As shown in (d), an abnormally large group is also a problem, indicating sparse communication between them, i.e., a botnet. This situation is usually associated with low-activity or dormant networks, such as botnets or bots, which require minimal communication to remain active.
[0085] Afterwards, ICAD combines the features of each vertex in the compressed interaction graph with the features of its corresponding egocentric network (i.e., the subgraph containing the vertex’s direct neighbors). For the egocentric network of vertex v, N v is the number of neighbors of v, E v is the total number of edges in the egocentric network. Both values can be obtained by counting subgraphs in the compressed interaction graph; considering the pruned single-host population, the actual number of neighbors of vertex v Should be N v +G o [v]+G i [v], while the total number of edges in the egocentric network It can be estimated as E v +G o [v]+G i [v].
[0086] The weights of the removed edges are calculated as follows: one edge representing the maximum outflow and one edge representing the maximum inflow are selected, and for the remaining edges, the average weight is calculated. ICAD can then use this information to identify the following four patterns depicted in the figure:
[0087] Star: When a vertex v exhibits a star pattern, it should have large in-degree and out-degree, and its neighbors have little communication, so Very big Very small, so that The ratio is close to 1;
[0088] Unevenness: ICAD recovers the trimmed population and related edges of vertex v, after which embodiments of the present application can calculate the variance of the edges connected to vertex v, which will be very large when vertex v exhibits an uneven pattern;
[0089] Clique: When a vertex v behaves as a complete graph pattern, almost every node in its egocentric network communicates with each other. In this case, The value of may not be very large, but The ratio is much greater than 1;
[0090] Botnets: ICAD only needs to identify groups that behave as abnormally large groups to discover botnets.
[0091] After extracting the shape features of the compressed graph, ICAD combines the vertex features with the above graph features to obtain hybrid features and inputs them into an unsupervised anomaly detection model. The unsupervised anomaly detection model can utilize the isolation forest algorithm, which is a powerful unsupervised learning algorithm that can be used for anomaly detection. By applying it to the compressed interaction graph, ICAD is able to identify anomalous points for further investigation. For example, ICAD can use the complete measurement data again to check all hosts (including the pruned hosts) and the traffic connected to the abnormal vertices.
[0092] It should be noted that, in the actual implementation process, those skilled in the art may also use other algorithms to detect Star, Unevenness, Clique and Botnet, so as to further improve the accuracy of ICAD, which is not specifically limited here.
[0093] Therefore, the embodiment of the present application designs a lightweight, unsupervised detection strategy through ICAD to analyze the compressed traffic interaction graph to detect abnormal traffic, thereby improving the throughput of the anomaly detection method based on the traffic interaction graph without losing detection accuracy, making it more practical and deployable in high-speed traffic such as cloud networks.
[0094] According to the compression and anomaly detection method based on flow interaction graph proposed in the embodiment of the present application, the flow data of each time window is measured by a preset passive flow measurement hardware device, and the total in-degree and total out-degree of each IP node in the preset original flow interaction graph are summarized by using a preset Bloom filter and two CM-Sketch; based on the total in-degree, total out-degree and flow data, the target software classifies the total in-degree and total out-degree of each IP node and obtains the classification result, and performs a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, and obtains and maintains the point features and edge features of the compressed flow interaction graph; the graph features of the compressed flow interaction graph are obtained according to the point features and edge features, and the anomaly detection results corresponding to the compressed flow interaction graph are generated based on the graph features and the preset unsupervised anomaly detection model. The present application can improve the throughput of anomaly detection based on flow interaction graph without losing detection accuracy, has high practicality, and can be deployed in application scenarios such as high-speed traffic.
[0095] Secondly, the compression and anomaly detection device based on the flow interaction graph proposed according to the embodiment of the present application is described with reference to the accompanying drawings.
[0096] Fig.12 It is a block diagram of a compression and anomaly detection device based on a flow interaction graph according to an embodiment of the present application.
[0097] like Fig.12 As shown, the compression and anomaly detection device 10 based on the flow interaction graph includes: a summary module 100, a compression module 200 and a detection module 300.
[0098] The aggregation module 100 is used to measure the traffic data of each time window through a preset passive traffic measurement hardware device, and to aggregate the total in-degree and total out-degree of each IP node in the preset original traffic interaction graph using a preset Bloom filter and two CM-Sketch.
[0099] The compression module 200 is used to enable the target software to classify the total in-degree and total out-degree of each IP node based on the total in-degree, total out-degree and traffic data, and obtain the classification results, and perform a union-find-based merge or delete operation on each IP node according to the classification results to generate a compressed flow interaction graph corresponding to the original traffic interaction graph, and at the same time obtain and maintain the point features and edge features of the compressed flow interaction graph.
[0100] The detection module 300 is used to obtain the graph features of the compressed flow interaction graph according to the point features and the edge features, and generate anomaly detection results corresponding to the compressed flow interaction graph based on the graph features and a preset unsupervised anomaly detection model.
[0101] Optionally, in one embodiment of the present application, the summarizing module 100 includes: a judgment unit, a first processing unit, a second processing unit and an iteration unit.
[0102] The judging unit is used to extract each flow data in the flow data, and judge whether each flow data satisfies the preset new flow condition of the Bloom filter.
[0103] The first processing unit is used to hash the source IP and destination IP in the tuple corresponding to the currently extracted traffic data to each counter of src-Sketch and dst-Sketch in CM-Sketch respectively if the currently extracted traffic data meets the preset new flow condition, and perform an addition operation on each counter to obtain a new in-degree and a new out-degree corresponding to each IP node.
[0104] The second processing unit is configured to not perform any operation on each counter of src-Sketch and dst-Sketch if the currently extracted traffic data does not meet the preset new flow condition.
[0105] The iteration unit is used for iteratively judging each flow data in the flow data until the judgment of each flow data in the flow data is completed, so as to obtain the total in-degree and total out-degree of each IP node.
[0106] Optionally, in one embodiment of the present application, the compression module 200 includes: a query unit, an aggregation unit and a first generation unit.
[0107] The query unit is used to query the src-Sketch and the dst-Sketch according to each flow data in the flow data to obtain the total in-degree and total out-degree of the IP node corresponding to each flow data.
[0108] The aggregation unit is used to classify the total in-degree and total out-degree of the IP node corresponding to each flow data using the preset threshold parameter. If the total in-degree or total out-degree of the IP node is greater than the preset threshold parameter, the IP node is classified as Point; otherwise, the IP nodes whose total in-degree or total out-degree is not greater than the preset threshold parameter are aggregated into Group.
[0109] The first generating unit is used to obtain the number of members in the Group and delete the Group with only one member to generate a compressed flow interaction graph corresponding to the original flow interaction graph.
[0110] Optionally, in one embodiment of the present application, the detection module 300 includes: a determination unit, an identification unit and a second generation unit.
[0111] The determination unit is used to determine the anomaly detection type based on preset network traffic social characteristics and network attack patterns, wherein the anomaly detection types include Flood type, Brute force type, Replication type and Botnets type.
[0112] The recognition unit is used to obtain the egocentric network features corresponding to the point features of the compressed flow interaction graph, and combine the egocentric network features and the point features to identify the graph pattern corresponding to the compressed flow interaction graph, and extract the graph features corresponding to the graph pattern, wherein the graph patterns include Star pattern, Unevenness pattern, Clique pattern and Botnets pattern.
[0113] The second generation unit is used to generate a mixed feature by combining the graph feature, the point feature and the edge feature, and input the mixed feature into the unsupervised anomaly detection model to obtain the anomaly detection type corresponding to the compressed flow interaction graph.
[0114] It should be noted that the aforementioned explanation of the embodiment of the compression and anomaly detection method based on the flow interaction graph is also applicable to the compression and anomaly detection device based on the flow interaction graph of this embodiment, and will not be repeated here.
[0115] According to the compression and anomaly detection device based on the flow interaction graph proposed in the embodiment of the present application, it includes a summary module, which is used to measure the flow data of each time window through a preset passive flow measurement hardware device, and at the same time, the total in-degree and total out-degree of each IP node in the preset original flow interaction graph are summarized by using a preset Bloom filter and two CM-Sketch; a compression module, which is used to enable the target software to classify the total in-degree and total out-degree of each IP node based on the total in-degree, total out-degree and flow data, and obtain the classification result, and perform a union-find-based merge or deletion operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph, and at the same time obtain and maintain the point features and edge features of the compressed flow interaction graph; a detection module, which is used to obtain the graph features of the compressed flow interaction graph according to the point features and edge features, and generate the anomaly detection results corresponding to the compressed flow interaction graph based on the graph features and the preset unsupervised anomaly detection model. The present application can improve the throughput of anomaly detection based on the flow interaction graph without losing detection accuracy, has high practicality, and can be deployed in application scenarios such as high-speed traffic.
[0116] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0117] A memory 1301 , a processor 1302 , and a computer program stored in the memory 1301 and executable on the processor 1302 .
[0118] When the processor 1302 executes the program, the compression and anomaly detection method based on the flow interaction graph provided in the above embodiment is implemented.
[0119] Furthermore, the electronic device further comprises:
[0120] The communication interface 1303 is used for communication between the memory 1301 and the processor 1302 .
[0121] The memory 1301 is used to store computer programs that can be executed on the processor 1302 .
[0122] The memory 1301 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0123] If the memory 1301, the processor 1302 and the communication interface 1303 are implemented independently, the communication interface 1303, the memory 1301 and the processor 1302 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.13 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0124] Optionally, in a specific implementation, if the memory 1301, the processor 1302 and the communication interface 1303 are integrated on a chip, the memory 1301, the processor 1302 and the communication interface 1303 can communicate with each other through an internal interface.
[0125] The processor 1302 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0126] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned compression and anomaly detection method based on a flow interaction graph.
[0127] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0128] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0129] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0130] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0131] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0132] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0133] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0134] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A compression and anomaly detection method based on flow interaction graph, It is characterized in that The following steps are involved: The traffic data of each time window is measured by the preset passive traffic measurement hardware device, and the total in-degree and total out-degree of each IP node in the preset original traffic interaction graph are summarized by the preset Bloom filter and two CM-Sketch; Based on the total in-degree, the total out-degree and the traffic data, the target software classifies the total in-degree and the total out-degree of each IP node and obtains a classification result, and performs a union-find-based merge or delete operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original traffic interaction graph, and simultaneously obtains and maintains the point features and edge features of the compressed flow interaction graph; The graph features of the compressed flow interaction graph are obtained according to the point features and the edge features, and based on the graph features and a preset unsupervised anomaly detection model, an anomaly detection result corresponding to the compressed flow interaction graph is generated.
2. The method according to claim 1, It is characterized in that The summarizing the total in-degree and total out-degree of each IP node in the original traffic interaction graph according to the traffic data, the preset Bloom filter and the CM-Sketch includes: Extracting each flow data from the flow data, and determining whether each flow data satisfies a preset new flow condition of the Bloom filter; If the currently extracted traffic data meets the preset new flow condition, the source IP and the destination IP in the tuple corresponding to the currently extracted traffic data are hashed to each counter of the src-Sketch and the dst-Sketch in the CM-Sketch, and each counter is incremented by one to obtain a new in-degree and a new out-degree corresponding to each IP node; If the currently extracted traffic data does not meet the preset new flow condition, no operation is performed on each counter of the src-Sketch and the dst-Sketch; Iteratively judge each flow data in the flow data until the judgment of each flow data in the flow data is completed, so as to obtain the total in-degree and total out-degree of each IP node.
3. The method according to claim 2, It is characterized in that The step of causing the target software to classify the total in-degree and the total out-degree of each IP node and obtain a classification result, and performing a union-find-based merging or deleting operation on each IP node according to the classification result to generate a compressed flow interaction graph corresponding to the original flow interaction graph includes: Query the src-Sketch and the dst-Sketch according to each flow data in the flow data to obtain the total in-degree and total out-degree of the IP node corresponding to each flow data; The total in-degree and total out-degree of the IP node corresponding to each flow data are classified using a preset threshold parameter. If the total in-degree or total out-degree of the IP node is greater than the preset threshold parameter, the IP node is classified as a Point. Otherwise, the IP nodes whose total in-degree or total out-degree is not greater than the preset threshold parameter are aggregated into a Group. The number of members in the Group is obtained, and the Group with only one member is deleted to generate a compressed flow interaction graph corresponding to the original flow interaction graph.
4. The method according to claim 1, It is characterized in that The obtaining of the graph features of the compressed flow interaction graph according to the point features and the edge features, and generating an anomaly detection result corresponding to the compressed flow interaction graph based on the graph features and a preset unsupervised anomaly detection model, includes: Based on the preset social characteristics of network traffic and network attack patterns, determine the anomaly detection type, wherein the anomaly detection type includes Flood type, Brute force type, Replication type and Botnets type; Acquire the egocentric network features corresponding to the point features of the compressed flow interaction graph, and identify the graph mode corresponding to the compressed flow interaction graph by combining the egocentric network features and the point features, and extract the graph features corresponding to the graph mode, wherein the graph mode includes Star mode, Unevenness mode, Clique mode and Botnets mode; The graph feature, the point feature and the edge feature are combined to generate a mixed feature, and the mixed feature is input into the unsupervised anomaly detection model to obtain an anomaly detection type corresponding to the compressed flow interaction graph.
5. A compression and anomaly detection device based on flow interaction graph, It is characterized in that include: The aggregation module is used to measure the traffic data of each time window through the preset passive traffic measurement hardware device, and to aggregate the total in-degree and total out-degree of each IP node in the preset original traffic interaction graph using the preset Bloom filter and two CM-Sketch; A compression module, configured to enable the target software to classify the total in-degree and the total out-degree of each IP node based on the total in-degree, the total out-degree and the traffic data, and obtain a classification result, and to perform a union-find-based merge or delete operation on each IP node according to the classification result, so as to generate a compressed flow interaction graph corresponding to the original traffic interaction graph, and to obtain and maintain point features and edge features of the compressed flow interaction graph; A detection module is used to obtain the graph features of the compressed flow interaction graph according to the point features and the edge features, and generate an anomaly detection result corresponding to the compressed flow interaction graph based on the graph features and a preset unsupervised anomaly detection model.
6. The device according to claim 5, It is characterized in that The summary module includes: A judging unit, configured to extract each flow data from the flow data, and judge whether each flow data satisfies a preset new flow condition of the Bloom filter; A first processing unit is configured to, if the currently extracted traffic data meets the preset new flow condition, hash the source IP and the destination IP in the tuple corresponding to the currently extracted traffic data to each counter of src-Sketch and dst-Sketch in the CM-Sketch, respectively, and perform an addition operation on each counter to obtain a new in-degree and a new out-degree corresponding to each IP node; A second processing unit, configured to not perform any operation on each counter of the src-Sketch and the dst-Sketch if the currently extracted traffic data does not meet the preset new flow condition; The iteration unit is used to iteratively judge each flow data in the flow data until the judgment of each flow data in the flow data is completed, so as to obtain the total in-degree and total out-degree of each IP node.
7. The device according to claim 6, It is characterized in that The compression module comprises: A query unit, configured to query the src-Sketch and the dst-Sketch according to each flow data in the flow data, so as to obtain a total in-degree and a total out-degree of an IP node corresponding to each flow data; an aggregation unit, configured to classify the total in-degree and the total out-degree of the IP node corresponding to each flow data by using a preset threshold parameter, and if the total in-degree or the total out-degree of the IP node is greater than the preset threshold parameter, classify the IP node as a Point; otherwise, aggregate the IP nodes whose total in-degree or the total out-degree is not greater than the preset threshold parameter into a Group; The first generating unit is used to obtain the number of members in the Group and delete the Group with only one member to generate a compressed flow interaction graph corresponding to the original flow interaction graph.
8. The device according to claim 5, It is characterized in that The detection module comprises: A determination unit, configured to determine an anomaly detection type based on preset network traffic social characteristics and network attack patterns, wherein the anomaly detection type includes a Flood type, a Brute force type, a Replication type, and a Botnets type; an identification unit, configured to obtain an egocentric network feature corresponding to a point feature of the compressed flow interaction graph, and identify a graph pattern corresponding to the compressed flow interaction graph by combining the egocentric network feature and the point feature, and extract graph features corresponding to the graph pattern, wherein the graph pattern includes a Star pattern, an Unevenness pattern, a Clique pattern, and a Botnets pattern; The second generating unit is used to generate a mixed feature by combining the graph feature, the point feature and the edge feature, and input the mixed feature into the unsupervised anomaly detection model to obtain an anomaly detection type corresponding to the compressed flow interaction graph.
9. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the compression and anomaly detection method based on a flow interaction graph as described in any one of claims 1 to 4.
10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement the compression and anomaly detection method based on a flow interaction graph as described in any one of claims 1 to 4.
