Vehicle-mounted hybrid network intrusion detection method based on deep learning

Through the deep learning intrusion detection method, combined with the Xception model and the residual attention module, the abnormal behavior in the vehicle Ethernet-CAN hybrid network is identified, which solves the problem of difficulty in identifying dynamic attack scenarios with existing technology and achieves efficient and real-time intrusion detection. Effect.

CN118764241APending Publication Date: 2024-10-11CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410857132.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

In-vehicle Ethernet-CAN hybrid networks are vulnerable to network attacks. Existing intrusion detection technologies are difficult to effectively identify dynamically changing attack scenarios and emerging threats, and a single network intrusion detection method cannot meet the security needs of hybrid networks.

Method used

An intrusion detection method based on deep learning is used to collect data packets through CANoe software for pre-processing and imaging processing. The improved Xception model is combined with the residual attention module to train the classification model to identify abnormal behaviors and adapt to the dynamic network environment.

Benefits of technology

It realizes real-time intrusion detection on the vehicle Ethernet-CAN hybrid network, improves detection accuracy and response speed, adapts to dynamic changes in the automotive environment, reduces false alarm rates, and is suitable for diverse attack scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118764241A_ABST
    Figure CN118764241A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle-mounted hybrid network intrusion detection method based on deep learning, and belongs to the field of vehicle-mounted network information security. According to the improved Xcepiton network provided by the invention, on the basis of an original model, the number of layers of Xcepiton intermediate streams is reduced by half so as to improve the real-time performance of detection, and a residual attention mechanism is added into the model so as to improve the detection precision of the network. The method comprises the following steps: firstly converting a CAN message in the hybrid network into a UDP data message of the vehicle-mounted Ethernet, then unifying the size of a data packet in the hybrid network, then carrying out imaging processing on network traffic, and finally inputting a picture into a network model for training, verification and testing. Experimental results show that compared with some mainstream network models, the improved Xception network model has higher accuracy and higher detection speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of vehicle-mounted network information security and relates to a vehicle-mounted hybrid network intrusion detection method based on deep learning. Background Art

[0002] In recent years, the automotive industry has adopted in-vehicle systems and various sensors to realize infotainment and advanced driver assistance system (ADAS) functions, and provide accurate and fast environmental perception capabilities. These advanced technologies require a large number of sensors to collect data, thus generating a large amount of network traffic. However, the introduction of these technologies also brings new security challenges. The status and location information of the vehicle, and even the personal privacy data of the driver, may be transmitted and processed in the environment of the Internet of Vehicles, which provides criminals with a variety of potential attack paths. In order to meet these security challenges, the research on intrusion detection technology has become crucial. According to the current development status of the automotive industry, major vehicle manufacturers are gradually introducing in-vehicle Ethernet into the in-vehicle network, and coexisting with the traditional CAN bus to form an in-vehicle Ethernet-CAN hybrid network to meet the needs of current automotive development.

[0003] In the in-vehicle Ethernet-CAN hybrid network, although the CAN bus has a certain anti-interference ability, it does not provide encryption or complex authentication mechanisms, which makes it vulnerable to various network attacks, such as spoofing attacks and replay attacks, which may cause abnormal behavior of the vehicle control system, such as sudden acceleration or braking, seriously threatening the safety of passengers. Although in-vehicle Ethernet provides high bandwidth and high data transmission speed, its openness increases security risks, such as unauthorized access and data tampering, which may lead to key information leakage and network service interruption. Therefore, in order to ensure the security of the vehicle's internal network and take into account the characteristics of the hybrid network in the actual vehicle, it is particularly important to develop a method that can effectively detect anomalies and identify potential attacks in the in-vehicle Ethernet-CAN hybrid network environment.

[0004] Intrusion detection systems are usually divided into two categories: signature-based intrusion detection systems and anomaly-based intrusion detection systems. Signature-based detection has a low false alarm rate and can accurately identify known attacks, but it requires constant updating of the attack signature library, which may cause update lags. As network behavior changes, anomaly-based detection can learn and adapt to new normal behavior patterns, and is suitable for dynamically changing network environments and diverse attack scenarios. Therefore, we chose to design an intrusion detection system based on deep learning to detect attacks on vehicle-mounted Ethernet and CAN in hybrid networks. For traffic in vehicle-mounted Ethernet-CAN hybrid networks, the data segment length of the CAN frame is up to 8 bytes, while vehicle-mounted Ethernet may contain data of different lengths due to the different information carried by each protocol. For example, the data packet of the Audio / Video Transport Protocol (AVTP) contains 434 bytes, while the data packet of the Generalized Precision Time Protocol (gPTP) contains 60-90 bytes. Therefore, we choose to convert the data frame of the CAN bus into the UDP data packet of the vehicle Ethernet, and then unify the traffic data packet size in the hybrid network, and then image the extracted network traffic. Finally, we use wavelet transform to compress the traffic image to reduce calculation time and improve response speed. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a vehicle-mounted hybrid network intrusion detection method based on deep learning. In order to ensure the safe transmission in the vehicle-mounted Ethernet-CAN hybrid network, the present invention proposes a vehicle-mounted Ethernet-CAN hybrid network intrusion detection method based on deep learning, extracts features from data packets, and combines deep learning methods to realize intrusion detection of vehicle-mounted hybrid networks.

[0006] In order to achieve the above object, the present invention provides the following technical solutions:

[0007] A vehicle-mounted hybrid network intrusion detection method based on deep learning, the method comprising the following steps: collecting data packets of the hybrid network through CANoe software;

[0008] Preprocessing data packets in the hybrid network, including extracting specific values ​​of ID and data fields in the data packets, unifying the size of data packets, and imaging and compressing data traffic;

[0009] The processed images are input into the improved Xception model for its training, verification and testing to detect attacks in the hybrid network.

[0010] Further, the data packets of the hybrid network are collected by CANoe software, specifically:

[0011] Build a test bench, use CANoe software to collect vehicle Ethernet and CAN data traffic, and use the software to create attacks;

[0012] For the CAN bus, Denial of Service (DoS) attacks and replay attacks are created; for the in-vehicle Ethernet, frame injection attacks, time synchronization attacks and switch flooding attacks are created; the data set contains abnormal and normal in-vehicle traffic data packets, and the data packets are marked, normal data packets are marked as "normal", and abnormal data packets are marked as "abnormal".

[0013] Further, the data packets in the hybrid network are preprocessed as follows:

[0014] Convert the CAN frames in the hybrid network into UDP packets of the vehicle Ethernet, unify the data flow of the vehicle Ethernet, and finally perform imaging processing;

[0015] Convert a single byte of data in a data packet from hexadecimal to decimal, and change the value range of each byte from 0X00 to 0XFF to 0 to 255; according to the value of each byte in the data packet, convert a data packet containing M data messages of length N into an image with a resolution of M×N;

[0016] In order to compare whether images of different sizes will affect the detection accuracy of the model, six data package combinations of different sizes are set, including: 16×16, 32×32, 64×64, 128×128, 256×256 and 512×512;

[0017] The images converted from mixed network traffic are compressed through discrete two-dimensional wavelet transform to reduce the amount of data input to the model, meet the real-time requirements of automobiles for intrusion detection, and take into account the limitations of the computing power of on-board chips.

[0018] Furthermore, the data set contains a total of 1,093,155 images, of which 877,139 are normal images and 216,016 are abnormal images; the data set is divided into 90% training sets, 5% validation sets and 5% test sets; wherein the training set, validation set and test set all contain both normal and abnormal images.

[0019] Furthermore, the improved Xception model includes three parts: an entry flow, an intermediate flow, and an exit flow;

[0020] The original Xception model has 36 convolutional layers, divided into 14 modules, with 4 blocks in the incoming stream, 8 blocks in the middle stream, and 2 blocks in the exit stream;

[0021] The intermediate stream is reduced from 8 blocks to 4 blocks, and a residual attention module is added to the Xception model to improve the network's ability to extract global information.

[0022] Further, the processed image is input into the improved Xception model for its training, verification and testing, specifically:

[0023] The Adam optimization algorithm based on gradient descent is used, and binary cross entropy is set as the loss function to train a classification model that can process vehicle Ethernet and CAN images. In each iteration, 10 feature maps are randomly selected for training, and the performance of the model is evaluated on the validation set. An early stopping strategy is set, that is, training is stopped when the validation set loss does not improve in three consecutive training cycles. The learning rate is set to 0.0001 to ensure that the model is stable and converges effectively.

[0024] The trained model was tested using a test set containing 54,658 images, and the accuracy, precision, recall, and F1-score indicators were used to evaluate the practicality and reliability of the model.

[0025] The beneficial effects of the present invention are: first, compared with other intrusion detection methods that study a single vehicle network, the present invention combines the current mainstream network architecture, and the research object focuses on the vehicle Ethernet-CAN hybrid network. Then compared with the signature-based intrusion detection method, the intrusion detection method based on deep learning can learn and identify new normal or abnormal behaviors, and is more adaptable to the current dynamically changing network environment and diversified attack scenarios. Finally, based on the original Xception model, the present invention combines the real-time and accuracy required by the vehicle network to improve Xception, so that it is more in line with the requirements in the actual automobile environment-smaller model parameters, faster response speed and higher detection accuracy.

[0026] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0028] Figure 1 It is the intrusion detection flow chart;

[0029] Figure 2 The process of converting CAN messages into UDP messages;

[0030] Figure 3 It is a schematic diagram of data interaction in a hybrid network;

[0031] Figure 4 The process of imaging network traffic;

[0032] Figure 5 It is an improved Xception model;

[0033] Figure 6 This is the structure diagram of the residual attention mechanism module;

[0034] Figure 7 The overall network model for intrusion detection;

[0035] Figure 8 The overall logical flow chart of intrusion detection. DETAILED DESCRIPTION

[0036] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0037] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0038] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0039] See also Figures 1 to 8 In this embodiment, the trained improved Xception model is transplanted to the gateway of the vehicle bus, so that the intrusion detection method based on the improved Xception model of this invention is deployed on the gateway, and then the vehicle Ethernet and CAN data packets generated by the ECU in the hybrid network are collected and input into the improved Xception model to determine whether the data packets are normal. The entire intrusion detection process is as follows Figure 1 shown.

[0040] In-vehicle Ethernet plays an important role in automotive networks. It not only provides high-bandwidth data transmission, data synchronization and scalability, but also can use various domain gateways to connect other different in-vehicle networks, such as CAN, LIN, MOST and FlexRay. The present invention mainly studies the in-vehicle Ethernet-CAN hybrid network. The data frame of the CAN bus needs to be converted into a UDP data packet through message parsing, data format conversion and data frame encapsulation, so as to extract the traffic data in the in-vehicle network. For example, four CAN frames are packaged into a UDP data packet, the first ID is 0x10, the data domain is 11111111111111111, the second ID is 0x20, the data domain is 222222222222222222, the third ID is 0x30, the data domain is 3333333333333333, the third ID is 0x40, and the data domain is 4 ... The four CAN frames including their IDs are packaged into a UDP data message with a data payload of 41 bytes: 10111111111111111120222222222222222222230333333333333333333404444444444444444400000000000, such as Figure 2 As shown in the figure, various protocol data packets of the vehicle Ethernet are transmitted from the sending node to the receiving node through a switch with a data rate of 100BASE-T1. Figure 3 shown.

[0041] The raw data of the data packets collected in the test bench often cannot be used directly for model training. The present invention pre-processes the collected network traffic. First, the data traffic is converted from hexadecimal to decimal, and then the size of the processed data is unified by specifying the number (M) and length (N) of data frames. When the length of the data frame is less than the specified value, zero padding is used. When the length of the data frame exceeds the fixed value, the excess data is discarded. Then, the number of data frames gradually increases until the set value M is reached. Finally, the data packet with M data frames of length N is imaged to form a picture with a resolution of M×N. For example: you can choose combinations of 16×16, 32×32, 64×64, 128×128, 256×256 and 512×512 to cover the data lengths contained in different protocols of vehicle-mounted Ethernet. The specific process is as follows: Figure 4 shown.

[0042] Each stream of Xception contains batch normalization, a linear rectification function, and a depth-wise separable convolution kernel. Through batch normalization, the output values ​​and distributions of different layers of the neural network can be balanced, thereby solving the problem that forward propagation is affected when there are a large number of convolutional layers. In addition, the use of a linear rectification function with fast convergence and low complexity improves the fitting ability of the model while introducing nonlinear factors to enhance the expressive power of the model. In order to solve the problem of vanishing gradients, all modules except the first and last modules have linear residual connections. In order to improve the detection speed of the network model, this invention reduces the number of modules in the intermediate stream of the Xception model by half. The improved Xception model is as follows: Figure 5 In addition to optimizing the original Xception model and reducing the amount of parameter calculation, this invention adds a residual attention mechanism module to the model to improve the network's ability to extract global information. The residual attention mechanism is shown in Figure 6 shown.

[0043] The overall network model used in this invention is mainly composed of an improved Xception model (including an entry stream, an intermediate stream, and an exit stream) and three residual attention mechanism modules. The three streams are composed of 4, 4, and 2 Xception blocks, respectively. The first block of the entry stream consists of two 3×3 convolutional layers, and the other three blocks are composed of two 3×3 depth-separable convolutional layers and superimposed maximum pooling layers. The first block of the exit stream consists of two 3×3 depth-separable convolutional layers, and the second block consists of two 3×3 depth-separable convolutional layers and superimposed maximum pooling layers. Each block in the intermediate stream consists of three 3×3 depth-separable convolutional layers. The residual connection structure between blocks consists of a 1×1 convolutional layer. The residual attention module ensures that the final sampled feature map size is consistent with the smallest feature map size in the entire network. The residual attention module is embedded behind the 2nd, 3rd, and 8th blocks of the Xception model. The overall network structure is as follows Figure 7 shown.

[0044] At this point, the images in the dataset are divided into training set, validation set and test set in a ratio of 90:5:5 through the TensorFlow API. According to the requirements of the network model input, the processed images are input into the built model for training and verification: first through the improved Xception model (including entry flow, intermediate flow and exit flow), then through the global average pooling layer, and finally input into the fully connected layer to output the judgment result: normal message or attack message. The logical flow of the entire intrusion detection method is as follows: Figure 8 shown.

[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A vehicle-mounted hybrid network intrusion detection method based on deep learning, Features: The method comprises the following steps: Collect data packets of hybrid network through CANoe software; Preprocessing data packets in the hybrid network, including extracting specific values ​​of ID and data fields in the data packets, unifying the size of data packets, and imaging and compressing data traffic; The processed images are input into the improved Xception model for its training, verification and testing to detect attacks in the hybrid network.

2. According to claim 1, a vehicle hybrid network intrusion detection method based on deep learning, Features: The data packets of the hybrid network are collected by CANoe software, specifically: Build a test bench, use CANoe software to collect vehicle Ethernet and CAN data traffic, and use the software to create attacks; For CAN bus, create denial of service DoS attacks and replay attacks; for vehicle Ethernet, create frame injection attacks, time synchronization attacks and switch flooding attacks; The data set contains abnormal and normal vehicle traffic data packets. The data packets are marked, normal data packets are marked as "normal", and abnormal data packets are marked as "abnormal".

3. According to the in-vehicle hybrid network intrusion detection method based on deep learning in claim 1, Features: The preprocessing of the data packets in the hybrid network is specifically as follows: Convert the CAN frames in the hybrid network into UDP packets of the vehicle Ethernet, unify the data flow of the vehicle Ethernet, and finally perform imaging processing; Convert a single byte of data in a data packet from hexadecimal to decimal, and change the value range of each byte from 0X00 to 0XFF to 0 to 255; according to the value of each byte in the data packet, convert a data packet containing M data messages of length N into an image with a resolution of M×N; In order to compare whether images of different sizes will affect the detection accuracy of the model, six data package combinations of different sizes are set, including: 16×16, 32×32, 64×64, 128×128, 256×256 and 512×512; The images converted from mixed network traffic are compressed through discrete two-dimensional wavelet transform to reduce the amount of data input to the model, meet the real-time requirements of automobiles for intrusion detection, and take into account the limitations of the computing power of on-board chips.

4. According to claim 3, a vehicle hybrid network intrusion detection method based on deep learning, Features: The dataset contains a total of 1,093,155 images, of which 877,139 are normal images and 216,016 are abnormal images; the dataset is divided into 90% training sets, 5% validation sets and 5% test sets; wherein the training set, validation set and test set all contain both normal and abnormal images.

5. According to claim 1, a vehicle hybrid network intrusion detection method based on deep learning, Features: The improved Xception model includes three parts: entry flow, intermediate flow and exit flow; The original Xception model has 36 convolutional layers, divided into 14 modules, with 4 blocks in the incoming stream, 8 blocks in the middle stream, and 2 blocks in the exit stream; The intermediate stream is reduced from 8 blocks to 4 blocks, and a residual attention module is added to the Xception model to improve the network's ability to extract global information.

6. According to claim 5, a vehicle hybrid network intrusion detection method based on deep learning, Features: The processed image is input into the improved Xception model for its training, verification and testing, specifically: The Adam optimization algorithm based on gradient descent is used, and binary cross entropy is set as the loss function to train a classification model that can process vehicle Ethernet and CAN images. In each iteration, 10 feature maps are randomly selected for training, and the performance of the model is evaluated on the validation set. An early stopping strategy is set, that is, training is stopped when the validation set loss does not improve in three consecutive training cycles. The learning rate is set to 0.0001 to ensure that the model is stable and converges effectively. The trained model was tested using a test set containing 54,658 images, and the accuracy, precision, recall, and F1-score indicators were used to evaluate the practicality and reliability of the model.

Citation Information

Patent Citations

  • Remote sensing image semantic segmentation method and device

    CN111582104A

  • Lightweight vehicle-mounted network intrusion detection method based on deep learning

    CN116112193A

  • Intrusion detection method for vehicle-mounted LIN (Local Interconnect Network)

    CN117479169A