A method, device, medium, and product for intelligent analysis of industrial internet attack behavior by integrating logs and traffic.
By integrating communication traffic and device log data from the Industrial Internet and using a graph attention network model to reconstruct attack behavior, the problem of insufficient identification capability of a single data source in traditional methods is solved, achieving high-precision attack detection and tracing.
Patent Information
- Application Number
- CN202611250658.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-18
- Publication Date
- 2026-11-10
AI Technical Summary
Traditional attack detection methods based on single-dimensional data struggle to identify diverse industrial internet attack behaviors, especially in cloud-edge-device collaborative systems where network logs and traffic data are difficult to accurately identify and reconstruct using isolated features.
By acquiring communication traffic data and device log data from the target network, traffic feature vectors and log feature vectors are extracted respectively, fused and then input into the anomaly detection model. The model is then trained using a graph attention network to reconstruct the attack behavior.
It improves the accuracy of network attack detection and attack tracing capabilities, effectively identifies a variety of complex attack behaviors, and is suitable for resource-constrained and protocol-heterogeneous environments.
Smart Images

Figure CN123074785A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network security technology, and in particular to an intelligent analysis method, device, medium and product for industrial internet attack behavior that integrates logs and traffic. Background Technology
[0002] With the increasing complexity of network environments, traditional attack detection methods based on single-dimensional data struggle to effectively identify diverse attack behaviors, especially in cloud-edge-device collaborative systems. Attacks related to industrial control systems, identifier resolution systems, and industrial cloud platforms, such as unauthorized commands, ransomware, data tampering, and man-in-the-middle attacks, exhibit varied behaviors in network logs and traffic data, making accurate identification and reconstruction through isolated features difficult. Therefore, integrating multi-source data and multi-dimensional features for joint analysis has become a key means to improve detection accuracy and attack attribution capabilities. Summary of the Invention
[0003] The purpose of this application is to provide an intelligent analysis method, device, medium, and product for industrial internet attack behavior that integrates logs and traffic, so as to improve the accuracy of network attack detection and the ability to trace the source of attacks.
[0004] To achieve the above objectives, this application provides the following solution.
[0005] Firstly, this application provides an intelligent analysis method for industrial internet attack behavior that integrates logs and traffic, including: Acquire communication traffic data and device log data of the target network; Feature extraction is performed on the communication traffic data and the device log data respectively to obtain the traffic feature vectors of different nodes in the target network and the log feature vectors of different log records; The traffic feature vectors of different nodes and the log feature vectors of different log records are fused to obtain the fused feature vector of each node. The fused feature vectors of each node are input into the anomaly detection model to obtain the anomaly detection results for each node; the anomaly detection model is obtained by training a graph attention network. Attack behavior is reconstructed based on the anomaly detection results of each node, and the attack behavior reconstruction results are obtained.
[0006] Optionally, feature extraction is performed on the communication traffic data and the device log data respectively to obtain traffic feature vectors for different nodes and log feature vectors for different log records, specifically including: Traffic feature vectors of different nodes are extracted from the communication traffic data; the traffic feature vectors include one or more of the following: source IP, destination IP, source port, destination port, protocol number, packet size, TCP flag, connection duration, average load, packet length, idle time, device address, function code, and data field; Extract log feature vectors for different log records from the device log data; the log feature vectors include one or more of the following: source IP, destination IP, source port, destination port, timestamp, module number, PID, function code, event level, operation type, application type, and alarm reason.
[0007] Optionally, the traffic feature vectors of different nodes and the log feature vectors of different log records are fused to obtain the fused feature vectors of each node, specifically including: A dynamic time warping algorithm is used to align the timestamps of the traffic feature vector and the log feature vector to obtain the time alignment relationship between the traffic feature vector and the log feature vector. Based on the common features in the traffic feature vector and the log feature vector, a mapping relationship is constructed between the traffic feature vector and the log feature vector. The mutual information algorithm is used to estimate the overall similarity between different log feature vectors; Log feature vectors with a comprehensive similarity greater than a similarity threshold are aggregated to obtain aggregated log feature vectors; Based on the time alignment relationship and the mapping relationship, the traffic feature vector of each node is concatenated with the aggregated log feature vector or the unaggregated log feature vector to form the fused feature vector of each node.
[0008] Optionally, the formula for calculating the comprehensive similarity is: ; ; in, The weight value of the k-th log feature. The k-th log feature in the log feature vector X The k-th log feature in the log feature vector Y Normalized mutual information, The k-th log feature in the log feature vector X The k-th log feature in the log feature vector Y mutual information, for Information entropy for Information entropy.
[0009] Optionally, the weight values of each log feature are calculated using the following formula: ; ; in, This represents the number of times the k-th log feature appears within the time window T. This represents the number of times each log feature appears within the time window T. Let k be the average occurrence interval of the log feature. For contextual comprehensive coefficient, Let be the normalized frequency of the k-th log feature. , This is the threshold filtering function. , These are the high confidence threshold and the low confidence threshold, respectively.
[0010] Optionally, the formula for aggregating log feature vectors with a comprehensive similarity greater than a similarity threshold is: ; in, This is the aggregated log feature vector. The weights of the r-th associated log feature vector, Let R be the r-th associated log feature vector, where R is the number of associated log records; the associated log feature vectors are log feature vectors with a comprehensive similarity greater than the similarity threshold.
[0011] Optionally, attack behavior reconstruction is performed based on the anomaly detection results of each node to obtain attack behavior reconstruction results, specifically including: Nodes whose anomaly detection results indicate abnormal traffic or abnormal events are identified as attack target nodes; Set the target node of the attack as the endpoint; Based on the traffic records and log records flowing into the endpoint within the attack event window, a spatiotemporal correlation graph of the endpoint is constructed. Set the source node of each directed edge in the spatiotemporal correlation graph as the endpoint, and return to the step of "constructing the spatiotemporal correlation graph of the endpoint based on the traffic records and log records flowing into the endpoint within the attack event window" until the termination condition is met, and output the total spatiotemporal correlation graph; the termination condition is that the source node belongs to the external public network and the log records flowing into the source node cannot be obtained, or the source node belongs to the baseline of a confirmed normal communicable device, or the tracing depth exceeds the preset maximum number of hops; Based on the overall spatiotemporal correlation graph, multiple attack paths are generated; Multiple attack paths are merged and deduplicated to obtain the merged and deduplicated attack paths as the result of attack behavior reconstruction.
[0012] Secondly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned intelligent analysis method for industrial internet attack behavior by integrating logs and traffic.
[0013] Thirdly, this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the aforementioned intelligent analysis method for industrial internet attack behavior that integrates logs and traffic.
[0014] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the aforementioned intelligent analysis method for industrial internet attack behavior by fusing logs and traffic.
[0015] According to the specific embodiments provided in this application, this application has the following technical effects.
[0016] This application provides an intelligent analysis method, device, medium, and product for industrial internet attack behavior by fusing logs and traffic. First, features are extracted from communication traffic data and device log data to obtain traffic feature vectors of different nodes in the target network and log feature vectors of different log records. The traffic feature vectors of different nodes and the log feature vectors of different log records are then fused to obtain a fused feature vector for each node. Next, the fused feature vectors of each node are input into an anomaly detection model to obtain anomaly detection results for each node. Finally, attack behavior is reconstructed based on the anomaly detection results for each node to obtain the reconstructed attack behavior results. This application overcomes the missed detection problem caused by a single data source in traditional methods by simultaneously analyzing logs and traffic features, thereby improving the accuracy of network attack detection and the ability to trace attack sources. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating an intelligent analysis method for industrial internet attack behavior that integrates logs and traffic data, provided as an embodiment of this application.
[0019] Figure 2This is a schematic diagram illustrating the specific implementation process of an intelligent analysis method for industrial internet attack behavior that integrates logs and traffic, provided as an embodiment of this application.
[0020] Figure 3 This is a schematic diagram of the structure of an intelligent analysis device for industrial internet attack behavior that integrates logs and traffic, provided as an embodiment of this application.
[0021] Figure 4 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] In one exemplary embodiment, an intelligent analysis method for industrial internet attack behavior that integrates logs and traffic is provided, such as... Figure 1 As shown, it includes the following steps 101-105.
[0025] Step 101: Obtain communication traffic data and device log data of the target network; Step 102: Extract features from the communication traffic data and the device log data respectively to obtain traffic feature vectors of different nodes in the target network and log feature vectors of different log records; Step 103: Fuse the traffic feature vectors of different nodes and the log feature vectors of different log records to obtain the fused feature vectors of each node. Step 104: Input the fused feature vectors of each node into the anomaly detection model to obtain the anomaly detection results of each node; the anomaly detection model is obtained by training a graph attention network. Step 105: Reconstruct the attack behavior based on the anomaly detection results of each node to obtain the attack behavior reconstruction results.
[0026] Steps 101-105 above, by simultaneously analyzing logs and traffic characteristics, overcome the missed detection problem caused by the single data source in traditional methods, thus improving the accuracy of network attack detection and the ability to trace the source of attacks. Furthermore, step 105 above realizes the reconstruction of attack behavior from traffic data and log data, which can effectively detect abnormal behavior from the network level and device level, and identify industrial Internet attack behavior.
[0027] The intelligent analysis method for industrial internet attack behavior based on log and traffic fusion provided in the above embodiments is applicable to detecting various network attack types related to industrial control systems, identifier resolution systems, and industrial cloud platforms, covering complex attack behaviors such as unauthorized command injection, ransomware propagation, critical data tampering, and man-in-the-middle attacks. By fusing multi-dimensional feature information from logs and traffic, and combining it with a graph attention neural network model to model attack correlations between nodes, the method achieves the identification of attack behaviors. This method can extract abnormal behavior features in the industrial internet and maintains good detection performance even in environments with limited equipment resources, heterogeneous protocols, or high real-time requirements. It also supports customized attack category expansion to meet the security monitoring needs of different industrial internet scenarios.
[0028] In another exemplary embodiment, the intelligent analysis method for industrial internet attack behavior based on log and traffic fusion provided in the above embodiments, applied to the industrial internet field, can also be applied to important fields such as the internet, the Internet of Things, and the Internet of Vehicles. See also Figure 2 This is a schematic diagram of the structure of an intelligent analysis device for industrial internet attack behavior that integrates logs and traffic, provided in this application example. It is intended as an example and not a limitation. The method may include the following steps: S1. Obtain real-time network communication traffic data from the bypass mirror port of the aggregation switch, and synchronously collect log records generated by industrial equipment.
[0029] The above-mentioned S1 is used to complete network traffic and log collection. Specifically, DPDK technology is used to obtain real-time communication traffic data from the bypass mirror port of the aggregation switch. Synchronous collection includes log records generated by industrial devices such as programmable logic controllers, industrial edge gateways, industrial switches, industrial firewalls, and industrial cloud WAFs. The log records cover logical operations, network access, access control, error messages, security events, etc. This step can assist in subsequent analysis and judgment of network behavior. Throughout the log transmission process, the national cryptographic algorithm SM2 is used for encrypted transmission.
[0030] S2. Parse and extract fields from the collected network traffic and device logs, and store them as traffic features and log features.
[0031] The above-mentioned S2 is used for flow and device feature extraction.
[0032] In one possible implementation, traffic characteristics are extracted from network traffic, including but not limited to source / destination IP, port, protocol type, load, time interval, TCP flags, duration, packet length, idle time, device address, function code, and data fields.
[0033] In one possible implementation, log features are extracted from device logs, including but not limited to IP address, timestamp, module number, PID, function code, event level, operation type, application type, and alarm reason. This step provides crucial input for subsequent feature fusion.
[0034] S3. Perform log and traffic data fusion mapping based on time and feature values.
[0035] The above-mentioned S3 is used for traffic and log feature fusion analysis. Specifically, feature fusion can be understood as a fusion mapping of log and traffic data based on time and feature values. The fusion mapping aligns traffic features and log features based on timestamps and overlapping attributes. This process realizes unified data modeling of cross-source information, providing a data foundation for subsequent anomaly detection and behavior recognition in the model.
[0036] It should be noted that the rules for feature fusion may be the same or different in different business scenarios.
[0037] In one possible implementation, considering that timestamps may be out of sync, delayed, or out of order in real-world network environments, a time-alignment method is adopted based on timestamps to align the characteristics of logs and traffic. A dynamic time warping algorithm is introduced to align the time series, thereby improving the accuracy of cross-source data time matching.
[0038] In one possible implementation, the intrinsic correlation between logs and traffic is mined by analyzing key mapping relationships (such as IP addresses, port numbers, connection durations, etc.). Furthermore, based on time alignment and semantic mapping, a unified vector representation of fused features is constructed, transforming multi-source heterogeneous datasets into a 110-dimensional joint feature vector for accurately representing network behavior characteristics.
[0039] S4. Use the fused feature vectors to train the graph attention network anomaly detection model, and introduce a normalized exponential function for classification prediction.
[0040] The S4 mentioned above is used for abnormal behavior modeling and detection. Specifically, the fused feature vectors are used to train the graph attention network anomaly detection model, and a normalized exponential function is introduced for classification prediction.
[0041] In one possible implementation, graph attention networks predict various attack types by calculating the activation probabilities of hidden layers.
[0042] In one possible implementation, the output probabilities of various behaviors are combined to achieve real-time determination of network status, output whether it is abnormal, and provide attack type prediction results.
[0043] The graph attention network anomaly detection model provided in this embodiment not only focuses on abnormal behavior but also incorporates normal behavior features, thereby improving the overall detection accuracy.
[0044] S5. When the graph attention network anomaly detection model detects abnormal behavior in the current business environment, it reconstructs the attack behavior by combining the context information of the logs.
[0045] The aforementioned S5 is used for attack reconstruction and policy response. Specifically, when the graph attention network anomaly detection model detects abnormal behavior in the current business environment, it reconstructs the attack behavior by combining the context information from the logs. Furthermore, the fusion policy module uses the reconstructed attack behavior results to trigger a defense response, enabling real-time handling of the attack. This step effectively improves the intelligent response capability and overall security of the network defense system.
[0046] In S1-S5 above, DPDK traffic acquisition technology deployed on edge devices is used to collect network traffic data in real time and extract key traffic features, including five-tuple information, timestamps, payload length, and session duration, to comprehensively describe communication behavior characteristics. Security log information is simultaneously collected from at least one network device among programmable logic controllers, edge gateways, industrial switches, and industrial firewalls, and log feature processing and aggregation are performed. During the collection of traffic data and security logs, the national cryptographic algorithm SM2 is used to encrypt the raw data during transmission to ensure data security and integrity. To address potential delays or out-of-order issues in the time dimension between log data and traffic data, a dynamic time warping algorithm is introduced to align the time series when establishing the time overlap model and feature correspondence, uncovering potential cross-source data correlations. The attack behavior process is reconstructed based on the fused data, and a graph neural network model is used to identify attack patterns. The above S1-S5 processes collect network traffic and device log data to mine the potential correlation between cross-source data of the same attack behavior, thereby obtaining a fused data representation of the attack behavior. Then, a graph neural network is used to model and classify the fused data, thereby quickly and accurately identifying attack behaviors in industrial internet scenarios.
[0047] In one possible implementation, attack behavior reconstruction can be understood as correlating multiple abnormal behaviors in time or space to reconstruct the complete attack process. For example, when the destination addresses of multiple abnormal behaviors all point to a certain server, and the logs record that the server continuously generates abnormal authentication failure information and access control errors, the system will determine that the server has been attacked, and use this as a starting point to trace the data source and behavior chain layer by layer upwards to reconstruct the complete attack process.
[0048] In one possible implementation, attack behavior reconstruction includes, but is not limited to, steps such as identifying abnormal communications, associating C&C servers, reproducing attack paths, killing chain mapping, and tracing the attack organization.
[0049] In one possible implementation, real-time handling of attacks includes measures such as blocking the attack source IP, adjusting access control policies, issuing alerts, or linking with other security devices.
[0050] This application embodiment obtains multiple attack events from network security data, analyzes the attack behavior characteristics to obtain the attacker's identity information corresponding to each attack event, associates different attack events with the same identity information, and traces the attacker based on the associated multiple attack events. Thus, by combining and analyzing the information of multiple attack events, the accuracy of attacker analysis can be improved.
[0051] In its implementation, a cloud-edge-device architecture is adopted to extract multi-dimensional features from log data and network traffic data. Through mapping and reconstruction models, combined with a graph attention neural network model, the identification and response to network attacks in the industrial internet field are achieved. The following example illustrates the working process of an intelligent analysis method for industrial internet attack behavior based on log and traffic fusion, as described in this application, and is not intended to limit the scope of the application: In another exemplary embodiment, one implementation of S1 above may include: S11. Collect network traffic data Specifically, in the industrial internet network environment, network traffic passing through devices including but not limited to programmable logic controllers, host computers, engineering workstations, identifier resolution nodes, and industrial cloud platforms is continuously collected using self-developed or open-source network traffic collection technologies, and the collected traffic is saved to form structured raw traffic records.
[0052] In one possible implementation, open-source network traffic acquisition technologies include, but are not limited to, DPDK, PF_RING, and LIBPCAP.
[0053] S12. Acquisition device log recording Specifically, in the industrial internet business environment, log records are collected from devices such as edge gateways, industrial switches, industrial firewalls, and industrial cloud WAFs through API interfaces or open-source management protocols. The types of logs collected include, but are not limited to, firewall logs, event logs, traffic logs, security logs, system logs, and database logs, and are saved to form structured raw log records.
[0054] In one possible implementation, open-source management protocols include, but are not limited to, SNMP, CMIP, RMON, SYSLOG, and other protocols.
[0055] In one possible implementation, network traffic and log recording collection are synchronized with high precision in time, ensuring time-aligned analysis during subsequent log and traffic feature fusion. Simultaneously, the log source can be configured with multiple collection strategies to improve the capture rate of logs related to significant attack behaviors.
[0056] Step S1 provides raw data support for subsequent feature extraction and fusion analysis, and is a fundamental step in the attack detection process. By using a dual-channel acquisition method combining "traffic" and "logs," the ability to detect different types of abnormal behavior can be effectively improved.
[0057] In another exemplary embodiment, one implementation of S2 described above may include: S21. Extracting network features from network traffic Specifically, using self-developed scripts or open-source traffic analysis tools, key network characteristics of each data stream are extracted, including but not limited to source IP, destination IP, source port, destination port, protocol number, packet size, TCP flags, connection duration, average load, packet length, idle time, device address, function code, and data fields.
[0058] In one possible implementation, open-source traffic parsing tools include, but are not limited to, CICFLOWMETER, SCAPY, TCPDUMP, etc.
[0059] S22. Extract log features from log records. Specifically, extract key log features from each log record, including but not limited to IP address, timestamp, module number, PID, function code, event level, operation type, application type, and alarm reason.
[0060] S23, Log Feature Weight Calculation Specifically, a weighting function is introduced during the log feature processing to assign differentiated importance scores to different types of log features.
[0061] In one possible implementation, log feature weights are dynamically adjusted based on the frequency of log occurrences within a specific time window. Log features with higher frequency receive higher weights to highlight their reference value in identifying abnormal behavior. The calculation process for log feature weights may include, but is not limited to, the following: in: This represents the weight value of the k-th log feature; This indicates the number of times the k-th log feature appears within the time window T; This indicates the number of times each log feature appears within the time window T. The normalized frequency of the k-th log feature is used to dynamically adjust the weight of higher frequencies. For time window, Let k be the average occurrence interval of the log feature. This is a time decay adjustment term, used to balance the effects of sudden high frequencies and sustained high frequencies; This is the context synthesis coefficient, determined by context information such as the log source device type and log level, and its value ranges from (0, 2]. This is the threshold filtering function.
[0062] In one possible implementation, to avoid interference from high-frequency noise, a threshold filtering mechanism is introduced in the log feature weight calculation to reduce the weight of log features with low confidence. The calculation process of the threshold filtering function may be, but is not limited to, the following: , in: , These are the high and low confidence thresholds, respectively. It is a very small positive number (such as 10). -6 This is used to reduce the weight of features with low confidence.
[0063] In one possible implementation, the log feature processing can also be comprehensively evaluated by combining specific contextual information such as the log source device type and log level.
[0064] S24, Log Recording Aggregation Specifically, during the log aggregation process, the mutual information algorithm is used to evaluate the correlation of log features between different devices, and the similarity is judged by measuring the degree of information sharing between log features.
[0065] One possible implementation involves introducing normalized mutual information as a standardized metric, normalizing similarity values to between 0 and 1 for unified comparison and filtering. Specifically, for log records from different network devices, mutual information values are calculated based on dimensions such as timestamp, module field, and reason code, and then clustered and integrated according to preset thresholds.
[0066] Let X and Y be the log feature variables from two different network devices, and let x and y be their value spaces, respectively. The calculation process of Normalized Mutual Information (NMI) may be, but is not limited to, the following: in: The k-th log feature in the log feature vector X The k-th log feature in the log feature vector Y Mutual information is defined as ; , Information entropy; It is a joint probability distribution; , This represents a marginal probability distribution.
[0067] In one possible implementation, for log records originating from different network devices, the NMI values for dimensions such as timestamp, module field, and reason code are calculated. For K features in the log record, including timestamp, module field, and reason code, the normalized mutual information for each dimension is calculated, and a weighted fusion is used to obtain the comprehensive similarity. The calculation process may be, but is not limited to, the following: in: The weight value of the k-th log feature. .
[0068] In one possible implementation, clustering is performed based on a preset threshold. If the overall similarity is considered... If the value is greater than or equal to the threshold, and the threshold value ranges from [0,1], then the two log records will be grouped into the same cluster to achieve the aggregation of redundant or duplicate log items.
[0069] The above scheme can effectively identify log items that are semantically consistent but structurally redundant or repetitive, reduce interference from invalid information, improve the compactness of feature aggregation and discrimination efficiency, and thus provide higher quality input data for subsequent attack detection models.
[0070] In the above embodiments, a weighting function is introduced during log feature processing to assign differentiated importance scores to different types of log features. The weighting is dynamically adjusted based on the frequency of log occurrences within a specific time window; log features with higher frequency receive higher weights to highlight their reference value in anomaly behavior identification. A threshold filtering mechanism is introduced to reduce the weight of low-confidence log features to avoid interference from high-frequency noise. A comprehensive evaluation is performed by combining contextual information such as the log source device type and log level. This enables more accurate identification of log patterns highly correlated with attack behavior during feature aggregation and modeling stages, improving the accuracy of attack detection.
[0071] In another exemplary embodiment, S3 above performs time alignment of log and traffic features based on timestamps, introducing a dynamic time warping algorithm to align the time series. By analyzing key mapping relationships and establishing a mapping relationship between log records and traffic behavior through overlapping attributes (such as IP address, port number, connection duration, etc.), a unified vector representation of fused features is constructed, transforming the multi-source heterogeneous dataset into a 90-dimensional joint feature vector, with 50 dimensions for industrial features and 40 dimensions for log features. S3 above achieves unified cross-source information modeling of traffic data and log data, providing a data structure foundation for subsequent anomaly detection and behavior recognition in the model.
[0072] In another exemplary embodiment, one implementation of S3 described above may include: S31. Time-align logs and traffic characteristics. In this step, timestamp information is first extracted from both log data and traffic data, and Dynamic Time Warping (DTW) is introduced to align the timestamps, ensuring that the data can be synchronized in the time dimension. Since network device log records have second-level precision, while traffic packets may have millisecond or microsecond-level latency, time standardization is required during time alignment, and the correspondence between log records and corresponding traffic is determined by sliding window or time window matching methods.
[0073] In one specific implementation, let the log timestamp sequence be A=(a1, a2,...,a...). M The traffic timestamp sequence is B=(b1, b2,...,b N (), where a1 and b1 are the standardized time values. The minimum cumulative distance between two sequences is calculated using DTW, and its core recursive formula may include, but is not limited to, the following: in: This represents the optimal cumulative distance between log timestamp sequence A and traffic timestamp sequence B, with the following boundary conditions: ; It is a local distance metric.
[0074] By minimizing this cumulative distance, the optimal non-linear matching path between logs and traffic timestamps is obtained, thereby achieving precise alignment of second-level logs and traffic data.
[0075] In this embodiment of the application, when the optimal cumulative distance is less than the cumulative distance threshold, it indicates that the log timestamp sequence A and the traffic timestamp sequence B correspond and a mapping relationship between them can be established; otherwise, it indicates that the log timestamp sequence A and the traffic timestamp sequence B do not correspond and a mapping relationship between them cannot be established.
[0076] For example, under normal circumstances, the collected traffic records are "Traffic 1-Traffic 2-Traffic 3", and the corresponding log records are "Log 1-Log 2-Log 3". However, the traffic records may become out of order due to network congestion, becoming "Traffic 1-Traffic 3-Traffic 2". This makes it easy to judge as a mismatch using the usual calculation method. Accumulating distance can deal with the situation of out-of-order traffic.
[0077] S32. Analyze the mapping relationship between features. This step calculates the correlation between logs and traffic characteristics, utilizing common features in both logs and traffic (such as source IP, destination IP, source port, destination port, etc.) to construct a mapping function or mapping matrix between them. To improve accuracy, methods such as Mutual Information (MI) and Normalized Mutual Information (NMI) can be introduced to measure the similarity between log features, thereby identifying whether log records generated by different devices point to the same type of attack behavior.
[0078] S33. Generate the fused joint feature vector. After time alignment and feature mapping, log features and traffic features are merged to form a unified joint feature vector. The joint feature vector includes over 80 categories of basic traffic features (such as 5-tuples, load, duration, TCP flags, etc.) and over 30 categories of general log features (such as time, module, PID, cause, etc.), totaling over 110 dimensions. The generated feature vector will serve as input data for subsequent anomaly detection model training and prediction, used to identify and classify various types of network attack behaviors. In one specific implementation, for multiple log records mapped to a single traffic record, the weighted aggregation method used to generate a unified log feature vector might be calculated as follows, but is not limited to: in, This is the aggregated log feature vector. The weights of the r-th associated log feature vector, Let R be the r-th associated log feature vector, and R be the number of associated log records.
[0079] The aggregated log feature vector is concatenated with the traffic feature vector to form a joint feature vector.
[0080] In one possible implementation, the mapping relationship is not limited to one-to-one correspondence, but also includes many-to-one and one-to-many associations. For example, one traffic record may map to multiple log records, and vice versa. When generating joint features, weighted aggregation of related log records (such as using a log weight function) can reduce redundant information and highlight key behavioral events.
[0081] The embodiments of this application achieve efficient fusion of log and traffic data through the above process, which improves the accuracy of network attack reconstruction and detection, and provides a stable and high-quality data foundation for subsequent model training.
[0082] In another exemplary embodiment, a mutual information algorithm is used during log aggregation to evaluate the correlation of log features between different devices, judging their similarity by measuring the degree of information sharing between log features. Normalized mutual information is introduced as a standardized metric, normalizing similarity values to between 0 and 1 for unified comparison and filtering. For log records from different network devices, NMI values for dimensions such as timestamp, module field, and reason code are calculated, and clustering is performed based on preset thresholds. This method can effectively identify semantically consistent but structurally redundant or repetitive log items, reduce interference from invalid information, improve the compactness and discrimination efficiency of feature aggregation, and thus provide higher quality input data for subsequent attack detection models.
[0083] In another exemplary embodiment, during the aggregation of the log feature vector and traffic feature vector, an association rule mining algorithm is employed to perform in-depth analysis of the mapping relationship between log features and traffic features, uncovering potential collaborative change patterns and logical causal relationships. Specifically, based on the timestamp information of device logs and traffic data, an event-level time window model is constructed to pair and match log records and traffic behaviors occurring within the same time period. Combining frequent itemset analysis and confidence calculation, highly correlated log-traffic combination patterns before and after the attack are identified, thereby reconstructing the entire process of the network attack, including the stages of attack initiation, propagation, control, and execution.
[0084] In another exemplary embodiment, after the fusion of log and traffic features, a graph attention neural network is introduced to train and model the fused multidimensional feature data. The graph attention neural network model dynamically assigns importance weights to different neighboring nodes using an attention mechanism, uncovering the complex structural relationships and implicit dependencies between logs and traffic. Specifically, each network behavior is treated as a node in a graph, with node attributes composed of log and traffic features, and edges representing temporal or logical relationships between nodes. During training, the graph attention neural network model automatically learns the optimal feature aggregation method, strengthening the significant feature differences between abnormal behaviors. Finally, a normalized exponential function is used in the output layer to classify each node, outputting whether it is an attack behavior and its specific type.
[0085] In another exemplary embodiment, the graph attention network can not only classify and predict anomalous behaviors, but also model and identify normal behavior patterns, achieving bidirectional predictive analysis of both normal and anomalous behaviors. Specifically, by simultaneously introducing a normal behavior sample model during training, the feature distribution of regular communication and activity in the network can be learned. In the graph structure, the features of normal behavior nodes can help calibrate the boundaries of anomaly detection, improving the model's ability to identify edge samples and mixed patterns. Combined with the normalized exponential function classification output, the graph attention neural network model can output the probability distribution of each network behavior belonging to either normal or a specific attack category.
[0086] In another exemplary embodiment, one implementation of S4 described above may include: S41. Training the anomaly detection model This step constructs a Graph Attention Network (GAT) model and uses a fused feature vector of network device logs and traffic data as input to jointly model various attack behaviors and normal behaviors. The input feature vector contains more than 80 types of traffic features and more than 30 types of log features, totaling more than 110 dimensions. A visible layer is established through Softmax neurons, and the mapping relationship between log and traffic features and attack types is obtained through training.
[0087] S42. Calculate the activation probability of the hidden layer. Based on the trained GAT model, the activation probability of all hidden unit nodes is calculated. This probability reflects the likelihood that the input features (fused log and traffic features) will trigger potential anomalous behavior under the current model, and is the basis for subsequent classification judgments.
[0088] S43. Calculate and predict attack types By utilizing the activation probability results, the probability distribution of each attack type (such as unauthorized commands, ransomware, data tampering, man-in-the-middle attacks, etc.) is calculated, thereby predicting and identifying whether the fused data belongs to abnormal behavior and what type of attack it is. In one specific implementation, let there be C attack types (including normal behavior categories), and the original score vector of the GAT model output layer is z=(z1, z2,..., z...). C If p is the predicted probability of attack type c, then... c The calculation process may be, but is not limited to, the following: in, This is an exponential function, with the denominator being the sum of the score indices for all categories. The final value is... As the predicted attack type, and A higher value indicates that the input features are more likely to belong to that type of attack.
[0089] S44. Integrate normal behavior detection and output the detection results. In this step, the process of identifying normal behavior is incorporated into the model. By constructing a feature vector to determine normal behavior and combining it with the predicted attack behavior, the final detection result is output. This step improves the model's ability to identify true positives in distinguishing between normal and abnormal behavior, thereby increasing the overall detection accuracy.
[0090] This application's embodiments utilize fused log and traffic features, combined with the GAT model, to enhance the ability to distinguish normal network behavior while maintaining high sensitivity to anomaly attack detection, achieving accurate identification and classification of various network attack types. Simultaneously, the integration of a Softmax structure in the visible layer design and diversified log feature extraction makes the model more adaptable to multi-dimensional input features in complex cloud-edge-device environments, improving the comprehensiveness and real-time nature of network security situational awareness.
[0091] In another exemplary embodiment, one implementation of S5 described above may include: S51, Attack Path Reconstruction When abnormal behavior is detected, the system will reconstruct the attack path based on feature mapping relationships. For example, if the destination addresses of multiple abnormal traffic points to a certain server, and the logs record that the server continuously generates abnormal authentication failure information and access control errors, the system will determine that the server has been attacked, and use this as a starting point to trace the data source and behavior chain layer by layer upwards to reconstruct the complete attack process.
[0092] S52, Cloud Protection Policy Generation The source tracing results will be synchronized to a cloud-based security platform to leverage its computing power for further analysis and modeling of large amounts of historical data, dynamically adjusting protection rules for local and edge environments. Optionally, after source tracing is complete, the system will update the attacker's profile information, including attack tools, paths, protocol preferences, behavioral patterns, and trigger times, continuously improving the profile database and enhancing the system's future automatic identification capabilities.
[0093] S53. End-side policy issuance and execution Edge devices can execute issued policies to quickly block suspicious IPs, isolate target hosts, or enhance detection sensitivity, greatly improving the system's responsiveness to new threats and the efficiency of coordinated defense. This mechanism combines real-time response with dynamic policies, making it suitable for network security defense scenarios in large-scale heterogeneous cloud-edge-device architectures.
[0094] In another exemplary embodiment, one implementation of S51 described above may include: S511. Determine the target node for attack. The target node N0 is selected as the main device of the abnormal traffic destination address or the abnormal events that frequently appear in the logs, and it is used as the starting point for tracing the source.
[0095] S512, Constructing a Spatiotemporal Relationship Diagram Extract all inbound traffic records and related log records of the target node within the attack occurrence time window [T0-Δt, T0+Δt], where T0 is the time when the anomaly was first detected and Δt is the preset time backtracking window. Based on the 5-tuple (source IP, destination IP, source port, destination port, protocol) and the source device identifier in the logs, establish a set of directed edges with the target node as the endpoint, where each edge represents a communication or operation event.
[0096] S513, Recursively trace upstream nodes For the source node of each directed edge, repeat step S512 to extract the incoming record of the source node until any of the following termination conditions are met: The source node has an external public IP address and no further logs can be obtained; The source node belongs to a confirmed, normal, and trusted device baseline; The tracing depth exceeds the preset maximum number of hops.
[0097] S514, Generate attack path sequence The directed edges obtained during the recursive tracing process are connected in chronological order to form several attack paths, each represented as follows: in, For the target node, For direct attack source, This is the outermost trace node. The final output is a set of all attack paths, with each node on each path labeled with the corresponding attack behavior type (e.g., port scanning, brute-force attacks, vulnerability exploitation, etc.).
[0098] S515, Path Merging and Deduplication Multiple paths with the same intermediate node sequence are merged, and the earliest trigger time is retained as the path start time to form a simplified attack chain for use in the generation of subsequent cloud protection strategies.
[0099] In one exemplary embodiment, corresponding to the intelligent analysis method for industrial internet attack behavior that integrates logs and traffic as described in the embodiments above, Figure 3 The diagram shows a structural block diagram of an intelligent analysis device for industrial internet attack behavior that integrates logs and traffic, provided in an embodiment of this application. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0100] Reference Figure 3 The device includes: Data acquisition module 11 is used to acquire network traffic and log records. The network traffic is acquired through the bypass mirror port of the access switch, and the log records are acquired through the API interface. Feature extraction module 12 is used to extract traffic features and log features. The traffic features are obtained by reading the payload and performing network flow statistics on the original network traffic, including but not limited to IP, port, timestamp, duration, flow rate, etc. The log features are obtained by parsing the original log records, including but not limited to function codes, device status, etc. The association matching module 13 is used to perform log and traffic data fusion mapping based on time and feature values. The fusion mapping aligns traffic features and log features based on timestamps and overlapping attributes. The anomaly analysis module 14 is used to realize industrial internet attack detection and behavior classification, which is achieved by training a graph attention neural network model.
[0101] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0102] It should be noted that the above system embodiments correspond to the aforementioned method embodiments. Since their principles are basically the same as those of the method embodiments, relevant details can be found in the description of the aforementioned method embodiments, and will not be repeated here.
[0103] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 4 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an attack detection method for the Industrial Internet.
[0104] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0105] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0106] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0107] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0108] According to the specific embodiments provided in this application, this application has the following technical effects.
[0109] Multi-source heterogeneous data fusion: By simultaneously analyzing logs and traffic features, it overcomes the missed detection problem caused by the single data source in traditional methods. Specifically, it collects more than 50 types of traffic features from industrial networks and simultaneously acquires more than 40 features from logs of cloud-side, network-side, edge-side, and endpoint devices. Combining feature mapping and time overlap analysis, it establishes the correlation between logs and traffic to reconstruct attack behavior. The system uses a mutual information algorithm to achieve log similarity aggregation, reducing redundancy. Combined with graph neural networks and a custom loss function to train the fused features, it improves the accuracy and response speed of detecting attacks such as unauthorized commands, ransomware, data tampering, and man-in-the-middle attacks. It is suitable for network threat detection and tracing in complex cloud-edge-end environments. Deep attack behavior reconstruction: Through time synchronization and attribute mapping, attack paths can be reconstructed across devices and protocols; Significantly improved accuracy: The graph attention network considers features from both normal and abnormal behaviors, and its recognition accuracy is significantly better than that of traditional unsupervised learning models; Strong real-time performance and scalability: The model structure is applicable to various types of industrial and network equipment, supports edge deployment, and is suitable for large-scale cloud-edge-device collaborative environments; Supports coordinated response and protection strategy adjustment: Attack detection results can be fed back to edge devices for dynamic adjustment of network and security policy updates.
[0110] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0111] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0112] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for intelligent analysis of industrial internet attack behavior that integrates logs and traffic, characterized in that, include: Acquire communication traffic data and device log data of the target network; Feature extraction is performed on the communication traffic data and the device log data respectively to obtain the traffic feature vectors of different nodes in the target network and the log feature vectors of different log records; The traffic feature vectors of different nodes and the log feature vectors of different log records are fused to obtain the fused feature vector of each node. The fused feature vectors of each node are input into the anomaly detection model to obtain the anomaly detection results for each node; the anomaly detection model is obtained by training a graph attention network. Attack behavior is reconstructed based on the anomaly detection results of each node, and the attack behavior reconstruction results are obtained.
2. The intelligent analysis method for industrial internet attack behavior based on log and traffic fusion as described in claim 1, characterized in that, Feature extraction is performed on the communication traffic data and the device log data respectively to obtain traffic feature vectors for different nodes and log feature vectors for different log records, specifically including: Traffic feature vectors of different nodes are extracted from the communication traffic data; the traffic feature vectors include one or more of the following: source IP, destination IP, source port, destination port, protocol number, packet size, TCP flag, connection duration, average load, packet length, idle time, device address, function code, and data field; Extract log feature vectors for different log records from the device log data; the log feature vectors include one or more of the following: source IP, destination IP, source port, destination port, timestamp, module number, PID, function code, event level, operation type, application type, and alarm reason.
3. The intelligent analysis method for industrial internet attack behavior based on log and traffic fusion as described in claim 1, characterized in that, The traffic feature vectors of different nodes and the log feature vectors of different log records are fused to obtain the fused feature vector of each node, specifically including: A dynamic time warping algorithm is used to align the timestamps of the traffic feature vector and the log feature vector to obtain the time alignment relationship between the traffic feature vector and the log feature vector. Based on the common features in the traffic feature vector and the log feature vector, a mapping relationship is constructed between the traffic feature vector and the log feature vector. The mutual information algorithm is used to estimate the overall similarity between different log feature vectors; Log feature vectors with a comprehensive similarity greater than a similarity threshold are aggregated to obtain aggregated log feature vectors; Based on the time alignment relationship and the mapping relationship, the traffic feature vector of each node is concatenated with the aggregated log feature vector or the unaggregated log feature vector to form the fused feature vector of each node.
4. The intelligent analysis method for industrial internet attack behavior based on log and traffic fusion as described in claim 3, characterized in that, The formula for calculating the overall similarity is: ; ; in, The weight value of the k-th log feature. The k-th log feature in the log feature vector X The k-th log feature in the log feature vector Y Normalized mutual information, The k-th log feature in the log feature vector X The k-th log feature in the log feature vector Y mutual information, for Information entropy for Information entropy.
5. The intelligent analysis method for industrial internet attack behavior based on log and traffic fusion as described in claim 4, characterized in that, The weight values of each log feature are calculated using the following formula: ; ; in, This represents the number of times the k-th log feature appears within the time window T. This represents the number of times each log feature appears within the time window T. Let k be the average occurrence interval of the log feature. For contextual comprehensive coefficient, Let be the normalized frequency of the k-th log feature. , This is the threshold filtering function. , These are the high confidence threshold and the low confidence threshold, respectively. It is a very small positive number.
6. The intelligent analysis method for industrial internet attack behavior based on log and traffic fusion as described in claim 4, characterized in that, The formula for aggregating log feature vectors with a comprehensive similarity greater than a similarity threshold is as follows: ; in, This is the aggregated log feature vector. The weights of the r-th associated log feature vector, Let R be the r-th associated log feature vector, where R is the number of associated log records; the associated log feature vectors are log feature vectors with a comprehensive similarity greater than the similarity threshold.
7. The intelligent analysis method for industrial internet attack behavior based on log and traffic fusion as described in claim 1, characterized in that, Attack behavior reconstruction is performed based on the anomaly detection results of each node, resulting in the following: Nodes whose anomaly detection results indicate abnormal traffic or abnormal events are identified as attack target nodes; Set the target node of the attack as the endpoint; Based on the traffic records and log records flowing into the endpoint within the attack event window, a spatiotemporal correlation graph of the endpoint is constructed. Set the source node of each directed edge in the spatiotemporal correlation graph as the endpoint, and return to the step of "constructing the spatiotemporal correlation graph of the endpoint based on the traffic records and log records flowing into the endpoint within the attack event window" until the termination condition is met, and output the total spatiotemporal correlation graph; the termination condition is that the source node belongs to the external public network and the log records flowing into the source node cannot be obtained, or the source node belongs to the baseline of a confirmed normal communicable device, or the tracing depth exceeds the preset maximum number of hops; Based on the overall spatiotemporal correlation graph, multiple attack paths are generated; Multiple attack paths are merged and deduplicated to obtain the merged and deduplicated attack paths as the result of attack behavior reconstruction.
8. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the intelligent analysis method for industrial internet attack behavior based on log and traffic fusion as described in any one of claims 1-7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the intelligent analysis method for industrial internet attack behavior that integrates logs and traffic, as described in any one of claims 1-7.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the intelligent analysis method for industrial internet attack behavior that integrates logs and traffic, as described in any one of claims 1-7.
