Network node anomaly detection method and device based on tree neural network

Through the detection method based on tree neural network, a tree structure and detection model are constructed, and the network traffic characteristics are automatically extracted, which solves the problem that traditional methods are difficult to identify dynamic malicious traffic, and achieves efficient malicious traffic detection.

CN119071033AActive Publication Date: 2024-12-03JIANGNAN INFORMATION SECURITY (BEIJING) TECH CO LTD

Patent Information

Application Number
CN202411090995.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-03
Estimated Expiration
2044-08-09

AI Technical Summary

Technical Problem

Traditional malicious traffic detection methods are based on feature engineering and rule matching, and are difficult to adapt to different types and dynamically changing malicious traffic, and are vulnerable to confrontational attacks, so they cannot identify malicious traffic without human intervention.

Method used

The detection method based on tree neural network is adopted, and by constructing a tree structure and neural detection model, features are automatically extracted from network traffic information to detect whether there is malicious traffic on the network node.

Benefits of technology

It improves the accuracy and efficiency of malicious traffic detection, avoids difficulty in feature selection, and can automatically update node detection in dynamic networks to identify whether it is normal or not.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071033A_ABST
    Figure CN119071033A_ABST
Patent Text Reader

Abstract

The invention discloses a network node anomaly detection method and device based on a tree neural network. The method comprises the following steps: acquiring network traffic information of a network to be detected within a predetermined time period; constructing a tree structure of the to-be-detected network according to the plurality of network nodes of the to-be-detected network; constructing a tree nerve detection model of the to-be-detected network according to network flow information in a preset time period and the tree structure; and obtaining network traffic information of the network to be detected at a to-be-detected moment, inputting the network traffic information to the tree nerve detection model, and detecting network nodes with malicious traffic in a plurality of network nodes of the network to be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security technology, and more specifically, to a method and device for detecting network node anomalies based on a tree neural network. Background Art

[0002] Traditional malicious traffic detection methods are mainly based on feature engineering and rule matching of network data packets, which require manual extraction and selection of features. They are difficult to adapt to different types of and dynamically changing malicious traffic and are vulnerable to adversarial attacks.

[0003] In recent years, deep learning methods have been widely used in malicious traffic detection. Traditional malicious traffic detection methods are mostly based on feature engineering and rule matching, which require manual intervention and cannot effectively identify malicious traffic from constantly changing dynamic networks. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides a method and device for detecting anomalies of network nodes based on a tree neural network, a method and device for detecting anomalies of network nodes based on a tree neural network, or a method and device for detecting network nodes based on a tree neural network.

[0005] According to one aspect of the present invention, a method for detecting network nodes based on a tree neural network is provided, characterized in that it includes:

[0006] Obtaining network traffic information of the network to be detected within a predetermined time period;

[0007] Constructing a tree structure of the network to be detected according to a plurality of network nodes of the network to be detected;

[0008] Constructing a dendritic neural detection model of the network to be detected according to the network traffic information within a predetermined time period and the tree structure; and

[0009] The network traffic information of the network to be detected at the time of detection is obtained and input into the tree neural detection model to detect the network nodes with malicious traffic among the multiple network nodes of the network to be detected.

[0010] Preferably, the network traffic information includes: inbound traffic of network nodes, outbound traffic of network nodes, protocol distribution, port distribution, IP address distribution and bandwidth utilization.

[0011] Preferably, constructing a tree structure of the network to be detected according to a plurality of network nodes of the network to be detected includes:

[0012] Abstracting the multiple network nodes of the network to be detected into a tree structure including M layers, wherein the tree structure includes: a root node, an intermediate node and a leaf node of the tree, the root node is a router or a data collection device, the intermediate node and the leaf node are network nodes connected to the router or the data collection device, and M is greater than or equal to 2;

[0013] The layer where the root node is located is the first layer.

[0014] Preferably, the tree adjacency matrix of the tree structure is expressed as:

[0015]

[0016] If network node i and network node j have data communication at the current time t, and network node i sends data to network node j, the data flow at the current time t is from network node i to network node j. The direction of the data flow at the current time t is expressed as point to Then network node i is the parent node of network node j, A ij =1, represents the network node i at the current moment, Represents the network node j at the current time t

[0017] If there is no data communication between network node i and network node j at the current time t, then A i,j =0 represents the network node at the current time, represents the network node at the current time t;

[0018] Among them, the current time t corresponds to a time slice.

[0019] Preferably, according to the network traffic information within a predetermined time period and the tree structure, a tree neural detection model of the network to be detected is constructed, including:

[0020] Starting from the layer where the root node of the tree structure is located, toward the direction of the leaf node of the Mth layer, two layers are obtained each time with a step length of 1 layer and calculation is performed until the Mth layer of the tree structure participates in the calculation, and the following is performed: according to the network traffic information within the predetermined time period, the similarity between each child node in each subtree of the tree structure and each of its one or more brother nodes is calculated, and the calculated multiple similarities are spliced ​​as the feature information of the child node;

[0021] Aggregating feature information of all child nodes of the parent node of each subtree in the tree structure to generate a basic matrix of the parent node of each subtree based on the aggregated feature information;

[0022] Performing multiple aggregations on each time slice within the predetermined time period, thereby generating multiple input matrices based on the basic matrix, and performing data feature transformation on the multiple input matrices, thereby determining an output matrix of a specific dimension; and

[0023] Normalizing the output matrix, determining the cross entropy loss between the predicted value and the label value, thereby constructing a tree neural detection model of the network to be detected;

[0024] The time to be detected corresponds to a time slice.

[0025] Preferably, according to the network traffic information within the predetermined time period, the similarity between each child node in each subtree of the tree structure and each of its one or more brother nodes is calculated, and the calculated multiple similarities are spliced ​​as the characteristic information of the child node, including:

[0026] The characteristic information is determined based on the following formula:

[0027]

[0028] Among them, z i represents the traffic information vector of child node i determined based on the network traffic information within a predetermined time period. Brother node j is the brother node of child node i. j represents the traffic information vector of the brother node j determined based on the network traffic information in a predetermined time period, Sim(·)(t) represents a similarity calculation function, which is used to determine the similarity of two nodes at time t based on the traffic information vector, Indicates that child node i and sibling node j are child nodes of parent node v. is the set of child nodes of the parent node v, It means that after calculating the similarity between child node i and each of multiple sibling nodes, the multiple similarities calculated are concatenated as the feature information of child node i. Con{} means that the multiple similarities calculated are concatenated, and the feature information of child node i is used to represent the similarity vector of child node i.

[0029] Preferably, aggregating the feature information of all child nodes of the parent node of each subtree in the tree structure to generate a basic matrix of the parent node of each subtree based on the aggregated feature information includes:

[0030] Generate the basic matrix of the parent node of each subtree based on the following formula:

[0031]

[0032] Among them, X v(t) represents the basic matrix of the parent node v at the current time t, Represents the node set of all child nodes of the parent node v at the current time t, and indicates that the child node i belongs to First_children_aggregation represents the aggregation operation of the feature information or similarity vectors of all child nodes of the parent node v, where child node i is the child node of the parent node v. Represents the feature information or similarity vector of node i, α iv represents the attention weight, which is used to characterize the degree of association between the parent node v and the child node i. avg is the average value, W struct is the weight matrix; σ is the sigmoid activation function;

[0033] Self_similar_difference represents the difference in feature information or similarity vector of parent node v in adjacent time slices t and t-1, where X v (t)-X v (t-1) represents the difference in time similarity between the parent node v at time slice t and time slice t-1 after self-aggregation;

[0034] Self_similar means aggregating the self-similarity of the parent node v at the previous time t-1 before the current time t, X v (t-1) represents the basic matrix after the parent node v aggregates the feature information of the child node in the adjacent time slice t and the previous time slice in time slice t-1;

[0035] W t and W rec , are weight matrices.

[0036] Preferably, multiple aggregations are performed on each time slice within the predetermined time period, thereby generating multiple input matrices based on the basic matrix, and performing data feature transformation on the multiple input matrices to determine an output matrix of a specific dimension, including:

[0037] Perform l aggregation operations on each time slice within the predetermined time period, generate l input matrices based on the basic matrix through l aggregation operations, and take the average value of the l input matrices to determine the intermediate matrix X at the current time t K (t), the formula is as follows:

[0038] X K (t) = avg(X v (t) (1) ,X v (t) (2) ,…,X v (t)(l) )

[0039] Among them, X v (t) (l) is the basic matrix X at the tth time slice v The input matrix generated by the l-th aggregation operation of (t); X v (t) (2) The basic matrix X for the second time slice v The input matrix generated by the second aggregation operation of (t); avg is the average value;

[0040] The number of time slices in the predetermined time period is T, and the retained features are output matrices of T specific dimensions, which are expressed as follows:

[0041] X=[X K (1),X K (2),X K (3),…,X K (T)]

[0042] Where X is an output matrix including T intermediate matrices or a specific dimension, X K (1),X K (2),X K (3),…,X K (T) is T intermediate matrices or specific dimensions, each of which is used to represent a feature dimension, X K (T) is the Tth intermediate matrix or specific dimension; each intermediate matrix or characteristic dimension corresponds to a time slice within a predetermined time period;

[0043] The dimension of the output matrix X is (T, C, C). The output matrix X is transformed into the transposed matrix of the output matrix X after the data features are transformed. Used to represent the transposed matrix X T Dimension.

[0044] Preferably, the output matrix is ​​normalized to determine the cross entropy loss between the predicted value and the label value, thereby constructing a tree neural detection model of the network to be detected, including:

[0045] The normalized exponential function softmax is used to perform normalization, and the probability of the network node not having malicious traffic and the probability of the network node having malicious traffic are output, which is expressed as:

[0046]

[0047] X=[X K (1),X K (2),X K (3),…,X K(T)]

[0048] It is a two-dimensional vector output by the tree neural detection model. The first dimension of the two-dimensional vector represents the probability that there is no malicious traffic in the network node i, and the second dimension of the two-dimensional vector represents the probability that there is malicious traffic in the network node i.

[0049] in, is the result matrix output by the tree neural detection model, where the number of network nodes to be detected is C, X is an output matrix including T intermediate matrices or a specific dimension, and X K (1),X K (2),X K (3),…,X K (T) is T intermediate matrices or specific dimensions, X T is the transposed matrix of X, where W (i) is the weight matrix, Used to represent W (i) The dimension of b (i) is the bias matrix, Used to represent b (i) Dimension.

[0050] Preferably, the method further includes adopting a cross entropy loss function as a loss function so that the training process converges until it is stable. The formula is as follows:

[0051]

[0052] Among them, Loss is the loss function, y i is the label value of network node i, C is the number of network nodes, 1≤i≤C, is the two-dimensional vector output by the tree neural detection model.

[0053] Preferably, detecting a network node having malicious traffic among a plurality of network nodes of the network to be detected includes:

[0054] When the network node i When the probability that the network node i indicated by the first dimension does not have malicious traffic is greater than a first probability threshold, the network node i is determined to be a network node that does not have malicious traffic.

[0055] Preferably, detecting a network node having malicious traffic among a plurality of network nodes of the network to be detected includes:

[0056] When the network node i When the probability that the network node i indicated by the second dimension has malicious traffic is greater than a second probability threshold, the network node i is determined to be a network node with malicious traffic.

[0057] According to another aspect of the present invention, there is provided a device for detecting abnormalities of network nodes based on a tree neural network, comprising:

[0058] An acquisition module is used to acquire network traffic information of a network to be detected within a predetermined time period;

[0059] A first construction module is used to construct a tree structure of the network to be detected according to a plurality of network nodes of the network to be detected;

[0060] A second construction module is used to construct a dendritic neural detection model of the network to be detected according to the network traffic information within a predetermined time period and the tree structure; and

[0061] The detection module is used to obtain network traffic information of the network to be detected at the time of detection, input it into the tree neural detection model, and detect network nodes with malicious traffic among multiple network nodes of the network to be detected.

[0062] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.

[0063] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method described in any one of the above aspects of the present invention.

[0064] Therefore, the present application provides a method for detecting network nodes based on a tree neural network, assuming that the representation learning of dynamic graphics is a process of interaction between nodes, and updating the relevant node representations through events. It is believed that the attacked nodes have similarities, so the node vector is the result of calculating the similarity between the node itself and the nodes of the same order, thereby realizing the modeling process of the tree-type dynamic network, and then achieving the technical effect of realizing whether the network node is attacked by malicious traffic. The present application proposes that the use of a new type of tree-type neural network to detect malicious traffic can effectively improve the accuracy and efficiency of malicious traffic detection. Features can be automatically extracted from raw data without human intervention, avoiding the problem of difficult feature selection; and it can detect whether it is normal or not by updating nodes in a constantly changing dynamic network. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] A more complete understanding of exemplary embodiments of the present invention may be obtained by referring to the following drawings:

[0066] Figure 1It is a flowchart of a method for detecting abnormalities of network nodes based on a tree neural network provided by an exemplary embodiment of the present invention;

[0067] Figure 2 It is a schematic diagram of abstracting a network into multiple tree structures with only two layers provided by an exemplary embodiment of the present invention;

[0068] Figure 3 is a schematic diagram of a data storage method provided by an exemplary embodiment of the present invention;

[0069] Figure 4 It is a schematic diagram of a parent-child hierarchical structure storage of a network provided by an exemplary embodiment of the present invention;

[0070] Figure 5 It is a structural schematic diagram of a detection device for abnormal network nodes based on a tree neural network provided by an exemplary embodiment of the present invention;

[0071] Figure 6 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0072] Below, the exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments of the present invention, and it should be understood that the present invention is not limited to the exemplary embodiments described here.

[0073] It should be noted that the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0074] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0075] It should also be understood that, in the embodiments of the present invention, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.

[0076] It should also be understood that any component, data or structure mentioned in the embodiments of the present invention can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0077] In addition, the term "and / or" in the present invention is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects before and after are in an "or" relationship.

[0078] It should also be understood that the description of the various embodiments of the present invention focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0079] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0080] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0081] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0082] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0083] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0084] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0085] Exemplary Methods

[0086] Figure 1 FIG. 1 is a flow chart of a method for detecting abnormalities of network nodes based on a tree neural network according to an exemplary embodiment of the present invention. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the method 100 for detecting abnormalities of network nodes based on a tree neural network includes the following steps:

[0087] Step 101: Obtain network traffic information of a network to be detected within a predetermined time period.

[0088] Optionally, the network traffic information includes: the node's incoming traffic and outgoing traffic, protocol distribution, port distribution, IP address distribution, and bandwidth utilization.

[0089] Specifically, the network packet capture program obtains network traffic information. Network traffic information refers to the amount of data transmitted in a network and related statistical information. It can include the following:

[0090] Ingress and egress traffic: The amount of data traffic entering and leaving a specific node (such as a router or interface) in a network.

[0091] Protocol distribution: The traffic ratio of different protocols, such as HTTP, FTP, SMTP, etc. It helps to understand different types of data flows in the network.

[0092] Port distribution: The proportion of data transmitted using different network ports. Each application usually uses a specific port for communication.

[0093] IP address distribution: The ratio of different IP addresses sending and receiving data on a network. This helps determine the most active hosts or sources on a network.

[0094] Bandwidth utilization: The ratio between the bandwidth actually used on a network link and the available bandwidth. It reflects how busy the network is.

[0095] Step 102: construct a tree structure of the network to be detected according to a plurality of network nodes of the network to be detected.

[0096] Optionally, constructing a tree structure of the network to be detected according to the network nodes of the network to be detected includes:

[0097] The network nodes are abstracted into a tree structure with only two layers, where the tree structure includes a root node and leaf nodes. The root node is a router or data aggregation device in a small network, and the leaf nodes are all network hosts under the device.

[0098] According to another embodiment, the multiple network nodes of the network to be detected are abstracted into a tree structure including M layers, wherein the tree structure includes: a root node, intermediate nodes and leaf nodes of the tree, the root node is a router or a data collection device, the intermediate nodes and the leaf nodes are network nodes connected to the router or the data collection device, and M is greater than or equal to 2; wherein the layer where the root node is located is the first layer.

[0099] Optionally, the tree adjacency matrix of the tree structure is represented as:

[0100]

[0101] Among them, at the current moment, network node i and network node j are communicating, and network node i points to network node j, then network node i is the parent node of network node j, A ij =1, otherwise A i,j =0.

[0102] According to another embodiment, if network node i and network node j have data communication at current time t, and network node i points to network node j to send data, the data flow at current time t is from network node i to network node j, and the direction of the data flow at current time t is expressed as point to Then network node i is the parent node of network node j, A ij =1, represents the network node i at the current moment, represents the network node j at the current time t;

[0103] If there is no data communication between network node i and network node j at the current time t, then A i,j =0 represents the network node at the current time, represents the network node at the current time t;

[0104] The current time t corresponds to a time slice. The current time t corresponds to the t-th time slice, and the previous time t-1 of the current time t corresponds to the t-1-th time slice.

[0105] Specifically, since the spread of malicious traffic in the network can be viewed as a tree, the parent-child relationship in the tree structure reflects the spread behavior. A parent node can be connected to multiple child nodes, and a child node may be a leaf node or a parent node of the next layer.

[0106] Specifically, since the spread of malicious traffic in the network can be viewed as a tree, the parent-child relationship in the tree structure reflects the spread behavior. A parent node can be connected to multiple child nodes, and a child node may be a leaf node or a parent node of the next layer.

[0107] For this purpose, the following tree network structure is defined: Figure 2 The network is abstracted into multiple two-layer tree structures, including the root node and leaf nodes of the tree. The root node is a router or data collection device in a small network. The leaf nodes are all network hosts under the device. They have directed connection edges with communication nodes. Nodes that do not communicate are considered to have no relationship. Figure 2 The storage method of data in can be represented by referring to the child representation method of the tree network, such as Figure 3 The first column is the ID of the parent node, and the second column stores the similarity of the child nodes of the node. The parent-child hierarchy of the network is also stored in the tree structure. If the root node points to the child node, then it is 1, otherwise it is 0, such as Figure 4 . Due to the dynamic nature of the network, the number of child nodes is not fixed, which causes the characteristic dimension of the parent node to change, which is not conducive to calculation. Therefore, specifying the maximum number of child nodes of the parent node is equivalent to specifying the characteristic dimension of the root node, which is represented by N here. Since the number of protected parent nodes is not necessarily fixed, the size of the parent node matrix is ​​also specified. For the convenience of subsequent calculations, it is represented by C, thus forming a C*N data matrix.

[0108] This application defines a tree as (a ij ) m×n , where j is the child node of i, m is the number of nodes, and n is the maximum number of children propagated by each node. Due to the dynamic nature of the network, the number of parent nodes and child nodes is not fixed. In order to facilitate calculation, the number of parent nodes and the maximum number of child nodes of the node are specified to be m and n respectively, thus forming an m×n data matrix. If only the malicious traffic propagation behavior of the LAN is detected, the model is simplified to multiple tree structures with only two layers, including the root node and leaf nodes of the tree. The root node is a protected node, and the leaf node is a network host that communicates with the node. It has a directed connection edge relationship with the root node. Nodes that do not communicate are considered to have no relationship, and this topological structure relationship is represented by the adjacency matrix.

[0109] This application discretely represents the dynamic evolution of the tree in the form of time slices, and uses a set of ordered trees to represent the dynamic tree. TR=(TR 1 ,TR 2 ....TR T ), t=1,2...T is the number of snapshots of the tree formed in the time series. Therefore, according to the definition, a tree adjacency matrix can be established for each snapshot of the tree as shown below, and the child nodes and their number corresponding to each node can be known:

[0110]

[0111] The above formula represents the communication connection relationship between the parent node and the child node. If at the current moment, node i and node j are communicating, and node i points to node j. Then node i is considered to be the parent node of node j, then A ij =1, otherwise A i,j = 0. This adjacency matrix will be used in subsequent detection.

[0112] Step 103, constructing a tree neural detection model of the network to be detected according to the network traffic information within a predetermined time period and the tree structure.

[0113] Optionally, a tree neural detection model of the network to be detected is constructed according to the network traffic information and the tree structure within a predetermined time period, including:

[0114] Calculate the similarity between each child node and other sibling nodes in the tree structure based on the network traffic information, and concatenate the calculated similarities as the feature information of the child node;

[0115] Aggregate the child node information of each tree in the tree structure to update the parent node of the tree;

[0116] Perform multiple aggregations on each time slice within a predetermined time period to generate multiple input vectors, perform data feature transformation on multiple output vectors, and output output vectors of specific dimensions;

[0117] The output vector is normalized, the cross entropy loss between the predicted value and the label value is determined, and the tree neural detection model is optimized.

[0118] Optionally, the similarity between each child node and other sibling nodes in the tree structure is calculated based on the network traffic information, and the calculated similarities are concatenated as the feature information of the child node according to the following formula:

[0119]

[0120] Where z represents the node traffic information vector. Sim(·)(t) represents the similarity calculation function of two nodes at time t. i and j are child nodes of node v. It means that after calculating the similarity between child node i and other sibling nodes, they are concatenated together as the feature information of node i.

[0121] Optionally, the calculation formula for updating the parent node of each tree in the aggregated tree structure by using the child node information of the tree is as follows:

[0122]

[0123] Where, X v (t) represents the vector representation of the updated parent node at the current moment, represents the set of nodes adjacent to node i at time t, i belongs to the set of child nodes in the time slice, First_children_aggregation represents the aggregation operation of the similarity vector of the child nodes of the parent node v, where i is the child node of node v, represents the node similarity vector, α iv represents the attention weight, that is, the importance of its child node, and Self_similar_difference represents the difference calculation value of the similarity vector of the parent node in the previous and next two time slices, where X v (t)-X v (t-1) represents the difference in the time similarity between the parent node and the previous and next time slices after self-aggregation. Self_similar represents the calculation of the self-similarity at the previous moment of aggregation. X v (t-1) represents the vector representation of the similarity of the parent node and the child nodes in the previous time slice;

[0124] in, The calculation formula of the process is as follows:

[0125] X v (t) = σ(A T X v (t-1) T W+b)

[0126] Where, X v (t-1) T represents the transpose of the matrix updated at time t-1, A T represents the transposed matrix of the tree adjacency matrix, W is the parameter matrix, and b is the bias matrix.

[0127] Optionally, multiple aggregations are performed on each time slice within a predetermined time period to generate multiple input vectors, data feature transformation is performed on multiple output vectors, and outputs output vectors of a specific dimension, including:

[0128] For each time slice, l aggregations are performed. Multiple aggregation operations will generate l output vectors. The average operation is taken. The formula is as follows:

[0129] X v (t) = avg(X v (t) (1) ,X v (t) (2) ,…,X v (t) (l) )

[0130] There are a total of T time slices, and the retained features have a total of T output vectors, which are expressed as follows:

[0131] X=[X1,X2,…,X T ]

[0132] The dimension of the input data X received by the output layer is (T, C, C), which is transformed into

[0133] Optionally, the output vector is normalized, the cross entropy loss between the predicted value and the label value is determined, and the tree neural detection model is optimized, including:

[0134] The probability of whether the node is normal is output by normalizing it with the softmax function, expressed as:

[0135]

[0136] X=[X1,X2,…,X T ]

[0137] The model outputs a two-dimensional vector, where the first dimension and the second dimension represent the probability of a network node being normal or abnormal, respectively. Indicates that there are C nodes to be detected, X is the input data, X T is the transpose of X, where is the weight matrix, is the bias matrix;

[0138] The loss function uses the cross entropy loss function to make it converge until it is stable during training. The formula is as follows:

[0139]

[0140] Among them, y i is the label value, is the predicted value, where the predicted value is calculated by the softmax function.

[0141] Specifically, first, the traffic information (incoming and outgoing traffic, protocol distribution, port distribution, IP address distribution, and bandwidth utilization) obtained in step 1 is used to calculate the similarity between the child nodes of each network device node and other sibling nodes. The formula is as follows:

[0142]

[0143] Where z represents the node traffic information vector. Sim(·)(t) represents the similarity calculation function of two nodes at time t, and i and j are child nodes of node v. It means that after calculating the similarity between child node i and other sibling nodes, they are spliced ​​together as the feature information of the node.

[0144] Then, the tree neural network relationship modeled in step 2 is used to aggregate the child information to update the parent node representation. In order to capture the correlation between the child and parent nodes of adjacent time slices, it is necessary to use the previous and next two time slices for calculation:

[0145]

[0146] Among them, X v (t) represents the vector representation of the updated parent node at the current moment. i belongs to the set of child nodes in the time slice. First_children_aggregation represents the aggregation operation of the similarity vector of the child nodes of the parent node v. Among them, i is the child node of node v, represents the node similarity vector, α iv Represents the attention weight, that is, the importance of its child nodes. Self_similar_difference represents the difference between the similarity vectors of the parent node in the previous and next time slices, where X v (t)-X v (t-1) indicates the difference in the time similarity between the parent node and the previous and next time slices after self-aggregation. Self_similar indicates the calculation of the self-similarity of the previous moment of aggregation, X v (t-1) represents the vector representation of the similarity of the parent node and its child nodes in the previous time slice.

[0147] in, The calculation formula of the process is shown as follows:

[0148] X v (t) = σ(A T X v (t-1) T W+b)

[0149] X v(t-1) T represents the transpose of the matrix updated at time t-1, A T Represents the transposed matrix of the tree adjacency matrix. W is the parameter matrix and b is the bias matrix, both of which are learnable matrices.

[0150] For each time slice, l aggregations are performed. Multiple aggregation operations will generate l output vectors. Here, the average operation is taken. The formula is as follows.

[0151] X v (t) = avg(X v (t) (1) ,X v (t) (2) ,…,X v (t) (l) )

[0152] Since there are T time slices in total, the retained features have a total of T output vectors. They are expressed as follows:

[0153] X=[X1,X2,…,X T ]

[0154] Finally, the dimension of the input data X received by the output layer is (T, C, C), which is transformed into is the weight matrix, is the bias matrix, both of which can be obtained through learning and training. The output layer is connected to a fully connected layer and normalized by the softmax function to output the probability of whether the node is normal.

[0155]

[0156] The prediction value output by the model is to determine whether the target host node is attacked by malicious traffic, so the goal is a binary classification problem. The model output is a two-dimensional vector, where the first dimension and the second dimension represent the probability of the node being normal or abnormal. Indicates that there are C nodes to be detected.

[0157] The loss function uses the cross entropy loss function, which makes it converge until it stabilizes during training. The formula is as follows:

[0158]

[0159] Among them, y i is the label value, is the predicted value, which is calculated using the softmax mentioned above.

[0160] According to another embodiment, constructing a dendritic neural detection model of the network to be detected based on network traffic information within a predetermined time period and the tree structure includes:

[0161] Starting from the layer where the root node of the tree structure is located, toward the leaf node of the Mth layer, two layers are acquired each time with a step of 1 layer and calculation is performed until the Mth layer of the tree structure participates in the calculation, and then:

[0162] Calculate the similarity between each child node and each of its one or more brother nodes in each subtree of the tree structure according to the network traffic information within the predetermined time period, and concatenate the calculated multiple similarities as feature information of the child node;

[0163] Aggregating feature information of all child nodes of the parent node of each subtree in the tree structure to generate a basic matrix of the parent node of each subtree based on the aggregated feature information;

[0164] Performing multiple aggregations on each time slice within the predetermined time period, thereby generating multiple input matrices based on the basic matrix, and performing data feature transformation on the multiple input matrices, thereby determining an output matrix of a specific dimension; and

[0165] Normalizing the output matrix, determining the cross entropy loss between the predicted value and the label value, thereby constructing a tree neural detection model of the network to be detected;

[0166] The time to be detected corresponds to a time slice.

[0167] Wherein, starting from the layer where the root node of the tree structure is located, in the direction of the leaf node of the Mth layer, 2 layers are obtained step by step with 1 layer as a step and calculation is performed until the Mth layer of the tree structure participates in the calculation, and the execution specifically includes: when the tree structure includes 6 layers, that is, M is 6, the layer where the root node is located is the 1st layer, and the layer adjacent to the layer where the root node is located is the 2nd layer. The first time, the 1st layer including the root node and the 2nd layer adjacent to the layer where the root node is located are obtained and calculated; the second time, the 2nd layer and the 3rd layer are obtained and calculated; the third time, the 3rd layer and the 4th layer are obtained and calculated; the fourth time, the 4th layer and the 5th layer are obtained and calculated, and the fifth time, the 5th layer and the 6th layer are obtained and calculated. Since the 6th layer, that is, the Mth layer participates in the calculation, the calculation ends after the 5th layer and the 6th layer are obtained and calculated for the fifth time.

[0168] According to another embodiment, based on the network traffic information within the predetermined time period, the similarity between each child node in each subtree of the tree structure and each of its one or more brother nodes is calculated, and the calculated multiple similarities are spliced ​​as the characteristic information of the child node, including:

[0169] The characteristic information is determined based on the following formula:

[0170]

[0171] Among them, z i represents the traffic information vector of child node i determined based on the network traffic information within a predetermined time period. Brother node j is the brother node of child node i. j represents the traffic information vector of the brother node j determined based on the network traffic information in a predetermined time period, Sim(·)(t) represents a similarity calculation function, which is used to determine the similarity of two nodes at time t based on the traffic information vector, Indicates that child node i and sibling node j are child nodes of parent node v. is the set of child nodes of parent node v, It means that after calculating the similarity between child node i and each of multiple sibling nodes, the multiple similarities calculated are concatenated as the feature information of child node i. Con{} means that the multiple similarities calculated are concatenated, and the feature information of child node i is used to represent the similarity vector of child node i.

[0172] According to another embodiment, aggregating feature information of all child nodes of the parent node of each subtree in the tree structure to generate a basic matrix of the parent node of each subtree based on the aggregated feature information includes:

[0173] Generate the basic matrix of the parent node of each subtree based on the following formula:

[0174]

[0175] Among them, X v (t) represents the basic matrix of the parent node v at the current time t, Represents the node set of all child nodes of the parent node v at the current time t, and indicates that the child node i belongs to First_children_aggregation represents the aggregation operation of the feature information or similarity vectors of all child nodes of the parent node v, where child node i is the child node of the parent node v. Represents the feature information or similarity vector of node i, α ivrepresents the attention weight, which is used to characterize the degree of association between the parent node v and the child node i. avg is the average value, W struct is the weight matrix; σ is the sigmoid activation function;

[0176] Self_similar_difference represents the difference in feature information or similarity vector of parent node v in adjacent time slices t and t-1, where X v (t)-X v (t-1) represents the difference in time similarity between the parent node v at time slice t and time slice t-1 after self-aggregation;

[0177] Self_similar means aggregating the self-similarity of the parent node v at the previous time t-1 before the current time t, X v (t-1) represents the basic matrix after the parent node v aggregates the feature information of the child node in the adjacent time slice t and the previous time slice in time slice t-1;

[0178] W t and W rec , are weight matrices.

[0179] According to another embodiment, performing multiple aggregations on each time slice within the predetermined time period, thereby generating multiple input matrices based on the basic matrix, and performing data feature transformation on the multiple input matrices, thereby determining an output matrix of a specific dimension, includes:

[0180] Perform l aggregation operations on each time slice within the predetermined time period, generate l input matrices based on the basic matrix through l aggregation operations, and take the average value of the l input matrices to determine the intermediate matrix X at the current time t K (t), the formula is as follows:

[0181] X K (t) = avg(X v (t) (1) ,X v (t) (2) ,…,X v (t) (l) )

[0182] Among them, X v (t) (l) is the basic matrix X at the tth time slice v The input matrix generated by the l-th aggregation operation of (t); X v (t) (2) The basic matrix X for the second time slice v The input matrix generated by the second aggregation operation of (t); avg is the average value;

[0183] The number of time slices in the predetermined time period is T, and the retained features are output matrices of T specific dimensions, which are expressed as follows:

[0184] X=[X K (1),X K (2),X K (3),…,X K (T)]

[0185] Where X is an output matrix including T intermediate matrices or a specific dimension, X K (1),X K (2),X K (3),…,X K (T) is T intermediate matrices or specific dimensions, each of which is used to represent a feature dimension, X K (T) is the Tth intermediate matrix or specific dimension; each intermediate matrix or feature dimension corresponds to a time slice within a predetermined time period.

[0186] The dimension of the output matrix X is (T, C, C). The output matrix X is transformed into the transposed matrix of the output matrix X after the data features are transformed. Used to represent the transposed matrix X T Dimension.

[0187] According to another embodiment, the output matrix is ​​normalized, and the cross entropy loss between the predicted value and the label value is determined, thereby constructing a tree neural detection model of the network to be detected, including:

[0188] The normalized exponential function softmax is used to perform normalization, and the probability of the network node not having malicious traffic and the probability of the network node having malicious traffic are output, which is expressed as:

[0189]

[0190] X=[X K (1),X K (2),X K (3),…,X K (T)]

[0191] It is a two-dimensional vector output by the tree neural detection model. The first dimension of the two-dimensional vector represents the probability that there is no malicious traffic in the network node i, and the second dimension of the two-dimensional vector represents the probability that there is malicious traffic in the network node i.

[0192] in, is the result matrix output by the tree neural detection model, where the number of network nodes to be detected is C, X is an output matrix including T intermediate matrices or a specific dimension, and X K (1),X K (2),X K (3),…,X K (T) is T intermediate matrices or specific dimensions, X T is the transposed matrix of X, where W (i) is the weight matrix, Used to represent W (i) The dimension of b (i) is the bias matrix, Used to represent b (i) Dimension.

[0193] According to another embodiment, the cross entropy loss function is used as the loss function to make the training process converge until it is stable. The formula is as follows:

[0194]

[0195] Among them, Loss is the loss function, y i is the label value of network node i, C is the number of network nodes, 1≤i≤C, is the two-dimensional vector output by the tree neural detection model.

[0196] Step 104, obtain network traffic information of the network to be detected at the time of detection, input it into the tree neural detection model, and detect abnormal nodes with malicious traffic in the network to be detected.

[0197] Specifically, the network traffic information of the network to be tested at the time of testing, the node's incoming traffic and outgoing traffic, protocol distribution, port distribution, IP address distribution, and bandwidth utilization are collected and input into the tree-type neural network model, and the result of each network node is output as normal or abnormal.

[0198] According to another embodiment, obtaining network traffic information of the network to be detected at the time to be detected, inputting it into the tree neural detection model, and detecting network nodes with malicious traffic among multiple network nodes of the network to be detected, includes:

[0199] Obtain the network traffic information of the network to be detected at the time to be detected, and input it into the tree neural detection model. When the probability that the network node i indicated by the first dimension does not have malicious traffic is greater than a first probability threshold, the network node i is determined to be a network node that does not have malicious traffic.

[0200] According to another embodiment, obtaining network traffic information of the network to be detected at the time to be detected, inputting it into the tree neural detection model, and detecting network nodes with malicious traffic among multiple network nodes of the network to be detected, includes:

[0201] Obtain the network traffic information of the network to be detected at the time to be detected, and input it into the tree neural detection model. When the probability that the network node i indicated by the second dimension has malicious traffic is greater than a second probability threshold, the network node i is determined to be a network node with malicious traffic.

[0202] Therefore, the present application provides a method for detecting abnormalities of network nodes based on a tree neural network, generating a new tree-type dynamic network framework, which assumes that the representation learning of dynamic graphics is a process of interaction between nodes, and updates the relevant node representations through events. It is believed that the attacked nodes have similarities, so the node vector is the result of calculating the similarity between the node itself and the nodes of the same order, thereby realizing the modeling process of the tree-type dynamic network, and then achieving the technical effect of realizing whether the network node is attacked by malicious traffic. The present application proposes that the use of a new type of tree-type neural network to detect malicious traffic can effectively improve the accuracy and efficiency of malicious traffic detection. Features can be automatically extracted from raw data without human intervention, avoiding the problem of difficult feature selection; and it can detect whether it is normal or not by updating nodes in a constantly changing dynamic network.

[0203] Cluster analysis is used to determine whether a host node is in an attacked or normal state. There are normal communications and attack infection behaviors between hosts over time, corresponding to the increase or decrease in the number of network host nodes in the network and the increase and deletion of communication edges between two host nodes.

[0204] Exemplary Devices

[0205] Figure 5 FIG. 1 is a schematic diagram of a structure of a detection device for abnormal network nodes based on a tree neural network according to an exemplary embodiment of the present invention. Figure 5 As shown, the device 500 includes:

[0206] An acquisition module 510 is used to acquire network traffic information within a predetermined time period of the network to be detected;

[0207] A first construction module 520, configured to construct a tree structure of the network to be detected according to the network nodes of the network to be detected;

[0208] The second construction module 530 is used to construct a tree neural detection model of the network to be detected according to the network traffic information and the tree structure within a predetermined time period;

[0209] The detection module 540 is used to obtain network traffic information of the network to be detected at the time of detection, input it into the tree neural detection model, and detect abnormal nodes with malicious traffic in the network to be detected.

[0210] Optionally, the network traffic information includes: the node's incoming traffic and outgoing traffic, protocol distribution, port distribution, IP address distribution, and bandwidth utilization.

[0211] Optionally, the first building module 520 includes:

[0212] Abstracted into sub-modules, used to abstract network nodes into a tree structure with only two layers, where the tree structure includes a root node and leaf nodes. The root node is a router or data aggregation device in a small network, and the leaf nodes are all network hosts under the device.

[0213] Optionally, the tree adjacency matrix of the tree structure is represented as:

[0214]

[0215] Among them, at the current moment, network node i and network node j are communicating, and network node i points to network node j, then network node i is the parent node of network node j, A ij =1, otherwise A i,j =0.

[0216] Optionally, the first building module 520 includes:

[0217] The first calculation submodule is used to calculate the similarity between each child node and other sibling nodes in the tree structure according to the network traffic information, and concatenate the calculated similarities as the feature information of the child node;

[0218] The update submodule is used to aggregate the child node information of each tree in the tree structure and update the parent node of the tree;

[0219] The aggregation submodule is used to perform multiple aggregations on each time slice within a predetermined time period, generate multiple input vectors, perform data feature transformation on multiple output vectors, and output output vectors of specific dimensions;

[0220] The optimization submodule is used to normalize the output vector, determine the cross entropy loss between the predicted value and the label value, and optimize the tree neural detection model.

[0221] Optionally, the similarity between each child node and other sibling nodes in the tree structure is calculated based on the network traffic information, and the calculated similarities are concatenated as the feature information of the child node according to the following formula:

[0222]

[0223] Where z represents the node traffic information vector. Sim(·)(t) represents the similarity calculation function of two nodes at time t. i and j are child nodes of node v. It means that after calculating the similarity between child node i and other sibling nodes, they are concatenated together as the feature information of node i.

[0224] Optionally, the calculation formula for updating the parent node of each tree in the aggregated tree structure by using the child node information of the tree is as follows:

[0225]

[0226] Where, X v (t) represents the vector representation of the updated parent node at the current moment, represents the set of nodes adjacent to node i at time t, i belongs to the set of child nodes in the time slice, First_children_aggregation represents the aggregation operation of the similarity vector of the child nodes of the parent node v, where i is the child node of node v, represents the node similarity vector, α iv represents the attention weight, that is, the importance of its child node, and Self_similar_difference represents the difference calculation value of the similarity vector of the parent node in the previous and next two time slices, where X v (t)-X v (t-1) represents the difference in the time similarity between the parent node and the previous and next time slices after self-aggregation. Self_similar represents the calculation of the self-similarity at the previous moment of aggregation. X v (t-1) represents the vector representation of the similarity of the parent node and the child nodes in the previous time slice;

[0227] in, The calculation formula of the process is as follows:

[0228] X v (t) = σ(A T X v (t-1) T W+b)

[0229] Where, X v (t-1) T represents the transpose of the matrix updated at time t-1, A T represents the transposed matrix of the tree adjacency matrix, W is the parameter matrix, and b is the bias matrix.

[0230] Optionally, the aggregation submodule includes:

[0231] The generation unit is used to perform l aggregations for each time slice. Multiple aggregation operations will generate l output vectors, and the average operation is taken. The formula is as follows:

[0232] X v (t) = avg(X v (t) (1) ,X v (t) (2) ,…,X v (t) (l) )

[0233] The retention unit is used for a total of T time slices, and the retained features have a total of T output vectors, which are expressed as follows:

[0234] X=[X1,X2,…,X T ]

[0235] The transformation unit is used for the input data X received by the output layer. The dimension is (T, C, C). After the data features are transformed into

[0236] Optionally, optimize submodules, including:

[0237] The output unit is used to output the probability of whether the node is normal through softmax function normalization, expressed as:

[0238]

[0239] X=[X1,X2,…,X T ]

[0240] The model outputs a two-dimensional vector, where the first dimension and the second dimension represent the probability of a network node being normal or abnormal, respectively. Indicates that there are C nodes to be detected, X is the input data, X T is the transpose of X, where is the weight matrix, is the bias matrix;

[0241] The unit is used, and the cross entropy loss function is used for the loss function, so that it converges until it is stable during training. The formula is as follows:

[0242]

[0243] Among them, y i is the label value, is the predicted value, where the predicted value is calculated by the softmax function.

[0244] Exemplary Electronic Devices

[0245] Figure 6 This is a structure of an electronic device provided by an exemplary embodiment of the present invention. Figure 6 As shown, the electronic device 60 includes one or more processors 61 and a memory 62 .

[0246] The processor 61 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0247] The memory 62 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 61 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may also include: an input device 63 and an output device 64, which are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0248] In addition, the input device 63 may also include, for example, a keyboard, a mouse, etc.

[0249] The output device 64 can output various information to the outside, and can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto.

[0250] Of course, to simplify, Figure 6 Only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the electronic device may further include any other appropriate components according to specific application conditions.

[0251] Exemplary computer program products and computer-readable storage media

[0252] In addition to the above-mentioned methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above-mentioned "Exemplary Method" section of this specification.

[0253] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0254] In addition, an embodiment of the present invention may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0255] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, system or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0256] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.

[0257] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0258] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.

[0259] The method and system of the present invention may be implemented in many ways. For example, the method and system of the present invention may be implemented by software, hardware, firmware or any combination of software, hardware, firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present invention are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present invention. Thus, the present invention also covers a recording medium storing a program for executing the method according to the present invention.

[0260] It should also be noted that in the system, device and method of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. The above description of the disclosed aspects is provided to enable any technician in the field to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined here can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown here, but in accordance with the widest range consistent with the principles and novel features disclosed here.

[0261] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A method for detecting network nodes based on a tree neural network, characterized in that: include: Obtaining network traffic information of the network to be detected within a predetermined time period; Constructing a tree structure of the network to be detected according to a plurality of network nodes of the network to be detected; Constructing a dendritic neural detection model of the network to be detected according to the network traffic information within a predetermined time period and the tree structure; and The network traffic information of the network to be detected at the time of detection is obtained and input into the tree neural detection model to detect the network nodes with malicious traffic among the multiple network nodes of the network to be detected.

2. The method according to claim 1, characterized in that: The network traffic information includes: inbound traffic of network nodes, outbound traffic of network nodes, protocol distribution, port distribution, IP address distribution and bandwidth utilization.

3. The method according to claim 1, characterized in that Constructing a tree structure of the network to be detected according to a plurality of network nodes of the network to be detected, including: Abstracting the multiple network nodes of the network to be detected into a tree structure including M layers, wherein the tree structure includes: a root node, an intermediate node and a leaf node of the tree, the root node is a router or a data collection device, the intermediate node and the leaf node are network nodes connected to the router or the data collection device, and M is greater than or equal to 2; The layer where the root node is located is the first layer.

4. The method according to claim 3, characterized in that The tree adjacency matrix of the tree structure is expressed as: If network node i and network node j have data communication at the current time t, and network node i sends data to network node j, the data flow at the current time t is from network node i to network node j. The direction of the data flow at the current time t is expressed as point to Then network node i is the parent node of network node j, A ij =1, represents the network node i at the current moment, represents the network node j at the current time t; If there is no data communication between network node i and network node j at the current time t, then A i,j =0 represents the network node at the current time, represents the network node at the current time t; Among them, the current time t corresponds to a time slice.

5. The method according to claims 1 to 3, characterized in that According to the network traffic information within a predetermined time period and the tree structure, a tree neural detection model of the network to be detected is constructed, including: Starting from the layer where the root node of the tree structure is located, toward the direction of the leaf node of the Mth layer, two layers are obtained each time with a step length of 1 layer and calculation is performed until the Mth layer of the tree structure participates in the calculation, and the following is performed: according to the network traffic information within the predetermined time period, the similarity between each child node in each subtree of the tree structure and each of its one or more brother nodes is calculated, and the calculated multiple similarities are spliced ​​as the feature information of the child node; Aggregating feature information of all child nodes of the parent node of each subtree in the tree structure to generate a basic matrix of the parent node of each subtree based on the aggregated feature information; Performing multiple aggregations on each time slice within the predetermined time period, thereby generating multiple input matrices based on the basic matrix, and performing data feature transformation on the multiple input matrices, thereby determining an output matrix of a specific dimension; and Normalizing the output matrix, determining the cross entropy loss between the predicted value and the label value, thereby constructing a tree neural detection model of the network to be detected; The time to be detected corresponds to a time slice.

6. The method according to claim 5, characterized in that According to the network traffic information within the predetermined time period, the similarity between each child node in each subtree of the tree structure and each of its one or more brother nodes is calculated, and the calculated multiple similarities are spliced ​​as the characteristic information of the child node, including: The characteristic information is determined based on the following formula: Among them, z i represents the traffic information vector of child node i determined based on the network traffic information within a predetermined time period. Brother node j is the brother node of child node i. j represents the traffic information vector of the brother node j determined based on the network traffic information in a predetermined time period, Sim(·)(t) represents a similarity calculation function, which is used to determine the similarity of two nodes at time t based on the traffic information vector, Indicates that child node i and sibling node j are child nodes of parent node v. is the set of child nodes of the parent node v, It means that after calculating the similarity between child node i and each of multiple sibling nodes, the multiple similarities calculated are concatenated as the feature information of child node i. Con{} means that the multiple similarities calculated are concatenated, and the feature information of child node i is used to represent the similarity vector of child node i.

7. The method according to claim 5, characterized in that Aggregating feature information of all child nodes of the parent node of each subtree in the tree structure to generate a basic matrix of the parent node of each subtree based on the aggregated feature information, including: Generate the basic matrix of the parent node of each subtree based on the following formula: Among them, X v (t) represents the basic matrix of the parent node v at the current time t, Represents the node set of all child nodes of the parent node v at the current time t, and indicates that the child node i belongs to First_children_aggregation represents the aggregation operation of the feature information or similarity vectors of all child nodes of the parent node v, where child node i is the child node of the parent node v. Represents the feature information or similarity vector of node i, α iv represents the attention weight, which is used to characterize the degree of association between the parent node v and the child node i. avg is the average value, W struct is the weight matrix; σ is the sigmoid activation function; Self_similar_difference represents the difference in feature information or similarity vector of parent node v in adjacent time slices t and t-1, where X v (t)-X v (t-1) represents the difference in time similarity between the parent node v at time slice t and time slice t-1 after self-aggregation; Self_similar means aggregating the self-similarity of the parent node v at the previous time t-1 before the current time t, X v (t-1) represents the basic matrix after the parent node v aggregates the feature information of the child node in the adjacent time slice t and the previous time slice in time slice t-1; W t and W rec , are weight matrices.

8. The method according to claim 5, characterized in that Aggregating each time slice within the predetermined time period multiple times, thereby generating multiple input matrices based on the basic matrix, and performing data feature transformation on the multiple input matrices, thereby determining an output matrix of a specific dimension, including: Perform l aggregation operations on each time slice within the predetermined time period, generate l input matrices based on the basic matrix through l aggregation operations, and take the average value of the l input matrices to determine the intermediate matrix X at the current time t K (t), the formula is as follows: X K (t)=avg(X v (t) (1) ,X v (t) (2) ,…,X v (t) (l) ) Among them, X v (t) (l) is the basic matrix X at the tth time slice v (t) is the input matrix generated by the lth aggregation operation; X v (t) (2) The basic matrix X for the second time slice v The input matrix generated by the second aggregation operation of (t); avg is the average value; The number of time slices in the predetermined time period is T, and the retained features are output matrices of T specific dimensions, which are expressed as follows: X=[X K (1),X K (2),X K (3),…,X K (T)] Where X is an output matrix including T intermediate matrices or a specific dimension, X K (1),X K (2),X K (3),…,X K (T) is T intermediate matrices or specific dimensions, each of which is used to represent a feature dimension, X K (T) is the Tth intermediate matrix or specific dimension; wherein each intermediate matrix or characteristic dimension corresponds to a time slice within a predetermined time period; The dimension of the output matrix X is (T, C, C). The output matrix X is transformed into the transposed matrix of the output matrix X after the data features are transformed. Used to represent the transposed matrix X T Dimension.

9. A device for detecting network nodes based on a tree neural network, characterized in that: include: An acquisition module is used to acquire network traffic information of a network to be detected within a predetermined time period; A first construction module is used to construct a tree structure of the network to be detected according to a plurality of network nodes of the network to be detected; A second construction module is used to construct a tree neural detection model of the network to be detected according to the network traffic information within a predetermined time period and the tree structure; as well as The detection module is used to obtain network traffic information of the network to be detected at the time of detection, input it into the tree neural detection model, and detect network nodes with malicious traffic among multiple network nodes of the network to be detected.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Multi-step attack detection method based on interpretable convolutional neural network CNN and graph detection

    CN112738015A

  • Abnormal traffic detection method, device

    CN113762299A

  • Flow detection rule processing method, device and equipment, and network flow detection method, device and equipment

    CN115426135A

  • Neural network test case generation method based on tree structure

    CN115757103A

  • Malicious URL detection method based on hybrid binary neural tree

    CN116186251A

Cited By

  • Subscriber identification system based on SIM card

    CN119967415A