A method and device for detecting anomalies in vehicle-to-everything (V2X) collaborative attacks

By using graph neural networks and ensemble learning models to detect coordinated attacks in vehicle networks, this technology solves the problem of difficulty in identifying coordinated attacks in existing technologies and improves the security of intelligent connected vehicles.

CN120785662BActive Publication Date: 2026-01-30HUBEI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511292416.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-11
Publication Date
2026-01-30
Estimated Expiration
2045-09-11

AI Technical Summary

Technical Problem

Existing technologies are insufficient to effectively detect and identify coordinated attacks in vehicle networks, especially Sybil and Replay attacks, resulting in inadequate security for intelligent connected vehicle systems.

Method used

By combining graph neural network models with ensemble learning models, dynamic adjacency graphs and basic safety information between vehicles are acquired, topological features and historical trajectory features are extracted, and spatiotemporal features are fused to detect abnormal attacks.

Benefits of technology

It improves the accuracy of anomaly attack detection, enhances the network security of intelligent connected vehicles, and enables effective identification and early warning of coordinated attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120785662B_ABST
    Figure CN120785662B_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent connected vehicle data security technology, and particularly to a method and apparatus for detecting anomalies in vehicle-to-everything (V2X) collaborative attacks. The method includes: acquiring basic security information of the target vehicle and surrounding vehicles; constructing a dynamic adjacency graph between vehicles based on the basic security information; acquiring a graph neural network model, wherein the graph neural network model employs a multi-head attention mechanism; extracting topological structure features and historical trajectory features of the dynamic adjacency graph based on the dynamic adjacency graph and the graph neural network model; fusing the topological structure features and historical trajectory features to obtain spatiotemporal features; and detecting abnormal behavior of surrounding vehicles based on the spatiotemporal features and an ensemble learning model to obtain the type and probability of abnormal attacks, thereby improving the accuracy of abnormal attack detection and enhancing the network security of intelligent connected vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent connected vehicle data security technology, and in particular to a method and device for detecting anomalies in vehicle-to-everything (V2X) collaborative attacks. Background Technology

[0002] With the integration of intelligent transportation and vehicle-to-everything (V2X) technology, real-time sharing of status information between vehicles can ensure the safety of traffic operations.

[0003] Vehicles periodically broadcast Basic Safety Messages (BSMs) to each other, enabling surrounding vehicles to perceive their speed, position, acceleration, and direction of travel, so that they can perform advanced driver assistance functions such as path optimization, collision warning, and cooperative control.

[0004] However, since vehicles rely on wireless communication to perform these advanced driver assistance functions, the system's security faces new challenges. Malicious attackers can exploit protocol vulnerabilities or identity forgery to inject false or expired information, misleading the system and causing traffic chaos or even serious accidents. These attacks include Sybil attacks and replay attacks.

[0005] Sybil attacks create false traffic patterns by forging multiple virtual identities; Replay attacks use historical data to obfuscate the system's perception of the current environment. These attack methods are often characterized by their coordination, strong concealment, and difficulty in being identified by traditional testing agencies, seriously threatening the operational safety of intelligent connected vehicles.

[0006] Traditional anomaly detection techniques often employ rule-based matching, statistical analysis, or shallow machine learning models. While these methods can be effective in certain static scenarios, they struggle to capture the complex and dynamic topological relationships between vehicles, particularly in analyzing multi-vehicle cooperative behavior and identifying attacks. Some research utilizes deep learning models for time series modeling, such as LSTM or autoencoders, which can uncover evolutionary patterns. However, these methods lack sufficient dependence on spatial structure and struggle to model the spatial communication characteristics between vehicles.

[0007] Therefore, how to detect anomalies in vehicle-to-everything (V2X) attacks and ensure the network security of intelligent connected vehicles is a pressing technical problem that needs to be solved. Summary of the Invention

[0008] In view of the above problems, the present invention provides a method and apparatus for detecting anomalies in vehicle network collaborative attacks that overcomes or at least partially solves the above problems.

[0009] In a first aspect, the present invention provides a method for detecting anomalies in vehicle-to-everything (V2X) collaborative attacks, applied in intelligent connected vehicles, wherein the intelligent connected vehicle includes an on-board unit and a roadside unit, comprising:

[0010] Obtain basic safety information about the target vehicle and surrounding vehicles;

[0011] Based on the aforementioned basic safety information, a dynamic adjacency graph between vehicles is constructed;

[0012] Obtain a graph neural network model, wherein the graph neural network model employs a multi-head attention mechanism;

[0013] Based on the dynamic adjacency graph and the graph neural network model, the topological structure features and historical trajectory features of the dynamic adjacency graph are extracted;

[0014] Spatiotemporal features are obtained by fusing topological structure features and historical trajectory features;

[0015] Based on the aforementioned spatiotemporal features and ensemble learning model, abnormal behavior of surrounding vehicles is detected, and the types and probabilities of abnormal attacks are obtained.

[0016] Preferably, the basic security information includes: a unique vehicle number, a vehicle type identifier, a transmission timestamp, vehicle three-dimensional location information, a vehicle speed vector, a message number, and receiving channel parameters, wherein the receiving channel parameters include: a signal-to-noise ratio and a communication delay.

[0017] Preferably, based on the basic safety information, a dynamic adjacency graph between vehicles is constructed, including:

[0018] Based on the aforementioned basic safety information, determine the Euclidean distances between the surrounding vehicles and the target vehicle;

[0019] Based on the Euclidean distance, the adjacency matrix between the target vehicle and surrounding vehicles is determined, and undirected adjacency edges are established between the target vehicle and surrounding vehicles.

[0020] Based on the received channel parameters and Euclidean distance, a weight is assigned to each undirected adjacent edge to construct a dynamic adjacency graph between vehicles. The dynamic adjacency graph is a graph structure with vehicles as nodes and communication connections between vehicles as undirected adjacent edges.

[0021] Preferably, based on the dynamic adjacency graph and the graph neural network model, the topological structure features and historical trajectory features of the dynamic adjacency graph are extracted, including:

[0022] The dynamic adjacency graph is input into the graph neural network model, and the topological structure features at any time step are finally output through the output features of each layer of the graph neural network model.

[0023] Based on the topological features at any time step, a sliding time window mechanism is used to extract the historical trajectory features of the target vehicle within a preset time period.

[0024] Preferably, the spatiotemporal features are obtained based on topological structure features and historical trajectory features, using the following formula:

[0025] ;

[0026] in, Spatiotemporal characteristics, Topological features, Characteristics of historical trajectory For weighting;

[0027] It is obtained by adaptive calculation using the following formula:

[0028] ;

[0029] in, For learnable parameter matrix, For bias terms, This is the subscript identifier used in the weight calculation module of the adaptive feature fusion mechanism. For the Sigmoid function, This is for splicing operations.

[0030] Preferably, based on the spatiotemporal features and the ensemble learning model, abnormal behavior detection of surrounding vehicles is performed to obtain the abnormal attack type and abnormal attack probability, including:

[0031] The spatiotemporal features are input into the anomaly probability estimator, which outputs the anomaly attack probability. The ensemble learning model includes: an anomaly probability estimator and an attack type classifier.

[0032] The spatiotemporal features are input into the attack type classifier, which outputs the abnormal attack type with the highest probability of abnormal attack.

[0033] Preferably, the attack type classifier employs a multi-base classifier and a majority voting mechanism, and the classification result is obtained according to the following formula:

[0034] ;

[0035] in, For the first Base classifier, This represents the total number of multi-base classifiers. For voting functions, Spatiotemporal characteristics, This is the classification result.

[0036] Preferably, after detecting abnormal behavior of surrounding vehicles based on the spatiotemporal features and the ensemble learning model to obtain the abnormal attack type and probability, the method further includes:

[0037] Based on the aforementioned abnormal attack types and probabilities, corresponding early warning measures will be implemented.

[0038] Preferably, based on the type and probability of the abnormal attack, corresponding early warning measures are implemented, including:

[0039] When the probability of an abnormal attack is greater than 0.9, the control will execute an emergency braking command;

[0040] When the probability of an abnormal attack is between 0.7 and 0.9, control and guide the target vehicle to leave the main lane;

[0041] When the probability of an abnormal attack is between 0.5 and 0.7, the control system records the abnormal information and uploads it to the cloud for asynchronous auditing.

[0042] When the probability of an abnormal attack is less than or equal to 0.5, the target vehicle is determined to be behaving normally, and no warning action is required.

[0043] Secondly, the present invention also provides a vehicle-to-everything (V2X) collaborative attack anomaly detection device, applied in intelligent connected vehicles, wherein the intelligent connected vehicle includes an on-board unit and a roadside unit, comprising:

[0044] The first acquisition module is used to acquire basic safety information of the target vehicle and surrounding vehicles;

[0045] A construction module is used to construct a dynamic adjacency graph between vehicles based on the aforementioned basic security information;

[0046] The second acquisition module is used to acquire a graph neural network model, wherein the graph neural network model adopts a multi-head attention mechanism;

[0047] The extraction module is used to extract the topological structure features and historical trajectory features of the dynamic adjacency graph based on the dynamic adjacency graph and the graph neural network model.

[0048] The fusion module is used to fuse spatiotemporal features based on topological features and historical trajectory features;

[0049] The module is used to detect abnormal behavior of surrounding vehicles based on the spatiotemporal features and the ensemble learning model, and to obtain the abnormal attack type and abnormal attack probability.

[0050] Thirdly, the present invention also 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 program to implement the method described in the first aspect.

[0051] Fourthly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.

[0052] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:

[0053] This invention provides a method for detecting anomalies in vehicle-to-everything (V2X) collaborative attacks, applicable to intelligent connected vehicles. The intelligent connected vehicle includes an onboard unit and a roadside unit. The method includes: acquiring basic security information about the target vehicle and surrounding vehicles; constructing a dynamic adjacency graph between vehicles based on the basic security information; acquiring a graph neural network model employing a multi-head attention mechanism; extracting topological features and historical trajectory features of the dynamic adjacency graph based on the dynamic adjacency graph and the graph neural network model; fusing the topological features and historical trajectory features to obtain spatiotemporal features; and detecting abnormal behavior of surrounding vehicles based on the spatiotemporal features and an ensemble learning model to obtain the type and probability of abnormal attacks, thereby improving the accuracy of abnormal attack detection and enhancing the network security of intelligent connected vehicles. Attached Figure Description

[0054] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference figures denote the same parts throughout the drawings. In the drawings:

[0055] Figure 1 This invention illustrates a flowchart of the steps involved in detecting anomalies in a vehicle-to-everything (V2X) collaborative attack method according to an embodiment of the present invention.

[0056] Figure 2 This diagram illustrates the overall process of the vehicle-to-everything (V2X) collaborative attack anomaly detection method in an embodiment of the present invention.

[0057] Figure 3 This invention illustrates a schematic diagram of the vehicle-to-everything (V2X) collaborative attack anomaly detection device in an embodiment of the present invention.

[0058] Figure 4 A schematic diagram of the structure of a computer device for implementing the vehicle network collaborative attack anomaly detection method in an embodiment of the present invention is shown. Detailed Implementation

[0059] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the invention and to fully convey the scope of the invention to those skilled in the art.

[0060] Example 1:

[0061] Embodiments of the present invention provide a method for detecting anomalies in vehicle-to-everything (V2X) cooperative attacks, applicable to intelligent connected vehicles, which include onboard units and roadside units, such as... Figure 1 As shown, it includes:

[0062] S101, Obtain basic safety information of the target vehicle and surrounding vehicles;

[0063] S102, Based on basic safety information, construct a dynamic adjacency graph between vehicles;

[0064] S103, Obtain the graph neural network model, which employs a multi-head attention mechanism;

[0065] S104, based on dynamic adjacency graph and graph neural network model, extracts the topological structure features and historical trajectory features of dynamic adjacency graph;

[0066] S105, based on topological features and historical trajectory features, fused to obtain spatiotemporal features;

[0067] S106, based on spatiotemporal features and an ensemble learning model, detects abnormal behavior of surrounding vehicles and obtains the type and probability of abnormal attacks.

[0068] S101, Obtain basic safety information about the target vehicle and surrounding vehicles. The target vehicle can be any vehicle.

[0069] In intelligent connected vehicles, the On Board Unit (OBU) and Road Side Unit (RSU) work together to broadcast and receive Basic Safety Information (BSM).

[0070] For the target vehicle, it can broadcast and receive basic safety information of surrounding vehicles through DSRC or C-V2X communication protocols at fixed intervals T.

[0071] The basic security information includes: vehicle unique number, vehicle type identifier, sending timestamp, vehicle three-dimensional position information, vehicle speed vector, message number, and receiving channel parameters, including: signal-to-noise ratio and communication delay.

[0072] Following S101, it also includes the preprocessing of basic security information.

[0073] Specifically, the data structure model for each piece of basic security information is as follows:

[0074]

[0075] in, A unique vehicle identification number. For vehicle type identification, For message sending timestamps, For vehicle three-dimensional position information, For the set of real numbers, For the vehicle's velocity vector, For message number, For vehicles At time step Complete status information.

[0076] In addition, it also includes received channel parameters, specifically the characteristics of the received signal parameters recorded when the roadside unit (RSU) receives basic safety information:

[0077]

[0078] in, For roadside units at time steps The timestamp of successful reception of basic security information, in dBm. To receive signal strength, Signal-to-noise ratio (SNR) is used to measure vehicle signal-to-noise ratio. The clarity and reliability of the transmitted signal, For vehicles The communication delay is specifically defined for this vehicle. The difference between the sending timestamp and the receiving timestamp is used to calculate the communication delay, as follows:

[0079]

[0080] To facilitate future use, the data collected from both the on-board unit (OBU) and the roadside unit (RSU) are standardized and fused, and stored in a local cache. This data serves as the raw input for the dynamic adjacency graph at each time step. All of them obtained the fused input feature set The specific definition is as follows:

[0081]

[0082] In time step At that time, a collection of basic safety information for all vehicles. For fusion operation.

[0083] In order to obtain more basic security data during the experimental simulation, the VeReMi public dataset can be used for simulation experiments. This method has multiple attack types (such as Sybil attack and Replay attack) and multiple communication densities, which can effectively simulate the urban-level vehicle network communication environment and is suitable for evaluating the robustness and generalization ability of abnormal behavior detection models in intelligent connected vehicles.

[0084] In the experimental implementation of this invention, the type=2 message in the VeReMi dataset is used to simulate the BSM broadcast behavior of the local vehicle OBU, and the type=3 message is used to simulate the reception of BSMs and channel characteristics of other vehicles. The main fields include transmission time, reception time, location, velocity vector, and received signal strength.

[0085] Next, execute S102 to construct a dynamic adjacency graph between vehicles based on basic safety information.

[0086] Specifically, based on basic safety information, the Euclidean distances between the surrounding vehicles and the target vehicle are determined;

[0087] Based on Euclidean distance, determine the adjacency matrix between the target vehicle and its surrounding vehicles, and establish undirected adjacency edges between the target vehicle and its surrounding vehicles.

[0088] Based on the received channel parameters, weights are assigned to each undirected adjacent edge to construct a dynamic adjacency graph between vehicles. The dynamic adjacency graph is a graph structure with vehicles as nodes and the passage connections between vehicles as undirected adjacent edges.

[0089] In a specific implementation, based on the basic security information obtained in S101, the following data set can be constructed as follows, wherein, at any time step... The vehicle collection at that time was For any vehicle, a triple can be modeled: ,in, For vehicle node set, For any time step The set of wireless adjacent edges at that time Let be the node feature matrix, where For node feature vectors, and .

[0090] In the obtained triplet, for each vehicle node, the corresponding node feature vector consists of its own features (vehicle). At time step (Complete status information) Its corresponding received signal parameter characteristics It is pieced together, that is:

[0091] When establishing undirected adjacent edges, the Euclidean distance between the target vehicle and any surrounding vehicles is calculated. Undirected adjacent edges are established between two vehicles that meet preset conditions, and no undirected adjacent edges are established between two vehicles that do not meet the preset conditions. Specifically, undirected adjacent edges are established according to the following formula:

[0092]

[0093] in, For the vehicle in time step Two-dimensional position coordinates, The preset condition, i.e., the preset communication radius threshold, is preferably 100m~300m in this embodiment of the invention. The standard Euclidean distance calculation formula establishes an undirected adjacent edge between two vehicles when the preset conditions of Euclidean distance are met.

[0094] Next, a weight is assigned to each undirected adjacent edge, and this assigned weight is determined based on the received channel parameters.

[0095] Specifically, based on the received channel parameters, the signal-to-noise ratio (SNR) and reception delay are obtained. Then, based on the Euclidean distance, the reciprocal of the Euclidean distance is calculated. Finally, based on the reciprocal of the Euclidean distance, the SNR, and the reception delay, the corresponding weights are obtained. The calculation formula is as follows:

[0096] in, Euclidean distance. For signal-to-noise ratio, Due to reception delay, Let be the weight of any undirected adjacent edge. For normalized weighted coefficients, satisfying Preferably, in the static weight setting method, .

[0097] This results in a dynamic adjacency graph between vehicles.

[0098] Next, step S103 is executed to obtain the graph neural network model, which employs a multi-head attention mechanism. Specifically, the graph attention network GAT is used as the graph neural network structure to perform weighted aggregation of neighbor node information.

[0099] Then, S104 is executed to extract the topological features and historical trajectory features of the dynamic adjacency graph based on the dynamic adjacency graph and graph neural network model.

[0100] Specifically, the dynamic adjacency graph is input into the graph neural network model, and the topological features at any time step are finally output through the output of each layer of the graph neural network model.

[0101] Based on the topological features at any time step, a sliding time window mechanism is used to extract historical trajectory features within a preset time period.

[0102] Among them, the topological structure features are the static features of the dynamic adjacency graph, while the historical trajectory features are the dynamic features of the dynamic adjacency graph.

[0103] Specifically, the graph neural network model employs a multi-head attention mechanism to extract semantic differences in the local topology from different perspectives. The resulting high-dimensional node features can effectively encode the contextual dependencies between the target vehicle and surrounding vehicles in terms of spatial structural domain behavior evolution.

[0104] First, because the graph neural network model uses a multi-head attention mechanism, if the target vehicle is in the first... The input features of the layer are , If the dimension of the input feature is , then in the th dimension... The output features of the layer are calculated using a multi-head attention mechanism as follows:

[0105] in, The number of attention heads in a multi-head attention mechanism. Let be the set of vehicle nodes surrounding the target vehicle. For the first The weight matrix of each attention head. To input dimensions Mapped to the output dimension, It is a non-linear activation function, preferably ELU. For splicing operations of attention head output. For the first Target vehicle node under attention For surrounding vehicle nodes The attention weights are defined as follows:

[0106] in, For the first Learnable parameters for each attention head; The activation function is a leakage coefficient, preferably 0.2; This indicates a splicing operation.

[0107] After passing through all layers of the encoding structure of this graph neural network model, the target vehicle node at time step is obtained. The topological features are denoted as .

[0108] Next, the historical trajectory features of the target vehicle within a preset time period are extracted. To model the historical behavior trend of nodes, a sliding time window mechanism is used to extract the state sequence of the target vehicle node within the past preset time period. The historical trajectory features are extracted using GRU, 1D-CNN, or other temporal coding networks, denoted as: .

[0109] After obtaining the topological structure features and historical trajectory features, step S105 is executed. Based on the topological structure features and historical trajectory features, spatiotemporal features are fused and obtained using the following formula:

[0110] ;

[0111] in, Spatiotemporal characteristics, Topological features, Characteristics of historical trajectory For weighting;

[0112] It is obtained by adaptive calculation using the following formula:

[0113] ;

[0114] in, For learnable parameter matrix, For bias terms, This is the subscript identifier used in the weight calculation module of the adaptive feature fusion mechanism. For the Sigmoid function, This is for splicing operations.

[0115] This adaptive feature fusion mechanism can automatically learn the importance of different feature sources based on the behavior patterns of different times and different vehicles, effectively improving the expressive power and robustness of abnormal vehicle behavior detection in dynamic environments.

[0116] After fusing the spatiotemporal features, the next step is to execute S106, which uses the spatiotemporal features and the ensemble learning model to detect abnormal behavior of surrounding vehicles and obtain the type and probability of abnormal attacks.

[0117] Specifically, the ensemble learning model includes an anomaly probability estimator and an attack type classifier. Spatiotemporal features are input into the anomaly probability estimator, which outputs the anomaly attack probability; the spatiotemporal features are output into the attack type classifier, which outputs the anomaly attack type with the highest anomaly attack probability.

[0118] First, the spatiotemporal characteristics Input into the anomaly probability estimator to estimate the target vehicle's time step. abnormal attack probability value Specifically, the formula for calculating the probability of this abnormal attack is as follows:

[0119] in, It is a weight vector. It is a bias term; The Sigmoid activation function is used to map the output to... Interval. If If the value exceeds the set threshold (e.g., 0.7 or 0.8), the target vehicle's behavior is deemed to have potential anomalies, and its attack type needs to be further classified.

[0120] Next, the attack type with the highest probability is output by the attack type classifier. Specifically, a Softmax classifier is used, and the probability vector of the attack type at time step is denoted as... The specific calculation formula is as follows:

[0121]

[0122] in, It is the weight matrix of the Softmax classifier. This is the bias vector. The Softmax function is defined as:

[0123]

[0124] in, This represents the number of abnormal attack types.

[0125] In one alternative implementation, the attack type classifier employs a multi-base classifier and a majority voting mechanism, and obtains the classification result according to the following formula:

[0126] ;

[0127] in, For the first Base classifier, This represents the total number of multi-base classifiers, typically set to 30-500. For voting functions, Spatiotemporal characteristics, This is the classification result.

[0128] This attack type classifier includes the following three base classifiers: K-Nearest Neighbor (KNN), Decision Tree (DT), and Random Forest (RF). Each base classifier is described below:

[0129] K-Nearest Neighbors (KNN): By calculating the feature vector distance (such as Euclidean distance) between the test sample and the labeled training samples, the K nearest neighbors with the smallest distance are selected, and their class is determined based on a voting principle. The performance of KNN is highly dependent on two key factors: the selection of the value of K and the setting of the distance metric. To avoid the unfair influence of different feature units, in practical applications, it is usually necessary to perform standardization or normalization on the original feature vectors.

[0130] Decision tree: A decision tree is generated by dividing features to determine which category a sample belongs to.

[0131] The classification rules are organized in a tree structure, and decision paths are constructed by recursively partitioning the feature space. Specifically, it is assumed that the input training set... , Let represent the feature vector of the i-th sample. Indicates the first The true class label of each sample, m represents the total number of training samples, n represents the number of feature dimensions, and the attribute set. Each attribute This corresponds to a single, separable dimension. The decision tree generation function, TreeGenerate(T, G), can be executed according to the following steps:

[0132] Step 1: Generate the current node.

[0133] Step 2: If The middle sample belongs entirely to a certain category Then the node will be marked as a category. Find the leaf node and return that node.

[0134] Step 3: If attribute empty or Medium sample If the values ​​are the same, then node is marked as the class with the most classes in the sample, and node is returned.

[0135] Step 4: From the attributes Focus on selecting the optimal attribute .

[0136] Step 5: For Each value in Extract a subset of samples If the sample categories are consistent, then a leaf node is generated for that branch, with the category being that category; otherwise, the process is recursively called. Generate child nodes.

[0137] Step 6: Return to the current node.

[0138] Random Forest: A typical ensemble method based on the Bagging strategy, which constructs multiple differential decision trees to learn input features in parallel. Specific steps include:

[0139] The training set is repeatedly sampled to construct n sample subsets; a decision tree is trained independently on each subset; during the final prediction, the prediction results of all trees are synthesized through a voting mechanism.

[0140] The K-nearest neighbors and random forest classifiers each use their own voting mechanisms for decision-making. However, this invention implements a voting mechanism on the classification results output by multiple classifiers to ensure that the final output has consistency and robustness.

[0141] Following S106, it also includes: implementing corresponding early warning measures based on the type and probability of abnormal attacks.

[0142] Specifically, when the probability of an abnormal attack is greater than 0.9, the control executes an emergency braking command;

[0143] When the probability of an abnormal attack is between 0.7 and 0.9, control and guide the vehicle to leave the main lane;

[0144] When the probability of an abnormal attack is between 0.5 and 0.7, the control system records the abnormal information and uploads it to the cloud for asynchronous auditing.

[0145] When the probability of an abnormal attack is less than or equal to 0.5, the target vehicle is determined to be behaving normally, and no warning action is required.

[0146] By implementing a tiered response mechanism and a multi-source linkage early warning and control strategy, the real-time security protection and system robustness of intelligent connected vehicle networks are ensured.

[0147] Specifically, the response decision-making is based on a tiered strategy divided into four levels:

[0148]

[0149] in, In response to the decision, The probability of an abnormal attack is set to 0.9. When the probability of an abnormal attack is higher than 0.9, an emergency braking command is triggered through the vehicle unit, and an on-board audio-visual warning is also triggered to alert the driver and surrounding vehicles.

[0150] When the probability of an abnormal attack is between 0.7 and 0.9, control and guide the vehicle to leave the main lane.

[0151] When the probability of an abnormal attack is between 0.5 and 0.7, we do not intervene immediately, but instead record the abnormal information and synchronize it to the cloud for asynchronous auditing.

[0152] When the probability of an abnormal attack is less than or equal to 0.5, the target vehicle is determined to be operating normally and no additional action is required.

[0153] After triggering the response decision, the relevant anomaly information is encapsulated into a structured early warning data packet for local alerts and synchronized analysis in the cloud. Defined as the following quintuple:

[0154]

[0155] in, It is the unique identification number of the target vehicle. This represents the probability value of an abnormal attack on the target vehicle. It represents the type of abnormal attack corresponding to the maximum value in the output of the Softmax classifier. This is the classification output vector of the anomaly detection model for the samples. This is the timestamp for anomaly detection. For the target vehicle in time step Three-dimensional position information at that time.

[0156] To meet the real-time response requirements of high-speed dynamic traffic environments, the latency of the entire detection-response process will be strictly controlled. Overall operation time latency. Defined as:

[0157]

[0158] in, For communication data acquisition and transmission delay, For dynamic adjacency graph construction and undirected adjacency edge weight update time, For the processing time of the graph neural network model, The timeframe for anomaly attack classifier judgment (including anomaly assessment and attack identification) is defined. The overall design goal is to meet the real-time requirements of autonomous driving-related standards such as ISO 21434.

[0159] The performance of this invention is evaluated by introducing the following performance indicators in simulation and real vehicle testing. Specifically, the confusion matrix is ​​used as the basic indicator of classification performance. The confusion matrix compares the prediction results of the test set samples with the real labels and counts the number of true positives (TP), true negatives (TN), false positives (FP), and false negatives (FN), reflecting its detection capability and false positive / false negative distribution from multiple dimensions.

[0160] For the third type of anomaly, if it is accurately classified as "Other," it is also considered a correct identification. Based on the confusion matrix, the following performance metrics are further calculated:

[0161] Accuracy: In this context, TP represents a true positive (correct detection of an abnormal attack), TN represents a true negative (correct detection of a normal attack), FP represents a false positive, and FN represents a false negative.

[0162] Precision: This indicates the proportion of detected anomalies that are actually malicious attacks.

[0163] Recall: , which represents the proportion of all actual anomalies identified by the system.

[0164] F1 score: This metric comprehensively measures the stability of the detection under imbalanced samples, and is particularly suitable for evaluating the detection effectiveness of small-sample, highly destructive attacks such as Sybil attacks.

[0165] The above-mentioned indicators provide a quantitative basis for performance optimization and threshold adjustment of each model in the scheme, ensuring the practicality and accuracy of each model.

[0166] The overall concept of this invention is as follows: Figure 2 As shown, basic security data in the real environment is first collected. Then, a dynamic adjacency graph structure is constructed based on this basic security data. The dynamic adjacency graph is processed by a graph neural network to extract features, including topological features and historical trajectory features. Then, the extracted features are input into an integrated learning model for attack identification and anomaly detection. Finally, early warning output and response control are implemented, thereby improving the network security of intelligent connected vehicles.

[0167] One or more technical solutions in the embodiments of the present invention have at least the following technical effects or advantages:

[0168] This invention provides a method for detecting anomalies in vehicle-to-everything (V2X) collaborative attacks, applicable to intelligent connected vehicles. The intelligent connected vehicle includes an onboard unit and a roadside unit. The method includes: acquiring basic security information about the target vehicle and surrounding vehicles; constructing a dynamic adjacency graph between vehicles based on the basic security information; acquiring a graph neural network model employing a multi-head attention mechanism; extracting topological features and historical trajectory features of the dynamic adjacency graph based on the dynamic adjacency graph and the graph neural network model; obtaining spatiotemporal features based on the topological features and historical trajectory features; and detecting abnormal behavior of surrounding vehicles based on the spatiotemporal features and an ensemble learning model to obtain the type and probability of abnormal attacks. This improves the accuracy of anomaly detection and enhances the network security of intelligent connected vehicles.

[0169] Example 2:

[0170] Based on the same inventive concept, this invention also provides a vehicle-to-everything (V2X) collaborative attack anomaly detection device, applied in intelligent connected vehicles, wherein the intelligent connected vehicle includes an on-board unit and a roadside unit, such as... Figure 3 As shown, it includes:

[0171] The first acquisition module 301 is used to acquire basic safety information of the target vehicle and surrounding vehicles;

[0172] Construction module 302 is used to construct a dynamic adjacency graph between vehicles based on the basic safety information;

[0173] The second acquisition module 303 is used to acquire a graph neural network model, wherein the graph neural network model adopts a multi-head attention mechanism;

[0174] Extraction module 304 is used to extract the topological structure features and historical trajectory features of the dynamic adjacency graph based on the dynamic adjacency graph and the graph neural network model;

[0175] The fusion module 305 is used to fuse spatiotemporal features based on topological features and historical trajectory features to obtain spatiotemporal features.

[0176] The module 306 is used to detect abnormal behavior of surrounding vehicles based on the spatiotemporal features and the ensemble learning model, and to obtain the abnormal attack type and the abnormal attack probability.

[0177] In one optional implementation, the basic security information includes: a unique vehicle number, a vehicle type identifier, a transmission timestamp, vehicle three-dimensional location information, a vehicle speed vector, a message number, and receiving channel parameters, wherein the receiving channel parameters include: a signal-to-noise ratio and a communication delay.

[0178] In one alternative implementation, the construction module 302 is configured to:

[0179] Based on the aforementioned basic safety information, determine the Euclidean distances between the surrounding vehicles and the target vehicle;

[0180] Based on the Euclidean distance, the adjacency matrix between the target vehicle and surrounding vehicles is determined, and undirected adjacency edges are established between the target vehicle and surrounding vehicles.

[0181] Based on the received channel parameters and Euclidean distance, a weight is assigned to each undirected adjacent edge to construct a dynamic adjacency graph between vehicles. The dynamic adjacency graph is a graph structure with vehicles as nodes and communication connections between vehicles as undirected adjacent edges.

[0182] In one alternative implementation, the extraction module 304 is used for:

[0183] The dynamic adjacency graph is input into the graph neural network model, and the topological structure features at any time step are finally output through the output features of each layer of the graph neural network model.

[0184] Based on the topological features at any time step, a sliding time window mechanism is used to extract the historical trajectory features of the target vehicle within a preset time period.

[0185] In one alternative implementation, the fusion module 305 is used for:

[0186] Based on topological structure features and historical trajectory features, spatiotemporal features are obtained by fusing them, and are calculated using the following formula:

[0187] ;

[0188] in, Spatiotemporal characteristics, Topological features, Characteristics of historical trajectory For weighting;

[0189] It is obtained by adaptive calculation using the following formula:

[0190] ;

[0191] in, For learnable parameter matrix, For bias terms, This is the subscript identifier used in the weight calculation module of the adaptive feature fusion mechanism. For the Sigmoid function, This is for splicing operations.

[0192] In one alternative implementation, module 306 is obtained, which is used for:

[0193] The spatiotemporal features are input into the anomaly probability estimator, which outputs the anomaly attack probability. The ensemble learning model includes: an anomaly probability estimator and an attack type classifier.

[0194] The spatiotemporal features are input into the attack type classifier, which outputs the abnormal attack type with the highest probability of abnormal attack.

[0195] In one optional implementation, the attack type classifier employs a multi-base classifier and a majority voting mechanism, and obtains the classification result according to the following formula:

[0196] ;

[0197] in, For the first Base classifier, This represents the total number of multi-base classifiers. For voting functions, Spatiotemporal characteristics, This is the classification result.

[0198] In one optional implementation, it further includes: an early warning module, used for:

[0199] Based on the aforementioned abnormal attack types and probabilities, corresponding early warning measures will be implemented.

[0200] In one alternative implementation, the early warning module is specifically used for:

[0201] When the probability of an abnormal attack is greater than 0.9, the control will execute an emergency braking command;

[0202] When the probability of an abnormal attack is between 0.7 and 0.9, control and guide the target vehicle to leave the main lane;

[0203] When the probability of an abnormal attack is between 0.5 and 0.7, the control system records the abnormal information and uploads it to the cloud for asynchronous auditing.

[0204] When the probability of an abnormal attack is less than or equal to 0.5, the target vehicle is determined to be behaving normally, and no warning action is required.

[0205] Example 3:

[0206] Based on the same inventive concept, embodiments of the present invention provide a computer device, such as... Figure 4 As shown, it includes a memory 404, a processor 402, and a computer program stored in the memory 404 and executable on the processor 402. When the processor 402 executes the program, it implements the steps of the above-described vehicle network collaborative attack anomaly detection method.

[0207] Among them, Figure 4In this document, a bus architecture (represented by bus 400) is used. Bus 400 may include any number of interconnected buses and bridges, linking various circuits including one or more processors represented by processor 402 and memory represented by memory 404. Bus 400 may also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. Bus interface 406 provides an interface between bus 400 and receiver 401 and transmitter 403. Receiver 401 and transmitter 403 may be the same element, i.e., a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 402 is responsible for managing bus 400 and general processing, while memory 404 can be used to store data used by processor 402 during operation.

[0208] Example 4:

[0209] Based on the same inventive concept, embodiments of the present invention provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method for detecting anomalies in vehicle network collaborative attacks.

[0210] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0211] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0212] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are explicitly recited in each embodiment. Rather, as reflected in each embodiment, inventive aspects lie in fewer than all features of the single foregoing disclosed embodiment. Therefore, the claims, following the detailed description, are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.

[0213] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.

[0214] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the specific implementation, any of the claimed embodiments can be used in any combination.

[0215] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the vehicle-to-everything (V2X) collaborative attack anomaly detection device or computer device according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

[0216] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.

Claims

1. A cyber-physical attack anomaly detection method applied to a smart connected vehicle, the smart connected vehicle comprising a vehicle unit and a roadside unit, characterized in that, The method comprises the following steps: acquiring basic safety information of a target vehicle and surrounding vehicles, wherein the basic safety information comprises a vehicle unique number, a vehicle type identifier, a sending timestamp, vehicle three-dimensional position information, a vehicle speed vector, a message number, and a receiving channel parameter, wherein the receiving channel parameter comprises a signal-to-noise ratio and a communication delay; based on the basic safety information, constructing a dynamic adjacency graph between vehicles, comprising: based on the basic safety information, determining the Euclidean distance between the target vehicle and each of the surrounding vehicles; based on the Euclidean distance, determining an adjacency matrix of the target vehicle and the surrounding vehicles, and establishing a non-directional adjacency edge between the target vehicle and the surrounding vehicles; based on the receiving channel parameter and the Euclidean distance, assigning a weight to each non-directional adjacency edge to construct a dynamic adjacency graph between vehicles, wherein the dynamic adjacency graph is a graph structure taking vehicles as nodes and communication connections between vehicles as non-directional adjacency edges; acquiring a graph neural network model, wherein the graph neural network model adopts a multi-head attention mechanism; based on the dynamic adjacency graph and the graph neural network model, extracting topological structure features and historical trajectory features of the dynamic adjacency graph; based on the topological structure features and the historical trajectory features, fusing to obtain spatio-temporal features; based on the spatio-temporal features and an ensemble learning model, detecting abnormal behaviors of the surrounding vehicles to obtain an abnormal attack type and an abnormal attack probability, comprising: inputting the spatio-temporal features into an abnormal probability evaluator to output an abnormal attack probability, wherein the ensemble learning model comprises an abnormal probability evaluator and an attack type classifier; inputting the spatio-temporal features into the attack type classifier to output an abnormal attack type with the maximum abnormal attack probability, wherein the attack type classifier adopts a multi-base classifier and a majority voting mechanism, and the classification result is obtained according to the following calculation formula: ; wherein, is the number of base classifiers, is the number of base classifiers, is the number of base classifiers, is the number of base classifiers, is the number of base classifiers, is the number of base classifiers, based on the abnormal attack type and the abnormal attack probability, implementing corresponding warning measures, comprising: when the abnormal attack probability is greater than 0.9, controlling to execute an emergency braking instruction; when the abnormal attack probability is between 0.7 and 0.9, controlling to guide the target vehicle to leave the main lane; when the abnormal attack probability is between 0.5 and 0.7, controlling to record abnormal information and upload the abnormal information to the cloud for asynchronous auditing; when the abnormal attack probability is less than or equal to 0.5, determining that the target vehicle behaves normally and no warning operation is needed.

2. The method of claim 1, wherein, based on the dynamic adjacency graph and the graph neural network model, extracting topological structure features and historical trajectory features of the dynamic adjacency graph, comprising: inputting the dynamic adjacency graph into the graph neural network model, outputting features through each layer structure of the graph neural network model, and finally outputting topological structure features at any time step; based on the topological structure features at any time step, adopting a sliding time window mechanism to extract historical trajectory features of the target vehicle within a preset time period.

3. The method of claim 1, wherein, based on the topological structure features and the historical trajectory features, fusing to obtain spatio-temporal features, which are obtained according to the following formula: ; wherein, is a spatio-temporal feature, is a topological structure feature, is a historical trajectory feature, is a fusion weight; is adaptively calculated from the equation: ; wherein, is a learnable parameter matrix, is a bias term, is an index identifier for a weight computation module in the adaptive feature fusion mechanism, is a Sigmoid function, is a concatenation operation.

4. A vehicle networking cooperative attack anomaly detection device applied to an intelligent networked vehicle, the intelligent networked vehicle comprising a vehicle-mounted unit and a roadside unit, characterized in that, comprising: The first obtaining module is configured to obtain basic safety information of a target vehicle and surrounding vehicles, the basic safety information including: a vehicle unique number, a vehicle type identifier, a sending timestamp, vehicle three-dimensional position information, a vehicle speed vector, a message number, and a receiving channel parameter, wherein the receiving channel parameter includes a signal-to-noise ratio and a communication delay; The construction module is configured to construct a dynamic adjacency graph between vehicles based on the basic safety information, and is configured to: determine, based on the basic safety information, an Euclidean distance between each of the surrounding vehicles and the target vehicle; determine, based on the Euclidean distance, an adjacency matrix of the target vehicle and the surrounding vehicles, and establish a non-directional adjacency edge between the target vehicle and the surrounding vehicles; assign a weight to each non-directional adjacency edge based on the receiving channel parameter and the Euclidean distance, and construct a dynamic adjacency graph between vehicles, the dynamic adjacency graph being a graph structure with vehicles as nodes and communication connections between vehicles as non-directional adjacency edges; The second obtaining module is configured to obtain a graph neural network model, the graph neural network model adopting a multi-head attention mechanism; The extraction module is configured to extract a topological structure feature and a historical trajectory feature of the dynamic adjacency graph based on the dynamic adjacency graph and the graph neural network model; The fusion module is configured to fuse the topological structure feature and the historical trajectory feature to obtain a spatio-temporal feature; The obtaining module is configured to detect an abnormal behavior of the surrounding vehicles based on the spatio-temporal feature and an ensemble learning model, and obtain an abnormal attack type and an abnormal attack probability, and is configured to: input the spatio-temporal feature into an anomaly probability evaluator to output the abnormal attack probability, the ensemble learning model including the anomaly probability evaluator and an attack type classifier; input the spatio-temporal feature into the attack type classifier to output an abnormal attack type with the maximum abnormal attack probability, the attack type classifier adopting a multi-base classifier and a majority voting mechanism, and obtaining a classification result according to the following calculation formula: ; wherein, is the number of base classifiers, base classifier, is the total number of base classifiers, is a voting function, is a spatio-temporal feature, is a classification result; The warning module is configured to implement corresponding warning measures based on the abnormal attack type and the abnormal attack probability, and is specifically configured to: when the abnormal attack probability is greater than 0.9, control an emergency braking instruction to be executed; when the abnormal attack probability is between 0.7 and 0.9, control the target vehicle to be guided to leave a main lane; when the abnormal attack probability is between 0.5 and 0.7, control abnormal information to be recorded and uploaded to a cloud for asynchronous auditing; when the abnormal attack probability is less than or equal to 0.5, determine that the target vehicle behaves normally, and no warning operation is needed.

Citation Information

Patent Citations

  • Internet of vehicles attack detection method and system based on attention and space-time convolution

    CN119316840A

  • Vehicle-around intention prediction method based on multi-modal space-time fusion and related equipment

    CN120472656A

  • Vehicle network intrusion detection method and device based on ensemble learning and storage medium

    CN120614602A