Vehicle intrusion detection method based on deep normalized self-connected spiking neural network
Through the method based on deep normalized self-connected pulse neural network, the in-vehicle network data is extracted and processed, and the problem of insufficient accuracy of in-vehicle network intrusion detection in the prior art is solved, and more efficient intrusion information identification and detection is achieved.
Patent Information
- Application Number
- CN202210471292.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-28
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-04-28
AI Technical Summary
The prior art has insufficient detection accuracy in in-vehicle network intrusion detection and does not meet the practical application standards.
The car intrusion detection method based on deep normalized self-connected pulse neural network is adopted. The CAN ID field and DATA storage data are extracted through the context combiner, and the context characteristics of the data are obtained using a sliding window. The character form is embedded into the cyclic LIF neuron model, and normalized preprocessing is performed, and the probability of the car intrusion message is finally calculated.
It realizes more precise identification of intrusion information, and can efficiently detect in-vehicle network intrusion within expectations, and is suitable for actual in-vehicle network intrusion detection scenarios.
Smart Images

Figure CN114936593B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of in-vehicle network intrusion detection, and in particular to a vehicle intrusion detection method based on a deep normalized self-connected pulse neural network. Background Art
[0002] In recent years, spiking neural networks (SNNs), which originated from the theoretical foundation of neuroscience, have attracted the attention of neuromorphic computing and brain-like computing due to their advantages such as similar neural dynamics and coding mechanisms to biological neurons. SNN has become one of the mainstream frameworks in the field of brain-like computing. At present, there are some methods that use error backpropagation (BP) for direct SNN training. Most of these methods use strictly hierarchical (Leaky Integ rate-and-Fire) LIF neurons as the basic computing unit. For example, Neftci et al. proposed a substitute function based on the fast sigmoid function to solve the problem of non-differentiable LIF neuron pulses.
[0003] Based on this, most of the intelligent systems currently used for in-vehicle network intrusion detection use deep learning frameworks. For example, Yubin et al. proposed an intrusion detection framework based on deep denoising autoencoders and an optimization algorithm based on eco-geography. Yang et al. proposed a combination of multi-stage machine learning algorithms that can also effectively detect in-vehicle network intrusions.
[0004] However, the detection accuracy is still insufficient and has not reached the standard for practical application.
[0005] In view of this, an invention involving an in-vehicle intrusion detection method based on a pulse neural network is urgently needed to fill the gap in the industry. Summary of the invention
[0006] The purpose of the present invention is to provide a vehicle intrusion detection method based on a deep normalized self-connected spiking neural network. By using a spiking neural network with stronger time series information integration capabilities and complex function simulation capabilities, it is possible to achieve more accurate identification of intrusion information within expectations, thereby solving the problems in the prior art. To achieve the above purpose, the present invention provides the following technical solutions:
[0007] The vehicle intrusion detection method based on deep normalized self-connected spike neural network includes the following steps:
[0008] Based on the context combiner, the CAN ID field of the target car and the DATA storage data of the target car are extracted, and a sliding window is used to combine the data obtained by the context combiner to obtain the context characteristics in the data to obtain the input features;
[0009] Embedding the input features into the constructed recurrent LIF neuron model in the form of characters to translate the input features into neuron postsynaptic potentials;
[0010] Performing normalization preprocessing on the postsynaptic potentials of the neurons in groups to obtain normalized postsynaptic potentials of the neurons, so as to convert them into various neural network dynamic models including fully connected layers;
[0011] The probability of car intrusion message and car normal message is calculated based on the neural network dynamic model.
[0012] As an improvement to the automobile intrusion detection method based on the deep normalized self-connected spike neural network of the present invention, the CAN ID field of the extracted target automobile includes 4 hexadecimal numbers, and the DATA storage data of the extracted target automobile includes 16 hexadecimal numbers;
[0013] The sliding window combines the data obtained by the context combiner in the following manner:
[0014]
[0015] In the formula, F i Represented as the context feature in sliding window i; f i Represented as the feature extracted from the i-th CAN bus message; win len It is expressed as the length of the sliding window; concatenate(x1,x2,...,x n ) function is a concatenation function, which concatenates the elements together to form window data.
[0016] An example of data obtained by the context combiner contains 19*win len Hexadecimal number; the input feature is 19*win len Hexadecimal number.
[0017] As an improvement to the automobile intrusion detection method based on the deep normalized self-connected spike neural network of the present invention, the specific method of embedding the input features in the form of characters is as follows:
[0018] The input features are converted into a high-dimensional feature vector e through the embedding layer i , to ensure that the position characteristics of each character are preserved:
[0019]
[0020] Where E is the connected one-dimensional feature vector, e0, e1, ..., e 19*winlenis the high-dimensional representation vector of the i-th feature converted using the embedding layer, where 0≤i≤19*winlen.
[0021] As an improvement to the automobile intrusion detection method based on deep normalized self-connected spike neural network of the present invention, in the second step, the specific method of constructing the recurrent LIF neuron model is as follows:
[0022] First, the presynaptic potential at the current time point is calculated by the sum of the weighted postsynaptic potentials of the neurons in the previous layer:
[0023]
[0024] In the formula, p i (t) represents the presynaptic potential of neuron i at time t; w j,i Represented as the connection weight from neuron j to neuron i in the previous layer; s j (t) represents the postsynaptic potential of neuron j at time t;
[0025] Second, calculate the presynaptic potential at the previous time point:
[0026]
[0027] In the formula, m i (t) represents the membrane potential of neuron i at time t; R is the input resistance, and the calculation method of R is the ratio of the presynaptic potential to the membrane potential; υ(t-1) represents the weight of the recurrent connection at time t-1;
[0028] Again, confirm the conditions for a pulse event to occur when the membrane potential reaches the threshold:
[0029]
[0030] In the formula, o i (t) represents the spike event of neuron i at time t; i (t) = 1 indicates the occurrence of a pulse event, which is caused by the membrane potential exceeding the threshold;
[0031] When t = 0, the membrane potential is transformed by the presynaptic potential input at the current time point;
[0032] When t>0, the membrane potential is the sum of the leak membrane potential at the previous time point, the converted presynaptic potential, and the weighted own postsynaptic potential;
[0033] Finally, based on the spike event that occurs when the membrane potential reaches the threshold, the postsynaptic potential at which the spike occurs is calculated:
[0034]
[0035] In the formula, s i (t) is the postsynaptic potential of neuron i at time t, τ s Expressed as the postsynaptic constant.
[0036] As an improvement to the automobile intrusion detection method based on the deep normalized self-connected spike neural network of the present invention, based on the constructed recurrent LIF neuron model, the specific calculation method of translating the input features into neuron postsynaptic potentials is:
[0037]
[0038] In the formula, s e (t) represents the translated postsynaptic potential at time t.
[0039] As an improvement to the automobile intrusion detection method based on the deep normalized self-connected spike neural network of the present invention, the normalization preprocessing method of the neuron postsynaptic potential includes:
[0040] In the first step, the neurons in the recurrent LIF neuron model are divided into G groups of neurons with different activity patterns, and the average postsynaptic potential of neurons in the same group at each time step is calculated:
[0041]
[0042] In the formula, is the average postsynaptic potential of neuron i in group g; T is the time step;
[0043] Secondly, the mean and standard deviation of the aggregated postsynaptic potentials of group G were calculated:
[0044]
[0045] In the formula, It is expressed as the average of the aggregated postsynaptic potentials in group g; It is expressed as the standard deviation of the aggregated postsynaptic potentials in group g;
[0046] Finally, the postsynaptic potential at that time step is passed and Perform Z-Score normalization:
[0047]
[0048] In the second step, based on each group of neurons, the activities of the neurons in the group are linearly weighted to form a postsynaptic potential sequence of the central neuron, and the negative postsynaptic current is removed using the ReLU activation function to obtain a non-negative postsynaptic potential:
[0049]
[0050] In the formula, Represented as normalized postsynaptic potential; u i,g Indicated as constituting the g group of central neurons The trainable weights of neuron i in the group.
[0051] As an improvement to the automobile intrusion detection method based on the deep normalized self-connected spike neural network of the present invention, when constructing the recurrent LIF neuron model, it is also necessary to deal with the non-differentiability of the pulse to find the derivative of the pulse activity in the error back propagation process:
[0052]
[0053] In the formula, α is represented as a constant that controls the curvature of the function. The larger the α value is, the faster the gradient rises, and the membrane potential approaches the threshold and tends to zero gradient.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] The present invention proposes an in-vehicle network intrusion detection model SiN-Vein that heterogeneously combines a context combiner, a pulse neural network and an artificial neural network, so that the present invention can accurately detect in-vehicle network intrusions and be applied in real time to actual in-vehicle network intrusion detection scenarios based on high-speed operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is an overall flow chart of a vehicle intrusion detection method based on a deep normalized self-connected spiking neural network proposed in one embodiment of the present invention;
[0057] Figure 2 A structural block diagram of a recurrent LIF neuron model proposed in one embodiment of the present invention;
[0058] Figure 3 A working principle diagram of normalizing and preprocessing neuron postsynaptic potentials proposed in one embodiment of the present invention;
[0059] Figure 4 A schematic diagram of a substitute gradient function proposed in one embodiment of the present invention when finding a derivative of a pulse activity in the error back propagation process;
[0060] Figure 5 A schematic diagram of the training and testing accuracy curves of each epoch in the training phase of each data set proposed in an embodiment of the present invention;
[0061] Figure 6It is a schematic diagram of testing the inference speed of the SiN-Vein model based on GPU and CPU proposed in an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0063] In the description of the present invention, it is necessary to understand that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0064] The present invention will be described in further detail below in conjunction with the accompanying drawings, but this is not intended to limit the present invention.
[0065] like Figure 1 As shown, as an embodiment of the present invention, a vehicle intrusion detection method based on a deep normalized self-connected spike neural network includes the following steps:
[0066] In the first step, the CAN ID field of the target car and the DATA storage data of the target car are extracted based on the context combiner, and the data obtained by the context combiner are combined using a sliding window to obtain the context characteristics in the data to obtain the input features. It should be noted that the role of the context combiner is to mainly combine the key data features of the current time point and multiple previous time points so that the input features can include multiple context information;
[0067] It can be understood that the ID field in the CAN network message is a key feature field, including 16 bits, that is, 16 binary bits, which can be represented by 4 hexadecimal numbers. Since the first four bits are generally not used, the present invention extracts the last 12 bits of the ID field in a single CAN message, that is, the last 3 hexadecimal values. Another important key feature field is the DATA field, which has a total of 64 bits. In the present invention, it is represented by 16 hexadecimal numbers. Combining the ID field and the DATA field, the effective features in a single CAN message can be represented by 19 hexadecimal numbers. Therefore, in the specific implementation, the present invention proposes that the CAN ID field includes four hexadecimal numbers. The DATA storage data of the target car refers to the data in the data storage folder of the system and program, including 16 hexadecimal numbers. In all data, the first hexadecimal number in the CAN ID field is 0, and the present invention only takes the last three. At the same time, all 16 hexadecimal numbers in the DATA field in the DATA storage data are extracted as features. Therefore, a CAN bus message (CAN ID field and DATA storage data) extract 19 hexadecimal numbers.
[0068] Next, the sliding window is used to combine the data obtained by the context combiner as follows:
[0069]
[0070] In the formula, F i Represented as the context feature in sliding window i; f i Represented as the feature extracted from the i-th CAN bus message; win len Expressed as the length of the sliding window, based on the above concept, we get that a data example contains 19*win len Hexadecimal number, and the input feature is 19*win len Hexadecimal number.
[0071] It should be noted that the 19*win extracted by the context combiner len After the hexadecimal number, since each bit of the hexadecimal number identifies a set of complex operation instruction parameters, it is difficult to convey the complex meaning of each hexadecimal number by directly converting the hexadecimal number into a decimal number. Therefore, the present invention proposes to regard each hexadecimal number as a character based on the SiN-Vein model, that is, embed the input features in the form of characters:
[0072] The input features are converted into a high-dimensional feature vector e through the embedding layer i , to ensure that the position characteristics of each character are preserved:
[0073]
[0074] Where E is the connected one-dimensional feature vector, is the high-dimensional representation vector of the i-th feature obtained by using the embedding layer, where 0≤i≤19*win len It is understandable that in the SiN-Vein model, win len Set to 5, character feature vector e i The length of is set to 16, so E is now a feature vector with 1520 features.
[0075] like Figure 2 As shown in the figure, in the second step, when the input features are embedded in the form of characters, a recurrent LIF neuron model needs to be constructed to translate the input features into neuron postsynaptic potentials:
[0076] First, the presynaptic potential at the current time point is calculated by the sum of the weighted postsynaptic potentials of the neurons in the previous layer:
[0077]
[0078] In the formula, p i (t) represents the presynaptic potential of neuron i at time t; w j,i Represented as the connection weight from neuron j to neuron i in the previous layer; s j (t) represents the postsynaptic potential of neuron j at time t;
[0079] Second, calculate the presynaptic potential at the previous time point:
[0080]
[0081] In the formula, m i (t) represents the membrane potential of neuron i at time t; R is the input resistance (R is calculated as the ratio of the presynaptic potential to the membrane potential); υ(t-1) represents the weight of the recurrent connection at time t-1;
[0082] Again, confirm the conditions for a pulse event to occur when the membrane potential reaches the threshold:
[0083]
[0084] In the formula, o i (t) represents the spike event of neuron i at time t; i (t) = 1 indicates the occurrence of a pulse event, which is caused by the membrane potential exceeding the threshold;
[0085] When t = 0, the membrane potential is transformed by the presynaptic potential input at the current time point;
[0086] When t>0, the membrane potential is the sum of the leak membrane potential at the previous time point, the converted presynaptic potential, and the weighted own postsynaptic potential;
[0087] Finally, based on the spike event that occurs when the membrane potential reaches the threshold, the postsynaptic potential at which the spike occurs is calculated:
[0088]
[0089] In the formula, s i (t) is the postsynaptic potential of neuron i at time t, τ s Expressed as the postsynaptic constant.
[0090] Based on this, it can be understood that the postsynaptic potential has a leak at every time point regardless of whether a spike occurs, however, when a spike occurs, the postsynaptic potential also increases at the current time point
[0091] Based on the constructed recurrent LIF neuron model, the specific calculation method for translating input features into neuron postsynaptic potentials is:
[0092]
[0093] In the formula, s e (t) represents the translated postsynaptic potential at time t.
[0094] It should be noted that the translated postsynaptic potentials were input into a five-layer spiking neural network with fully connected layers, with the number of neurons in each layer being 1520, 256, 128, 64, and 2, respectively, while the two neurons in the last layer represented the probability of intrusion messages and the probability of normal messages, respectively.
[0095] In a specific embodiment of the present invention, in order to reduce overfitting, each connection between two fully connected layers is also randomly dropped with a probability of D, that is, the postsynaptic potential sequence of two neurons in the last layer is transformed into two types of probabilities by softmax summed along the time axis:
[0096]
[0097] At the same time, cross entropy is used as the loss function.
[0098] like Figure 4 As shown, based on the above concept, it should be noted that when constructing the recurrent LIF neuron model, it is also necessary to deal with the non-differentiability of the pulse to find the derivative of the pulse activity in the error back propagation process:
[0099]
[0100] Where α is a constant that controls the curvature of the function. Functions with α = 1, 2, 4, 8, and 16 are as follows: Figure 4 As shown, where θ=1, it can be concluded that the larger the α value, the faster the gradient rises as the membrane potential approaches the threshold. However, if α is too large, it tends to zero gradient when the membrane potential is far away from the threshold. Therefore, in one embodiment of the present invention, the SiN-Vein model sets α=8.
[0101] The third step is to perform normalization preprocessing on the postsynaptic potentials of neurons in groups to obtain the normalized postsynaptic potentials of neurons, so as to convert them into various neural network dynamic models including fully connected layers:
[0102] like Figure 3 As shown in the figure, the normalization preprocessing methods for neuron postsynaptic potential include:
[0103] S3-1, first, divide the neurons in the recurrent LIF neuron model into G groups of neurons with different activity patterns, and calculate the average postsynaptic potential of neurons in the same group at each time step:
[0104]
[0105] In the formula, is the average postsynaptic potential of neuron i in group g; T is the time step used in the SiN-Vein model;
[0106] Secondly, calculate the mean and standard deviation of the aggregated postsynaptic potentials of group g respectively:
[0107]
[0108] In the formula, It is expressed as the average of the aggregated postsynaptic potentials in group g; It is expressed as the standard deviation of the aggregated postsynaptic potentials in group g;
[0109] Finally, the postsynaptic potentials at all time steps are calculated by and Perform Z-Score normalization:
[0110]
[0111] S3-2, based on each group of neurons, linearly weight the activities of the neurons in the group to form a postsynaptic potential sequence of the central neuron, and use the ReLU activation function to remove the negative postsynaptic current to obtain a non-negative postsynaptic potential:
[0112]
[0113] In the formula, Represented as normalized postsynaptic potential; u i,g Indicated as constituting the g group of central neurons The trainable weights of neuron i in the group.
[0114] As an embodiment of the present invention, when the present invention is implemented, the following experimental settings are first performed:
[0115] The proposed SiN-Vein method is verified on three automotive network intrusion datasets: the CAN Dataset for Intrusion Detection (CDID) dataset, the Car-Hacking Dataset for Intrusion Detection (CHDID) dataset, and the Survival Analysis of Automotive Intrusion Detection System (SADIDS) dataset. The number of all types of messages in these datasets is shown in Table 1:
[0116]
[0117] It should be noted that
[0118] The CDID dataset includes DoS, fuzzy, simulated and non-attack states. The messages in OTIDS are accessed from KIASoul when performing intrusion or normal messages; the messages that are not attacked are normal CAN messages; DoS attack information refers to the data that attacks the vehicle network and is full of false data; fuzzy attack information randomly injects identifiers and data into the vehicle network; simulated attack messages are disguised as real operation messages to control the ECU to send wrong instructions.
[0119] The CHDID dataset is also constructed from CAN messages from real vehicles. It has the same attack message types as the CDID dataset, however, CHDID distinguishes simulated attack messages, where 597,252 attacks are based on drive gear and 654,897 attacks are based on revolutions per minute.
[0120] The SADIDS dataset focuses on three types of intrusions: DoS, fuzzy attacks, and fault attacks. Fault attacks send messages with corresponding data to specific ECUs to issue vehicle warnings. The dataset comes from three types of cars: Sonata, Soul, and Spark.
[0121] The SiN-Vein model was cross-validated in three models of the CDID and CHDID datasets and the SADIDS dataset. The model used normal information and intrusion information as two classes for the experiment. Then, the evaluation indicators of the intrusion type were analyzed:
[0122] All training sets were undersampled to make the number of normal messages equal to the number of intrusion messages, and the hyperparameters of the SiN-Vein model were predefined, Winlen was set to 5. τm was set to 3. τs was set to 2. The generation gradient α value was set to 8, the membrane potential threshold was set to 1, and the number of normalized groups G was 8. In all experiments, other hyperparameters of the training phase were also predefined. The learning rate was 0.001, the epoch was 30, and the batch size was 1000. At the same time, the experiments were conducted on a workstation with 24 CPU cores, 64G RAM, 1 NVIDIARTX 3090GPU, CentOS 7.5, Python 3.6, and Pytorch 1.9.0.
[0123] like Figure 5 As shown, finally, the performance of the SiN-Vein model proposed in the present invention is tested.
[0124] The proposed SiN-Vein model only needs a few epochs to fit well in all datasets, and the test accuracy of all experiments is close to 100%. At the same time, the performance of the SiN-Vein model under different attack types is analyzed and compared with other excellent models, and the following results are obtained:
[0125] 1) Comparison of the results of the CDID dataset As shown in Table 2, the SiN-Vein model is compared with the deep denoising autoencoder (DDA) and CANintelliIDS. It is found that in DoS attack type, fuzzy attack type and simulated attack type, the performance of the SiN-Vein model is significantly better than the other two models, and all its indicators are close to 100%. Even in fuzzy attacks, the F1 score of SiN-Vein is 13.15% higher than that of DDA. For various types of intrusions, this method outperforms other methods:
[0126]
[0127]
[0128] 2) Comparison of the results of the CHDID dataset As shown in Table 3, the SiN-Vein model is compared with DCNN, LSTM-Autoencoder and MTHIDS. It can be seen that the CHDID dataset is easier to classify than the CDID dataset. The deep learning model based on the complex structure can obtain an F1 score of more than 99%. The recall rate and F1 score of the MTH-IDS model even reached 99.99%. The SiN-Vein model has the same performance as the MTH-IDS model, with a recall rate of 99.99%, an accuracy rate of 100%, and an F1 score of 99.99%. At the same time, the performance of the SiN-Vein model in single-type intrusion detection is calculated. It can be seen that the F1 score of the model for all intrusion behaviors is almost 100%. This shows that the good performance of the model on the CHDID dataset is not only reflected in the overall classification results. It also has a low error rate when detecting various types of intrusions.
[0129]
[0130] Therefore, it is concluded that the SiN-Vein model proposed in the present invention has better performance than the other two deep learning methods and the multi-stage machine learning method.
[0131] 3) Compare the differences in recall between the survival analysis-based anomaly detection algorithm (SAD) and the SiN-Vein model,
[0132] The results show that the recall rate of DoS and fault intrusion detection of the SiN-Vein model on all models reaches 100%. The recall rate of fuzzy intrusion detection reaches 99.84%, which is much better than the SAD algorithm (87.08%-98.87%). In addition, the method obtains a high F1 score in all test cases, indicating that the SiN-Vein model is able to detect various intrusion information and is applicable to various models produced by different manufacturers. Table 4 shows the results of the SADIDS dataset:
[0133]
[0134] Therefore, it is concluded that among the three models, SiN-Vein's recall rate is better than that of the SAD algorithm, and its F1 score is close to 100.
[0135] It should be noted that when testing the performance of the SiN-Vein model proposed in the present invention, its processing time is also tested:
[0136] In practical applications, whether the SiN-Vein model has real-time processing speed still needs to be considered. Therefore, the inference speed of the SiN-Vein model was tested using GPU (RTX 3090) and CPU (E5-2680 V3 2.5GHz single core) respectively, and the batch size was set to 1. The results are as follows: Figure 6 shown.
[0137] It can be concluded that for one sample, the average inference time of the model on the CPU is 65ms, while the average inference time on the GPU is 102ms; the execution efficiency of the CPU is higher than that of the GPU, which may be due to the small batch size; small batch processing cannot take advantage of GPU parallel lel batch processing;
[0138] Therefore, a lot of time is wasted in data transfer between the CPU and GPU. However, through the analysis of processing time, it can be determined that the processing time of the SiN-Vein model on a single-core 2.5GHz CPU is 100ms / each sample. It can process 15 messages per second on average. In actual driving, brain-like chips or cloud-based high-performance servers can further improve the processing time. Therefore, the model has sufficient inference speed and accuracy and can be applied to actual scenarios.
[0139] In one embodiment of the present invention, when looking for the derivative of the pulse activity in the error back propagation process, α, whose optional range is 1-16, win len The optional range is 3-10, the character feature vector e i The length of can be set to 8-32, the membrane potential constant τ m Set to 2-5; postsynaptic potential constant τ s Set to 2-4, and the number of normalized groups G is set to 2-8.
[0140] The basic principles and main features of the present invention and the advantages of the present invention are shown and described above. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic features of the present invention; therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is limited by the attached claims rather than the above description. Therefore, it is intended to include all changes within the meaning and scope of the equivalent elements of the claims in the present invention, and any figure marks in the claims should not be regarded as limiting the claims involved.
[0141] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A vehicle intrusion detection method based on a deep normalized self-connected spike neural network, characterized in that: The following steps are involved: Based on the context combiner, the CAN ID field of the target car and the DATA storage data of the target car are extracted, and a sliding window is used to combine the data obtained by the context combiner to obtain the context characteristics in the data to obtain the input features; Embedding the input features into the constructed recurrent LIF neuron model in the form of characters to translate the input features into neuron postsynaptic potentials; The specific method of embedding the input features in the form of characters is: The input features are converted into a high-dimensional feature vector e through the embedding layer i , to ensure that the position characteristics of each character are preserved: Where E is the connected one-dimensional feature vector, is the high-dimensional representation vector of the i-th feature obtained by using the embedding layer, where 0≤i≤19*winlen; Performing normalization preprocessing on the postsynaptic potentials of the neurons in groups to obtain normalized postsynaptic potentials of the neurons, so as to convert them into various neural network dynamic models including fully connected layers; The probability of car intrusion message and car normal message is calculated based on the neural network dynamic model.
2. The vehicle intrusion detection method based on deep normalized self-connected spike neural network according to claim 1 is characterized in that: The CAN ID field of the extracted target vehicle includes 4 hexadecimal numbers, and the DATA storage data of the extracted target vehicle includes 16 hexadecimal numbers; The sliding window combines the data obtained by the context combiner in the following manner: In the formula, F i Represented as the context feature in sliding window i; f i Represented as the features extracted from the i-th CAN bus message; win len It is represented as the length of the sliding window; An example of data obtained by the context combiner contains 19*win len Hexadecimal number; the input feature is 19*win len Hexadecimal number.
3. The vehicle intrusion detection method based on deep normalized self-connected spike neural network according to claim 1 is characterized in that: The specific method of constructing the recurrent LIF neuron model is: First, the presynaptic potential at the current time point is calculated by the sum of the weighted postsynaptic potentials of the neurons in the previous layer: In the formula, p i (t) represents the presynaptic potential of neuron i at time t; w j,i Represented as the connection weight from neuron j to neuron i in the previous layer; s j (t) represents the postsynaptic potential of neuron j at time t; Second, calculate the presynaptic potential at the previous time point: In the formula, m i (t) represents the membrane potential of neuron i at time t; R is the input resistance, and the calculation method of R is the ratio of the presynaptic potential to the membrane potential; υ(t-1) represents the weight of the recurrent connection at time t-1; Again, confirm the conditions for a pulse event to occur when the membrane potential reaches the threshold: In the formula, o i (t) represents the spike event of neuron i at time t; i (t) = 1 indicates the occurrence of a pulse event, which is caused by the membrane potential exceeding the threshold; When t = 0, the membrane potential is transformed by the presynaptic potential input at the current time point; When t>0, the membrane potential is the sum of the leak membrane potential at the previous time point, the converted presynaptic potential, and the weighted own postsynaptic potential; Finally, based on the spike event that occurs when the membrane potential reaches the threshold, the postsynaptic potential at which the spike occurs is calculated: In the formula, s i (t) is the postsynaptic potential of neuron i at time t, τ s Expressed as the postsynaptic constant.
4. The vehicle intrusion detection method based on deep normalized self-connected spike neural network according to claim 1 or 3 is characterized in that: Based on the constructed recurrent LIF neuron model, the specific calculation method for translating the input features into neuron postsynaptic potentials is: In the formula, s e (t) represents the translated postsynaptic potential at time t.
5. The vehicle intrusion detection method based on deep normalized self-connected spike neural network according to claim 1 is characterized in that: The method of normalizing the postsynaptic potential of the neuron comprises: In the first step, the neurons in the recurrent LIF neuron model are divided into G groups of neurons with different activity patterns, and the average postsynaptic potential of neurons in the same group at each time step is calculated: In the formula, is the average postsynaptic potential of neuron i in group g; T is the time step; Secondly, calculate the mean and standard deviation of the aggregated postsynaptic potentials of group g respectively: In the formula, It is expressed as the average of the aggregated postsynaptic potentials in group g; It is expressed as the standard deviation of the aggregated postsynaptic potentials in group g; Finally, the postsynaptic potentials at all time steps are calculated by and Perform Z-Score normalization: In the second step, based on each group of neurons, the activities of the neurons in the group are linearly weighted to form a postsynaptic potential sequence of the central neuron, and the negative postsynaptic current is removed using the ReLU activation function to obtain a non-negative postsynaptic potential: In the formula, Represented as normalized postsynaptic potential; u i,g Indicated as constituting the g group of central neurons The trainable weights of neuron i in the group.
6. The vehicle intrusion detection method based on deep normalized self-connected spike neural network according to claim 3 is characterized in that: When building a recurrent LIF neuron model, it is also necessary to deal with the non-differentiability of spikes to find derivatives that replace spike activity during error back propagation: In the formula, α is represented as a constant that controls the curvature of the function. The larger the α value is, the faster the gradient rises, and the membrane potential approaches the threshold and tends to zero gradient.
Citation Information
Patent Citations
Vehicle-mounted CAN intrusion detection method based on sliding window and CENN
CN111931252A