Network anomaly detection method, device, computer equipment and storage medium

By performing probability modeling and abnormal feature calculation on the network behavior data of each node in the network, the problem of high computing resource requirements for network traffic detection in the existing technology is solved, and efficient anomaly detection under low resource conditions is achieved.

CN117768165BActive Publication Date: 2024-09-06DARK MATTER ARTIFICIAL INTELLIGENT (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311702884.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2024-09-06
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

Network traffic anomaly detection methods in the existing technology require a large amount of training data and computing resources, resulting in high requirements for computing resources and making it difficult to detect efficiently in large-scale network environments.

Method used

By obtaining the network behavior data of each node in the network, probabilistic modeling is performed according to different roles, and abnormal characteristics of dimensions such as port usage, protocol selection, and data volume are calculated, and the abnormal information of the source node and target node is determined respectively to reduce the impact on computing resources. needs.

Benefits of technology

It achieves anomaly detection and identification of each node in the network under relatively low computing power resources, reduces computing costs and resource requirements, and improves detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117768165B
    Figure CN117768165B
Patent Text Reader

Abstract

The present application provides a network anomaly detection method, device, computer equipment and storage medium, wherein the method includes obtaining network behavior data of each node in the network to be detected within a target time period; determining the first abnormal information of each node when it is a source node according to the network behavior data of each node, and determining the abnormal detection result of each node when it is a source node according to the first abnormal information; determining the second abnormal information of each node when it is a target node according to the network behavior data of each node, and determining the abnormal detection result of each node when it is a target node according to the second abnormal information. It is possible to consider the joint features in the network, and detect and identify the different network behavior data of each node when it is a source node and a target node respectively, so that the abnormal information of each node when it is a source node and a target node can be determined respectively, and at the same time, the requirements for computing power resources are lower.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network detection technology, and in particular to a network anomaly detection method, apparatus, computer equipment and storage medium. Background Art

[0002] Anomaly-Based Intrusion Detection System (ABIDS) analyzes the normal operation mode of a system or network and then compares it with the actual observed behavior to detect any behavior that does not conform to the expected pattern. In implementation, anomaly-based intrusion detection systems need to detect abnormal behavior by analyzing system logs, network traffic, and other related data. Therefore, network traffic anomaly detection methods can be used to implement the functions of anomaly-based intrusion detection systems.

[0003] In the prior art, deep learning methods can be used to detect anomalies in network traffic, such as multi-layer perceptron, convolutional neural network (CNN), recurrent neural network (RNN) and autoencoder.

[0004] However, deep learning methods require a large amount of training data and computing resources for training, and have high requirements on the performance of deep learning models. Therefore, large computing resources are needed. Summary of the invention

[0005] The purpose of this application is to provide a network anomaly detection method, device, computer equipment and storage medium to address the deficiencies in the above-mentioned prior art, so as to solve the problem in the prior art that anomaly detection of network traffic requires large computing resources.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a network anomaly detection method, the method comprising:

[0008] Obtaining network behavior data of each node in the network to be detected within a target period of time, wherein the network behavior data at least includes: port usage data, protocol selection data, data volume on a preset protocol, and the number of times a node appears in data interaction;

[0009] Determine, according to the network behavior data of each node, first abnormal information when each node is used as a source node, and determine, according to the first abnormal information, an abnormal detection result when each node is used as a source node, wherein the first abnormal information is used to characterize abnormal information in terms of port usage, protocol selection, protocol data volume, and number of interactions when each node is used as a source node;

[0010] Based on the network behavior data of each node, the second abnormal information of each node when it is a target node is determined, and based on the second abnormal information, the abnormal detection result of each node when it is a target node is determined, wherein the second abnormal information is used to characterize the abnormal information of each node in the local service and internal access dimensions when it is a target node.

[0011] As a possible implementation manner, determining the first abnormal information when each node is used as a source node according to the network behavior data of each node includes:

[0012] Determine, according to the network behavior data of the current node, feature data when the current node is used as a source node, wherein the current node is any node in the network to be detected;

[0013] According to the characteristic data when the current node is used as a source node, first abnormal information when the current node is used as a source node is determined.

[0014] As a possible implementation manner, determining the characteristic data of the current node as a source node according to the network behavior data of the current node includes:

[0015] Obtaining the data volume of the current node on the preset protocol at each moment in the target time period, calculating the probability distribution information of the data volume of the current node at each moment according to the data volume of the current node on the preset protocol at each moment in the target time period, and determining the abnormal characteristics of the protocol data volume according to the probability distribution information of the data volume of the current node at each moment;

[0016] Acquire the ports used by the current node at each time in the target time period, calculate the joint two-dimensional probability distribution information of the ports of the current node at each time according to the ports used by the current node at each time in the target time period, and determine the abnormal port usage feature according to the joint two-dimensional probability distribution information of the ports of the current node at each time;

[0017] Acquire the protocol type used by the current node at each time in the target time period, calculate the protocol probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the protocol selection abnormality feature according to the protocol probability distribution information of the current node at each time;

[0018] According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node acts as a source node at each moment in the target time period is determined; according to the number of data interactions in which the current node acts as a source node at each moment in the target time period, the probability distribution information of external requests of the current node at each moment is calculated; and according to the probability distribution information of external requests of the current node at each moment, the abnormal characteristics of external requests are determined.

[0019] As a possible implementation manner, determining, according to the feature data when the current node is used as a source node, the first abnormal information when the current node is used as a source node includes:

[0020] Determining a protocol anomaly indicator when the current node is used as a source node according to the protocol data volume anomaly feature;

[0021] Determining a port abnormality index when the current node is used as a source node according to the abnormal port usage characteristics;

[0022] Determining a protocol selection anomaly indicator when the current node is used as a source node according to the protocol selection anomaly feature;

[0023] Determine, according to the abnormal characteristics of the external request, an abnormal index of the external request when the current node is used as a source node;

[0024] The protocol abnormality indicator, the port abnormality indicator, the protocol selection abnormality indicator and the external request abnormality indicator are used as the first abnormality information.

[0025] As a possible implementation manner, determining the second abnormal information when each node is used as a target node according to the network behavior data of each node includes:

[0026] Determine, according to the network behavior data of the current node, the characteristic data of the current node when it is used as a target node, wherein the current node is any node in the network to be detected;

[0027] According to the characteristic data when the current node is used as the target node, second abnormal information when the current node is used as the target node is determined.

[0028] As a possible implementation manner, determining the characteristic data of the current node as a target node according to the network behavior data of the current node includes:

[0029] Acquire the protocol type used by the current node at each time in the target time period, calculate the local service probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the local service abnormality feature according to the local service probability distribution information of the current node at each time;

[0030] According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node serves as a target node at each moment in the target time period is determined; according to the number of data interactions in which the current node serves as a target node at each moment in the target time period, the internal access probability distribution information of the current node at each moment is calculated; and according to the internal access probability distribution information of the current node at each moment, the abnormal characteristics of internal access are determined.

[0031] As a possible implementation manner, determining, according to the feature data when the current node is used as the target node, the second abnormal information when the current node is used as the target node includes:

[0032] Determining, according to the local service abnormality feature, a local service abnormality indicator when the current node is used as a target node;

[0033] Determining, according to the internal access abnormality feature, an internal access abnormality index when the current node is used as a target node;

[0034] The local service abnormality indicator and the internal access abnormality indicator are used as the second abnormality information.

[0035] In a second aspect, another embodiment of the present application provides a network anomaly detection device, the device comprising:

[0036] An acquisition module is used to acquire network behavior data of each node in the network to be detected within a target period of time, wherein the network behavior data at least includes: port usage data, protocol selection data, data volume on a preset protocol, and the number of times a node appears in data interaction;

[0037] A first determination module is used to determine, based on the network behavior data of each node, first abnormal information when each node is used as a source node, and determine, based on the first abnormal information, an abnormal detection result when each node is used as a source node, wherein the first abnormal information is used to characterize abnormal information in terms of port usage, protocol selection, protocol data volume, and number of interactions when each node is used as a source node;

[0038] The second determination module is used to determine the second abnormality information of each node when it is a target node based on the network behavior data of each node, and determine the abnormality detection result of each node when it is a target node based on the second abnormality information, wherein the second abnormality information is used to characterize the abnormal information of each node in the local service and internal access dimensions when it is a target node.

[0039] As a possible implementation manner, the first determining module is specifically configured to:

[0040] Determine, according to the network behavior data of the current node, feature data when the current node is used as a source node, wherein the current node is any node in the network to be detected;

[0041] According to the characteristic data when the current node is used as a source node, first abnormal information when the current node is used as a source node is determined.

[0042] As a possible implementation manner, the first determining module is specifically configured to:

[0043] Obtaining the data volume of the current node on the preset protocol at each moment in the target time period, calculating the probability distribution information of the data volume of the current node at each moment according to the data volume of the current node on the preset protocol at each moment in the target time period, and determining the abnormal characteristics of the protocol data volume according to the probability distribution information of the data volume of the current node at each moment;

[0044] Acquire the ports used by the current node at each time in the target time period, calculate the joint two-dimensional probability distribution information of the ports of the current node at each time according to the ports used by the current node at each time in the target time period, and determine the abnormal port usage feature according to the joint two-dimensional probability distribution information of the ports of the current node at each time;

[0045] Acquire the protocol type used by the current node at each time in the target time period, calculate the protocol probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the protocol selection abnormality feature according to the protocol probability distribution information of the current node at each time;

[0046] According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node acts as a source node at each moment in the target time period is determined; according to the number of data interactions in which the current node acts as a source node at each moment in the target time period, the probability distribution information of external requests of the current node at each moment is calculated; and according to the probability distribution information of external requests of the current node at each moment, the abnormal characteristics of external requests are determined.

[0047] As a possible implementation manner, the first determining module is specifically configured to:

[0048] Determining a protocol anomaly indicator when the current node is used as a source node according to the protocol data volume anomaly feature;

[0049] Determining a port abnormality index when the current node is used as a source node according to the abnormal port usage characteristics;

[0050] Determining a protocol selection anomaly indicator when the current node is used as a source node according to the protocol selection anomaly feature;

[0051] Determine, according to the abnormal characteristics of the external request, an abnormal index of the external request when the current node is used as a source node;

[0052] The protocol abnormality indicator, the port abnormality indicator, the protocol selection abnormality indicator and the external request abnormality indicator are used as the first abnormality information.

[0053] As a possible implementation manner, the second determining module is specifically configured to:

[0054] Determine, according to the network behavior data of the current node, the characteristic data of the current node when it is used as a target node, wherein the current node is any node in the network to be detected;

[0055] According to the characteristic data when the current node is used as the target node, second abnormal information when the current node is used as the target node is determined.

[0056] As a possible implementation manner, the second determining module is specifically configured to:

[0057] Acquire the protocol type used by the current node at each time in the target time period, calculate the local service probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the local service abnormality feature according to the local service probability distribution information of the current node at each time;

[0058] According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node serves as a target node at each moment in the target time period is determined; according to the number of data interactions in which the current node serves as a target node at each moment in the target time period, the internal access probability distribution information of the current node at each moment is calculated; and according to the internal access probability distribution information of the current node at each moment, the abnormal characteristics of internal access are determined.

[0059] As a possible implementation manner, the second determining module is specifically configured to:

[0060] Determining, according to the local service abnormality feature, a local service abnormality indicator when the current node is used as a target node;

[0061] Determining, according to the internal access abnormality feature, an internal access abnormality index when the current node is used as a target node;

[0062] The local service abnormality indicator and the internal access abnormality indicator are used as the second abnormality information.

[0063] In the third aspect, another embodiment of the present application provides a computer device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of any method described in the first aspect above.

[0064] In a fourth aspect, another embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any method described in the first aspect are executed.

[0065] The beneficial effects of the present application are as follows: by expressing the network behavior data of each node in the network, and performing probability modeling and calculation according to the different roles of each node in data transmission, it is possible to consider the joint characteristics in the network, and to detect and identify the different network behavior data of each node when it is a source node and a target node respectively, so as to determine the abnormal information of each node when it is a source node and a target node respectively. At the same time, since only the network behavior data of each node needs to be detected and identified, the requirements for computing resources are lower. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 A flowchart of a network anomaly detection method provided in an embodiment of the present application;

[0068] Figure 2 A logical schematic diagram of a directed graph model provided in an embodiment of the present application;

[0069] Figure 3A schematic diagram of a flow chart of determining first abnormal information when each node is used as a source node in a network abnormality detection method provided in an embodiment of the present application;

[0070] Figure 4 A schematic diagram of a process for determining characteristic data when a current node is used as a source node in a network anomaly detection method provided in an embodiment of the present application;

[0071] Figure 5 A schematic diagram of a flow chart of determining first abnormal information when a current node is used as a source node in a network abnormality detection method provided in an embodiment of the present application;

[0072] Figure 6 A schematic diagram of a flow chart of determining second abnormality information when each node is used as a target node in a network abnormality detection method provided in an embodiment of the present application;

[0073] Figure 7 A schematic diagram of a flow chart of characteristic data when a current node is determined as a target node in a network anomaly detection method provided in an embodiment of the present application;

[0074] Figure 8 A schematic diagram of a flow chart of determining second abnormality information when a current node is used as a target node in a network abnormality detection method provided in an embodiment of the present application;

[0075] Fig. 9 A schematic diagram of an abnormality detection result provided in an embodiment of the present application;

[0076] Fig.10 A schematic diagram of a network anomaly detection device provided in an embodiment of the present application;

[0077] Fig.11 A schematic diagram of the computer device structure provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0079] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0080] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0081] First, the relevant background involved in this application is explained.

[0082] Anomaly-Based Intrusion Detection System (ABIDS) analyzes the normal operation mode of a system or network and then compares it with the actual observed behavior to detect any behavior that does not conform to the expected pattern. In implementation, anomaly-based intrusion detection systems need to detect abnormal behavior by analyzing system logs, network traffic, and other related data. Therefore, network traffic anomaly detection methods can be used to implement the functions of anomaly-based intrusion detection systems.

[0083] Existing network traffic anomaly detection methods can include statistical learning methods, traditional machine learning methods, and deep learning methods. Among them, statistical learning methods are usually based on the assumption that "normal behavior and abnormal behavior have different statistical properties", which is easily affected by changes in normal behavior and noise, resulting in a high false alarm rate. Traditional machine learning methods require manual design of features, and there is a problem of performance bottleneck caused by feature information loss or change. Therefore, deep learning methods are usually used to detect anomalies in network traffic, such as: multi-layer perceptron, convolutional neural network (CNN), recurrent neural network (RNN) and autoencoder.

[0084] In one possible implementation, a convolutional neural network can be used to extract the spatial features of network traffic, while a recurrent neural network can be used to extract the temporal features of network traffic. However, the convolutional neural network is limited in its ability to capture long-distance dependencies between pixels. At the same time, for recurrent neural networks, the intervals at which packets arrive in real network traffic are different, and the intervals at which packets arrive vary significantly depending on the type of attack. This results in the recurrent neural network only being able to extract sequence features between packets without considering temporal features. Therefore, since abnormal data is relatively scarce and difficult to obtain, collect, and annotate, this method often suffers from overfitting or poor performance in practical applications.

[0085] In another possible implementation, the existing technology can detect abnormal data of network traffic by combining long short-term memory networks and convolutional neural networks, but this method is difficult to consider the time interval between data packets in implementation, so there will be a problem of low detection accuracy. At the same time, deep learning-based methods usually need to collect and mark a large amount of network traffic data, and the collection and marking process of these data is complicated and time-consuming, and abnormal data is often scarce, which leads to high training costs for the model. In addition, the operation of this deep learning method requires high computing resources, especially in a large-scale network environment, processing all network traffic will lead to a sharp increase in computing power.

[0086] In another possible implementation, the prior art provides a network traffic anomaly detection method for monitoring link status changes and link traffic changes by establishing a BGP-LS collection channel and an SNMP or Telemetry collection channel. When tracing the source of abnormal traffic, a time series prediction model trained on a big data platform is used to generate a predicted traffic change baseline. Then, the actual traffic currently collected is compared and calculated with the predicted traffic change baseline to further analyze the abnormal traffic. If the difference between the actual traffic currently collected and the predicted traffic change baseline is less than a specified percentage, it is considered normal congestion and is handled by the traffic scheduling system. Otherwise, it is considered to be congestion for unknown reasons, and an attempt is made to associate alarm events of network anomalies. However, this network traffic anomaly detection method can only analyze network traffic anomalies, and does not take into account abnormal access behavior patterns. Therefore, it has certain limitations in practical applications.

[0087] In another possible implementation, the prior art provides a network anomaly detection method that analyzes the network connection table and constructs the host record table, performs statistics and analysis on the network behavior of the host, and determines whether the host behavior is abnormal by calculating characteristic values ​​such as source port entropy, destination port entropy, and maximum proportion, and further classifies the abnormal behavior. However, this method only considers a single feature when designing entropy, resulting in insufficient coverage of entropy. Therefore, there are certain limitations in practical applications.

[0088] In another possible implementation, the prior art also provides a network anomaly detection method, which extracts network access data under each specific domain name by analyzing the network access data set, and calculates the statistical characteristic parameters of the specified fields in the network access data. Then, based on these statistical characteristic parameters, the behavioral characteristics of the network access data are detected from different dimensions, and a multidimensional feature vector is generated to represent each network access data, so that the classification algorithm in machine learning is used to calculate the predicted class label of the network access data in the detection data set based on the multidimensional feature vector and actual class label in the training data set, and the multidimensional feature vector in the detection data set. However, this method can only detect abnormal behaviors related to domain name access, and it is necessary to analyze fields such as parameter names and parameter values, which increases the data acquisition cost and processing cost. Therefore, it still has certain limitations in practical applications.

[0089] Based on the above problems, the embodiment of the present application proposes a network anomaly detection method, which can consider the joint features in the network and realize the anomaly detection of different network behaviors of each node by expressing the network behavior data of each node in the network and performing different probability calculations according to the different network behaviors of each node. At the same time, it is not necessary to use deep learning methods for modeling, so a large amount of network traffic data is not required, and the requirements for computing resources are lower.

[0090] The network anomaly detection method of the embodiment of the present application is described in detail below in combination with multiple embodiments.

[0091] Figure 1 The flowchart of the network anomaly detection method provided in the embodiment of the present application is shown in FIG. 1 . The execution subject of the method can be any computer device with processing capability. Figure 1 As shown, the method includes:

[0092] S101. Obtain network behavior data of each node in the network to be detected within a target period of time, where the network behavior data at least includes: port usage data, protocol selection data, data volume on a preset protocol, and the number of times a node appears in data interaction.

[0093] It should be understood that the network to be detected is composed of many nodes, and each node is connected through a communication line to form a certain geometric relationship, which constitutes a computer network topology. Among them, the nodes in the network to be detected can be workstations, clients, network users or personal computers, servers, printers and other network-connected devices, such as routers, switches, gateways and firewalls. Each device with its own unique network address is a node in the computer network topology. Each node has different behaviors and functions in the network topology. For example, a router can determine the routing of a data packet based on the information of the network layer, thereby realizing data transmission; a switch can transmit a computer's signal to other computers to realize data exchange; a gateway can convert data packets of different protocols to realize communication between networks of different protocols; a firewall can block unauthorized network traffic, thereby protecting the security of the network.

[0094] Among them, each node in the network topology interacts through various protocols and standards. The interaction between each node constitutes the network behavior, and the network behavior enables each node in the network to cooperate with each other. Correspondingly, the network behavior data includes the interaction data between each node, and the interaction data between each node includes user data, control data, signaling data, synchronization data, and management data, such as: port usage data, protocol selection data, data volume on the preset protocol, the number of times the node appears in the data interaction, routing information, topology structure, connection status, clock information, various protocol messages, connection requests, error reports, device configuration information, and performance monitoring data.

[0095] Optionally, the computer device first acquires the network behavior data of each node in the network to be detected, and preprocesses the acquired network behavior data of each node, wherein the preprocessing may include steps such as integration, cleaning, sorting, padding, deduplication, correction and formatting.

[0096] Optionally, the network behavior data includes at least: port usage data, protocol selection data, data volume on the preset protocol, the number of times a node appears in data interaction, routing information, topology, connection status, clock information, various protocol messages, connection requests, error reports, device configuration information, and performance monitoring data, etc. Among them, the port usage data is used to identify the starting point and end point of data transmission, the protocol selection data is used to identify the protocol used by the current node, the data volume on the preset protocol is used to indicate the size of the data packet under the current protocol, and the number of times a node appears in data interaction is used to indicate the number of times the current node plays a role in data transmission.

[0097] Exemplarily, the computer device may define the network behavior data of each node as a structure containing multiple fields, as shown in Table (1):

[0098] Fields Format illustrate id Integer Primary Key source_ip String Source IP address source_port Integer Source port number dst_ip String Destination IP address dst_port Integer Destination port number protocol String Message Protocol

[0099] Table (1) Example of structure definition of each node

[0100] S102. Determine the first abnormal information of each node when it is a source node based on the network behavior data of each node, and determine the abnormal detection result of each node when it is a source node based on the first abnormal information, wherein the first abnormal information is used to characterize the abnormal information of each node in the dimensions of port usage, protocol selection, protocol data volume and number of interactions when it is a source node.

[0101] It should be understood that the nodes in the network to be detected can be divided into source nodes and target nodes according to the different roles they play in data transmission. Among them, the source node is the sender node of the data packet, and the network behavior data of the source node in the dimensions of port usage, protocol selection, protocol data volume and number of interactions can be analyzed to determine the first abnormal information generated when each node is the sender of data transmission. Among them, the target node is the receiver node of the data packet, and the network behavior data of the target node in the dimensions of local service and internal access can be analyzed to determine the second abnormal information generated when each node is the receiver of data transmission.

[0102] Optionally, the computer device can combine probability and grammar to model the historical network behavior data to analyze various data in the network behavior data to be tested, thereby identifying the first abnormal information of each node as a source node based on the network behavior data of each node to be tested in terms of port usage, protocol selection, protocol data volume, and number of interactions, so as to determine the abnormal detection results of each node as a source node based on a pre-set threshold. Among them, modeling in combination with probability and grammar can be achieved through models, such as Bayesian networks and directed graph models.

[0103] S103. Determine the second abnormality information of each node when it is a target node based on the network behavior data of each node, and determine the abnormality detection result of each node when it is a target node based on the second abnormality information, wherein the second abnormality information is used to characterize the abnormal information of each node in the local service and internal access dimensions when it is a target node.

[0104] Optionally, the computer device can combine probability and grammar to model the historical network behavior data to analyze various data in the network behavior data to be tested, thereby identifying the second abnormal information of each node when it is a target node based on the local service of each node to be tested and the network behavior data on the internal access dimension, so that the abnormal detection result of each node when it is a target node can be determined according to a pre-set threshold. Among them, modeling combined with probability and grammar can be achieved through models, such as Bayesian networks and directed graph models.

[0105] Exemplarily, the network behavior data can be modeled using a Bayesian network, and the conditional independence relationship and causal relationship between the target node and the source node can be described in the Bayesian network topology. Each node can represent a network behavior, which can be a source node or a target node. The nodes are connected by arcs to indicate the connection relationship between the two nodes. Each node includes at least IP address, MAC address, port number, host model, operating system type and other information to indicate the network behavior of each node.

[0106] For example, Figure 2 A logical schematic diagram of a directed graph model provided in an embodiment of the present application, wherein a computer device establishes a directed graph model and performs probability calculation in combination with historical network behavior data. Figure 2 As shown, the directed graph model can be a three-layer directed graph, wherein the first layer is the root node, representing the network range to be detected, the second layer nodes are composed of all target nodes, and the third layer nodes are composed of all source nodes. Exemplarily, the connection relationship between the second layer nodes and the third layer nodes can be expressed as <source node, target node, protocol type>. Each node includes at least information such as IP address, MAC address, port number, host model, operating system type, etc., which is used to indicate the network behavior of each node.

[0107] Exemplarily, based on the directed graph model, the computer device can perform probability modeling on the network behavior data, specifically including: probability distribution modeling of source nodes and probability distribution modeling of target nodes. The probability distribution modeling of source nodes includes:

[0108] The conditional probability distribution of the amount of data on the preset protocol P(c|S i ), is the source node S i One-dimensional probability distribution, where S i represents the i-th source node, c represents the size of the data, and the value range is 0-1000 bytes;

[0109] The joint probability distribution of the port usage data of the source node P(Dp|S i .), is the source node S iThe two-dimensional probability distribution of i . represents all ports of the source node, and Dp represents all ports of the target node, with a value range of 0-65535;

[0110] The joint probability distribution of the port usage data of the target node P(Sp|D i .), is the target node D i Two-dimensional probability distribution, where Sp represents all ports of the source node, D i .Represents all ports of the target node, with a value range of 0-65535;

[0111] The conditional probability distribution of the source node's protocol selection data P(r|S i ), is the source node S i One-dimensional probability distribution, where S i represents the i-th source node, r represents the protocol type, and the value range is 0-255;

[0112] The conditional probability distribution of source node and target node P(D|S i ), is the two-dimensional probability distribution of the source node;

[0113] The prior probability distribution of the source node is:

[0114] P(S=S i )= i Number of occurrences / total number of source node occurrences.

[0115] Among them, the probability distribution modeling of the target node includes:

[0116] The conditional probability distribution of the target node's protocol selection data P(r|D i ), is the target node D i One-dimensional probability distribution, where D i Represents the i-th target node, represents the protocol type, and the value range is 0-255;

[0117] The conditional probability distribution of the target node and the source node P(S|D i ), target node D i The two-dimensional probability distribution of ;

[0118] The prior probability distribution of the target node is:

[0119] P(D=D i )=D i Number of occurrences / total number of occurrences of the target node.

[0120] In this embodiment, by expressing the network behavior data of each node in the network, and performing probability modeling and calculation according to the different roles of each node in data transmission, it is possible to consider the joint characteristics in the network, and detect and identify the different network behavior data of each node when it is a source node and a target node respectively, so as to determine the abnormal information of each node when it is a source node and a target node respectively. At the same time, since only the network behavior data of each node needs to be detected and identified, the requirements for computing resources are lower.

[0121] Figure 3 A schematic diagram of a flow chart for determining the first abnormality information when each node is used as a source node in the network anomaly detection method provided in an embodiment of the present application.

[0122] As a possible implementation, refer to Figure 3 As shown, in the above step S102, when determining the first abnormal information of each node as a source node according to the network behavior data of each node, the following steps may be performed, specifically including:

[0123] S301. Determine characteristic data of the current node as a source node according to network behavior data of the current node, wherein the current node is any node in the network to be detected.

[0124] Optionally, the computer device determines the characteristic data of each node in the network to be tested in turn, and determines the characteristic data of the current node as a source node based on the network behavior data of the current node in the dimensions of port usage, protocol selection, protocol data volume, and number of interactions, wherein the characteristic data includes abnormal characteristics of the protocol data volume of the source node, abnormal characteristics of the port usage of the source node, abnormal characteristics of the protocol selection of the source node, and abnormal characteristics of the external requests of the source node.

[0125] S302: Determine first abnormal information when the current node is used as a source node according to feature data when the current node is used as a source node.

[0126] Optionally, the computer device determines the first abnormal information of each node in the network to be tested in turn, and performs calculations based on the characteristic data when the current node is used as the source node in the above step S301 to determine the first abnormal information when the current node is used as the source node. The first abnormal information corresponds to the abnormal characteristics of the protocol data volume of the source node, the abnormal characteristics of the port usage of the source node, the abnormal characteristics of the protocol selection of the source node, and the abnormal characteristics of the external request of the source node.

[0127] Based on the network behavior data of each node, the characteristic data of each node when it is a source node is determined separately. The first abnormal information when the current node is a source node can be determined through the characteristic data when each node is a source node, thereby detecting network anomalies when each node is a source node.

[0128] Figure 4 A schematic diagram of a flow chart for determining characteristic data when a current node is used as a source node in a network anomaly detection method provided in an embodiment of the present application.

[0129] As a possible implementation, refer to Figure 4 As shown, in the above step S301, when determining the characteristic data of the current node as a source node according to the network behavior data of the current node, the following steps may be performed, specifically including:

[0130] S401. Obtain the data volume of the current node on the preset protocol at each moment in the target time period, calculate the probability distribution information of the data volume of the current node at each moment based on the data volume of the current node on the preset protocol at each moment in the target time period, and determine the abnormal characteristics of the protocol data volume based on the probability distribution information of the data volume of the current node at each moment.

[0131] Optionally, the amount of protocol data sent by the source node usually follows certain rules and expected size ranges. If the amount of protocol data sent by the source node is abnormal in size, for example, much larger or smaller than the expected size, or the size changes abnormally, then this may be regarded as an abnormal feature. Therefore, the amount of data on the preset protocol of the current node at each moment in the target period can be obtained, and the probability distribution information of the data amount of the current node at each moment can be calculated, and the abnormal characteristics of the protocol data amount can be calculated based on the probability distribution information of the data amount of the current node at each moment, so as to use the abnormal characteristics of the protocol data amount to determine whether a low-probability event occurs in the data size of a certain node on a specific protocol.

[0132] For example, when the conditional probability distribution of the amount of data on the preset protocol is P(c|S i ), the data volume of the current node on the preset protocol at each moment in the target period can be obtained respectively as c t0 、c t1 、c t2 ,,,c tn , then the probability distribution information of the data volume of the current node at each time can be expressed as P(c t0 | i )、P(c t1 | i )、P(c t2 | i )、、、P(c tn | i), where t0, t1, t2, tn are different times. At this time, the abnormal feature of the protocol data volume Q a (i) can be expressed by the following formula (1):

[0133] Q a (i) = P(S i ) n P(c t0 | i )P(c t1 | i )P(c t2 | i )···P(c tn | i ) (1)

[0134] S402. Obtain the ports used by the current node at each time in the target time period, calculate the joint two-dimensional probability distribution information of the ports of the current node at each time according to the ports used by the current node at each time in the target time period, and determine the abnormal characteristics of port usage according to the joint two-dimensional probability distribution information of the ports of the current node at each time.

[0135] Optionally, the source node usually uses a specific port number for communication when sending data. If the port number used by the source node does not match the normal communication mode, or is significantly different from the expected port number, this may be regarded as an abnormal feature. Therefore, the port data used by the current node at each time in the target period can be obtained, and the joint two-dimensional probability distribution information of the port of the current node at each time can be calculated, and the port usage abnormality feature can be calculated based on the joint two-dimensional probability distribution information of the port of the current node at each time, so as to use the port usage abnormality feature to determine whether a low-probability event occurs in the port usage of a certain node.

[0136] For example, when the joint probability distribution of port usage data is P(Dp|S i .), the port usage data of the current node at each time in the target period can be obtained respectively as P t0 (Dp|S i .), P t1 (Dp|S i .),,,P tn (Dp|S i .), where t0, t1, tn are different times. At this time, the port uses the abnormal feature Q b (i) can be expressed by the following formula (2):

[0137] Q b (i) = P(S i ) n Pt0 (Dp|S i . )P t1 (Dp|S i . )···P tn (Dp|S i . ) (2)

[0138] S403. Obtain the protocol type used by the current node at each moment in the target time period, calculate the protocol probability distribution information of the current node at each moment according to the protocol type used by the current node at each moment in the target time period, and determine the abnormal characteristics of protocol selection according to the protocol probability distribution information of the current node at each moment.

[0139] Optionally, the source node usually selects a communication protocol when sending data, such as TCP, UDP, etc. If the communication protocol selected by the source node does not match the normal protocol selection pattern, or there is a large difference from the expected protocol selection, then this may be regarded as an abnormal feature. Therefore, the protocol type used by the current node at each moment in the target period can be obtained, and the protocol probability distribution information of the current node at each moment can be calculated, and the protocol selection abnormality feature can be calculated based on the protocol probability distribution information of the current node at each moment, so as to use the protocol selection abnormality feature to determine whether a low-probability event occurs in the mode selected by a certain node protocol.

[0140] For example, when the conditional probability distribution of the source node's protocol selection data is P(r|S i ), the protocol types used by the current node at each time in the target period can be obtained, which are P t0 (r|S i ), P t1 (r|S i ), P t2 (r|S i ),,,P tn (r|S i ), where t0, t1, tn are different moments. At this time, the protocol selects the abnormal feature Q c (i) can be expressed by the following formula (3):

[0141] Q c (i)= P(S i ) n P t0 (r|S i ) t1 (r|S i ) t2 (r|S i )···P tn (r|S i ) (3)

[0142] S404. Determine the number of data interactions in which the current node acts as a source node at each time in the target time period based on the number of times the current node appears in data interactions and the role it plays in each data interaction. Calculate the probability distribution information of external requests of the current node at each time in the target time period based on the number of data interactions in which the current node acts as a source node at each time in the target time period. Determine the abnormal characteristics of external requests based on the probability distribution information of external requests of the current node at each time.

[0143] Optionally, the source node usually sends a request to the outside and obtains a response in an expected manner. If the source node has an abnormality when sending a request, such as an abnormal request URL, too high a request frequency, or abnormal request content, these features can be regarded as abnormal features. Therefore, based on the number of times the current node appears in data interaction and the role it plays in each data interaction, the number of data interactions of the current node as a source node at each moment in the target period can be determined, and then based on the number of data interactions of the current node as a source node at each moment in the target period, the probability distribution information of the current node's external requests at each moment is calculated, and the abnormal features of the external requests are calculated, so as to use the abnormal features of the external requests to determine whether a low-probability event occurs in the external request pattern of a certain node.

[0144] For example, an external request for abnormal feature Q e (i) can be expressed by the following formula (4):

[0145] Q e (i) = P(S i ) n P(D=D t0 | i )P(D=D t1 | i )···P(D=D tn | i ) (4)

[0146] Figure 5 A schematic diagram of a flow chart for determining first abnormality information when a current node is used as a source node in a network anomaly detection method provided in an embodiment of the present application.

[0147] As a possible implementation, refer to Figure 5 As shown, in the above step S302, when determining the first abnormal information when the current node is used as the source node according to the characteristic data when the current node is used as the source node, the following steps can be performed, specifically including:

[0148] S501. Determine a protocol anomaly index when the current node is used as a source node according to an abnormal feature of the protocol data volume.

[0149] Optionally, the computer device may calculate a protocol anomaly index when the current node is used as a source node based on an abnormal feature of the protocol data volume.

[0150] Exemplarily, the protocol anomaly indicator I when the current node is used as the source node a (i) can be expressed by the following formula (5):

[0151] I a (i) = xp(- a 9i) 2 )(5)

[0152] Exemplarily, the protocol anomaly indicator I when the current node is used as the source node a (i) can be expressed by the following formula (6):

[0153] I a (i) = -log2Q a (i) (6)

[0154] S502: Determine a port abnormality index when the current node is used as a source node according to the abnormal port usage characteristics.

[0155] Optionally, the computer device may calculate a port anomaly index when the current node is used as a source node according to the port usage anomaly feature.

[0156] Exemplarily, the protocol anomaly indicator I when the current node is used as the source node b (i) can be expressed by the following formula (7):

[0157] I b (i) = xp(- b (i) 2 )(7)

[0158] Exemplarily, the protocol anomaly indicator I when the current node is used as the source node b (i) can be expressed by the following formula (8):

[0159] I b (i) = -log2Q b (i) (8)

[0160] S503: Determine a protocol selection anomaly index when the current node is used as a source node according to the protocol selection anomaly feature.

[0161] Optionally, the computer device may calculate a protocol selection anomaly index when the current node is used as a source node based on the protocol selection anomaly feature.

[0162] Exemplarily, the protocol selection abnormality indicator I when the current node is used as the source node c(i) can be expressed by the following formula (9):

[0163] I c (i) = xp(- c (i) 2 )(9)

[0164] Exemplarily, the protocol selection abnormality indicator I when the current node is used as the source node c (i) can be expressed by the following formula (10):

[0165] I c (i) = -log2Q c (i) (10)

[0166] S504: Determine an outbound request abnormality index when the current node is used as a source node according to the outbound request abnormality feature.

[0167] Optionally, the computer device may calculate an outbound request abnormality index when the current node is used as a source node based on the outbound request abnormality characteristics.

[0168] Exemplarily, the external request abnormality indicator I when the current node is used as the source node e (i) can be expressed by the following formula (11):

[0169] I e (i) = xp(- e (i) 2 )(11)

[0170] Exemplarily, the external request abnormality indicator I when the current node is used as the source node e (i) can be expressed by the following formula (12):

[0171] I e (i) = -log2Q e (i) (12)

[0172] S505: Use the protocol abnormality indicator, the port abnormality indicator, the protocol selection abnormality indicator, and the external request abnormality indicator as the first abnormality information.

[0173] Optionally, the computer device converts the above-mentioned protocol abnormality indicator I a (i) Protocol Abnormality Index I b (i) Protocol selection abnormal index I c (i) and external request abnormality indicator I e (i) As the first abnormal information.

[0174] Figure 6A schematic diagram of a flow chart for determining second abnormality information when each node is used as a target node in the network anomaly detection method provided in an embodiment of the present application.

[0175] As a possible implementation, refer to Figure 6 As shown, in the above step S103, when determining the second abnormal information of each node as a target node according to the network behavior data of each node, the following steps may be performed, specifically including:

[0176] S601. Determine characteristic data of the current node as a target node according to network behavior data of the current node, wherein the current node is any node in the network to be detected.

[0177] Optionally, the computer device determines the characteristic data of each node in the network to be tested in turn, and determines the characteristic data of the current node when it is a target node based on the network behavior data of the current node in the local service and internal access dimensions, wherein the characteristic data includes the local service abnormality characteristics and internal access abnormality characteristics of the target node.

[0178] S602: Determine second abnormal information when the current node is used as a target node according to feature data when the current node is used as a target node.

[0179] Optionally, the computer device determines the second abnormal information of each node in the network to be tested in turn, and calculates according to the characteristic data of the current node as the target node in the above step S601 to determine the second abnormal information when the current node is the target node. The second abnormal information corresponds to the local service abnormality feature and the internal access abnormality feature of the target node respectively.

[0180] According to the network behavior data of each node, the characteristic data of each node when it is a target node is determined respectively. The second abnormal information when the current node is a target node can be determined through the characteristic data when each node is a target node, thereby detecting the network abnormality when each node is a target node.

[0181] Figure 7 A flowchart of characteristic data when the current node is determined as the target node in the network anomaly detection method provided in an embodiment of the present application.

[0182] As a possible implementation, refer to Figure 7 As shown, in the above step S601, when determining the characteristic data of the current node as the target node according to the network behavior data of the current node, the following steps may be performed, specifically including:

[0183] S701. Obtain the protocol type used by the current node at each moment in the target time period, calculate the local service probability distribution information of the current node at each moment according to the protocol type used by the current node at each moment in the target time period, and determine the local service abnormality characteristics according to the local service probability distribution information of the current node at each moment.

[0184] Optionally, when providing local services, the target node usually responds to requests from the source node and provides services in the expected manner. If the target node encounters an abnormality when providing services, such as a long response time, service crash, or abnormal response content, these features can be regarded as abnormal features. Therefore, the protocol type used by the current node at each moment in the target period can be obtained, and the local service probability distribution information of the current node at each moment can be calculated, and the local service abnormality feature can be calculated based on the local service probability distribution information of the current node at each moment, so as to use the local service abnormality feature to determine whether a low-probability event occurs in the service provided by a certain node to the outside.

[0185] For example, when the conditional probability distribution of the protocol selection data of the target node is P(r|D i ), the protocol types used by the current node at each time in the target period can be obtained, which are P t0 (r|D i ), P t1 (r|D i ), P t2 (r|D i ),,,P tn (r|D i ), where t0, t1, tn are different times. At this time, the local service abnormality feature Q d (i) can be expressed by the following formula (13):

[0186] Q d (i)= P(S i ) n P t0 (r|D i ) t1 (r|D I ) t2 (r|D i )···P (n (r|D i ) (13)

[0187] S702. Determine the number of data interactions in which the current node acts as a target node at each time point in the target time period based on the number of times the current node appears in data interactions and the role it plays in each data interaction. Calculate the internal access probability distribution information of the current node at each time point based on the number of data interactions in which the current node acts as a target node at each time point in the target time period. Determine abnormal characteristics of internal access based on the internal access probability distribution information of the current node at each time point.

[0188] Optionally, the target node usually accepts access requests from the outside and processes them in the expected manner. If the target node has an abnormality when accepting access, such as an abnormal external IP address, too high access frequency, or abnormal access content, then these features can be regarded as abnormal features. Therefore, based on the number of times the current node appears in data interaction and the role it plays in each data interaction, the number of data interactions of the current node as a target node at each time in the target period can be determined, and then based on the number of data interactions of the current node as a target node at each time in the target period, the internal access probability distribution information of the current node at each time is calculated, and the internal access abnormality features are calculated, so as to use the internal access abnormality features to determine whether a low-probability event occurs when a node accesses the intranet.

[0189] For example, the internal access abnormal feature Q f (i) can be expressed by the following formula (14):

[0190] Q f (i) = P(D i ) n P(S=S t0 | i )P(S=S t1 | i )···P(S=S tn | i ) (14)

[0191] Figure 8 A flowchart of determining second abnormality information when a current node is used as a target node in a network anomaly detection method provided in an embodiment of the present application.

[0192] As a possible implementation, refer to Figure 8 As shown, in the above step S602, when determining the second abnormal information when the current node is used as the target node according to the characteristic data when the current node is used as the target node, the following steps may be performed, specifically including:

[0193] S801. Determine a local service anomaly index when the current node is used as a target node according to local service anomaly characteristics.

[0194] Optionally, the computer device may calculate, based on the local service anomaly feature, a local service anomaly index when the current node is used as a source node.

[0195] Exemplarily, the local service abnormality indicator I when the current node is used as the target node d (i) can be expressed by the following formula (15):

[0196] I d (i) = xp(- d (i) 2 )(15)

[0197] Exemplarily, the local service abnormality indicator I when the current node is used as the target node d (i) can be expressed by the following formula (16):

[0198] I d (i) = -log2Q d (i) (16)

[0199] S802: Determine an internal access anomaly index when the current node is used as a target node according to the internal access anomaly feature.

[0200] Optionally, the computer device may calculate, based on the internal access abnormality feature, an internal access abnormality index when the current node is used as a source node.

[0201] Exemplarily, when the current node is used as the target node, the internal access abnormality indicator I f (i) can be expressed by the following formula (17):

[0202] I f (i) = exp(- f (i) 2 )(17)

[0203] Exemplarily, when the current node is used as the target node, the internal access abnormality indicator I f (i) can be expressed by the following formula (18):

[0204] I f (i) = -log2Q f (i) (18)

[0205] S803: Use the local service abnormality indicator and the internal access abnormality indicator as the second abnormality information.

[0206] Optionally, the computer device sends the above local service abnormality indicator I d (i) and internal access abnormality indicator I f (i) As the first abnormal information.

[0207] In a possible implementation, after executing the above steps S102-S103, the first abnormal information and the second abnormal information in the network to be detected can be obtained, and the computer device can judge the first abnormal information and the second abnormal information respectively according to a pre-set threshold value, so as to determine the abnormal detection result of the network to be detected.

[0208] For example, if there are m nodes to be queried, then the sum of the above information can be used. Whether it is greater than the threshold is used to determine whether there is an abnormal node among the m nodes.

[0209] For example, the threshold value may be “the mean value of the corresponding dimension in the training data set plus 1 times the variance”, for example, a The threshold is set to

[0210] Fig. 9 A schematic diagram of an abnormality detection result provided in an embodiment of the present application.

[0211] For example, take time windows n = 1s, 2s, and 3s respectively to perform anomaly detection, refer to Fig. 9 As shown, by executing the network anomaly detection method provided in the embodiment of the present application, the following table (2) and Fig. 9 Anomaly detection results shown.

[0212]

[0213]

[0214] Table (2) Example of anomaly detection results

[0215] Based on the same inventive concept, a network anomaly detection device corresponding to the network anomaly detection method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned network anomaly detection method in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0216] Reference Fig.10 , which is a schematic diagram of a network anomaly detection device provided in an embodiment of the present application, the device includes: an acquisition module 1001, a first determination module 1002, and a second determination module 1003; wherein,

[0217] The acquisition module 1001 is used to acquire the network behavior data of each node in the network to be detected within the target period, wherein the network behavior data at least includes: port usage data, protocol selection data, data volume on the preset protocol, and the number of times the node appears in the data interaction;

[0218] A first determination module 1002 is used to determine, based on the network behavior data of each node, first abnormal information when each node is used as a source node, and determine, based on the first abnormal information, an abnormal detection result when each node is used as a source node, wherein the first abnormal information is used to characterize abnormal information in terms of port usage, protocol selection, protocol data volume, and number of interactions when each node is used as a source node;

[0219] The second determination module 1003 is used to determine the second abnormality information of each node when it is a target node based on the network behavior data of each node, and determine the abnormality detection result of each node when it is a target node based on the second abnormality information, wherein the second abnormality information is used to characterize the abnormal information of each node in the local service and internal access dimensions when it is a target node.

[0220] As a possible implementation manner, the first determining module 1002 is specifically configured to:

[0221] Determine, according to the network behavior data of the current node, feature data when the current node is used as a source node, wherein the current node is any node in the network to be detected;

[0222] According to the characteristic data when the current node is used as a source node, first abnormal information when the current node is used as a source node is determined.

[0223] As a possible implementation manner, the first determining module 1002 is specifically configured to:

[0224] Obtaining the data volume of the current node on the preset protocol at each moment in the target time period, calculating the probability distribution information of the data volume of the current node at each moment according to the data volume of the current node on the preset protocol at each moment in the target time period, and determining the abnormal characteristics of the protocol data volume according to the probability distribution information of the data volume of the current node at each moment;

[0225] Acquire the ports used by the current node at each time in the target time period, calculate the joint two-dimensional probability distribution information of the ports of the current node at each time according to the ports used by the current node at each time in the target time period, and determine the abnormal port usage feature according to the joint two-dimensional probability distribution information of the ports of the current node at each time;

[0226] Acquire the protocol type used by the current node at each time in the target time period, calculate the protocol probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the protocol selection abnormality feature according to the protocol probability distribution information of the current node at each time;

[0227] According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node acts as a source node at each moment in the target time period is determined; according to the number of data interactions in which the current node acts as a source node at each moment in the target time period, the probability distribution information of external requests of the current node at each moment is calculated; and according to the probability distribution information of external requests of the current node at each moment, the abnormal characteristics of external requests are determined.

[0228] As a possible implementation manner, the first determining module 1002 is specifically configured to:

[0229] Determining a protocol anomaly indicator when the current node is used as a source node according to the protocol data volume anomaly feature;

[0230] Determining a port abnormality index when the current node is used as a source node according to the abnormal port usage characteristics;

[0231] Determining a protocol selection anomaly indicator when the current node is used as a source node according to the protocol selection anomaly feature;

[0232] Determine, according to the abnormal characteristics of the external request, an abnormal index of the external request when the current node is used as a source node;

[0233] The protocol abnormality indicator, the port abnormality indicator, the protocol selection abnormality indicator and the external request abnormality indicator are used as the first abnormality information.

[0234] As a possible implementation manner, the second determining module 1003 is specifically configured to:

[0235] Determine, according to the network behavior data of the current node, the characteristic data of the current node when it is used as a target node, wherein the current node is any node in the network to be detected;

[0236] According to the characteristic data when the current node is used as the target node, second abnormal information when the current node is used as the target node is determined.

[0237] As a possible implementation manner, the second determining module 1003 is specifically configured to:

[0238] Acquire the protocol type used by the current node at each time in the target time period, calculate the local service probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the local service abnormality feature according to the local service probability distribution information of the current node at each time;

[0239] According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node serves as a target node at each moment in the target time period is determined; according to the number of data interactions in which the current node serves as a target node at each moment in the target time period, the internal access probability distribution information of the current node at each moment is calculated; and according to the internal access probability distribution information of the current node at each moment, the abnormal characteristics of internal access are determined.

[0240] As a possible implementation manner, the second determining module 1003 is specifically configured to:

[0241] Determining, according to the local service abnormality feature, a local service abnormality indicator when the current node is used as a target node;

[0242] Determining, according to the internal access abnormality feature, an internal access abnormality index when the current node is used as a target node;

[0243] The local service abnormality indicator and the internal access abnormality indicator are used as the second abnormality information.

[0244] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0245] The present application embodiment also provides a computer device 1100, such as Fig.11 1 is a schematic diagram of the computer device structure provided in an embodiment of the present application, including: a processor 1101, a memory 1102, and optionally, a bus 1103. The memory 1102 stores machine-readable instructions executable by the processor 1101 (for example, Fig.10 The device acquires the execution instructions corresponding to the module 1001, the first determination module 1002 and the second determination module 1003, etc.), when the computer device 1100 is running, the processor 1101 communicates with the memory 1102 through the bus 1103, and when the machine-readable instructions are executed by the processor 1101, the steps of the above-mentioned network anomaly detection method are performed.

[0246] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned network anomaly detection method are executed.

[0247] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0248] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program code.

[0249] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.

Claims

1. A network anomaly detection method, characterized in that: include: Obtaining network behavior data of each node in the network to be detected within a target period of time, wherein the network behavior data at least includes: port usage data, protocol selection data, data volume on a preset protocol, and the number of times a node appears in data interaction; Determine, according to the network behavior data of each node, first abnormal information when each node is used as a source node, and determine, according to the first abnormal information, an abnormal detection result when each node is used as a source node, wherein the first abnormal information is used to characterize abnormal information in terms of port usage, protocol selection, protocol data volume, and number of interactions when each node is used as a source node; Determine, according to the network behavior data of each node, second abnormal information when each node is a target node, and determine, according to the second abnormal information, an abnormal detection result when each node is a target node, wherein the second abnormal information is used to characterize abnormal information in the local service and internal access dimensions of each node when it is a target node; The determining, based on the network behavior data of each node, the second abnormal information when each node is used as a target node includes: Determine, according to the network behavior data of the current node, the characteristic data of the current node when it is used as a target node, wherein the current node is any node in the network to be detected; Determining second abnormal information when the current node is used as the target node according to the characteristic data when the current node is used as the target node; The determining, based on the network behavior data of the current node, the characteristic data of the current node when serving as the target node includes: Acquire the protocol type used by the current node at each time in the target time period, calculate the local service probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the local service abnormality feature according to the local service probability distribution information of the current node at each time; According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node serves as a target node at each moment in the target time period is determined; according to the number of data interactions in which the current node serves as a target node at each moment in the target time period, the internal access probability distribution information of the current node at each moment is calculated; and according to the internal access probability distribution information of the current node at each moment, the abnormal characteristics of internal access are determined.

2. The network anomaly detection method according to claim 1, characterized in that: The determining, based on the network behavior data of each node, first abnormal information when each node is used as a source node includes: Determine, according to the network behavior data of the current node, feature data when the current node is used as a source node, wherein the current node is any node in the network to be detected; According to the characteristic data when the current node is used as a source node, first abnormal information when the current node is used as a source node is determined.

3. The network anomaly detection method according to claim 2, characterized in that: The determining, based on the network behavior data of the current node, characteristic data when the current node is used as a source node includes: Obtaining the data volume of the current node on the preset protocol at each moment in the target time period, calculating the probability distribution information of the data volume of the current node at each moment according to the data volume of the current node on the preset protocol at each moment in the target time period, and determining the abnormal characteristics of the protocol data volume according to the probability distribution information of the data volume of the current node at each moment; Acquire the ports used by the current node at each time in the target time period, calculate the joint two-dimensional probability distribution information of the ports of the current node at each time according to the ports used by the current node at each time in the target time period, and determine the abnormal port usage feature according to the joint two-dimensional probability distribution information of the ports of the current node at each time; Acquire the protocol type used by the current node at each time in the target time period, calculate the protocol probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the protocol selection abnormality feature according to the protocol probability distribution information of the current node at each time; According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node acts as a source node at each moment in the target time period is determined; according to the number of data interactions in which the current node acts as a source node at each moment in the target time period, the probability distribution information of external requests of the current node at each moment is calculated; and according to the probability distribution information of external requests of the current node at each moment, the abnormal characteristics of external requests are determined.

4. The network anomaly detection method according to claim 3, characterized in that: The determining, according to the characteristic data when the current node is used as a source node, first abnormal information when the current node is used as a source node includes: Determining a protocol anomaly indicator when the current node is used as a source node according to the protocol data volume anomaly feature; Determining a port abnormality index when the current node is used as a source node according to the abnormal port usage characteristics; Determining a protocol selection anomaly indicator when the current node is used as a source node according to the protocol selection anomaly feature; Determine, according to the abnormal characteristics of the external request, an abnormal index of the external request when the current node is used as a source node; The protocol abnormality indicator, the port abnormality indicator, the protocol selection abnormality indicator and the external request abnormality indicator are used as the first abnormality information.

5. The network anomaly detection method according to claim 1, characterized in that: The determining, according to the characteristic data when the current node is used as the target node, second abnormal information when the current node is used as the target node includes: Determining, according to the local service abnormality feature, a local service abnormality indicator when the current node is used as a target node; Determining, according to the internal access abnormality feature, an internal access abnormality index when the current node is used as a target node; The local service abnormality indicator and the internal access abnormality indicator are used as the second abnormality information.

6. A network anomaly detection device, characterized in that: include: An acquisition module is used to acquire network behavior data of each node in the network to be detected within a target period of time, wherein the network behavior data at least includes: port usage data, protocol selection data, data volume on a preset protocol, and the number of times a node appears in data interaction; A first determination module is used to determine, based on the network behavior data of each node, first abnormal information when each node is used as a source node, and determine, based on the first abnormal information, an abnormal detection result when each node is used as a source node, wherein the first abnormal information is used to characterize abnormal information in terms of port usage, protocol selection, protocol data volume, and number of interactions when each node is used as a source node; A second determination module is used to determine, based on the network behavior data of each node, second abnormality information when each node is a target node, and determine, based on the second abnormality information, an abnormality detection result when each node is a target node, wherein the second abnormality information is used to characterize abnormal information in the local service and internal access dimensions of each node when it is a target node; The second determining module is specifically used to: Determine, according to the network behavior data of the current node, the characteristic data of the current node when it is used as a target node, wherein the current node is any node in the network to be detected; Determining second abnormal information when the current node is used as the target node according to the characteristic data when the current node is used as the target node; The second determining module is specifically used to: Acquire the protocol type used by the current node at each time in the target time period, calculate the local service probability distribution information of the current node at each time according to the protocol type used by the current node at each time in the target time period, and determine the local service abnormality feature according to the local service probability distribution information of the current node at each time; According to the number of times the current node appears in data interaction and the role in each data interaction, the number of data interactions in which the current node serves as a target node at each moment in the target time period is determined; according to the number of data interactions in which the current node serves as a target node at each moment in the target time period, the internal access probability distribution information of the current node at each moment is calculated; and according to the internal access probability distribution information of the current node at each moment, the abnormal characteristics of internal access are determined.

7. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor executes the machine-readable instructions to perform the steps of the network anomaly detection method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the network anomaly detection method according to any one of claims 1 to 5 are executed.