Method and apparatus for detecting driver's abnormalities based on machine learning using vehicle can bus signal
Provided is a method for detecting a driver's abnormalities based on a CAN (Controller Area Network) bus network communicating with an ECU (Electronic Control Unit) of a vehicle. The method may include: acquiring a CAN bus signal related to an operation of the vehicle from the CAN bus network; extracting a detection vector from the CAN bus signal using an auto encoder; and detecting a driver's abnormality based on the detection vector.
1. A method for detecting a driver's abnormalities based on a Controller Area Network (CAN) bus network communicating with an Electronic Control Unit (ECU) of a vehicle, the method comprising:
acquiring, by the CAN bus signal extractor of the ECU, CAN bus signals related to an operation of the vehicle from the CAN bus network;
extracting, by an auto encoder of the ECU, detection vectors from the CAN bus signals, the detection vectors including general vectors, supports vectors and anomaly vectors, wherein the detection vectors are extracted through an Mean Square Error (MSE) calculated for each of CAN bus signal vectors inputted to encoders of the auto encoder at a specific time and each of CAN bus signal vectors outputted from decoders of the auto encoder of an immediate previous time, and where a hyperplane is formed by connecting the support vectors; and
detecting, by the ECU, a driver's abnormality based on anomaly scores indicated as distances on the hyperplane between the anomaly vectors and a determination boundary surface which includes support vectors selected by a one class-support vector machine (OC-SVM) learning among the detection vectors.
2. The method of claim 1 , wherein the MSE is minimized by adjusting parameters constituting the auto encoder, the encoders and the decoders including long short term memory (LSTM) layers and a fully connected layer, respectively.
3. The method of claim 1 , wherein the detecting of the driver's abnormality comprises detecting the driver's abnormality through an abnormality detection model based on unsupervised learning.
4. The method of claim 3 , wherein the detecting of the driver's abnormality through the abnormality detection model based on the unsupervised learning comprises detecting the driver's abnormality by extracting the anomaly score for a predetermined time.
5. The method of claim 4 , wherein the detecting of the driver's abnormality by extracting the anomaly score for the predetermined time comprises detecting the driver's abnormality based on the number of times that the anomaly score exceeds a first threshold related to the driver's abnormality for the predetermined time.
6. The method of claim 4 , wherein the detecting of the driver's abnormality by extracting the anomaly score for the predetermined time comprises detecting the driver's abnormality by measuring a fluctuation in anomaly score over time, which exceeds a second threshold related to the driver's abnormality, for the predetermined time.
7. An apparatus for detecting a driver's abnormalities based on a Controller Area Network (CAN) bus network communicating with an Electronic Control Unit (ECU) of a vehicle, the apparatus comprising:
a processor; and
a memory configured to store one or more commands executed through the processor,
wherein when the processor performs a function of a CAN bus signal extractor and a function of an auto encoder by the one or more commands,
the CAN bus signal extractor acquires CAN bus signals related to an operation of the vehicle from the CAN bus network;
the auto encoder extracts detection vectors from the CAN bus signals, the detection vectors including general vectors, supports vectors and anomaly vectors, wherein the detection vectors are extracted through an Mean Square Error (MSE) calculated for each of CAN bus signal vectors outputted from decoders of the auto encoder ata n immediate previous time, and where a hyperplane is formed by connecting the support vectors; and
the processor detects a driver's abnormality based on anomaly scores indicated as distances on the hyperplane between the anomaly vectors and a determination boundary surface which includes support vectors selected by an one class-support vector machine (OC-SVM) learning among the detection vectors.
8. The apparatus of claim 7 , wherein the MSE is minimized by adjusting parameters constituting the auto encoder, the encoders and the decoders including long short term memory (LSTM) layers and a fully connected layer, respectively.
9. The apparatus of claim 7 , wherein the processor detects the driver's abnormality through an abnormality detection model based on unsupervised learning, wherein the encoders and the decoders including long short term memory (LSTM) layers and a fully connected layer, respectively.
10. The apparatus of claim 9 , wherein the processor detects the driver's abnormality by extracting the anomaly score for a predetermined time.
11. The apparatus of claim 10 , wherein the processor detects the driver's abnormality based on the number of times that the anomaly score exceeds a first threshold related to the driver's abnormality for the predetermined time.
12. The apparatus of claim 10 , wherein the processor detects the driver's abnormality by measuring a fluctuation in anomaly score over time, which exceeds a second threshold related to the driver's abnormality, for the predetermined time.