Two-stage Internet of Vehicles intrusion detection method
By employing a two-stage vehicle-to-everything (V2X) intrusion detection method, which utilizes a two-dimensional convolutional classifier and a Robust LSTM classifier to process vehicle data in stages, the problem of sample imbalance and low computational efficiency in single-stage models is solved. This achieves efficient and real-time intrusion detection, thereby improving the security and adaptability of V2X systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING JIAOTONG UNIV
- Filing Date
- 2026-03-09
- Publication Date
- 2026-04-24
AI Technical Summary
Existing single-stage vehicle-to-everything (V2X) intrusion detection models struggle to meet the real-time requirements of V2X systems due to uneven sample distribution and low computational efficiency. Furthermore, they lack adaptability to attack patterns, resulting in unstable detection accuracy and excessive resource consumption.
A two-stage vehicle network intrusion detection method is adopted. First, a two-dimensional convolutional classifier is used for fast binary classification and screening. Then, a Robust LSTM classifier is used for deep analysis. The vehicle data is processed in stages to improve detection efficiency and accuracy.
It achieves high detection accuracy while meeting the real-time requirements of vehicle networking, improving the system's real-time performance, relevance, and reliability, and is suitable for deployment in resource-constrained vehicle-mounted devices or edge nodes.
Smart Images

Figure CN121923934A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of vehicle networking and deep learning technology, specifically to a two-stage vehicle networking intrusion detection method. Background Technology
[0002] With the rapid popularization and deepening application of vehicle-to-everything (V2X) technology, vehicle-to-vehicle (V2I) communication scenarios are becoming increasingly frequent, bringing significant efficiency improvements and security optimizations to intelligent transportation systems. However, this trend also exposes V2X to increasingly complex cybersecurity threats, such as data tampering, denial-of-service attacks, and identity forgery, seriously threatening vehicle operational safety and user privacy. Therefore, building an efficient and reliable intrusion detection system (IDS) has become a core component in ensuring V2X security.
[0003] Currently, mainstream intrusion detection technologies in the industry mainly rely on single-stage multi-classification models. The core problem faced by existing single-stage multi-classification models lies in the highly imbalanced distribution of samples. With the expansion of connected vehicle attack datasets (such as authoritative datasets like VeReMi, which cover more than 19 attack patterns), the surge in the number of attack types has led to significant differences in the number of samples in each category of the training data. Furthermore, the computational efficiency of single-stage models is becoming increasingly prominent. Connected vehicle scenarios require intrusion detection systems to have millisecond-level response capabilities to handle real-time data streams, but single-stage models need to perform multi-classification inference across all dimensions for each input sequence, resulting in high computational overhead and latency. In large-scale connected vehicle networks (such as city-level V2X networks), data throughput surges, and the processing speed of single-stage models often becomes a bottleneck, failing to meet the requirements of low-latency security protection. Moreover, existing technologies lack adaptability to the evolution of attack patterns. When new attacks emerge, single-stage models need to retrain the entire classification system, resulting in long update cycles, high maintenance costs, and difficulty in dynamically responding to rapidly changing security threats.
[0004] The aforementioned shortcomings limit the performance of existing technologies in practical applications: on the one hand, detection accuracy cannot remain stable under complex attack scenarios, and critical security events may be missed; on the other hand, system resources are consumed excessively, making it difficult to operate efficiently in resource-constrained environments such as in-vehicle terminals or edge nodes. As the scale of connected vehicles expands and attack complexity increases, the limitations of single-stage models have evolved from a technical bottleneck into a source of security risk. Therefore, an innovative detection framework is urgently needed to fundamentally solve the problem of imbalanced samples, while improving detection efficiency and stability, providing more reliable technical support for connected vehicle security. Summary of the Invention
[0005] To address the shortcomings of the existing technologies, the technical problem to be solved by this invention is: how to provide a two-stage vehicle network intrusion detection method, which, through a phased processing strategy, enables the system to meet the real-time requirements of vehicle networks while ensuring high detection accuracy, thereby improving the real-time performance, targeting, and reliability of vehicle network intrusion detection and the vehicle network system.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0007] A two-stage vehicle-to-everything (V2X) intrusion detection method includes:
[0008] S1: Obtain the input sequence of vehicle data to be detected;
[0009] S2: Input the data sequence of the vehicle to be detected into the trained intrusion detection model and output the corresponding attack detection results;
[0010] The processing steps of the intrusion detection model include:
[0011] S201: Input the data sequence of the vehicle to be detected into the two-dimensional convolution classifier and output the corresponding binary classification result;
[0012] S202: If the binary classification result is attack data, proceed to step S203; if the binary classification result is legitimate data, proceed to step S205.
[0013] S203: Input the vehicle data sequence to be detected into the Robust LSTM classifier and output the corresponding attack type label;
[0014] S204: Output the corresponding attack data label and attack type label as the attack detection result;
[0015] S205: Output the corresponding valid data label as the attack detection result;
[0016] S3: Use the attack detection results output by the intrusion detection model as the intrusion detection results of the vehicle data sequence to be detected.
[0017] Preferably, in step S201, the processing steps of the two-dimensional convolutional classifier include:
[0018] S2011: Convert the input vehicle data sequence to be detected into a time feature sequence using a sliding window;
[0019] S2012: Rearrange the time feature series into a two-dimensional feature matrix;
[0020] S2013: After processing the two-dimensional feature matrix through the first two-dimensional convolution module, time pooling is then performed to obtain the first feature map;
[0021] S2014: After processing the first feature map through the second two-dimensional convolution module, the second feature map is obtained by time pooling.
[0022] S2015: After flattening the second feature map, it is input into a two-layer fully connected network to obtain the corresponding binary classification result.
[0023] Preferably, the first two-dimensional convolutional module includes cascaded two-dimensional convolutional layers with an inflation rate of 2, batch normalization layers, and ReLU activation functions;
[0024] The second two-dimensional convolutional module consists of cascaded two-dimensional convolutional layers with an inflation rate of 4, batch normalization layers, and ReLU activation functions.
[0025] Preferably, the fully connected network includes cascaded fully connected layers, Dropout layers, and ReLU activation functions.
[0026] Preferably, in step S203, the processing steps of the Robust LSTM classifier include:
[0027] S2031: Perform batch normalization on the input vehicle data sequence to be detected to obtain normalized features;
[0028] S2032: Input the normalized features into a four-layer bidirectional LSTM, and capture the forward and reverse information of the sequence to obtain the bidirectional information representation of the sequence;
[0029] S2033: Extract the hidden state of the last time step from the bidirectional information representation of the sequence as the global feature vector;
[0030] S2034: Input the global feature vector into a multi-layer fully connected network for dimensionality reduction and feature extraction to obtain deep features;
[0031] S2035: Map deep features to the number of categories to obtain the corresponding attack type.
[0032] Preferably, the fully connected network includes cascaded fully connected layers, Dropout layers, and ReLU activation functions.
[0033] Preferably, in step S2, when training the intrusion detection model, legitimate data and attack data are used as two types of labels to train the two-dimensional convolutional classifier.
[0034] Preferably, in step S2, when training the intrusion detection model, a Robust LSTM classifier is trained using attack data with multiple attack type labels.
[0035] Compared with existing technologies, the two-stage vehicle network intrusion detection method of this invention has the following advantages:
[0036] In the first stage, this invention uses a two-dimensional convolutional classifier to determine whether the input data is malicious or legitimate. The design of the two-dimensional convolutional classifier fully utilizes the ability of the two-dimensional convolutional structure to capture multi-dimensional features. A sliding window converts the time series into a two-dimensional feature matrix, effectively extracting spatial correlation features from the vehicle data. The design of two-dimensional convolutional layers with different dilation rates expands the receptive field without significantly increasing the number of parameters, enabling the capture of longer sequence dependencies and enhancing the ability to identify complex attack patterns. Temporal pooling effectively extracts key features, reduces redundant information, and improves processing efficiency. The binary classification fast filtering mechanism efficiently separates legitimate and malicious data, significantly reducing the computational burden of subsequent processing and enabling real-time processing of large-scale vehicle network data streams. Furthermore, this design has strong tolerance to data noise and outliers, enhancing the model's robustness in real-world vehicle network environments, providing high-quality input data for subsequent attack type identification, avoiding unnecessary deep analysis of legitimate data, and thus improving the real-time performance of vehicle network intrusion detection.
[0037] In the second stage, this invention outputs attack type labels using a Robust LSTM classifier. The Robust LSTM classifier, through a four-layer bidirectional LSTM structure, simultaneously captures the forward and reverse dependencies of the sequence, providing more comprehensive sequence context information and accurately identifying complex attack patterns with time-series characteristics. Batch normalization processing in the input stage enhances the model's training stability and generalization ability, making it more adaptable to different data distributions and reducing the risk of overfitting. Extracting the hidden state of the last time step from the bidirectional sequence information representation as a global feature vector ensures the preservation of key sequence information and avoids information loss in long sequences. The feature dimensionality reduction and extraction mechanism of the multi-layer fully connected network effectively removes noise and improves the accuracy of attack type identification. This design is particularly suitable for the sequence characteristics of vehicle network attack data, accurately distinguishing different types of attacks and providing precise decision-making basis for subsequent defense measures. This allows the system to adopt targeted protection strategies for different attack types, thereby further improving the targeting and reliability of vehicle network intrusion detection.
[0038] This invention presents a two-stage vehicle-to-everything (V2X) intrusion detection method that optimizes overall detection performance through rational division of labor and complementary advantages. On one hand, binary classification using a two-dimensional convolutional classifier quickly filters out most legitimate data, significantly reducing the computational load of subsequent processing and meeting the real-time requirements of V2X systems. On the other hand, for suspected attack data, a Robust LSTM classifier is used for deep analysis, fully leveraging the modeling capabilities of LSTM for sequence data and improving the accuracy of attack type identification. The two-stage design avoids the limitations of a single model; the rapid filtering in the first stage and the deep analysis in the second stage complement each other, ensuring both detection efficiency and accuracy. This invention, through a phased processing strategy, enables the system to meet the real-time requirements of V2X systems while maintaining high detection accuracy, thereby improving the real-time performance, targeting, and reliability of V2X intrusion detection and the overall V2X system. Attached Figure Description
[0039] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:
[0040] Figure 1 This is a logic block diagram of a two-stage vehicle-to-everything (V2X) intrusion detection method. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0042] It should be noted that similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the figures, or the orientation or positional relationship commonly used when the product is in use. They are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. In addition, the terms "horizontal," "vertical," etc., do not mean that the component is required to be absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted. In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0043] The following detailed explanation illustrates the specific implementation methods:
[0044] Example:
[0045] This embodiment discloses a two-stage vehicle network intrusion detection method. The method constructs a two-stage vehicle network intrusion detection framework. By decoupling "attack judgment" and "attack type identification", the originally highly complex multi-classification task is split into two levels: "coarse judgment + fine classification". This allows each model to learn on a more singular and purer data distribution, thereby significantly improving the overall detection performance.
[0046] In the two-stage detection framework, the first stage consists of a binary classification model whose core task is to determine whether a vehicle is currently exhibiting suspicious behavior based on its historical behavior sequence. The model only needs to determine "abnormality," thus focusing on uncovering the global differences between attack and normal behavior, avoiding noise interference in mixed categories, and improving detection sensitivity and reliability. Once the first stage identifies a vehicle as an attacker, it is fed into the second-stage classifier for further identification of the specific attack type. In the second stage, all inputs to the model have been confirmed as attackers, allowing the model to focus on learning the subtle differences between different attack types without having its features diluted by a large number of normal samples.
[0047] like Figure 1 As shown, a two-stage vehicle-to-everything (V2X) intrusion detection method includes:
[0048] S1: Obtain the input sequence of vehicle data to be detected;
[0049] S2: Input the data sequence of the vehicle to be detected into the trained intrusion detection model and output the corresponding attack detection results;
[0050] The processing steps of the intrusion detection model include:
[0051] S201: Input the data sequence of the vehicle to be detected into the two-dimensional convolution classifier and output the corresponding binary classification result;
[0052] S202: If the binary classification result is attack data, proceed to step S203; if the binary classification result is legitimate data, proceed to step S205.
[0053] S203: Input the vehicle data sequence to be detected into the Robust LSTM classifier and output the corresponding attack type label;
[0054] S204: Output the corresponding attack data label and attack type label as the attack detection result;
[0055] S205: Output the corresponding valid data label as the attack detection result.
[0056] S3: Use the attack detection results output by the intrusion detection model as the intrusion detection results of the vehicle data sequence to be detected.
[0057] To better illustrate the technical solution of the present invention, this embodiment will be described in more detail through the following parts.
[0058] I. Two-Dimensional Convolutional Integrator Classifier (2d-CNN)
[0059] In the first stage, this invention constructs a lightweight two-dimensional convolutional classifier 2d-CNN to efficiently complete the binary classification task of normal vehicles and attacking vehicles.
[0060] The processing steps of a two-dimensional convolution classifier include:
[0061] S2011: Convert the input vehicle data sequence to be detected into a time feature sequence using a sliding window;
[0062] S2012: Rearranges the time feature sequence into a two-dimensional feature matrix (1,F,T); enabling the convolution operation to simultaneously model the joint relationship between the time dimension and the feature dimension.
[0063] S2013: After processing the two-dimensional feature matrix through the first two-dimensional convolution module, time pooling is then performed to obtain the first feature map;
[0064] S2014: After processing the first feature map through the second two-dimensional convolution module, the second feature map is obtained by time pooling.
[0065] In this embodiment, to avoid information loss across feature dimensions, pooling is applied only to the time axis (kernel = 1×2) to achieve gradual compression of the time series length while retaining all feature dimension structural information.
[0066] S2015: After flattening the second feature map, it is input into a two-layer fully connected network to obtain the corresponding binary classification result.
[0067] In this invention, the overall design of the 2D convolutional classifier (2D-CNN) can effectively identify temporal anomaly patterns while ensuring high detection speed, making it very suitable as a fast screening module in a two-stage framework. Compared to GRU / LSTM based on recurrent structures, the computation process of 2D-CNN does not require time step iterations, thus having a significant advantage in inference speed. For scenarios with high real-time requirements, such as connected vehicles, the first stage needs to quickly filter a large number of vehicles in a very short time. Its high efficiency makes it particularly suitable for deployment in resource-constrained onboard units (OBUs) or edge nodes.
[0068] Specifically, the first two-dimensional convolutional module includes cascaded two-dimensional convolutional layers with an inflation rate of 2, batch normalization layers, and ReLU activation functions;
[0069] The second two-dimensional convolutional module includes cascaded two-dimensional convolutional layers with an inflation rate of 4, batch normalization layers, and ReLU activation functions.
[0070] In this invention, the designed two-dimensional convolution module expands the temporal receptive field without adding extra parameters, thereby simultaneously capturing short-term mutations and medium- to long-term behavioral patterns.
[0071] Specifically, a fully connected network consists of cascaded fully connected layers, Dropout layers, and ReLU activation functions.
[0072] In the first stage, this invention uses a two-dimensional convolutional classifier to determine whether the input data is malicious or legitimate. The design of the two-dimensional convolutional classifier fully utilizes the ability of the two-dimensional convolutional structure to capture multi-dimensional features. A sliding window converts the time series into a two-dimensional feature matrix, effectively extracting spatial correlation features from the vehicle data. The design of two-dimensional convolutional layers with different dilation rates expands the receptive field without significantly increasing the number of parameters, enabling the capture of longer sequence dependencies and enhancing the ability to identify complex attack patterns. Temporal pooling effectively extracts key features, reduces redundant information, and improves processing efficiency. The binary classification fast filtering mechanism efficiently separates legitimate and malicious data, significantly reducing the computational burden of subsequent processing and enabling real-time processing of large-scale vehicle network data streams. Furthermore, this design has strong tolerance to data noise and outliers, enhancing the model's robustness in real-world vehicle network environments, providing high-quality input data for subsequent attack type identification, avoiding unnecessary deep analysis of legitimate data, and thus improving the real-time performance of vehicle network intrusion detection.
[0073] II. Robust LSTM Classifier
[0074] In the second stage, the present invention uses an improved LSTM classifier, Robust LSTM, which optimizes the traditional LSTM in many aspects.
[0075] The processing steps of the Robust LSTM classifier include:
[0076] S2031: Batch normalization is performed on the input vehicle data sequence to obtain normalized features; adding batch normalization to the input layer to normalize the features improves the model's stability and convergence speed.
[0077] S2032: The normalized features are input into a four-layer bidirectional LSTM (with 512 hidden units) to capture both forward and reverse information of the sequence, thus obtaining a bidirectional information representation of the sequence.
[0078] S2033: Extract the hidden state of the last time step from the bidirectional information representation of the sequence as the global feature vector;
[0079] S2034: The global feature vector is input into a multi-layer fully connected network for dimensionality reduction (feature dimension is successively reduced from 1024 to 256 and then to 128) and feature extraction to obtain deep features;
[0080] S2035: Map deep features to the number of categories to obtain the corresponding attack type.
[0081] Specifically, a fully connected network consists of cascaded fully connected layers, Dropout layers, and ReLU activation functions.
[0082] In the second stage, this invention outputs attack type labels using a Robust LSTM classifier. The Robust LSTM classifier, through a four-layer bidirectional LSTM structure, simultaneously captures the forward and reverse dependencies of the sequence, providing more comprehensive sequence context information and accurately identifying complex attack patterns with time-series characteristics. Batch normalization processing in the input stage enhances the model's training stability and generalization ability, making it more adaptable to different data distributions and reducing the risk of overfitting. Extracting the hidden state of the last time step from the bidirectional sequence information representation as a global feature vector ensures the preservation of key sequence information and avoids information loss in long sequences. The feature dimensionality reduction and extraction mechanism of the multi-layer fully connected network effectively removes noise and improves the accuracy of attack type identification. This design is particularly suitable for the sequence characteristics of vehicle network attack data, accurately distinguishing different types of attacks and providing precise decision-making basis for subsequent defense measures. This allows the system to adopt targeted protection strategies for different attack types, thereby further improving the targeting and reliability of vehicle network intrusion detection.
[0083] III. Model Training
[0084] In this embodiment, when training the intrusion detection model, legitimate data and attack data are used as two types of labels to train a two-dimensional convolutional classifier. A RobustLSTM classifier is trained using attack data (excluding legitimate data) with multiple attack type labels.
[0085] IV. Experimental Instructions
[0086] The federated learning experimental platform for this experiment was implemented in Python, and all experiments were conducted on a workstation equipped with an NVIDIA RTX4090 GPU (24GB of video memory).
[0087] The database used in this experiment is the VeReMi extended dataset, which is one of the most representative benchmark datasets in the field of connected vehicle security. This database contains 30 features, 20 categories, and 3,194,808 samples, including 1,900,539 valid samples and 1,294,269 samples exhibiting abnormal behavior.
[0088] Table 1 presents the overall performance of different algorithms. "LSTM" represents a simple LSTM single-stage multi-class detection model, whose core architecture consists of a single-layer LSTM network and a fully connected (linear) layer. Input features are first processed by the LSTM layer, which contains 128 hidden units, enabling the model to effectively capture long-term dependencies in sequence data. After processing the complete input sequence, the model selects the final hidden state as the global feature vector, representing the comprehensive information of the entire sequence. This feature vector is then passed to the fully connected layer, directly mapping to the output class space to achieve final classification. "Robust LSTM" refers to the improved LSTM single-stage multi-class detection model used in this invention; "Two-Stage Intrusion DetectionFramework" represents the two-stage vehicle network intrusion detection framework proposed in this invention.
[0089] Table 1
[0090]
[0091] This invention presents a two-stage vehicle-to-everything (V2X) intrusion detection method that optimizes overall detection performance through rational division of labor and complementary advantages. On one hand, binary classification using a two-dimensional convolutional classifier quickly filters out most legitimate data, significantly reducing the computational load of subsequent processing and meeting the real-time requirements of V2X systems. On the other hand, for suspected attack data, a Robust LSTM classifier is used for deep analysis, fully leveraging the modeling capabilities of LSTM for sequence data and improving the accuracy of attack type identification. The two-stage design avoids the limitations of a single model; the rapid filtering in the first stage and the deep analysis in the second stage complement each other, ensuring both detection efficiency and accuracy. This invention, through a phased processing strategy, enables the system to meet the real-time requirements of V2X systems while maintaining high detection accuracy, thereby improving the real-time performance, targeting, and reliability of V2X intrusion detection and the overall V2X system.
[0092] Another key advantage of the two-stage detection framework of this invention lies in its adaptability to real-time vehicle-to-everything (V2V) environments. In actual V2V scenarios, vehicles move continuously at high speeds, and their position and speed information changes constantly, requiring the model to complete judgments within milliseconds. By performing rapid binary classification in the first stage, the system can immediately exclude normal vehicles in most cases, thus saving significant computing resources. Only when suspicious behavior occurs is the second stage, with its more complex classifier, triggered for in-depth analysis. This "trigger-based" structure allows the system to significantly reduce the overall computational burden while ensuring detection accuracy, making it more suitable for deployment on resource-constrained in-vehicle devices or edge nodes.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A two-stage vehicle-to-everything (V2X) intrusion detection method, characterized in that, include: S1: Obtain the input sequence of vehicle data to be detected; S2: Input the data sequence of the vehicle to be detected into the trained intrusion detection model and output the corresponding attack detection results; The processing steps of the intrusion detection model include: S201: Input the data sequence of the vehicle to be detected into the two-dimensional convolution classifier and output the corresponding binary classification result; S202: If the binary classification result is attack data, proceed to step S203; if the binary classification result is legitimate data, proceed to step S205. S203: Input the vehicle data sequence to be detected into the Robust LSTM classifier and output the corresponding attack type label; S204: Output the corresponding attack data label and attack type label as the attack detection result; S205: Output the corresponding valid data label as the attack detection result; S3: Use the attack detection results output by the intrusion detection model as the intrusion detection results of the vehicle data sequence to be detected.
2. The two-stage vehicle network intrusion detection method as described in claim 1, characterized in that: In step S201, the processing steps of the two-dimensional convolution classifier include: S2011: Convert the input vehicle data sequence to be detected into a time feature sequence using a sliding window; S2012: Rearrange the time feature series into a two-dimensional feature matrix; S2013: After processing the two-dimensional feature matrix through the first two-dimensional convolution module, time pooling is then performed to obtain the first feature map; S2014: After processing the first feature map through the second two-dimensional convolution module, the second feature map is obtained by time pooling. S2015: After flattening the second feature map, it is input into a two-layer fully connected network to obtain the corresponding binary classification result.
3. The two-stage vehicle network intrusion detection method as described in claim 2, characterized in that: The first two-dimensional convolutional module consists of cascaded two-dimensional convolutional layers with an inflation rate of 2, batch normalization layers, and ReLU activation functions; The second two-dimensional convolutional module consists of cascaded two-dimensional convolutional layers with an inflation rate of 4, batch normalization layers, and ReLU activation functions.
4. The two-stage vehicle network intrusion detection method as described in claim 2, characterized in that: A fully connected network consists of cascaded fully connected layers, Dropout layers, and ReLU activation functions.
5. The two-stage vehicle network intrusion detection method as described in claim 1, characterized in that: In step S203, the processing steps of the RobustLSTM classifier include: S2031: Perform batch normalization on the input vehicle data sequence to be detected to obtain normalized features; S2032: Input the normalized features into a four-layer bidirectional LSTM, and capture the forward and reverse information of the sequence to obtain the bidirectional information representation of the sequence; S2033: Extract the hidden state of the last time step from the bidirectional information representation of the sequence as the global feature vector; S2034: Input the global feature vector into a multi-layer fully connected network for dimensionality reduction and feature extraction to obtain deep features; S2035: Map deep features to the number of categories to obtain the corresponding attack type.
6. The two-stage vehicle network intrusion detection method as described in claim 5, characterized in that: A fully connected network consists of cascaded fully connected layers, Dropout layers, and ReLU activation functions.
7. The two-stage vehicle network intrusion detection method as described in claim 1, characterized in that: In step S2, when training the intrusion detection model, legitimate data and attack data are used as two types of labels to train the two-dimensional convolutional classifier.
8. The two-stage vehicle network intrusion detection method as described in claim 1, characterized in that: In step S2, when training the intrusion detection model, a Robust LSTM classifier is trained using attack data with multiple attack type labels.