WO2022075678A2 - Apparatus and method for detecting abnormal symptoms of vehicle based on self-supervised learning by using pseudo normal data - Google Patents

Apparatus and method for detecting abnormal symptoms of vehicle based on self-supervised learning by using pseudo normal data Download PDF

Info

Publication number
WO2022075678A2
WO2022075678A2 PCT/KR2021/013572 KR2021013572W WO2022075678A2 WO 2022075678 A2 WO2022075678 A2 WO 2022075678A2 KR 2021013572 W KR2021013572 W KR 2021013572W WO 2022075678 A2 WO2022075678 A2 WO 2022075678A2
Authority
WO
WIPO (PCT)
Prior art keywords
normal data
data
vehicle
neural network
network model
Prior art date
Application number
PCT/KR2021/013572
Other languages
French (fr)
Korean (ko)
Other versions
WO2022075678A3 (en
Inventor
김휘강
송현민
Original Assignee
고려대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from KR1020210006212A external-priority patent/KR102506805B1/en
Application filed by 고려대학교 산학협력단 filed Critical 고려대학교 산학협력단
Publication of WO2022075678A2 publication Critical patent/WO2022075678A2/en
Publication of WO2022075678A3 publication Critical patent/WO2022075678A3/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security

Definitions

  • the present disclosure relates to a vehicle anomaly detection method, and more particularly, to a vehicle anomaly detection method based on self-supervised learning using pseudo-normal data.
  • CAN In-vehicle Network
  • CAN Controller Area Network
  • LIN Local Interconnected Network
  • FlexRay FlexRay
  • CAN is well known as the de facto standard for IVN and is known to be the most distributed.
  • CAN provides an efficient and economical communication channel between ECUs, it lacks security functions and may be vulnerable from cyber threats. For example, when CAN receives a connection from a user device, since it does not require a separate authentication procedure, an external device other than the user device can also be easily connected.
  • the present disclosure has been devised in response to the above-described background technology, and an object of the present disclosure is to provide a method for detecting anomalies in a vehicle network based on self-supervised learning using pseudo-normal data.
  • a method for detecting anomalies in a vehicle network based on self-supervised learning using pseudo-normal data is disclosed.
  • a vehicle abnormal symptom detection method for solving the above-described problems includes: obtaining normal data generated in the vehicle; pre-processing the obtained normal data; generating pseudo normal data by inputting data into a pre-trained first neural network model, training a second neural network model based on the generated pseudo normal data, and generating in the vehicle and inputting the data to the learned second neural network model to detect abnormal signs of the vehicle.
  • the acquiring of the normal data may include acquiring controller area network (CAN) traffic data generated in a vehicle in a normal state.
  • CAN controller area network
  • the pre-processing of the normal data includes extracting a CAN ID from CAN messages included in the normal data, and a CAN ID sequence based on the extracted CAN ID. (sequence) may be included.
  • the CAN ID sequence may be expressed in hexadecimal or binary data.
  • the generating of the pseudo-normal data includes: inputting the pre-processed normal data into the pre-trained first neural network model; and the pre-trained first neural network model.
  • the method may include generating pseudo normal data by predicting a CAN ID that appears next to each CAN ID included in the normal data through a network model.
  • the step of inputting the pre-processed normal data into the pre-trained first neural network model may include pre-learning the normal data including an arbitrary CAN ID or CAN ID sequence. can be input to the first neural network model.
  • the generating of the pseudo-normal data includes: a next CAN ID according to a probability distribution of a CAN ID appearing next to each CAN ID included in the normal data. You can predict and choose.
  • the generating of the pseudo-normal data may include adding noise by selecting an arbitrary CAN ID according to a uniform distribution when selecting the next CAN ID. there is.
  • an arbitrary CAN ID when adding the noise, may be selected as the uniform distribution based on a preset noise ratio.
  • the pseudo-normal data may include a CAN ID sequence having an arbitrary length.
  • the pseudo normal data may include a CAN ID sequence having the same length as that of normal data input to the first neural network model.
  • the pseudo-normal data includes a CAN ID sequence, and some CAN IDs are selected with a uniform distribution according to a preset noise ratio among all CAN IDs of the CAN ID sequence can be
  • the first neural network model when the CAN ID or CAN ID sequence extracted from the normal data is input, the CAN ID that appears next to the input CAN ID or CAN ID sequence can be pre-trained to predict the probability distribution for
  • the prior learning of the first neural network model includes receiving the CAN ID extracted from the normal data and converting it into a vector of a certain size, based on the converted vector It may include extracting a context of a given sequence, and predicting and learning a probability distribution for a CAN ID appearing next to the input CAN ID based on the context of the extracted sequence.
  • the first neural network model includes an embedding layer that receives the CAN ID extracted from the normal data and converts it into a vector of a certain size, the converted vector.
  • a Long Short-Term Memory layer (LSTM) that extracts the context of a given sequence based on the context, and a probability distribution for the CAN ID appearing next to the input CAN ID based on the context of the extracted sequence It may include a dense layer (Dense layer).
  • the training of the second neural network model may include inputting the pre-processed normal data and the pseudo-normal data into the second neural network model to convert the pseudo-normal data into an abnormality. It can be learned to classify as data.
  • the training of the second neural network model includes inputting the pre-processed normal data and additionally acquired attack type hint data into the second neural network model. It can be learned to classify the hint data of the attack type as abnormal data.
  • the training of the second neural network model includes the second neural network based on at least one of the pseudo normal data, the attack type hint data, and the abnormal data.
  • the size of the gradient backpropagated can be limited to below a threshold value.
  • the detecting of the vehicle anomaly may include acquiring data generated in the vehicle, pre-processing the acquired data, and pre-learning the pre-processed data and classifying it as normal data or abnormal data by inputting it to the second neural network model, and detecting abnormal signs of the vehicle.
  • the following operations for detecting abnormal signs of a vehicle when the computer program is executed in one or more processors The operations include: acquiring normal data generated in the vehicle, pre-processing the acquired normal data, and inputting the pre-processed normal data into a pre-trained first neural network model to obtain a pseudo-normal generating data (pseudo normal data), learning a second neural network model based on the generated pseudo normal data, and inputting data generated from the vehicle into the learned second neural network model It may include an operation of detecting abnormal signs of the vehicle.
  • a computing device for providing a vehicle anomaly detection method comprising a processor including one or more cores, and a memory, wherein the processor includes the vehicle Acquire normal data generated in A second neural network model may be trained based on the pseudo-normal data, and the data generated from the vehicle may be input to the learned second neural network model to detect an abnormal symptom of the vehicle.
  • FIG. 1 is a diagram illustrating a block diagram of a computing device that performs an operation for providing a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
  • FIG. 2 is a diagram illustrating a block configuration diagram of a processor for explaining a method for learning and detecting a vehicle anomaly detection model according to an embodiment of the present disclosure.
  • FIG. 3 is a diagram exemplarily illustrating a neural network model of a pseudo-normal data generator, according to an embodiment of the present disclosure.
  • FIG. 4 is a diagram illustrating an example of a decision boundary of a supervised learning model according to learning data, according to an embodiment of the present disclosure.
  • FIG. 5 is a diagram illustrating a flowchart of a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
  • FIG. 6 depicts a general schematic diagram of an exemplary computing environment in which embodiments of the present disclosure may be implemented.
  • a controller area network (CAN) anomaly detection system may include a first model of a long short term memory (LSTM) based pseudo normal data generator and a second model of an anomaly detection unit.
  • the first model of the LSTM-based pseudo-normal data generator may generate pseudo-normal data imitating normal CAN traffic collected from a vehicle in a general situation in which there are no abnormal signs of the vehicle.
  • the second model of the abnormality detection unit may detect an abnormality in CAN traffic.
  • FIG. 1 is a diagram illustrating a block diagram of a computing device that performs an operation for providing a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
  • the configuration of the computing device 100 shown in FIG. 1 is only a simplified example.
  • the computing device 100 may include other components for performing the computing environment of the computing device 100 , and only some of the disclosed components may configure the computing device 100 .
  • the computing device 100 may include a processor 110 , a memory 130 , and a network unit 150 .
  • the processor 110 can detect vehicle anomalies based on self-supervised learning using pseudo-normal data, and can effectively train a vehicle anomaly detection model in a limited data environment.
  • the processor 110 acquires normal data generated in a vehicle, pre-processes the acquired normal data, and inputs the pre-processed normal data to a pre-trained first neural network model to obtain a doctor Generates pseudo normal data, trains a second neural network model based on the generated pseudo-normal data, and detects abnormal signs of a vehicle by inputting data generated from the vehicle into the learned second neural network model can do.
  • the processor 110 may acquire controller area network (CAN) traffic data generated in a vehicle in a normal state.
  • CAN controller area network
  • the processor 110 when pre-processing the normal data, extracts a CAN ID from CAN messages included in the normal data, and based on the extracted CAN ID CAN ID sequence (sequence) can create
  • the CAN ID sequence may be expressed as hexadecimal or binary data.
  • the processor 110 when generating pseudo normal data, inputs the pre-processed normal data to the pre-trained first neural network model, and through the pre-trained first neural network model Pseudo-normal data can be generated by predicting the CAN ID that appears next to each CAN ID included in the normal data.
  • the processor 110 when the processor 110 inputs the pre-processed normal data to the pre-trained first neural network model, the pre-trained normal data including an arbitrary CAN ID or CAN ID sequence It can be input to the first neural network model.
  • the processor 110 when generating pseudo normal data, the processor 110 generates a next CAN ID according to a probability distribution of a CAN ID appearing next to each CAN ID included in the normal data. You can predict and choose.
  • the processor 110 may add noise by selecting an arbitrary CAN ID according to a uniform distribution.
  • the processor 110 may select an arbitrary CAN ID with a uniform distribution based on a preset noise ratio.
  • the pseudo-normal data of the present disclosure may include a CAN ID sequence having an arbitrary length.
  • the pseudo normal data may include a CAN ID sequence having the same length as that of normal data input to the first neural network model.
  • the pseudo-normal data may include a CAN ID sequence, and some CAN IDs may be selected with a uniform distribution according to a preset noise ratio among all CAN IDs of the CAN ID sequence. The foregoing is merely an example, and the present disclosure is not limited thereto.
  • the first neural network model of the present disclosure is pre-trained to predict the probability distribution for the CAN ID that appears next to the input CAN ID or CAN ID sequence.
  • can Pre-learning of the first neural network model receives the CAN ID extracted from normal data, transforms it into a vector of a certain size, extracts the context of a given sequence based on the transformed vector, and the context of the extracted sequence It is possible to learn by predicting a probability distribution for the CAN ID that appears next to the input CAN ID based on the .
  • the first neural network model includes an embedding layer that receives a CAN ID extracted from normal data and transforms it into a vector of a certain size, and extracts the context of a given sequence based on the transformed vector. It may include a Long Short-Term Memory layer (LSTM) and a density layer that predicts a probability distribution for a CAN ID appearing next to an input CAN ID based on the context of the extracted sequence.
  • LSTM Long Short-Term Memory layer
  • density layer that predicts a probability distribution for a CAN ID appearing next to an input CAN ID based on the context of the extracted sequence.
  • the processor 110 when training the second neural network model, inputs the preprocessed normal data and the pseudo-normal data to the second neural network model to classify the pseudo-normal data as abnormal data. can be taught to do.
  • the processor 110 trains the second neural network model
  • the preprocessed normal data and the additionally acquired hint data of the attack type are input to the second neural network model to enter the attack type. It can be trained to classify the hint data of , as abnormal data.
  • the processor 110 trains the second neural network model based on at least one of pseudo normal data, attack type hint data, and abnormal data. You can limit the size below a threshold.
  • the processor 110 obtains data generated in the vehicle when detecting an abnormal symptom of the vehicle, pre-processes the obtained data, and pre-learned the pre-processed data to the second neural By entering into the network model and classifying it as normal data or abnormal data, abnormal signs of the vehicle can be detected.
  • the processor 110 may acquire controller area network (CAN) traffic data generated in an abnormal or normal vehicle.
  • the processor 110 may extract a CAN ID from CAN messages included in the data, and generate a CAN ID sequence based on the extracted CAN ID.
  • CAN controller area network
  • the processor 110 may include one or more cores, and a central processing unit (CPU), a general purpose graphics processing unit (GPGPU), and a tensor of the computing device 100 . It may include a processor for deep learning, such as a tensor processing unit (TPU).
  • the processor 110 may read a computer program stored in the memory 130 to detect anomalies of the vehicle according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, the processor 110 may perform an operation for detecting abnormal signs of a vehicle.
  • the processor 110 performs learning of the neural network such as processing of input data for learning in deep learning (DN), extracting features from the input data, calculating an error, and updating the weight of the neural network using backpropagation.
  • DN deep learning
  • the processor 110 at least one of a CPU, a GPGPU, and a TPU may process learning of a network function.
  • the CPU and GPGPU can process learning of a network function and detection of anomalies in a vehicle using the network function.
  • learning of a network function and detection of anomalies of an unmanned moving object using the network function may be processed by using the processors of a plurality of computing devices together.
  • the computer program executed in the computing device according to an embodiment of the present disclosure may be a CPU, GPGPU or TPU executable program.
  • the memory 130 may store any type of information generated or determined by the processor 110 and any type of information received by the network unit 150 .
  • the memory 130 includes a flash memory type, a hard disk type, a multimedia card micro type, and a card type memory (eg, SD or XD memory, etc.), Random Access Memory (RAM), Static Random Access Memory (SRAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Programmable Memory (PROM) read-only memory), a magnetic memory, a magnetic disk, and an optical disk may include at least one type of storage medium.
  • the computing device 100 may operate in relation to a web storage that performs a storage function of the memory 130 on the Internet.
  • the description of the above-described memory is only an example, and the present disclosure is not limited thereto.
  • the network unit 150 may transmit/receive data for detecting abnormal signs of a vehicle to/from other computing devices, servers, and the like.
  • the network unit 150 may transmit/receive data to and from other computing devices, servers, and the like in order to detect anomalies of the vehicle.
  • the network unit 150 may enable communication between a plurality of computing devices so that learning of a network function is performed in a distributed manner in each of the plurality of computing devices.
  • the network unit 150 may enable communication between a plurality of computing devices to distribute analysis data generation using a network function.
  • the network unit 150 may be configured regardless of its communication mode, such as wired and wireless, and may include a personal area network (PAN) and a wide area network (WAN). ), etc., may be composed of various communication networks.
  • the network unit 150 may be a known World Wide Web (WWW), and may use a wireless transmission technology used for short-range communication such as infrared (IrDA) or Bluetooth (Bluetooth).
  • IrDA infrared
  • Bluetooth Bluetooth
  • the present disclosure may generate pseudo-normal data to detect a new type of anomaly that the model has not learned while maintaining the performance advantage of self-supervised learning and utilize it for model training. Accordingly, according to the present disclosure, the generated model can detect not only the learned type of anomaly but also the new type of attack data.
  • the present disclosure can detect not only the types of anomalies used for model training, but also new types of anomalies. Since the existing self-supervised learning method-based model uses a method of learning the boundary between normal and abnormal data points in the data space, it is dependent on the abnormal data used for training, Although there is a limitation in not being able to determine, in the present disclosure, both the learned type of anomaly as well as the new type of anomaly can be detected by allowing the model to learn the boundary of the spatial region where normal data points are distributed.
  • FIG. 2 is a diagram illustrating a block configuration diagram of a processor for explaining a method for learning and detecting a vehicle anomaly detection model according to an embodiment of the present disclosure.
  • the processor of the present disclosure includes a preprocessor 210 , a pseudo-normal data generator 220 including a first model, and an abnormality detector 230 including a second model. can do.
  • the preprocessor 210 extracts a CAN ID from CAN messages included in the normal data, and a CAN ID sequence based on the extracted CAN ID (sequence) can be created.
  • the CAN ID sequence may be expressed as hexadecimal or binary data.
  • the preprocessor 210 may perform a data preprocessing process, and may extract only information necessary for a model from the CAN traffic data. Specifically, the preprocessor 210 may extract CAN ID information from CAN messages included in CAN traffic and convert it into CAN ID sequence data. In this case, the CAN ID sequence data may be expressed as hexadecimal or binary data. However, the present invention is not limited thereto.
  • CAN IDs may be extracted from the CAN message and divided to form a CAN ID sequence.
  • the CAN ID may be displayed in different forms in the first model of the pseudo-normal data generator 220 and the second model of the abnormality detector 230 .
  • each CAN ID expressed as a hexadecimal string may be mapped to an integer representation as an index from 0 to the number of CAN IDs of CAN traffic.
  • each CAN ID may be converted into an 11-bit representation.
  • the CAN ID sequence converted according to each model may be divided into small batches of fixed-length subsequences and supplied to the model.
  • the present invention is not limited thereto.
  • the pseudo-normal data generator 220 inputs the pre-processed normal data to the pre-trained first neural network model, and adds the pre-trained normal data to the normal data through the pre-trained first neural network model.
  • Pseudo-normal data can be generated by predicting the CAN ID that appears next to each included CAN ID.
  • the normal data input to the pre-trained first neural network model may be an arbitrary CAN ID or normal data including a CAN ID sequence.
  • the pseudo-normal data generating unit 220 may predict and select the next CAN ID according to a probability distribution of a CAN ID that appears next to each CAN ID included in the normal data. . Also, when selecting the next CAN ID, the pseudo-normal data generator 220 may select an arbitrary CAN ID according to a uniform distribution to add noise. When adding noise, the pseudo-normal data generator 220 may select an arbitrary CAN ID with a uniform distribution based on a preset noise ratio.
  • the pseudo-normal data may include a CAN ID sequence having any length.
  • the pseudo-normal data may include a CAN ID sequence having the same length as that of normal data input to the first neural network model of the pseudo-normal data generator 220 .
  • the pseudo-normal data may include a CAN ID sequence, and some CAN IDs may be selected with a uniform distribution according to a preset noise ratio among all CAN IDs of the CAN ID sequence.
  • the first neural network model of the pseudo-normal data generator 220 predicts a probability distribution for a CAN ID that appears next to the input CAN ID or CAN ID sequence when a CAN ID or CAN ID sequence extracted from normal data is input. can be pre-trained to do so. Pre-learning of the first neural network model receives the CAN ID extracted from normal data, transforms it into a vector of a certain size, extracts the context of a given sequence based on the transformed vector, and the context of the extracted sequence It is possible to learn by predicting a probability distribution for the CAN ID that appears next to the input CAN ID based on the .
  • the first neural network model includes an embedding layer that receives a CAN ID extracted from normal data and transforms it into a vector of a certain size, and extracts the context of a given sequence based on the transformed vector. It may include a Long Short-Term Memory layer (LSTM) and a density layer that predicts a probability distribution for a CAN ID appearing next to an input CAN ID based on the context of the extracted sequence.
  • LSTM Long Short-Term Memory layer
  • density layer that predicts a probability distribution for a CAN ID appearing next to an input CAN ID based on the context of the extracted sequence.
  • the first neural network model of the pseudo-normal data generator 220 may generate pseudo-normal data based on Long Short Term Memory (LSTM), which is a representative Recurrent Neural Network (RNN) type.
  • LSTM Long Short Term Memory
  • RNN Recurrent Neural Network
  • the LSTM network may be suitable for processing time series data such as voice and video using a feedback connection.
  • the present invention is not limited thereto.
  • An input to the first neural network model of the pseudo-normal data generator 220 may be a CAN ID or a series of CAN IDs.
  • the first neural network model of the pseudo-normal data generator 220 may be trained to predict which CAN ID is most likely to be the next CAN ID at each time step based on a given CAN ID or series of CAN IDs. .
  • the present invention is not limited thereto.
  • the second neural network model of the abnormality detection unit 230 may be learned based on the pseudonormal data generated by the pseudonormal data generator 220 .
  • the learned second neural network model may receive data generated from the vehicle and detect an abnormal symptom of the vehicle.
  • the second neural network model of the abnormality detection unit 230 may receive preprocessed normal data and pseudonormal data and learn to classify the pseudonormal data as abnormal data.
  • the second neural network model of the abnormality detection unit 230 may be trained to classify the attack type hint data as abnormal data by receiving the preprocessed normal data and additionally acquired attack type hint data. .
  • the second neural network model of the abnormality detection unit 230 determines the size of the gradient back propagated when learning based on at least one of pseudo normal data, attack type hint data, and abnormal data. It can be limited below a threshold. The reason is that when the model is trained at a high learning rate, an exploding gradient problem may occur. Therefore, if a gradient clipping technique that limits the size of the gradient backpropagated is applied, training can be performed at a high learning rate and the model performance can be further improved.
  • a neural network may be composed of a set of interconnected computational units, which may generally be referred to as nodes. These nodes may also be referred to as neurons.
  • a neural network is configured to include at least one or more nodes. Nodes (or neurons) constituting the neural networks may be interconnected by one or more links.
  • one or more nodes connected through a link may relatively form a relationship between an input node and an output node.
  • the concepts of an input node and an output node are relative, and any node in an output node relationship with respect to one node may be in an input node relationship in a relationship with another node, and vice versa.
  • an input node-to-output node relationship may be created around a link.
  • One or more output nodes may be connected to one input node through a link, and vice versa.
  • the value of the output node may be determined based on data input to the input node.
  • a node interconnecting the input node and the output node may have a parameter.
  • the parameters may be variable, and may be changed by the user or algorithm in order for the neural network to perform a desired function. For example, when one or more input nodes are interconnected to one output node by respective links, the output node sets values input to input nodes connected to the output node and links corresponding to the respective input nodes. An output node value may be determined based on the parameter.
  • one or more nodes are interconnected through one or more links to form an input node and an output node relationship in the neural network.
  • the characteristics of the neural network may be determined according to the number of nodes and links in the neural network, correlations between nodes and links, and parameter values assigned to each of the links. For example, when two neural networks having the same number of nodes and links and having different parameter values between the links exist, the two neural networks may be recognized as different from each other.
  • a neural network may include one or more nodes. Some of the nodes constituting the neural network may configure one layer based on distances from the initial input node. For example, a set of nodes having a distance of n from the initial input node may constitute n layers. The distance from the initial input node may be defined by the minimum number of links that must be passed to reach the corresponding node from the initial input node. However, the definition of such a layer is arbitrary for description, and the order of the layer in the neural network may be defined in a different way from the above. For example, a layer of nodes may be defined by a distance from the final output node.
  • the initial input node may mean one or more nodes to which data is directly input without going through a link in a relationship with other nodes among nodes in the neural network.
  • it may mean nodes that do not have other input nodes connected by a link.
  • the final output node may refer to one or more nodes that do not have an output node in relation to other nodes among nodes in the neural network.
  • the hidden node may mean nodes constituting the neural network other than the first input node and the last output node.
  • the neural network according to an embodiment of the present disclosure may be a neural network in which the number of nodes in the input layer may be the same as the number of nodes in the output layer, and the number of nodes decreases and then increases again as progresses from the input layer to the hidden layer.
  • the number of nodes in the input layer may be less than the number of nodes in the output layer, and the number of nodes may be reduced as the number of nodes progresses from the input layer to the hidden layer. there is.
  • the neural network according to another embodiment of the present disclosure may be a neural network in which the number of nodes in the input layer may be greater than the number of nodes in the output layer, and the number of nodes increases as the number of nodes progresses from the input layer to the hidden layer.
  • the neural network according to another embodiment of the present disclosure may be a neural network in a combined form of the aforementioned neural networks.
  • a deep neural network may refer to a neural network including a plurality of hidden layers in addition to an input layer and an output layer.
  • Deep neural networks can be used to identify the latent structures of data. In other words, it can identify the potential structure of photos, texts, videos, voices, and music (e.g., what objects are in the photos, what the text and emotions are, what the texts and emotions are, etc.) .
  • Deep neural networks include convolutional neural networks (CNNs), recurrent neural networks (RNNs), auto encoders, generative adversarial networks (GANs), and restricted Boltzmann machines (RBMs). boltzmann machine), a deep belief network (DBN), a Q network, a U network, a Siamese network, and the like.
  • CNNs convolutional neural networks
  • RNNs recurrent neural networks
  • GANs generative adversarial networks
  • RBMs restricted Boltzmann machines
  • boltzmann machine a deep belief network
  • DBN deep belief network
  • Q network
  • FIG. 3 is a diagram exemplarily illustrating a neural network model of a pseudo-normal data generator, according to an embodiment of the present disclosure.
  • the first model of the pseudo-normal data generator includes at least one embedding layer 222 , at least one LSTM layer 224 , and at least one dense layer ( 226) may be included.
  • the embedding layer 222 may serve to convert the input CAN ID into a vector of a predetermined size.
  • the LSTM layer 224 may perform a role of receiving a vector and extracting information.
  • the density layer 226 may finally predict a probability distribution for the next CAN ID.
  • the first model of the pseudo-normal data generator may be trained to receive CAN ID sequence data extracted from normal CAN traffic and predict a probability distribution for a CAN ID that will appear after the input sequence.
  • the present invention is not limited thereto.
  • the first model of the pseudo-normal data generating unit for which the training has been completed may generate pseudo-normal data.
  • the pseudo-normal data is a CAN ID sequence, and each CAN ID constituting the sequence is predicted by the first model of the pseudo-normal data generator at each time step and then probabilistically according to the probability distribution of the CAN ID. can be selected.
  • the first model of the pseudo-normal data generator that has been trained can add noise by arbitrarily selecting a CAN ID using a uniform distribution rather than a predicted probability distribution when selecting the next CAN ID with a certain probability. there is.
  • the present invention is not limited thereto.
  • the pseudo-normal data generated from the first model of the pseudo-normal data generating unit may be used together with the normal data for supervised learning of the second model of the abnormal detecting unit.
  • the second model of the abnormality detection unit may be trained to classify the pseudonormal data and the normal data. Accordingly, the computing device of the present disclosure may improve the performance of the model by using the generated pseudo normal data and the abnormal symptom data separately collected as abnormal data together.
  • the present invention is not limited thereto.
  • the problem in which the first model of the pseudo-normal data generator predicts the next CAN ID may be regarded as a general multi-class classification problem.
  • the first model of the LSTM-based pseudo-normal data generator may predict the class of the next CAN ID based on the given previous state of the LSTM layer and the input CAN ID.
  • a categorical cross entropy loss function may be used.
  • categorical cross entropy can be implemented by adding softmax activation before calculating cross entropy.
  • Softmax activation can be calculated as in Equation 1 below by normalizing the C-dimensional vector s to the C-dimensional vector ⁇ (s) in the range (0, 1) in which the sum is 1.
  • C may represent the number of CAN IDs.
  • the vector s may represent an output logit of the last dense layer.
  • the cross entropy loss can be calculated as in Equation 2 below.
  • t i may indicate the next CAN ID of the given sequence.
  • the computing device of the present disclosure may supply the starting CAN ID to the first model of the pseudo-normal data generating unit by setting the number of CAN IDs to be generated.
  • the pseudo normal data generating unit may generate the CAN ID sequence.
  • the first model of the pseudo-normal data generator may predict the distribution of the next CAN ID based on the given start CAN ID.
  • the first model of the pseudo-normal data generator may obtain the index of the next CAN ID by sampling from the predicted probability distribution.
  • the predicted CAN ID may be used as the next input of the first model.
  • the first model of the pseudo-stationary data generator when selecting the next item to increase the diversity of the generated pseudo-stationary data, uses a uniform distribution of a given probability called the noise ratio instead of the probability distribution predicted in the dense layer. You can get a sample constructor model.
  • the first model of the pseudo-normal data generator may be selected by sampling from a uniform distribution of 20% of the CAN IDs of the generated sequence given a uniform sampling probability of 0.2.
  • the present invention is not limited thereto.
  • the second model of the anomaly detection unit may be learned through supervised learning using noise pseudo-normal data generated by the first model of the pseudo-normal data generation unit and actual CAN traffic data. Therefore, the training of the second model of the anomaly detection unit may be regarded as a binary classification problem.
  • samples of actual CAN data and pseudo-normal data may be represented by 0 and 1, respectively.
  • the present invention is not limited thereto.
  • the second model of the anomaly detection unit may use hint data for an attack, which is a type of attack data, by using additional abnormal data in addition to the pseudo normal data.
  • the second model of the anomaly detection unit may acquire a specific type of attack data and use it for training together with the noisy pseudo-normal data.
  • the hint about the attack may help the second model of the anomaly detection unit to learn the attack pattern and various general data.
  • the hint data may be labeled like noise pseudo-normal data.
  • the present invention is not limited thereto.
  • the binary cross entropy loss classifies the input CAN ID sequence into two classes, normal and abnormal, so that the second model of the anomaly detection unit is used. can be used to learn.
  • the binary cross entropy loss may be calculated by Equation 2 above.
  • C may be set to 2 according to the number of output classes.
  • the present invention is not limited thereto.
  • gradient clipping may be applied to prevent a gradient exploding problem that may occur during training of the first model of the pseudo-normal data generator and the second model of the abnormality detector.
  • the problem of gradient exploiting is that large error gradients can accumulate, causing too large updates to model weights during training.
  • c is the hyperparameter
  • g is the slope
  • c is the hyperparameter
  • g is the slope
  • gradient clipping can make the model training process more stable by allowing gradient g to have a norm of max c.
  • the present invention is not limited thereto.
  • FIG. 4 is a diagram illustrating an example of a decision boundary of a supervised learning model according to learning data, according to an embodiment of the present disclosure.
  • the data generated from the vehicle includes normal data and abnormal data (attack data) (a), only normal data (b), and noise pseudo data and normal data. There may be a case (c) included. If the amount of labeled normal data and anomalous data samples is sufficient, the anomaly detection model can be trained to classify normal data and abnormal data. However, there is a problem in that it is difficult to classify only normal data from data including normal data and abnormal data. Accordingly, the present disclosure can improve model performance by generating pseudo-normal data having noise from normal data and learning an anomaly detection model based on the generated noisy pseudo-normal data and normal data.
  • the present disclosure may generate pseudo-normal data to detect a new type of anomaly that the model has not learned while maintaining the performance advantage of self-supervised learning and utilize it for model training. Accordingly, according to the present disclosure, the generated model can detect not only the learned type of anomaly but also the new type of attack data.
  • the present disclosure can detect not only the types of anomalies used for model training, but also new types of anomalies. Since the existing self-supervised learning method-based model uses a method of learning the boundary between normal and abnormal data points in the data space, it is dependent on the abnormal data used for training, Although there is a limitation in not being able to determine, in the present disclosure, both the learned type of anomaly as well as the new type of anomaly can be detected by allowing the model to learn the boundary of the spatial region where normal data points are distributed.
  • FIG. 5 is a diagram illustrating a flowchart of a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
  • the computing device of the present disclosure may acquire normal data generated in the vehicle ( S10 ).
  • the computing device may acquire controller area network (CAN) traffic data generated in a vehicle in a normal state.
  • CAN controller area network
  • the computing device of the present disclosure may pre-process the acquired normal data (S20).
  • the computing device may extract a CAN ID from CAN messages included in normal data and generate a CAN ID sequence based on the extracted CAN ID.
  • the computing device of the present disclosure may generate pseudo normal data by inputting the pre-processed normal data to the pre-trained first neural network model ( S30 ).
  • the computing device inputs the pre-processed normal data to the pre-trained first neural network model, predicts the CAN ID that appears next to each CAN ID included in the normal data through the pre-trained first neural network model, data can be generated.
  • the computing device may input normal data including an arbitrary CAN ID or CAN ID sequence to the pre-trained first neural network model.
  • the computing device may predict and select the next CAN ID according to a probability distribution of a CAN ID that appears next to each CAN ID included in the normal data. Also, when selecting the next CAN ID, the computing device may add noise by selecting an arbitrary CAN ID according to a uniform distribution. For example, when adding noise, the computing device may select an arbitrary CAN ID with a uniform distribution based on a preset noise ratio.
  • the first neural network model may be pre-trained to predict a probability distribution for a CAN ID that appears next to the input CAN ID or CAN ID sequence.
  • Pre-learning of the first neural network model receives the CAN ID extracted from normal data, transforms it into a vector of a certain size, extracts the context of a given sequence based on the transformed vector, and the context of the extracted sequence It is possible to learn by predicting a probability distribution for the CAN ID that appears next to the input CAN ID based on the .
  • the computing device of the present disclosure may train the second neural network model based on the generated pseudo-normal data ( S40 ).
  • the computing device may input the pre-processed normal data and the pseudo-normal data into the second neural network model to learn to classify the pseudo-normal data as abnormal data.
  • the computing device inputs the pre-processed normal data and additionally acquired hint data of the attack type into the second neural network model to classify the hint data of the attack type as abnormal data. can learn
  • the computing device trains the second neural network model based on at least one of pseudo normal data, attack type hint data, and abnormal data the size of the gradient back propagated may be limited to less than or equal to a threshold value. there is.
  • the computing device of the present disclosure may input data generated from the vehicle into the learned second neural network model to detect an abnormal symptom of the vehicle ( S50 ).
  • the computing device acquires data generated in the vehicle, pre-processes the obtained data, and inputs the pre-processed data to the pre-trained second neural network model when detecting an abnormal symptom of the vehicle to normal data or abnormal data. By classifying, it is possible to detect abnormal signs of the vehicle.
  • the computing device may acquire controller area network (CAN) traffic data generated in the vehicle in an abnormal and normal state.
  • CAN controller area network
  • the computing device may extract a CAN ID from CAN messages included in the data, and may generate a CAN ID sequence based on the extracted CAN ID.
  • FIG. 6 depicts a general schematic diagram of an example computing environment in which embodiments of the present disclosure may be implemented.
  • modules herein include routines, procedures, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • modules herein include routines, procedures, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • modules herein can be applied to single-processor or multiprocessor computer systems, minicomputers, mainframe computers as well as personal computers, handheld computing devices, microprocessor-based or programmable consumer electronics, etc. (each of which is It will be appreciated that other computer system configurations may be implemented, including those that may operate in connection with one or more associated devices.
  • the described embodiments of the present disclosure may also be practiced in distributed computing environments where certain tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote memory storage devices.
  • Computers typically include a variety of computer-readable media.
  • Media accessible by a computer includes volatile and nonvolatile media, transitory and non-transitory media, removable and non-removable media.
  • computer-readable media may include computer-readable storage media and computer-readable transmission media.
  • Computer readable storage media includes volatile and nonvolatile media, temporary and non-transitory media, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. includes media.
  • a computer-readable storage medium may be RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital video disk (DVD) or other optical disk storage device, magnetic cassette, magnetic tape, magnetic disk storage device, or other magnetic storage device. device, or any other medium that can be accessed by a computer and used to store the desired information.
  • a computer readable transmission medium typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and the like. Includes all information delivery media.
  • modulated data signal means a signal in which one or more of the characteristics of the signal is set or changed so as to encode information in the signal.
  • computer-readable transmission media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared, and other wireless media. Combinations of any of the above are also intended to be included within the scope of computer-readable transmission media.
  • An example environment 1100 implementing various aspects of the disclosure is shown including a computer 1102 , the computer 1102 including a processing unit 1104 , a system memory 1106 , and a system bus 1108 . do.
  • a system bus 1108 couples system components, including but not limited to system memory 1106 , to the processing device 1104 .
  • the processing device 1104 may be any of a variety of commercially available processors. Dual processor and other multiprocessor architectures may also be used as processing unit 1104 .
  • the system bus 1108 may be any of several types of bus structures that may further interconnect a memory bus, a peripheral bus, and a local bus using any of a variety of commercial bus architectures.
  • System memory 1106 includes read only memory (ROM) 1110 and random access memory (RAM) 1112 .
  • ROM read only memory
  • RAM random access memory
  • a basic input/output system (BIOS) is stored in non-volatile memory 1110, such as ROM, EPROM, EEPROM, etc., the BIOS is the basic input/output system (BIOS) that helps transfer information between components within computer 1102, such as during startup. contains routines.
  • BIOS basic input/output system
  • RAM 1112 may also include high-speed RAM, such as static RAM, for caching data.
  • the computer 1102 may also include an internal hard disk drive (HDD) 1114 (eg, EIDE, SATA) - this internal hard disk drive 1114 may also be configured for external use within a suitable chassis (not shown).
  • HDD hard disk drive
  • FDD magnetic floppy disk drive
  • optical disk drive 1120 eg, a CD-ROM
  • the hard disk drive 1114 , the magnetic disk drive 1116 , and the optical disk drive 1120 are connected to the system bus 1108 by the hard disk drive interface 1124 , the magnetic disk drive interface 1126 , and the optical drive interface 1128 , respectively.
  • the interface 1124 for external drive implementation includes, for example, at least one or both of Universal Serial Bus (USB) and IEEE 1394 interface technologies.
  • drives and their associated computer-readable media provide non-volatile storage of data, data structures, computer-executable instructions, and the like.
  • drives and media correspond to storing any data in a suitable digital format.
  • computer readable storage media refers to HDDs, removable magnetic disks, and removable optical media such as CDs or DVDs, those skilled in the art will use zip drives, magnetic cassettes, flash memory cards, cartridges, It will be appreciated that other tangible computer-readable storage media and the like may also be used in the exemplary operating environment and any such media may include computer-executable instructions for performing the methods of the present disclosure. .
  • a number of program modules may be stored in the drive and RAM 1112 , including an operating system 1130 , one or more application programs 1132 , other program modules 1134 , and program data 1136 . All or portions of the operating system, applications, modules, and/or data may also be cached in RAM 1112 . It will be appreciated that the present disclosure may be implemented in various commercially available operating systems or combinations of operating systems.
  • a user may enter commands and information into the computer 1102 via one or more wired/wireless input devices, for example, a pointing device such as a keyboard 1138 and a mouse 1140 .
  • Other input devices may include a microphone, IR remote control, joystick, game pad, stylus pen, touch screen, and the like.
  • input device interface 1142 is often connected to the system bus 1108, parallel ports, IEEE 1394 serial ports, game ports, USB ports, IR interfaces, and the like may be connected by other interfaces.
  • a monitor 1144 or other type of display device is also coupled to the system bus 1108 via an interface, such as a video adapter 1146 .
  • the computer typically includes other peripheral output devices (not shown), such as speakers, printers, and the like.
  • Computer 1102 may operate in a networked environment using logical connections to one or more remote computers, such as remote computer(s) 1148 via wired and/or wireless communications.
  • Remote computer(s) 1148 may be workstations, server computers, routers, personal computers, portable computers, microprocessor-based entertainment devices, peer devices, or other common network nodes, and are generally Although including many or all of the components described, only memory storage device 1150 is shown for simplicity.
  • the logical connections shown include wired/wireless connections to a local area network (LAN) 1152 and/or a larger network, eg, a wide area network (WAN) 1154 .
  • LAN and WAN networking environments are common in offices and companies, and facilitate enterprise-wide computer networks, such as intranets, all of which can be connected to a worldwide computer network, for example, the Internet.
  • the computer 1102 When used in a LAN networking environment, the computer 1102 is coupled to the local network 1152 through a wired and/or wireless communication network interface or adapter 1156 .
  • Adapter 1156 may facilitate wired or wireless communication to LAN 1152 , which LAN 1152 also includes a wireless access point installed therein for communicating with wireless adapter 1156 .
  • the computer 1102 may include a modem 1158 , connected to a communication server on the WAN 1154 , or otherwise establishing communications over the WAN 1154 , such as over the Internet. have the means
  • a modem 1158 which may be internal or external and a wired or wireless device, is coupled to the system bus 1108 via a serial port interface 1142 .
  • program modules described for computer 1102 may be stored in remote memory/storage device 1150 . It will be appreciated that the network connections shown are exemplary and other means of establishing a communication link between the computers may be used.
  • the computer 1102 may be associated with any wireless device or object that is deployed and operates in wireless communication, for example, a printer, scanner, desktop and/or portable computer, portable data assistant (PDA), communication satellite, wireless detectable tag. It operates to communicate with any device or place and phone. This includes at least Wi-Fi and Bluetooth wireless technologies. Accordingly, the communication may be a predefined structure as in a conventional network or may simply be an ad hoc communication between at least two devices.
  • PDA portable data assistant
  • Wi-Fi Wireless Fidelity
  • Wi-Fi is a wireless technology such as cell phones that allows these devices, eg, computers, to transmit and receive data indoors and outdoors, ie anywhere within range of a base station.
  • Wi-Fi networks use a radio technology called IEEE 802.11 (a, b, g, etc.) to provide secure, reliable, and high-speed wireless connections.
  • Wi-Fi can be used to connect computers to each other, to the Internet, and to wired networks (using IEEE 802.3 or Ethernet).
  • Wi-Fi networks may operate in unlicensed 2.4 and 5 GHz radio bands, for example, at 11 Mbps (802.11a) or 54 Mbps (802.11b) data rates, or in products that include both bands (dual band). there is.
  • the various embodiments presented herein may be implemented as methods, apparatus, or articles of manufacture using standard programming and/or engineering techniques.
  • article of manufacture includes a computer program or media accessible from any computer-readable device.
  • computer-readable storage media include magnetic storage devices (eg, hard disks, floppy disks, magnetic strips, etc.), optical disks (eg, CDs, DVDs, etc.), smart cards, and flash drives. memory devices (eg, EEPROMs, cards, sticks, key drives, etc.).
  • machine-readable medium includes, but is not limited to, wireless channels and various other media that can store, hold, and/or convey instruction(s) and/or data.

Abstract

A method for detecting abnormal symptoms of a vehicle based on self-supervised learning by using pseudo normal data may comprise the steps of: obtaining normal data generated in a vehicle; preprocessing the obtained normal data; generating pseudo normal data by inputting the preprocessed normal data into a pre-trained first neural network model; training a second neural network model on the basis of the generated pseudo normal data; and detecting abnormal symptoms of the vehicle by inputting the data generated in the vehicle into the trained second neural network model.

Description

의사 정상 데이터를 이용한 자가 감독 학습 기반의 차량 이상징후 탐지 장치 및 방법Apparatus and method for detecting vehicle anomalies based on self-supervised learning using pseudo-normal data
본 개시는 차량 이상징후 탐지 방법에 관한 것으로, 구체적으로 의사 정상 데이터를 이용한 자가 감독 학습 기반의 차량 이상징후 탐지 방법에 관한 것이다.The present disclosure relates to a vehicle anomaly detection method, and more particularly, to a vehicle anomaly detection method based on self-supervised learning using pseudo-normal data.
전통적으로 차량 제어 시스템은, 기계적으로 제어되기 때문에 외부 침입으로부터 안전한 것으로 간주되었다. 그러나, 현대 차량에는, 차량의 다양한 기능을 관리하고 기계 제어 장치를 대체하는 ECU(Electronic Control Unit)와 같은 수많은 전자 제어 장치가 장착되어 있을 수 있다. 이러한 ECU는, CAN(Controller Area Network), LIN(Local Interconnected Network) 및 플렉스레이(FlexRay)와 같은 IVN(In-vehicle Network)이라는 네트워크를 통해 서로 다양한 차량 정보를 교환하기 위해 상호 연결될 수 있다. 특히, CAN은, IVN을 위한 사실상의 표준으로 잘 알려져 있으며 가장 많이 배포되는 것으로 알려져 있다. 그러나, CAN은, ECU간에 효율적이고 경제적인 통신 채널을 제공하지만, 보안 기능이 부족하여 사이버 위협으로부터 취약할 수 있다. 일례로, CAN은, 사용자 장치로부터 연결을 수신한 경우, 별도의 인증 절차를 요구하지 않기 때문에 사용자 장치가 아닌 외부 장치 또한 쉽게 연결될 수 있다.Traditionally, vehicle control systems have been considered safe from intrusion because they are mechanically controlled. However, modern vehicles may be equipped with numerous electronic control devices such as ECUs (Electronic Control Units) that manage various functions of the vehicle and replace mechanical control devices. These ECUs may be interconnected to exchange various vehicle information with each other through a network called an In-vehicle Network (IVN) such as a Controller Area Network (CAN), a Local Interconnected Network (LIN), and FlexRay. In particular, CAN is well known as the de facto standard for IVN and is known to be the most distributed. However, while CAN provides an efficient and economical communication channel between ECUs, it lacks security functions and may be vulnerable from cyber threats. For example, when CAN receives a connection from a user device, since it does not require a separate authentication procedure, an external device other than the user device can also be easily connected.
이러한 자동차 시스템에 대한 사이버 위협을 완화하기 위해 보안 기술에 대한 연구가 필요함에도 불구하고 제조업체는, 다양한 이유로 차량의 CAN 사양을 공개하지 않고 있다. 이러한 이유로, 몇몇 개발사들은 자체적으로 생성한 데이터 세트를 이용하여 침임 탐지 시스템을 개발하곤 한다. 그러나, 이러한 데이터 세트는, 정상적인 CAN 트래픽 데이터를 획득하기 쉬운 반면, 비정상적인 CAN 트래픽 데이터(예를 들어, 공격 데이터)를 획득하기 어렵기 때문에, 새로운 유형의 이상 징후를 탐지하지 못할 수 있다.Despite the need for research on security technologies to mitigate cyber threats to these vehicle systems, manufacturers do not disclose the CAN specifications of vehicles for various reasons. For this reason, some developers develop intrusion detection systems using data sets they generate themselves. However, this data set may fail to detect new types of anomalies because it is easy to acquire normal CAN traffic data, while it is difficult to acquire abnormal CAN traffic data (eg, attack data).
따라서, 새로운 유형의 이상징후를 탐지할 수 있도록 의사 정상 데이터를 생성하고, 이를 활용하는 자가 감독 학습 기반의 차량 네트워크 이상징후 탐지 방법에 대한 수요가 존재한다.Therefore, there is a demand for a method for detecting anomalies in a vehicle network based on self-supervised learning that generates pseudo-normal data to detect a new type of anomaly and utilizes it.
본 개시는 전술한 배경기술에 대응하여 안출된 것으로, 의사 정상 데이터를 이용한 자가 감독 학습 기반의 차량 네트워크 이상징후 탐지 방법을 제공하고자 한다.The present disclosure has been devised in response to the above-described background technology, and an object of the present disclosure is to provide a method for detecting anomalies in a vehicle network based on self-supervised learning using pseudo-normal data.
본 개시의 기술적 과제들은 이상에서 언급한 기술적 과제로 제한되지 않으며, 언급되지 않은 또 다른 기술적 과제들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The technical problems of the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by those skilled in the art from the following description.
전술한 바와 같은 과제를 해결하기 위한 본 개시의 일 실시예에 따라, 의사 정상 데이터를 이용한 자가 감독 학습 기반의 차량 네트워크 이상징후 탐지 방법이 개시된다.According to an embodiment of the present disclosure for solving the above-described problems, a method for detecting anomalies in a vehicle network based on self-supervised learning using pseudo-normal data is disclosed.
전술한 바와 같은 과제를 해결하기 위한 본 개시의 일 실시예에 따른 차량 이상징후 탐지 방법은, 상기 차량에서 발생하는 정상 데이터를 획득하는 단계, 상기 획득한 정상 데이터를 전처리하는 단계, 상기 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성하는 단계, 상기 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시키는 단계, 및 상기 차량에서 발생하는 데이터를 상기 학습된 제2 뉴럴 네트워크 모델에 입력하여 상기 차량의 이상징후를 탐지하는 단계를 포함할 수 있다.A vehicle abnormal symptom detection method according to an embodiment of the present disclosure for solving the above-described problems includes: obtaining normal data generated in the vehicle; pre-processing the obtained normal data; generating pseudo normal data by inputting data into a pre-trained first neural network model, training a second neural network model based on the generated pseudo normal data, and generating in the vehicle and inputting the data to the learned second neural network model to detect abnormal signs of the vehicle.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 정상 데이터를 획득하는 단계는, 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터를 획득할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the acquiring of the normal data may include acquiring controller area network (CAN) traffic data generated in a vehicle in a normal state.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 정상 데이터를 전처리하는 단계는, 상기 정상 데이터에 포함된 CAN 메시지들로부터 CAN ID를 추출하는 단계, 및 상기 추출한 CAN ID를 기초로 하여 CAN ID 시퀀스(sequence)를 생성하는 단계를 포함할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the pre-processing of the normal data includes extracting a CAN ID from CAN messages included in the normal data, and a CAN ID sequence based on the extracted CAN ID. (sequence) may be included.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 CAN ID 시퀀스는, 16진수 또는 2진수 데이터로 표현될 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the CAN ID sequence may be expressed in hexadecimal or binary data.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 의사 정상 데이터를 생성하는 단계는, 상기 전처리한 정상 데이터를 상기 사전 학습된 제1 뉴럴 네트워크 모델에 입력하는 단계, 및 상기 사전 학습된 제1 뉴럴 네트워크 모델을 통해, 상기 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID를 예측하여 의사 정상 데이터를 생성하는 단계를 포함할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the generating of the pseudo-normal data includes: inputting the pre-processed normal data into the pre-trained first neural network model; and the pre-trained first neural network model. The method may include generating pseudo normal data by predicting a CAN ID that appears next to each CAN ID included in the normal data through a network model.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 전처리한 정상 데이터를 상기 사전 학습된 제1 뉴럴 네트워크 모델에 입력하는 단계는, 임의의 CAN ID 또는 CAN ID 시퀀스를 포함하는 정상 데이터를 상기 사전 학습된 제1 뉴럴 네트워크 모델에 입력할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the step of inputting the pre-processed normal data into the pre-trained first neural network model may include pre-learning the normal data including an arbitrary CAN ID or CAN ID sequence. can be input to the first neural network model.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 의사 정상 데이터를 생성하는 단계는, 상기 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID의 확률 분포(probability distribution)에 따라 다음 CAN ID를 예측하여 선택할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the generating of the pseudo-normal data includes: a next CAN ID according to a probability distribution of a CAN ID appearing next to each CAN ID included in the normal data. You can predict and choose.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 의사 정상 데이터를 생성하는 단계는, 상기 다음 CAN ID를 선택할 때, 균일 분포(uniform distribution)에 따라 임의의 CAN ID를 선택하여 노이즈를 추가할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the generating of the pseudo-normal data may include adding noise by selecting an arbitrary CAN ID according to a uniform distribution when selecting the next CAN ID. there is.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 노이즈를 추가할 때, 미리 설정된 노이즈 비율에 기초하여 상기 균일 분포로 임의의 CAN ID를 선택할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, when adding the noise, an arbitrary CAN ID may be selected as the uniform distribution based on a preset noise ratio.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 의사 정상 데이터는, 임의의 길이를 갖는 CAN ID 시퀀스를 포함할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the pseudo-normal data may include a CAN ID sequence having an arbitrary length.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 의사 정상 데이터는, 상기 제1 뉴럴 네트워크 모델에 입력되는 정상 데이터의 길이와 동일한 길이를 갖는 CAN ID 시퀀스를 포함할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the pseudo normal data may include a CAN ID sequence having the same length as that of normal data input to the first neural network model.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 의사 정상 데이터는, CAN ID 시퀀스를 포함하고, 상기 CAN ID 시퀀스의 전체 CAN ID들 중 미리 설정된 노이즈 비율에 상응하여 일부 CAN ID들이 균일 분포로 선택될 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the pseudo-normal data includes a CAN ID sequence, and some CAN IDs are selected with a uniform distribution according to a preset noise ratio among all CAN IDs of the CAN ID sequence can be
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 제1 뉴럴 네트워크 모델은, 상기 정상 데이터로부터 추출된 CAN ID 또는 CAN ID 시퀀스가 입력되면 상기 입력된 CAN ID 또는 CAN ID 시퀀스의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하도록 사전 학습될 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the first neural network model, when the CAN ID or CAN ID sequence extracted from the normal data is input, the CAN ID that appears next to the input CAN ID or CAN ID sequence can be pre-trained to predict the probability distribution for
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 제1 뉴럴 네트워크 모델의 사전 학습은, 상기 정상 데이터로부터 추출된 CAN ID를 입력 받아 일정 크기의 벡터로 변환하는 단계, 상기 변환된 벡터에 기초하여 주어진 시퀀스의 컨텍스트(context)를 추출하는 단계, 및 상기 추출된 시퀀스의 컨텍스트에 기초하여 상기 입력된 CAN ID의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하여 학습하는 단계를 포함할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the prior learning of the first neural network model includes receiving the CAN ID extracted from the normal data and converting it into a vector of a certain size, based on the converted vector It may include extracting a context of a given sequence, and predicting and learning a probability distribution for a CAN ID appearing next to the input CAN ID based on the context of the extracted sequence.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 제1 뉴럴 네트워크 모델은, 상기 정상 데이터로부터 추출된 CAN ID를 입력 받아 일정 크기의 벡터로 변환하는 임베딩 레이어(Embedding layer), 상기 변환된 벡터에 기초하여 주어진 시퀀스의 컨텍스트(context)를 추출하는 LSTM 레이어(Long Short-Term Memory layer), 및 상기 추출된 시퀀스의 컨텍스트에 기초하여 상기 입력된 CAN ID의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하는 덴스 레이어(Dense layer)를 포함할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the first neural network model includes an embedding layer that receives the CAN ID extracted from the normal data and converts it into a vector of a certain size, the converted vector. A Long Short-Term Memory layer (LSTM) that extracts the context of a given sequence based on the context, and a probability distribution for the CAN ID appearing next to the input CAN ID based on the context of the extracted sequence It may include a dense layer (Dense layer).
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 제2 뉴럴 네트워크 모델을 학습시키는 단계는, 상기 전처리한 정상 데이터와 상기 의사 정상 데이터를 상기 제2 뉴럴 네트워크 모델에 입력하여 상기 의사 정상 데이터를 비정상 데이터로 분류하도록 학습될 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the training of the second neural network model may include inputting the pre-processed normal data and the pseudo-normal data into the second neural network model to convert the pseudo-normal data into an abnormality. It can be learned to classify as data.
*차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 제2 뉴럴 네트워크 모델을 학습시키는 단계는, 상기 전처리한 정상 데이터와 추가로 획득한 공격 유형의 힌트 데이터를 상기 제2 뉴럴 네트워크 모델에 입력하여 상기 공격 유형의 힌트 데이터를 비정상 데이터로 분류하도록 학습될 수 있다.* In an alternative embodiment of the vehicle anomaly detection method, the training of the second neural network model includes inputting the pre-processed normal data and additionally acquired attack type hint data into the second neural network model. It can be learned to classify the hint data of the attack type as abnormal data.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 제2 뉴럴 네트워크 모델을 학습시키는 단계는, 상기 의사 정상 데이터, 공격 유형의 힌트 데이터, 그리고 비정상 데이터 중 적어도 어느 하나에 기초하여 상기 제2 뉴럴 네트워크 모델을 학습시킬 때, 역전파되는 그레디언트의 크기를 임계값 이하로 제한할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the training of the second neural network model includes the second neural network based on at least one of the pseudo normal data, the attack type hint data, and the abnormal data. When training the model, the size of the gradient backpropagated can be limited to below a threshold value.
차량 이상징후 탐지 방법의 대안적인 실시예에서, 상기 차량의 이상징후를 탐지하는 단계는, 상기 차량에서 발생하는 데이터를 획득하는 단계, 상기 획득한 데이터를 전처리하는 단계, 상기 전처리한 데이터를 사전 학습된 제2 뉴럴 네트워크 모델에 입력하여 정상 데이터 또는 비정상 데이터로 분류하여 상기 차량의 이상징후를 탐지하는 단계를 포함할 수 있다.In an alternative embodiment of the vehicle anomaly detection method, the detecting of the vehicle anomaly may include acquiring data generated in the vehicle, pre-processing the acquired data, and pre-learning the pre-processed data and classifying it as normal data or abnormal data by inputting it to the second neural network model, and detecting abnormal signs of the vehicle.
전술한 바와 같은 과제를 실현하기 위한 본 개시의 일 실시예에 따른 컴퓨터 판독가능 저장 매체 저장된 컴퓨터 프로그램으로서, 상기 컴퓨터 프로그램은 하나 이상의 프로세서에서 실행되는 경우, 차량의 이상징후를 탐지하기 위한 이하의 동작들을 수행하도록 하며, 상기 동작들은, 상기 차량에서 발생하는 정상 데이터를 획득하는 동작, 상기 획득한 정상 데이터를 전처리하는 동작, 상기 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성하는 동작, 상기 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시키는 동작, 및 상기 차량에서 발생하는 데이터를 상기 학습된 제2 뉴럴 네트워크 모델에 입력하여 상기 차량의 이상징후를 탐지하는 동작을 포함할 수 있다.As a computer program stored in a computer readable storage medium according to an embodiment of the present disclosure for realizing the above-described problems, the following operations for detecting abnormal signs of a vehicle when the computer program is executed in one or more processors The operations include: acquiring normal data generated in the vehicle, pre-processing the acquired normal data, and inputting the pre-processed normal data into a pre-trained first neural network model to obtain a pseudo-normal generating data (pseudo normal data), learning a second neural network model based on the generated pseudo normal data, and inputting data generated from the vehicle into the learned second neural network model It may include an operation of detecting abnormal signs of the vehicle.
전술한 바와 같은 과제를 실현하기 위한 본 개시의 일 실시예에 따른 차량 이상징후 탐지 방법을 제공하기 위한 컴퓨팅 장치로서, 하나 이상의 코어를 포함하는 프로세서, 및 메모리를 포함하고, 상기 프로세서는, 상기 차량에서 발생하는 정상 데이터를 획득하고, 상기 획득한 정상 데이터를 전처리하며, 상기 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성하고, 상기 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시키며, 그리고 상기 차량에서 발생하는 데이터를 상기 학습된 제2 뉴럴 네트워크 모델에 입력하여 상기 차량의 이상징후를 탐지할 수 있다.A computing device for providing a vehicle anomaly detection method according to an embodiment of the present disclosure for realizing the above-described problems, comprising a processor including one or more cores, and a memory, wherein the processor includes the vehicle Acquire normal data generated in A second neural network model may be trained based on the pseudo-normal data, and the data generated from the vehicle may be input to the learned second neural network model to detect an abnormal symptom of the vehicle.
본 개시에서 얻을 수 있는 기술적 해결 수단은 이상에서 언급한 해결 수단들로 제한되지 않으며, 언급하지 않은 또 다른 해결 수단들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The technical solutions obtainable in the present disclosure are not limited to the above-mentioned solutions, and other solutions not mentioned are clearly to those of ordinary skill in the art to which the present disclosure belongs from the description below. can be understood
본 개시의 몇몇 실시예에 따르면, 제한된 데이터 환경에서 효과적으로 차량 이상징후 탐지 모델을 훈련시킬 수 있도록 한다.According to some embodiments of the present disclosure, it is possible to effectively train a vehicle anomaly detection model in a limited data environment.
본 개시에서 얻을 수 있는 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Effects obtainable in the present disclosure are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those of ordinary skill in the art to which the present disclosure belongs from the description below. .
다양한 양상들이 이제 도면들을 참조로 기재되며, 여기서 유사한 참조 번호들은 총괄적으로 유사한 구성요소들을 지칭하는데 이용된다. 이하의 실시예에서, 설명 목적을 위해, 다수의 특정 세부사항들이 하나 이상의 양상들의 총체적 이해를 제공하기 위해 제시된다. 그러나, 그러한 양상(들)이 이러한 특정 세부사항들 없이 실시될 수 있음은 명백할 것이다. 다른 예시들에서, 공지의 구조들 및 장치들이 하나 이상의 양상들의 기재를 용이하게 하기 위해 블록도 형태로 도시된다.Various aspects are now described with reference to the drawings, wherein like reference numbers are used to refer to like elements collectively. In the following example, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more aspects. It will be apparent, however, that such aspect(s) may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form in order to facilitate describing one or more aspects.
도 1은, 본 개시의 일 실시예에 따라, 차량 이상징후 탐지 방법을 제공하기 위한 동작을 수행하는 컴퓨팅 장치의 블록 구성도를 도시한 도면이다.1 is a diagram illustrating a block diagram of a computing device that performs an operation for providing a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
도 2는, 본 개시의 일 실시예에 따라, 차량 이상징후 탐지 모델의 학습 및 탐지 방법을 설명하기 위한 프로세서의 블록 구성도를 도시한 도면이다.2 is a diagram illustrating a block configuration diagram of a processor for explaining a method for learning and detecting a vehicle anomaly detection model according to an embodiment of the present disclosure.
도 3은, 본 개시의 일 실시예에 따라, 의사 정상 데이터 생성기의 뉴럴 네트워크 모델을 예시적으로 도시한 도면이다.3 is a diagram exemplarily illustrating a neural network model of a pseudo-normal data generator, according to an embodiment of the present disclosure.
도 4는, 본 개시의 일 실시예에 따라, 학습 데이터에 따른 지도 학습 모델의 결정 경계 예시를 보여주는 도면이다.4 is a diagram illustrating an example of a decision boundary of a supervised learning model according to learning data, according to an embodiment of the present disclosure.
도 5는, 본 개시의 일 실시예에 따라, 차량 이상징후 탐지 방법의 순서도를 도시한 도면이다.5 is a diagram illustrating a flowchart of a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
도 6은, 본 개시내용의 실시예들이 구현될 수 있는 예시적인 컴퓨팅 환경에 대한 일반적인 개략도를 도시한다.6 depicts a general schematic diagram of an exemplary computing environment in which embodiments of the present disclosure may be implemented.
다양한 실시예들 및/또는 양상들이 이제 도면들을 참조하여 개시된다. 하기 설명에서는 설명을 목적으로, 하나 이상의 양상들의 전반적 이해를 돕기 위해 다수의 구체적인 세부사항들이 개시된다. 그러나, 이러한 양상(들)은 이러한 구체적인 세부사항들 없이도 실행될 수 있다는 점 또한 본 개시의 기술 분야에서 통상의 지식을 가진 자에게 감지될 수 있을 것이다. 이후의 기재 및 첨부된 도면들은 하나 이상의 양상들의 특정한 예시적인 양상들을 상세하게 기술한다. 하지만, 이러한 양상들은 예시적인 것이고 다양한 양상들의 원리들에서의 다양한 방법들 중 일부가 이용될 수 있으며, 기술되는 설명들은 그러한 양상들 및 그들의 균등물들을 모두 포함하고자 하는 의도이다. 구체적으로, 본 명세서에서 사용되는 "실시예", "예", "양상", "예시" 등은 기술되는 임의의 양상 또는 설계가 다른 양상 또는 설계들보다 양호하다거나, 이점이 있는 것으로 해석되지 않을 수도 있다.Various embodiments and/or aspects are now disclosed with reference to the drawings. In the following description, for purposes of explanation, numerous specific details are set forth to provide a thorough understanding of one or more aspects. However, it will also be appreciated by one of ordinary skill in the art that such aspect(s) may be practiced without these specific details. The following description and accompanying drawings set forth in detail certain illustrative aspects of one or more aspects. These aspects are illustrative, however, and some of various methods may be employed in the principles of the various aspects, and the descriptions set forth are intended to include all such aspects and their equivalents. Specifically, as used herein, “embodiment”, “example”, “aspect”, “exemplary”, etc. are not to be construed as advantageous or advantageous over any aspect or design described herein. It may not be.
이하, 도면 부호에 관계없이 동일하거나 유사한 구성 요소는 동일한 참조 번호를 부여하고 이에 대한 중복되는 설명은 생략한다. 또한, 본 명세서에 개시된 실시예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 명세서에 개시된 실시예의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 첨부된 도면은 본 명세서에 개시된 실시예를 쉽게 이해할 수 있도록 하기 위한 것일 뿐, 첨부된 도면에 의해 본 명세서에 개시된 기술적 사상이 제한되지 않는다.Hereinafter, the same or similar components are assigned the same reference numerals regardless of reference numerals, and overlapping descriptions thereof will be omitted. In addition, in describing the embodiments disclosed in the present specification, if it is determined that detailed descriptions of related known technologies may obscure the gist of the embodiments disclosed in the present specification, the detailed description thereof will be omitted. In addition, the accompanying drawings are only for easy understanding of the embodiments disclosed in the present specification, and the technical ideas disclosed in the present specification are not limited by the accompanying drawings.
비록 제 1, 제 2 등이 다양한 소자나 구성요소들을 서술하기 위해서 사용되나, 이들 소자나 구성요소들은 이들 용어에 의해 제한되지 않음은 물론이다. 이들 용어들은 단지 하나의 소자나 구성요소를 다른 소자나 구성요소와 구별하기 위하여 사용하는 것이다. 따라서, 이하에서 언급되는 제 1 소자나 구성요소는 본 발명의 기술적 사상 내에서 제 2 소자나 구성요소 일 수도 있음은 물론이다.Although the first, second, etc. are used to describe various elements or elements, these elements or elements are not limited by these terms, of course. These terms are only used to distinguish one element or component from another. Accordingly, it goes without saying that the first element or component mentioned below may be the second element or component within the spirit of the present invention.
다른 정의가 없다면, 본 명세서에서 사용되는 모든 용어(기술 및 과학적 용어를 포함)는 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 공통적으로 이해될 수 있는 의미로 사용될 수 있을 것이다. 또 일반적으로 사용되는 사전에 정의되어 있는 용어들은 명백하게 특별히 정의되어 있지 않는 한 이상적으로 또는 과도하게 해석되지 않는다.Unless otherwise defined, all terms (including technical and scientific terms) used herein may be used with the meaning commonly understood by those of ordinary skill in the art to which the present invention belongs. In addition, terms defined in a commonly used dictionary are not to be interpreted ideally or excessively unless clearly defined in particular.
더불어, 용어 "또는"은 배타적 "또는"이 아니라 내포적 "또는"을 의미하는 것으로 의도된다. 즉, 달리 특정되지 않거나 문맥상 명확하지 않은 경우에, "X는 A 또는 B를 이용한다"는 자연적인 내포적 치환 중 하나를 의미하는 것으로 의도된다. 즉, X가 A를 이용하거나; X가 B를 이용하거나; 또는 X가 A 및 B 모두를 이용하는 경우, "X는 A 또는 B를 이용한다"가 이들 경우들 어느 것으로도 적용될 수 있다. 또한, 본 명세서에 사용된 "및/또는"이라는 용어는 열거된 관련 아이템들 중 하나 이상의 아이템의 가능한 모든 조합을 지칭하고 포함하는 것으로 이해되어야 한다. In addition, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless otherwise specified or clear from context, "X employs A or B" is intended to mean one of the natural implicit substitutions. That is, X employs A; X employs B; or when X employs both A and B, "X employs A or B" may apply to either of these cases. It should also be understood that the term “and/or” as used herein refers to and includes all possible combinations of one or more of the listed related items.
또한, "포함한다" 및/또는 "포함하는"이라는 용어는, 해당 특징 및/또는 구성요소가 존재함을 의미하지만, 하나 이상의 다른 특징, 구성요소 및/또는 이들의 그룹의 존재 또는 추가를 배제하지 않는 것으로 이해되어야 한다. 또한, 달리 특정되지 않거나 단수 형태를 지시하는 것으로 문맥상 명확하지 않은 경우에, 본 명세서와 청구범위에서 단수는 일반적으로 "하나 또는 그 이상"을 의미하는 것으로 해석되어야 한다.Also, the terms "comprises" and/or "comprising" mean that the feature and/or element is present, but excludes the presence or addition of one or more other features, elements, and/or groups thereof. should be understood as not Also, unless otherwise specified or unless it is clear from context to refer to a singular form, the singular in the specification and claims should generally be construed to mean “one or more”.
더불어, 본 명세서에서 사용되는 용어 "정보" 및 "데이터"는 종종 서로 상호교환 가능하도록 사용될 수 있다.In addition, as used herein, the terms “information” and “data” can often be used interchangeably.
어떤 구성 요소가 다른 구성 요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성 요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성 요소가 다른 구성 요소에 "직접 연결되어" 있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성 요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it is understood that it may be directly connected or connected to the other component, but other components may exist in between. it should be On the other hand, when it is said that a certain element is "directly connected" or "directly connected" to another element, it should be understood that the other element does not exist in the middle.
이하의 설명에서 사용되는 구성 요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다.The suffixes "module" and "part" for the components used in the following description are given or used in consideration of only the ease of writing the specification, and do not have distinct meanings or roles by themselves.
본 개시의 목적 및 효과, 그리고 그것들을 달성하기 위한 기술적 구성들은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 본 개시를 설명하는데 있어서 공지 기능 또는 구성에 대한 구체적인 설명이 본 개시의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략할 것이다. 그리고 후술되는 용어들은 본 개시에서의 기능을 고려하여 정의된 용어들로써 이는 사용자, 운용자의 의도 또는 관례 등에 따라 달라질 수 있다.Objects and effects of the present disclosure, and technical configurations for achieving them will become clear with reference to the embodiments described below in detail in conjunction with the accompanying drawings. In describing the present disclosure, if it is determined that a detailed description of a well-known function or configuration may unnecessarily obscure the subject matter of the present disclosure, the detailed description thereof will be omitted. In addition, the terms described below are terms defined in consideration of functions in the present disclosure, which may vary according to intentions or customs of users and operators.
그러나 본 개시는 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있다. 단지 본 실시예들은 본 개시가 완전하도록 하고, 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 개시의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 개시는 청구항의 범주에 의해 정의될 뿐이다. 그러므로 그 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.However, the present disclosure is not limited to the embodiments disclosed below and may be implemented in various different forms. Only the present embodiments are provided so that the present disclosure is complete, and to fully inform those of ordinary skill in the art to which the present disclosure belongs, the scope of the disclosure, and the present disclosure is only defined by the scope of the claims . Therefore, the definition should be made based on the content throughout this specification.
본 개시에서, CAN(Controller Area Network) 이상징후 탐지 시스템은 LSTM(Long Short Term Memory) 기반의 의사 정상 데이터 생성부의 제1 모델 및 비정상 탐지부의 제2 모델로 구성될 수 있다. 여기서, LSTM 기반의 의사 정상 데이터 생성부의 제1 모델은, 차량의 이상징후가 없는 일반적인 상황에서 차량으로부터 수집된 정상 CAN 트래픽을 모방하는 의사 정상 데이터를 생성할 수 있다. 그리고, 비정상 탐지부의 제2 모델은, CAN 트래픽에서 이상징후를 탐지할 수 있다. 이하, 본 개시에 따른 컴퓨팅 장치가 비정상 탐지부의 제2 모델을 이용하여 CAN 트래픽에서 이상징후를 탐지하는 방법에 대해 도 1 내지 도 6을 통해 설명한다.In the present disclosure, a controller area network (CAN) anomaly detection system may include a first model of a long short term memory (LSTM) based pseudo normal data generator and a second model of an anomaly detection unit. Here, the first model of the LSTM-based pseudo-normal data generator may generate pseudo-normal data imitating normal CAN traffic collected from a vehicle in a general situation in which there are no abnormal signs of the vehicle. And, the second model of the abnormality detection unit may detect an abnormality in CAN traffic. Hereinafter, a method in which the computing device according to the present disclosure detects anomalies in CAN traffic using the second model of the anomaly detection unit will be described with reference to FIGS. 1 to 6 .
도 1은, 본 개시의 일 실시예에 따라, 차량 이상징후 탐지 방법을 제공하기 위한 동작을 수행하는 컴퓨팅 장치의 블록 구성도를 도시한 도면이다.1 is a diagram illustrating a block diagram of a computing device that performs an operation for providing a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
도 1에 도시된 컴퓨팅 장치(100)의 구성은 간략화 하여 나타낸 예시일 뿐이다. 본 개시의 일 실시예에서 컴퓨팅 장치(100)는 컴퓨팅 장치(100)의 컴퓨팅 환경을 수행하기 위한 다른 구성들이 포함될 수 있고, 개시된 구성들 중 일부만이 컴퓨팅 장치(100)를 구성할 수도 있다.The configuration of the computing device 100 shown in FIG. 1 is only a simplified example. In an embodiment of the present disclosure, the computing device 100 may include other components for performing the computing environment of the computing device 100 , and only some of the disclosed components may configure the computing device 100 .
컴퓨팅 장치(100)는 프로세서(110), 메모리(130), 네트워크부(150)를 포함할 수 있다.The computing device 100 may include a processor 110 , a memory 130 , and a network unit 150 .
본 개시에서, 프로세서(110)는, 의사 정상 데이터를 이용한 자가 감독 학습 기반으로 차량 이상징후 탐지할 수 있고, 제한된 데이터 환경에서 효과적으로 차량 이상징후 탐지 모델을 훈련시킬 수 있다.In the present disclosure, the processor 110 can detect vehicle anomalies based on self-supervised learning using pseudo-normal data, and can effectively train a vehicle anomaly detection model in a limited data environment.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 차량에서 발생하는 정상 데이터를 획득하고, 획득한 정상 데이터를 전처리하며, 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성하고, 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시키며, 차량에서 발생하는 데이터를 학습된 제2 뉴럴 네트워크 모델에 입력하여 차량의 이상징후를 탐지할 수 있다.According to an embodiment of the present disclosure, the processor 110 acquires normal data generated in a vehicle, pre-processes the acquired normal data, and inputs the pre-processed normal data to a pre-trained first neural network model to obtain a doctor Generates pseudo normal data, trains a second neural network model based on the generated pseudo-normal data, and detects abnormal signs of a vehicle by inputting data generated from the vehicle into the learned second neural network model can do.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 정상 데이터를 획득할 때, 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터를 획득할 수 있다. 전술한 사항은 예시일 뿐 본 개시는 이에 제한되지 않는다.According to an embodiment of the present disclosure, when acquiring normal data, the processor 110 may acquire controller area network (CAN) traffic data generated in a vehicle in a normal state. The foregoing is merely an example, and the present disclosure is not limited thereto.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 정상 데이터를 전처리할 때, 정상 데이터에 포함된 CAN 메시지들로부터 CAN ID를 추출하고, 추출한 CAN ID를 기초로 하여 CAN ID 시퀀스(sequence)를 생성할 수 있다. 일 예로, CAN ID 시퀀스는, 16진수 또는 2진수 데이터로 표현될 수 있다. 전술한 사항은 예시일 뿐 본 개시는 이에 제한되지 않는다.According to an embodiment of the present disclosure, the processor 110, when pre-processing the normal data, extracts a CAN ID from CAN messages included in the normal data, and based on the extracted CAN ID CAN ID sequence (sequence) can create As an example, the CAN ID sequence may be expressed as hexadecimal or binary data. The foregoing is merely an example, and the present disclosure is not limited thereto.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 의사 정상 데이터를 생성할 때, 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하고, 사전 학습된 제1 뉴럴 네트워크 모델을 통해 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID를 예측하여 의사 정상 데이터를 생성할 수 있다. According to an embodiment of the present disclosure, when generating pseudo normal data, the processor 110 inputs the pre-processed normal data to the pre-trained first neural network model, and through the pre-trained first neural network model Pseudo-normal data can be generated by predicting the CAN ID that appears next to each CAN ID included in the normal data.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력할 때, 임의의 CAN ID 또는 CAN ID 시퀀스를 포함하는 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력할 수 있다.According to an embodiment of the present disclosure, when the processor 110 inputs the pre-processed normal data to the pre-trained first neural network model, the pre-trained normal data including an arbitrary CAN ID or CAN ID sequence It can be input to the first neural network model.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 의사 정상 데이터를 생성할 때, 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID의 확률 분포(probability distribution)에 따라 다음 CAN ID를 예측하여 선택할 수 있다.According to an embodiment of the present disclosure, when generating pseudo normal data, the processor 110 generates a next CAN ID according to a probability distribution of a CAN ID appearing next to each CAN ID included in the normal data. You can predict and choose.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 다음 CAN ID를 선택할 때, 균일 분포(uniform distribution)에 따라 임의의 CAN ID를 선택하여 노이즈를 추가할 수 있다. 프로세서(110)는, 노이즈를 추가할 때, 미리 설정된 노이즈 비율에 기초하여 균일 분포로 임의의 CAN ID를 선택할 수 있다.According to an embodiment of the present disclosure, when selecting the next CAN ID, the processor 110 may add noise by selecting an arbitrary CAN ID according to a uniform distribution. When adding noise, the processor 110 may select an arbitrary CAN ID with a uniform distribution based on a preset noise ratio.
그리고, 본 개시의 의사 정상 데이터는, 임의의 길이를 갖는 CAN ID 시퀀스를 포함할 수 있다. 일 예로, 의사 정상 데이터는, 제1 뉴럴 네트워크 모델에 입력되는 정상 데이터의 길이와 동일한 길이를 갖는 CAN ID 시퀀스를 포함할 수 있다. 다른 일 예로, 의사 정상 데이터는, CAN ID 시퀀스를 포함할 수 있는데, CAN ID 시퀀스의 전체 CAN ID들 중 미리 설정된 노이즈 비율에 상응하여 일부 CAN ID들이 균일 분포로 선택될 수 있다. 전술한 사항은 예시일 뿐 본 개시는 이에 제한되지 않는다.And, the pseudo-normal data of the present disclosure may include a CAN ID sequence having an arbitrary length. As an example, the pseudo normal data may include a CAN ID sequence having the same length as that of normal data input to the first neural network model. As another example, the pseudo-normal data may include a CAN ID sequence, and some CAN IDs may be selected with a uniform distribution according to a preset noise ratio among all CAN IDs of the CAN ID sequence. The foregoing is merely an example, and the present disclosure is not limited thereto.
이어, 본 개시의 제1 뉴럴 네트워크 모델은, 정상 데이터로부터 추출된 CAN ID 또는 CAN ID 시퀀스가 입력되면 입력된 CAN ID 또는 CAN ID 시퀀스의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하도록 사전 학습될 수 있다. 제1 뉴럴 네트워크 모델의 사전 학습은, 정상 데이터로부터 추출된 CAN ID를 입력 받아 일정 크기의 벡터로 변환하고, 변환된 벡터에 기초하여 주어진 시퀀스의 컨텍스트(context)를 추출하며, 추출된 시퀀스의 컨텍스트에 기초하여 입력된 CAN ID의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하여 학습할 수 있다. 일 예로, 제1 뉴럴 네트워크 모델은, 정상 데이터로부터 추출된 CAN ID를 입력 받아 일정 크기의 벡터로 변환하는 임베딩 레이어(Embedding layer), 변환된 벡터에 기초하여 주어진 시퀀스의 컨텍스트(context)를 추출하는 LSTM 레이어(Long Short-Term Memory layer), 그리고 추출된 시퀀스의 컨텍스트에 기초하여 입력된 CAN ID의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하는 덴스 레이어(Dense layer)를 포함할 수 있다. 전술한 사항은 예시일 뿐 본 개시는 이에 제한되지 않는다.Next, when the CAN ID or CAN ID sequence extracted from normal data is input, the first neural network model of the present disclosure is pre-trained to predict the probability distribution for the CAN ID that appears next to the input CAN ID or CAN ID sequence. can Pre-learning of the first neural network model receives the CAN ID extracted from normal data, transforms it into a vector of a certain size, extracts the context of a given sequence based on the transformed vector, and the context of the extracted sequence It is possible to learn by predicting a probability distribution for the CAN ID that appears next to the input CAN ID based on the . As an example, the first neural network model includes an embedding layer that receives a CAN ID extracted from normal data and transforms it into a vector of a certain size, and extracts the context of a given sequence based on the transformed vector. It may include a Long Short-Term Memory layer (LSTM) and a density layer that predicts a probability distribution for a CAN ID appearing next to an input CAN ID based on the context of the extracted sequence. The foregoing is merely an example, and the present disclosure is not limited thereto.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 제2 뉴럴 네트워크 모델을 학습시킬 때, 전처리한 정상 데이터와 의사 정상 데이터를 제2 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터를 비정상 데이터로 분류하도록 학습시킬 수 있다.According to an embodiment of the present disclosure, when training the second neural network model, the processor 110 inputs the preprocessed normal data and the pseudo-normal data to the second neural network model to classify the pseudo-normal data as abnormal data. can be taught to do.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 제2 뉴럴 네트워크 모델을 학습시킬 때, 전처리한 정상 데이터와 추가로 획득한 공격 유형의 힌트 데이터를 제2 뉴럴 네트워크 모델에 입력하여 공격 유형의 힌트 데이터를 비정상 데이터로 분류하도록 학습시킬 수 있다.According to an embodiment of the present disclosure, when the processor 110 trains the second neural network model, the preprocessed normal data and the additionally acquired hint data of the attack type are input to the second neural network model to enter the attack type. It can be trained to classify the hint data of , as abnormal data.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 의사 정상 데이터, 공격 유형의 힌트 데이터, 그리고 비정상 데이터 중 적어도 어느 하나에 기초하여 제2 뉴럴 네트워크 모델을 학습시키는 경우, 역전파되는 그레디언트의 크기를 임계값 이하로 제한할 수 있다.According to an embodiment of the present disclosure, when the processor 110 trains the second neural network model based on at least one of pseudo normal data, attack type hint data, and abnormal data, You can limit the size below a threshold.
본 개시의 일 실시예에 따르면, 프로세서(110)는, 차량의 이상징후를 탐지할 때, 차량에서 발생하는 데이터를 획득하고, 획득한 데이터를 전처리하며, 전처리한 데이터를 사전 학습된 제2 뉴럴 네트워크 모델에 입력하여 정상 데이터 또는 비정상 데이터로 분류하여 차량의 이상징후를 탐지할 수 있다. 프로세서(110)는, 차량에서 발생하는 데이터를 획득할 때, 비정상 및 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터를 획득할 수 있다. 프로세서(110)는, 데이터를 전처리할 때, 데이터에 포함된 CAN 메시지들로부터 CAN ID를 추출하고, 추출한 CAN ID를 기초로 하여 CAN ID 시퀀스(sequence)를 생성할 수 있다.According to an embodiment of the present disclosure, the processor 110 obtains data generated in the vehicle when detecting an abnormal symptom of the vehicle, pre-processes the obtained data, and pre-learned the pre-processed data to the second neural By entering into the network model and classifying it as normal data or abnormal data, abnormal signs of the vehicle can be detected. When acquiring data generated in the vehicle, the processor 110 may acquire controller area network (CAN) traffic data generated in an abnormal or normal vehicle. When the data is pre-processed, the processor 110 may extract a CAN ID from CAN messages included in the data, and generate a CAN ID sequence based on the extracted CAN ID.
이와 같이, 프로세서(110)는, 하나 이상의 코어로 구성될 수 있으며, 컴퓨팅 장치(100)의 중앙 처리 장치(CPU: central processing unit), 범용 그래픽 처리 장치(GPGPU: general purpose graphics processing unit), 텐서 처리 장치(TPU: tensor processing unit) 등의 딥러닝을 위한 프로세서를 포함할 수 있다. 프로세서(110)는, 메모리(130)에 저장된 컴퓨터 프로그램을 판독하여 본 개시의 일 실시예에 따른 차량의 이상징후 탐지를 수행할 수 있다. 본 개시의 일 실시예에 따라 프로세서(110)는, 차량의 이상징후 탐지를 위한 연산을 수행할 수 있다. 프로세서(110)는, 딥러닝(DN: deep learning)에서 학습을 위한 입력 데이터의 처리, 입력 데이터에서의 피처 추출, 오차 계산, 역전파(backpropagation)를 이용한 신경망의 가중치 업데이트 등의 신경망의 학습을 위한 계산을 수행할 수 있다. 프로세서(110)는, CPU, GPGPU, 및 TPU 중 적어도 하나가 네트워크 함수의 학습을 처리할 수 있다. 예를 들어, CPU 와 GPGPU가 함께 네트워크 함수의 학습, 네트워크 함수를 이용한 차량의 이상징후 탐지를 처리할 수 있다. 또한, 본 개시의 일 실시예에서는, 복수의 컴퓨팅 장치의 프로세서를 함께 사용하여 네트워크 함수의 학습, 네트워크 함수를 이용한 무인 이동체의 이상징후 탐지를 처리할 수 있다. 또한, 본 개시의 일 실시예에 따른 컴퓨팅 장치에서 수행되는 컴퓨터 프로그램은, CPU, GPGPU 또는 TPU 실행가능 프로그램일 수 있다.As such, the processor 110 may include one or more cores, and a central processing unit (CPU), a general purpose graphics processing unit (GPGPU), and a tensor of the computing device 100 . It may include a processor for deep learning, such as a tensor processing unit (TPU). The processor 110 may read a computer program stored in the memory 130 to detect anomalies of the vehicle according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, the processor 110 may perform an operation for detecting abnormal signs of a vehicle. The processor 110 performs learning of the neural network such as processing of input data for learning in deep learning (DN), extracting features from the input data, calculating an error, and updating the weight of the neural network using backpropagation. calculations can be performed for The processor 110, at least one of a CPU, a GPGPU, and a TPU may process learning of a network function. For example, the CPU and GPGPU can process learning of a network function and detection of anomalies in a vehicle using the network function. In addition, in an embodiment of the present disclosure, learning of a network function and detection of anomalies of an unmanned moving object using the network function may be processed by using the processors of a plurality of computing devices together. In addition, the computer program executed in the computing device according to an embodiment of the present disclosure may be a CPU, GPGPU or TPU executable program.
본 개시의 일 실시예에 따르면, 메모리(130)는, 프로세서(110)가 생성하거나 결정한 임의의 형태의 정보 및 네트워크부(150)가 수신한 임의의 형태의 정보를 저장할 수 있다.According to an embodiment of the present disclosure, the memory 130 may store any type of information generated or determined by the processor 110 and any type of information received by the network unit 150 .
본 개시의 일 실시예에 따르면, 메모리(130)는, 플래시 메모리 타입(flash memory type), 하드디스크 타입(hard disk type), 멀티미디어 카드 마이크로 타입(multimedia card micro type), 카드 타입의 메모리(예를 들어 SD 또는 XD 메모리 등), 램(Random Access Memory, RAM), SRAM(Static Random Access Memory), 롬(Read-Only Memory, ROM), EEPROM(Electrically Erasable Programmable Read-Only Memory), PROM(Programmable Read-Only Memory), 자기 메모리, 자기 디스크, 광디스크 중 적어도 하나의 타입의 저장매체를 포함할 수 있다. 컴퓨팅 장치(100)는 인터넷(internet) 상에서 메모리(130)의 저장 기능을 수행하는 웹 스토리지(web storage)와 관련되어 동작할 수도 있다. 전술한 메모리에 대한 기재는 예시일 뿐, 본 개시는 이에 제한되지 않는다.According to an embodiment of the present disclosure, the memory 130 includes a flash memory type, a hard disk type, a multimedia card micro type, and a card type memory (eg, SD or XD memory, etc.), Random Access Memory (RAM), Static Random Access Memory (SRAM), Read-Only Memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Programmable Memory (PROM) read-only memory), a magnetic memory, a magnetic disk, and an optical disk may include at least one type of storage medium. The computing device 100 may operate in relation to a web storage that performs a storage function of the memory 130 on the Internet. The description of the above-described memory is only an example, and the present disclosure is not limited thereto.
본 개시의 일 실시예에 따르면, 네트워크부(150)는, 차량의 이상징후 탐지를 수행하기 위한 데이터 등을 다른 컴퓨팅 장치, 서버 등과 송수신할 수 있다. 네트워크부(150)는, 차량의 이상징후 탐지를 수행하기 위하여 데이터를 다른 컴퓨팅 장치, 서버 등과 송수신할 수 있다. 또한, 네트워크부(150)는, 복수의 컴퓨팅 장치 사이의 통신을 가능하게 하여 복수의 컴퓨팅 장치 각각에서 네트워크 함수의 학습이 분산 수행되도록 할 수 있다. 네트워크부(150)는, 복수의 컴퓨팅 장치 사이의 통신을 가능하게 하여 네트워크 함수를 사용한 분석 자료 생성을 분산 처리할 수 있도록 할 수 있다.According to an embodiment of the present disclosure, the network unit 150 may transmit/receive data for detecting abnormal signs of a vehicle to/from other computing devices, servers, and the like. The network unit 150 may transmit/receive data to and from other computing devices, servers, and the like in order to detect anomalies of the vehicle. In addition, the network unit 150 may enable communication between a plurality of computing devices so that learning of a network function is performed in a distributed manner in each of the plurality of computing devices. The network unit 150 may enable communication between a plurality of computing devices to distribute analysis data generation using a network function.
본 개시의 일 실시예에 따르면, 네트워크부(150)는, 유선 및 무선 등과 같은 그 통신 양태를 가리지 않고 구성될 수 있으며, 단거리 통신망(PAN: Personal Area Network), 근거리 통신망(WAN: Wide Area Network) 등 다양한 통신망으로 구성될 수 있다. 또한, 네트워크부(150)는, 공지의 월드와이드웹(WWW: World Wide Web)일 수 있으며, 적외선(IrDA: Infrared Data Association) 또는 블루투스(Bluetooth)와 같이 단거리 통신에 이용되는 무선 전송 기술을 이용할 수도 있다. 본 명세서에서 설명된 기술들은 위에서 언급된 네트워크들뿐만 아니라, 다른 네트워크들에서도 사용될 수 있다.According to an embodiment of the present disclosure, the network unit 150 may be configured regardless of its communication mode, such as wired and wireless, and may include a personal area network (PAN) and a wide area network (WAN). ), etc., may be composed of various communication networks. In addition, the network unit 150 may be a known World Wide Web (WWW), and may use a wireless transmission technology used for short-range communication such as infrared (IrDA) or Bluetooth (Bluetooth). may be The techniques described herein may be used in the networks mentioned above, as well as in other networks.
이와 같이, 본 개시는, 자가 감독 학습의 성능적 이점을 유지하면서 모델이 학습하지 못한 새로운 유형의 이상징후를 탐지할 수 있도록 의사 정상 데이터를 생성하여 이를 모델 학습에 활용할 수 있다. 따라서, 본 개시는, 생성된 모델이 학습된 유형의 이상징후뿐만 아니라 새로운 유형의 공격 데이터도 탐지할 수 있다.As such, the present disclosure may generate pseudo-normal data to detect a new type of anomaly that the model has not learned while maintaining the performance advantage of self-supervised learning and utilize it for model training. Accordingly, according to the present disclosure, the generated model can detect not only the learned type of anomaly but also the new type of attack data.
본 개시는, 모델 학습에 이용된 유형의 이상징후뿐만 아니라, 새로운 유형의 이상징후를 모두 탐지할 수 있다. 기존의 자가 감독 학습 기법 기반의 모델은, 데이터 공간상에서 정상 데이터 포인트들과 비정상 데이터 포인트들의 경계를 학습하는 방식을 이용하기 때문에, 학습에 사용된 비정상 데이터에 의존적이며, 새로운 유형의 비정상 데이터를 올바르게 판단하지 못하는 한계점이 있으나, 본 개시에서는, 모델이 정상 데이터 포인트들이 분포한 공간 영역의 경계를 학습하도록 함으로써 학습된 유형의 이상징후뿐만 아니라 새로운 유형의 이상징후를 모두 탐지할 수 있다.The present disclosure can detect not only the types of anomalies used for model training, but also new types of anomalies. Since the existing self-supervised learning method-based model uses a method of learning the boundary between normal and abnormal data points in the data space, it is dependent on the abnormal data used for training, Although there is a limitation in not being able to determine, in the present disclosure, both the learned type of anomaly as well as the new type of anomaly can be detected by allowing the model to learn the boundary of the spatial region where normal data points are distributed.
도 2는, 본 개시의 일 실시예에 따라, 차량 이상징후 탐지 모델의 학습 및 탐지 방법을 설명하기 위한 프로세서의 블록 구성도를 도시한 도면이다.2 is a diagram illustrating a block configuration diagram of a processor for explaining a method for learning and detecting a vehicle anomaly detection model according to an embodiment of the present disclosure.
도 2에 도시된 바와 같이, 본 개시의 프로세서는, 전처리부(210), 제1 모델을 포함하는 의사 정상 데이터 생성부(220), 그리고 제2 모델을 포함하는 비정상 탐지부(230)를 포함할 수 있다.As shown in FIG. 2 , the processor of the present disclosure includes a preprocessor 210 , a pseudo-normal data generator 220 including a first model, and an abnormality detector 230 including a second model. can do.
전처리부(210)는, 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터가 입력되면 정상 데이터에 포함된 CAN 메시지들로부터 CAN ID를 추출하고, 추출한 CAN ID를 기초로 하여 CAN ID 시퀀스(sequence)를 생성할 수 있다. 일 예로, CAN ID 시퀀스는, 16진수 또는 2진수 데이터로 표현될 수 있다.When CAN (Controller Area Network) traffic data generated in a vehicle in a normal state is input, the preprocessor 210 extracts a CAN ID from CAN messages included in the normal data, and a CAN ID sequence based on the extracted CAN ID (sequence) can be created. As an example, the CAN ID sequence may be expressed as hexadecimal or binary data.
즉, 전처리부(210)는, 데이터 전처리 과정을 수행할 수 있는데, CAN 트래픽 데이터로부터 모델에 필요한 정보만을 추출할 수 있다. 구체적으로, 전처리부(210)는, CAN 트래픽에 포함된 CAN 메시지들로부터 CAN ID 정보를 추출하여 CAN ID 시퀀스 데이터로 변환할 수 있다. 이때, CAN ID 시퀀스 데이터는, 16진수 혹은 2진수 데이터로 표현될 수 있다. 다만, 이에 한정되는 것은 아니다.That is, the preprocessor 210 may perform a data preprocessing process, and may extract only information necessary for a model from the CAN traffic data. Specifically, the preprocessor 210 may extract CAN ID information from CAN messages included in CAN traffic and convert it into CAN ID sequence data. In this case, the CAN ID sequence data may be expressed as hexadecimal or binary data. However, the present invention is not limited thereto.
본 개시는, 메시지 페이로드를 제외한 CAN 트래픽의 순차적 패턴을 모델링하기 위해 CAN ID 시퀀스만 사용할 수 있다. 일례로, 모델 학습 이전의 전처리 단계에서, CAN ID는, CAN 메시지에서 추출되고 분할되어 CAN ID 시퀀스를 형성할 수 있다. 여기서, CAN ID는, 의사 정상 데이터 생성부(220)의 제1 모델과 비정상 탐지부(230)의 제2 모델에서 서로 다른 형태로 표시될 수 있다. 의사 정상 데이터 생성부(220)의 경우, 16 진수 문자열로 표시된 각 CAN ID는, 0부터 CAN 트래픽의 CAN ID 수까지의 인덱스로 정수 표현에 매핑될 수 있다. 그리고. 비정상 탐지부(230)의 경우, 각 CAN ID는, 11 비트 표현으로 변환될 수 있다. 그리고, 각 모델에 따라 변환된 CAN ID 시퀀스는, 고정 길이 하위 시퀀스의 작은 배치(batch)로 나누어 모델에 공급될 수 있다. 다만, 이에 한정되는 것은 아니다.This disclosure may use only the CAN ID sequence to model the sequential pattern of CAN traffic excluding the message payload. As an example, in a pre-processing step before model training, CAN IDs may be extracted from the CAN message and divided to form a CAN ID sequence. Here, the CAN ID may be displayed in different forms in the first model of the pseudo-normal data generator 220 and the second model of the abnormality detector 230 . In the case of the pseudo-normal data generator 220 , each CAN ID expressed as a hexadecimal string may be mapped to an integer representation as an index from 0 to the number of CAN IDs of CAN traffic. And. In the case of the anomaly detection unit 230, each CAN ID may be converted into an 11-bit representation. In addition, the CAN ID sequence converted according to each model may be divided into small batches of fixed-length subsequences and supplied to the model. However, the present invention is not limited thereto.
이어, 의사 정상 데이터 생성부(220)는, 의사 정상 데이터를 생성할 때, 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하고, 사전 학습된 제1 뉴럴 네트워크 모델을 통해 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID를 예측하여 의사 정상 데이터를 생성할 수 있다. 여기서, 사전 학습된 제1 뉴럴 네트워크 모델에 입력되는 정상 데이터는, 임의의 CAN ID 또는 CAN ID 시퀀스를 포함하는 정상 데이터일 수 있다.Next, when generating the pseudo-normal data, the pseudo-normal data generator 220 inputs the pre-processed normal data to the pre-trained first neural network model, and adds the pre-trained normal data to the normal data through the pre-trained first neural network model. Pseudo-normal data can be generated by predicting the CAN ID that appears next to each included CAN ID. Here, the normal data input to the pre-trained first neural network model may be an arbitrary CAN ID or normal data including a CAN ID sequence.
의사 정상 데이터 생성부(220)는, 의사 정상 데이터를 생성할 때, 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID의 확률 분포(probability distribution)에 따라 다음 CAN ID를 예측하여 선택할 수 있다. 또한, 의사 정상 데이터 생성부(220)는, 다음 CAN ID를 선택할 때, 균일 분포(uniform distribution)에 따라 임의의 CAN ID를 선택하여 노이즈를 추가할 수 있다. 의사 정상 데이터 생성부(220)는, 노이즈를 추가할 때, 미리 설정된 노이즈 비율에 기초하여 균일 분포로 임의의 CAN ID를 선택할 수 있다. 의사 정상 데이터는, 임의의 길이를 갖는 CAN ID 시퀀스를 포함할 수 있다. 일 예로, 의사 정상 데이터는, 의사 정상 데이터 생성부(220)의 제1 뉴럴 네트워크 모델에 입력되는 정상 데이터의 길이와 동일한 길이를 갖는 CAN ID 시퀀스를 포함할 수 있다. 다른 일 예로, 의사 정상 데이터는, CAN ID 시퀀스를 포함할 수 있는데, CAN ID 시퀀스의 전체 CAN ID들 중 미리 설정된 노이즈 비율에 상응하여 일부 CAN ID들이 균일 분포로 선택될 수 있다.When generating the pseudo-normal data, the pseudo-normal data generating unit 220 may predict and select the next CAN ID according to a probability distribution of a CAN ID that appears next to each CAN ID included in the normal data. . Also, when selecting the next CAN ID, the pseudo-normal data generator 220 may select an arbitrary CAN ID according to a uniform distribution to add noise. When adding noise, the pseudo-normal data generator 220 may select an arbitrary CAN ID with a uniform distribution based on a preset noise ratio. The pseudo-normal data may include a CAN ID sequence having any length. For example, the pseudo-normal data may include a CAN ID sequence having the same length as that of normal data input to the first neural network model of the pseudo-normal data generator 220 . As another example, the pseudo-normal data may include a CAN ID sequence, and some CAN IDs may be selected with a uniform distribution according to a preset noise ratio among all CAN IDs of the CAN ID sequence.
의사 정상 데이터 생성부(220)의 제1 뉴럴 네트워크 모델은, 정상 데이터로부터 추출된 CAN ID 또는 CAN ID 시퀀스가 입력되면 입력된 CAN ID 또는 CAN ID 시퀀스의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하도록 사전 학습될 수 있다. 제1 뉴럴 네트워크 모델의 사전 학습은, 정상 데이터로부터 추출된 CAN ID를 입력 받아 일정 크기의 벡터로 변환하고, 변환된 벡터에 기초하여 주어진 시퀀스의 컨텍스트(context)를 추출하며, 추출된 시퀀스의 컨텍스트에 기초하여 입력된 CAN ID의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하여 학습할 수 있다. 일 예로, 제1 뉴럴 네트워크 모델은, 정상 데이터로부터 추출된 CAN ID를 입력 받아 일정 크기의 벡터로 변환하는 임베딩 레이어(Embedding layer), 변환된 벡터에 기초하여 주어진 시퀀스의 컨텍스트(context)를 추출하는 LSTM 레이어(Long Short-Term Memory layer), 그리고 추출된 시퀀스의 컨텍스트에 기초하여 입력된 CAN ID의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하는 덴스 레이어(Dense layer)를 포함할 수 있다.The first neural network model of the pseudo-normal data generator 220 predicts a probability distribution for a CAN ID that appears next to the input CAN ID or CAN ID sequence when a CAN ID or CAN ID sequence extracted from normal data is input. can be pre-trained to do so. Pre-learning of the first neural network model receives the CAN ID extracted from normal data, transforms it into a vector of a certain size, extracts the context of a given sequence based on the transformed vector, and the context of the extracted sequence It is possible to learn by predicting a probability distribution for the CAN ID that appears next to the input CAN ID based on the . As an example, the first neural network model includes an embedding layer that receives a CAN ID extracted from normal data and transforms it into a vector of a certain size, and extracts the context of a given sequence based on the transformed vector. It may include a Long Short-Term Memory layer (LSTM) and a density layer that predicts a probability distribution for a CAN ID appearing next to an input CAN ID based on the context of the extracted sequence.
의사 정상 데이터 생성부(220)의 제1 뉴럴 네트워크 모델은, 대표적으로 RNN(Recurrent Neural Network) 유형인 LSTM(Long Short Term Memory)을 기반으로 의사 정상 데이터를 생성할 수 있다. 여기서, LSTM 네트워크는, 피드백 연결을 사용하여 음성 및 비디오와 같은 시계열 데이터를 처리하는데 적합할 수 있다. 다만, 이에 한정되는 것은 아니다.The first neural network model of the pseudo-normal data generator 220 may generate pseudo-normal data based on Long Short Term Memory (LSTM), which is a representative Recurrent Neural Network (RNN) type. Here, the LSTM network may be suitable for processing time series data such as voice and video using a feedback connection. However, the present invention is not limited thereto.
의사 정상 데이터 생성부(220)의 제1 뉴럴 네트워크 모델에 대한 입력은, CAN ID 또는 일련의 CAN ID일 수 있다. 의사 정상 데이터 생성부(220)의 제1 뉴럴 네트워크 모델은, 주어진 CAN ID 또는 일련의 CAN ID를 기반으로 각 시간 단계에서 다음 CAN ID로 어떤 CAN ID가 가장 가능성이 높은지를 예측하도록 학습될 수 있다. 다만, 이에 한정되는 것은 아니다.An input to the first neural network model of the pseudo-normal data generator 220 may be a CAN ID or a series of CAN IDs. The first neural network model of the pseudo-normal data generator 220 may be trained to predict which CAN ID is most likely to be the next CAN ID at each time step based on a given CAN ID or series of CAN IDs. . However, the present invention is not limited thereto.
다음, 비정상 탐지부(230)의 제2 뉴럴 네트워크 모델은, 의사 정상 데이터 생성부(220)에서 생성한 의사 정상 데이터에 기초하여 학습될 수 있다. 그리고, 학습된 제2 뉴럴 네트워크 모델은, 차량에서 발생하는 데이터를 입력 받아 차량의 이상징후를 탐지할 수 있다.Next, the second neural network model of the abnormality detection unit 230 may be learned based on the pseudonormal data generated by the pseudonormal data generator 220 . In addition, the learned second neural network model may receive data generated from the vehicle and detect an abnormal symptom of the vehicle.
일 예로, 비정상 탐지부(230)의 제2 뉴럴 네트워크 모델은, 전처리한 정상 데이터와 의사 정상 데이터를 입력 받아 의사 정상 데이터를 비정상 데이터로 분류하도록 학습될 수 있다.As an example, the second neural network model of the abnormality detection unit 230 may receive preprocessed normal data and pseudonormal data and learn to classify the pseudonormal data as abnormal data.
다른 일 예로, 비정상 탐지부(230)의 제2 뉴럴 네트워크 모델은, 전처리한 정상 데이터와 추가로 획득한 공격 유형의 힌트 데이터를 입력 받아 공격 유형의 힌트 데이터를 비정상 데이터로 분류하도록 학습될 수도 있다.As another example, the second neural network model of the abnormality detection unit 230 may be trained to classify the attack type hint data as abnormal data by receiving the preprocessed normal data and additionally acquired attack type hint data. .
또 다른 일 예로, 비정상 탐지부(230)의 제2 뉴럴 네트워크 모델은, 의사 정상 데이터, 공격 유형의 힌트 데이터, 그리고 비정상 데이터 중 적어도 어느 하나에 기초하여 학습하는 경우, 역전파되는 그레디언트의 크기를 임계값 이하로 제한할 수 있다. 그 이유는, 높은 학습률로 모델을 학습하는 경우, 익스프로딩 그레디언트(exploding gradient) 문제가 발생할 수 있기 때문이다. 따라서, 역전파되는 그레디언트 크기를 제한하는 그레디언트 클리핑(gradient clipping) 기법을 적용하면 높은 학습률로 학습을 수행할 수 있으며, 모델 성능이 더욱 향상될 수 있다.As another example, the second neural network model of the abnormality detection unit 230 determines the size of the gradient back propagated when learning based on at least one of pseudo normal data, attack type hint data, and abnormal data. It can be limited below a threshold. The reason is that when the model is trained at a high learning rate, an exploding gradient problem may occur. Therefore, if a gradient clipping technique that limits the size of the gradient backpropagated is applied, training can be performed at a high learning rate and the model performance can be further improved.
사전 학습된 비정상 탐지부(230)의 제2 뉴럴 네트워크 모델은, 차량에서 발생하는 데이터가 전처리되어 전처리한 데이터가 입력되면 정상 데이터 또는 비정상 데이터로 분류하여 차량의 이상징후를 탐지할 수 있다. 여기서, 차량에서 발생하는 데이터는, 비정상 및 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터일 수 있다. 제2 뉴럴 네트워크 모델에 입력되는 전처리한 데이터는, 데이터에 포함된 CAN 메시지들로부터 추출한 CAN ID를 기초로 하여 생성된 CAN ID 시퀀스(sequence)를 포함할 수 있다.The second neural network model of the pre-trained abnormality detection unit 230 may detect abnormal signs of the vehicle by classifying it as normal data or abnormal data when data generated in the vehicle is pre-processed and the pre-processed data is input. Here, the data generated in the vehicle may be controller area network (CAN) traffic data generated in the vehicle in an abnormal or normal state. The preprocessed data input to the second neural network model may include a CAN ID sequence generated based on a CAN ID extracted from CAN messages included in the data.
본 명세서에 걸쳐, 연산 모델, 신경망, 네트워크 함수, 뉴럴 네트워크(neural network)는 동일한 의미로 사용될 수 있다. 신경망은 일반적으로 노드라 지칭될 수 있는 상호 연결된 계산 단위들의 집합으로 구성될 수 있다. 이러한 노드들은 뉴런(neuron)들로 지칭될 수도 있다. 신경망은 적어도 하나 이상의 노드들을 포함하여 구성된다. 신경망들을 구성하는 노드(또는 뉴런)들은 하나 이상의 링크에 의해 상호 연결될 수 있다.Throughout this specification, computational model, neural network, network function, and neural network may be used interchangeably. A neural network may be composed of a set of interconnected computational units, which may generally be referred to as nodes. These nodes may also be referred to as neurons. A neural network is configured to include at least one or more nodes. Nodes (or neurons) constituting the neural networks may be interconnected by one or more links.
신경망 내에서, 링크를 통해 연결된 하나 이상의 노드들은 상대적으로 입력 노드 및 출력 노드의 관계를 형성할 수 있다. 입력 노드 및 출력 노드의 개념은 상대적인 것으로서, 하나의 노드에 대하여 출력 노드 관계에 있는 임의의 노드는 다른 노드와의 관계에서 입력 노드 관계에 있을 수 있으며, 그 역도 성립할 수 있다. 상술한 바와 같이, 입력 노드 대 출력 노드 관계는 링크를 중심으로 생성될 수 있다. 하나의 입력 노드에 하나 이상의 출력 노드가 링크를 통해 연결될 수 있으며, 그 역도 성립할 수 있다. In the neural network, one or more nodes connected through a link may relatively form a relationship between an input node and an output node. The concepts of an input node and an output node are relative, and any node in an output node relationship with respect to one node may be in an input node relationship in a relationship with another node, and vice versa. As described above, an input node-to-output node relationship may be created around a link. One or more output nodes may be connected to one input node through a link, and vice versa.
하나의 링크를 통해 연결된 입력 노드 및 출력 노드 관계에서, 출력 노드는 입력 노드에 입력된 데이터에 기초하여 그 값이 결정될 수 있다. 여기서 입력 노드와 출력 노드를 상호 연결하는 노드는 파라미터를 가질 수 있다. 파라미터는 가변적일 수 있으며, 신경망이 원하는 기능을 수행하기 위해, 사용자 또는 알고리즘에 의해 가변 될 수 있다. 예를 들어, 하나의 출력 노드에 하나 이상의 입력 노드가 각각의 링크에 의해 상호 연결된 경우, 출력 노드는 상기 출력 노드와 연결된 입력 노드들에 입력된 값들 및 각각의 입력 노드들에 대응하는 링크에 설정된 파라미터에 기초하여 출력 노드 값을 결정할 수 있다.In the relationship between the input node and the output node connected through one link, the value of the output node may be determined based on data input to the input node. Here, a node interconnecting the input node and the output node may have a parameter. The parameters may be variable, and may be changed by the user or algorithm in order for the neural network to perform a desired function. For example, when one or more input nodes are interconnected to one output node by respective links, the output node sets values input to input nodes connected to the output node and links corresponding to the respective input nodes. An output node value may be determined based on the parameter.
상술한 바와 같이, 신경망은 하나 이상의 노드들이 하나 이상의 링크를 통해 상호 연결되어 신경망 내에서 입력 노드 및 출력 노드 관계를 형성한다. 신경망 내에서 노드들과 링크들의 개수 및 노드들과 링크들 사이의 연관관계, 링크들 각각에 부여된 파라미터의 값에 따라, 신경망의 특성이 결정될 수 있다. 예를 들어, 동일한 개수의 노드 및 링크들이 존재하고, 링크들 사이의 파라미터 값이 상이한 두 신경망이 존재하는 경우, 두 개의 신경망들은 서로 상이한 것으로 인식될 수 있다.As described above, in a neural network, one or more nodes are interconnected through one or more links to form an input node and an output node relationship in the neural network. The characteristics of the neural network may be determined according to the number of nodes and links in the neural network, correlations between nodes and links, and parameter values assigned to each of the links. For example, when two neural networks having the same number of nodes and links and having different parameter values between the links exist, the two neural networks may be recognized as different from each other.
신경망은 하나 이상의 노드들을 포함하여 구성될 수 있다. 신경망을 구성하는 노드들 중 일부는, 최초 입력 노드로부터의 거리들에 기초하여, 하나의 레이어(layer)를 구성할 수 있다. 예를 들어, 최초 입력 노드로부터 거리가 n인 노드들의 집합은, n 레이어를 구성할 수 있다. 최초 입력 노드로부터 거리는, 최초 입력 노드로부터 해당 노드까지 도달하기 위해 거쳐야 하는 링크들의 최소 개수에 의해 정의될 수 있다. 그러나, 이러한 레이어의 정의는 설명을 위한 임의적인 것으로서, 신경망 내에서 레이어의 차수는 상술한 것과 상이한 방법으로 정의될 수 있다. 예를 들어, 노드들의 레이어는 최종 출력 노드로부터 거리에 의해 정의될 수도 있다.A neural network may include one or more nodes. Some of the nodes constituting the neural network may configure one layer based on distances from the initial input node. For example, a set of nodes having a distance of n from the initial input node may constitute n layers. The distance from the initial input node may be defined by the minimum number of links that must be passed to reach the corresponding node from the initial input node. However, the definition of such a layer is arbitrary for description, and the order of the layer in the neural network may be defined in a different way from the above. For example, a layer of nodes may be defined by a distance from the final output node.
최초 입력 노드는 신경망 내의 노드들 중 다른 노드들과의 관계에서 링크를 거치지 않고 데이터가 직접 입력되는 하나 이상의 노드들을 의미할 수 있다. 또는, 신경망 네트워크 내에서, 링크를 기준으로 한 노드 간의 관계에 있어서, 링크로 연결된 다른 입력 노드들 가지지 않는 노드들을 의미할 수 있다. 이와 유사하게, 최종 출력 노드는 신경망 내의 노드들 중 다른 노드들과의 관계에서, 출력 노드를 가지지 않는 하나 이상의 노드들을 의미할 수 있다. 또한, 히든 노드는 최초 입력 노드 및 최후 출력 노드가 아닌 신경망을 구성하는 노드들을 의미할 수 있다. 본 개시의 일 실시예에 따른 신경망은 입력 레이어의 노드의 개수가 출력 레이어의 노드의 개수와 동일할 수 있으며, 입력 레이어에서 히든 레이어로 진행됨에 따라 노드의 수가 감소하다가 다시 증가하는 형태의 신경망일 수 있다. 또한, 본 개시의 다른 일 실시예에 따른 신경망은 입력 레이어의 노드의 개수가 출력 레이어의 노드의 개수 보다 적을 수 있으며, 입력 레이어에서 히든 레이어로 진행됨에 따라 노드의 수가 감소하는 형태의 신경망일 수 있다. 또한, 본 개시의 또 다른 일 실시예에 따른 신경망은 입력 레이어의 노드의 개수가 출력 레이어의 노드의 개수보다 많을 수 있으며, 입력 레이어에서 히든 레이어로 진행됨에 따라 노드의 수가 증가하는 형태의 신경망일 수 있다. 본 개시의 또 다른 일 실시예에 따른 신경망은 상술한 신경망들의 조합된 형태의 신경망일 수 있다.The initial input node may mean one or more nodes to which data is directly input without going through a link in a relationship with other nodes among nodes in the neural network. Alternatively, in a relationship between nodes based on a link in a neural network, it may mean nodes that do not have other input nodes connected by a link. Similarly, the final output node may refer to one or more nodes that do not have an output node in relation to other nodes among nodes in the neural network. In addition, the hidden node may mean nodes constituting the neural network other than the first input node and the last output node. The neural network according to an embodiment of the present disclosure may be a neural network in which the number of nodes in the input layer may be the same as the number of nodes in the output layer, and the number of nodes decreases and then increases again as progresses from the input layer to the hidden layer. can Also, in the neural network according to another embodiment of the present disclosure, the number of nodes in the input layer may be less than the number of nodes in the output layer, and the number of nodes may be reduced as the number of nodes progresses from the input layer to the hidden layer. there is. In addition, the neural network according to another embodiment of the present disclosure may be a neural network in which the number of nodes in the input layer may be greater than the number of nodes in the output layer, and the number of nodes increases as the number of nodes progresses from the input layer to the hidden layer. can The neural network according to another embodiment of the present disclosure may be a neural network in a combined form of the aforementioned neural networks.
딥 뉴럴 네트워크(DNN: deep neural network, 심층신경망)는 입력 레이어와 출력 레이어 외에 복수의 히든 레이어를 포함하는 신경망을 의미할 수 있다. 딥 뉴럴 네트워크를 이용하면 데이터의 잠재적인 구조(latent structures)를 파악할 수 있다. 즉, 사진, 글, 비디오, 음성, 음악의 잠재적인 구조(예를 들어, 어떤 물체가 사진에 있는지, 글의 내용과 감정이 무엇인지, 음성의 내용과 감정이 무엇인지 등)를 파악할 수 있다. 딥 뉴럴 네트워크는 컨볼루셔널 뉴럴 네트워크(CNN: convolutional neural network), 리커런트 뉴럴 네트워크(RNN: recurrent neural network), 오토 인코더(auto encoder), GAN(Generative Adversarial Networks), 제한 볼츠만 머신(RBM: restricted boltzmann machine), 심층 신뢰 네트워크(DBN: deep belief network), Q 네트워크, U 네트워크, 샴 네트워크 등을 포함할 수 있다. 전술한 딥 뉴럴 네트워크의 기재는 예시일 뿐이며 본 개시는 이에 제한되지 않는다.A deep neural network (DNN) may refer to a neural network including a plurality of hidden layers in addition to an input layer and an output layer. Deep neural networks can be used to identify the latent structures of data. In other words, it can identify the potential structure of photos, texts, videos, voices, and music (e.g., what objects are in the photos, what the text and emotions are, what the texts and emotions are, etc.) . Deep neural networks include convolutional neural networks (CNNs), recurrent neural networks (RNNs), auto encoders, generative adversarial networks (GANs), and restricted Boltzmann machines (RBMs). boltzmann machine), a deep belief network (DBN), a Q network, a U network, a Siamese network, and the like. The description of the deep neural network described above is only an example, and the present disclosure is not limited thereto.
도 3은, 본 개시의 일 실시예에 따라, 의사 정상 데이터 생성기의 뉴럴 네트워크 모델을 예시적으로 도시한 도면이다.3 is a diagram exemplarily illustrating a neural network model of a pseudo-normal data generator, according to an embodiment of the present disclosure.
도 3을 참조하면, 본 개시에서, 의사 정상 데이터 생성부의 제1 모델은, 적어도 하나의 임베딩(Embedding) 레이어(222), 적어도 하나의 LSTM 레이어(224) 및 적어도 하나의 덴스(Dense) 레이어(226)를 포함할 수 있다. 여기서, 임베딩 레이어(222)는, 입력된 CAN ID를 일정 크기의 벡터로 변환하는 역할을 수행할 수 있다. 그리고, LSTM 레이어(224)는, 벡터를 입력 받아 정보를 추출하는 역할을 수행할 수 있다. 또한, 덴스 레이어(226)는, 최종적으로 다음 CAN ID에 대한 확률 분포를 예측할 수 있다. 이 경우, 의사 정상 데이터 생성부의 제1 모델은, 정상 CAN 트래픽으로부터 추출된 CAN ID 시퀀스 데이터를 입력 받아 입력된 시퀀스 다음에 나타날 CAN ID에 대한 확률 분포를 예측하도록 학습될 수 있다. 다만, 이에 한정되는 것은 아니다.Referring to FIG. 3 , in the present disclosure, the first model of the pseudo-normal data generator includes at least one embedding layer 222 , at least one LSTM layer 224 , and at least one dense layer ( 226) may be included. Here, the embedding layer 222 may serve to convert the input CAN ID into a vector of a predetermined size. In addition, the LSTM layer 224 may perform a role of receiving a vector and extracting information. Also, the density layer 226 may finally predict a probability distribution for the next CAN ID. In this case, the first model of the pseudo-normal data generator may be trained to receive CAN ID sequence data extracted from normal CAN traffic and predict a probability distribution for a CAN ID that will appear after the input sequence. However, the present invention is not limited thereto.
한편, 학습이 완료된 의사 정상 데이터 생성부의 제1 모델은, 의사 정상 데이터를 생성할 수 있다. 이때, 의사 정상 데이터는 CAN ID 시퀀스이며, 시퀀스를 구성하는 각 CAN ID는, 의사 정상 데이터 생성부의 제1 모델이 각 타임 스텝(time step)에서 예측한 다음 CAN ID의 확률 분포에 따라 확률적으로 선택될 수 있다. 또한, 학습이 완료된 의사 정상 데이터 생성부의 제1 모델은, 일정 확률로 다음 CAN ID를 선택할 때, 예측된 확률 분포가 아닌 균일(uniform) 분포를 이용하여 임의로 CAN ID를 선택함으로써 노이즈를 추가할 수 있다. 다만, 이에 한정되는 것은 아니다.Meanwhile, the first model of the pseudo-normal data generating unit for which the training has been completed may generate pseudo-normal data. At this time, the pseudo-normal data is a CAN ID sequence, and each CAN ID constituting the sequence is predicted by the first model of the pseudo-normal data generator at each time step and then probabilistically according to the probability distribution of the CAN ID. can be selected. In addition, the first model of the pseudo-normal data generator that has been trained can add noise by arbitrarily selecting a CAN ID using a uniform distribution rather than a predicted probability distribution when selecting the next CAN ID with a certain probability. there is. However, the present invention is not limited thereto.
한편, 의사 정상 데이터 생성부의 제1 모델로부터 생성된 의사 정상 데이터는, 정상 데이터와 함께 비정상 탐지부의 제2 모델의 감독(supervised) 학습에 사용될 수 있다. 또한, 비정상 탐지부의 제2 모델은, 의사 정상 데이터와 정상 데이터를 분류하도록 학습될 수 있다. 따라서, 본 개시의 컴퓨팅 장치는, 생성된 의사 정상 데이터와 별도로 수집된 이상징후 데이터를 함께 비정상 데이터로 사용함으로써, 모델의 성능을 향상시킬 수 있다. 다만, 이에 한정되는 것은 아니다.Meanwhile, the pseudo-normal data generated from the first model of the pseudo-normal data generating unit may be used together with the normal data for supervised learning of the second model of the abnormal detecting unit. Also, the second model of the abnormality detection unit may be trained to classify the pseudonormal data and the normal data. Accordingly, the computing device of the present disclosure may improve the performance of the model by using the generated pseudo normal data and the abnormal symptom data separately collected as abnormal data together. However, the present invention is not limited thereto.
본 개시에서, 의사 정상 데이터 생성부의 제1 모델이 다음 CAN ID를 예측하는 문제는, 일반적인 다중 클래스 분류 문제로 간주될 수 있다. 상술한 바와 같이, LSTM 기반의 의사 정상 데이터 생성부의 제1 모델은, LSTM 레이어의 주어진 이전 상태와 입력 CAN ID를 기반으로 다음 CAN ID의 클래스를 예측할 수 있다. 이때, CAN ID에 대한 확률을 출력하기 위해, 범주형 교차 엔트로피 손실 함수가 사용될 수 있다.In the present disclosure, the problem in which the first model of the pseudo-normal data generator predicts the next CAN ID may be regarded as a general multi-class classification problem. As described above, the first model of the LSTM-based pseudo-normal data generator may predict the class of the next CAN ID based on the given previous state of the LSTM layer and the input CAN ID. In this case, in order to output the probability for the CAN ID, a categorical cross entropy loss function may be used.
구체적으로, 범주형 교차 엔트로피는, 교차 엔트로피를 계산하기 전에 소프트맥스(Softmax) 활성화를 추가하여 구현할 수 있다. 소프트맥스(Softmax) 활성화는, C차원 벡터 s를 합계가 1인 범위 (0, 1)의 C차원 벡터 σ(s)로 정규화하며 하기의 수학식 1과 같이 계산될 수 있다.Specifically, categorical cross entropy can be implemented by adding softmax activation before calculating cross entropy. Softmax activation can be calculated as in Equation 1 below by normalizing the C-dimensional vector s to the C-dimensional vector σ(s) in the range (0, 1) in which the sum is 1.
Figure PCTKR2021013572-appb-img-000001
Figure PCTKR2021013572-appb-img-000001
여기서, C는, CAN ID의 수를 나타낼 수 있다. 그리고, 벡터 s는, 마지막 덴스(Dense) 레이어의 출력 로짓(logit)을 나타낼 수 있다. 한편, 교차 엔트로피 손실은 하기의 수학식 2과 같이 계산될 수 있다.Here, C may represent the number of CAN IDs. And, the vector s may represent an output logit of the last dense layer. Meanwhile, the cross entropy loss can be calculated as in Equation 2 below.
Figure PCTKR2021013572-appb-img-000002
Figure PCTKR2021013572-appb-img-000002
여기서 ti는, 주어진 시퀀스의 대상 다음 CAN ID를 나타낼 수 있다.Here, t i may indicate the next CAN ID of the given sequence.
한편, 본 개시에서, 의사 정상 데이터 생성부의 제1 모델이 학습되면 제1 모델이 CAN ID 시퀀스의 작은 배치(batch)에 대해 학습되었더라도 실제 CAN 트래픽의 CAN ID 시퀀스를 모방하는 긴 CAN ID 시퀀스를 생성할 수 있다. 일례로, 본 개시의 컴퓨팅 장치는, 생성할 CAN ID 수를 설정하여 의사 정상 데이터 생성부의 제1 모델에 시작 CAN ID를 공급할 수 있다. 이 경우, 의사 정상 데이터 생성부는, CAN ID 시퀀스를 생성할 수 있다. 또한, 의사 정상 데이터 생성부의 제1 모델은, 주어진 시작 CAN ID를 기반으로 다음 CAN ID의 분포를 예측할 수 있다. 그리고, 의사 정상 데이터 생성부의 제1 모델은, 예측된 확률 분포에서 샘플링하여 다음 CAN ID의 인덱스를 얻을 수 있다. 이때, 예측된 CAN ID는, 제1 모델의 다음 입력으로 사용될 수 있다. 이 경우, 의사 정상 데이터 생성부의 제1 모델은, 생성된 의사 정상 데이터의 다양성을 높이기 위해 다음 항목을 선택할 때, 덴스(Dense) 레이어에서 예측된 확률 분포 대신 노이즈 비율이라고 하는 주어진 확률의 균일 분포에서 생성자 모델 샘플을 얻을 수 있다. 예를 들어, 의사 정상 데이터 생성부의 제1 모델은, 균일 샘플링 확률이 0.2로 주어지면 생성된 시퀀스의 CAN ID 중 20 %가 균일 분포에서 샘플링하여 선택할 수 있다. 다만, 이에 한정되는 것은 아니다.Meanwhile, in the present disclosure, when the first model of the pseudo-normal data generator is trained, even if the first model is trained for a small batch of CAN ID sequences, a long CAN ID sequence that mimics the CAN ID sequence of actual CAN traffic is generated. can do. As an example, the computing device of the present disclosure may supply the starting CAN ID to the first model of the pseudo-normal data generating unit by setting the number of CAN IDs to be generated. In this case, the pseudo normal data generating unit may generate the CAN ID sequence. Also, the first model of the pseudo-normal data generator may predict the distribution of the next CAN ID based on the given start CAN ID. In addition, the first model of the pseudo-normal data generator may obtain the index of the next CAN ID by sampling from the predicted probability distribution. In this case, the predicted CAN ID may be used as the next input of the first model. In this case, the first model of the pseudo-stationary data generator, when selecting the next item to increase the diversity of the generated pseudo-stationary data, uses a uniform distribution of a given probability called the noise ratio instead of the probability distribution predicted in the dense layer. You can get a sample constructor model. For example, the first model of the pseudo-normal data generator may be selected by sampling from a uniform distribution of 20% of the CAN IDs of the generated sequence given a uniform sampling probability of 0.2. However, the present invention is not limited thereto.
본 개시에서, 비정상 탐지부의 제2 모델은, 의사 정상 데이터 생성부의 제1 모델에 의해 생성된 노이즈 의사 정상 데이터와 실제 CAN 트래픽 데이터를 사용하는 감독 학습을 통해 학습될 수 있다. 따라서, 비정상 탐지부의 제2 모델의 학습은, 이진 분류 문제로 간주될 수 있다. 일례로, 실제 CAN 데이터와 의사 정상 데이터의 샘플은, 각각 0과 1로 표시될 수 있다. 다만, 이에 한정되는 것은 아니다.In the present disclosure, the second model of the anomaly detection unit may be learned through supervised learning using noise pseudo-normal data generated by the first model of the pseudo-normal data generation unit and actual CAN traffic data. Therefore, the training of the second model of the anomaly detection unit may be regarded as a binary classification problem. As an example, samples of actual CAN data and pseudo-normal data may be represented by 0 and 1, respectively. However, the present invention is not limited thereto.
한편, 비정상 탐지부의 제2 모델은, 의사 정상 데이터 외에도 추가 비정상 데이터를 사용하여 공격 데이터의 한 유형인 공격에 대한 힌트 데이터를 사용할 수 있다. 일례로, 비정상 탐지부의 제2 모델은, 특정 유형의 공격 데이터를 획득하여 노이즈 의사 정상 데이터와 함께 학습에 사용할 수 있다. Meanwhile, the second model of the anomaly detection unit may use hint data for an attack, which is a type of attack data, by using additional abnormal data in addition to the pseudo normal data. As an example, the second model of the anomaly detection unit may acquire a specific type of attack data and use it for training together with the noisy pseudo-normal data.
이 경우, 공격에 대한 힌트는, 비정상 탐지부의 제2 모델이 공격 패턴과 다양한 일반 데이터를 학습하는데 도움될 수 있다. 여기서, 힌트 데이터는, 노이즈 의사 정상 데이터와 마찬가지로 라벨링될 수 있다. 다만, 이에 한정되는 것은 아니다.In this case, the hint about the attack may help the second model of the anomaly detection unit to learn the attack pattern and various general data. Here, the hint data may be labeled like noise pseudo-normal data. However, the present invention is not limited thereto.
본 개시에서, 범주형 교차 엔트로피를 사용한 의사 정상 데이터 생성부의 제1 모델 학습과 유사하게 이진 교차 엔트로피 손실은, 입력 CAN ID 시퀀스를 정상 및 비정상의 두 클래스로 분류하기 때문에 비정상 탐지부의 제2 모델을 학습하는데 사용될 수 있다. 이 경우, 이진 교차 엔트로피 손실은, 상기 수학식 2로 계산될 수 있다. 이때, C는 출력 클래스의 수에 따라 2로 설정될 수 있다. 다만, 이에 한정되는 것은 아니다.In the present disclosure, similar to the first model training of the pseudo-normal data generator using categorical cross entropy, the binary cross entropy loss classifies the input CAN ID sequence into two classes, normal and abnormal, so that the second model of the anomaly detection unit is used. can be used to learn. In this case, the binary cross entropy loss may be calculated by Equation 2 above. In this case, C may be set to 2 according to the number of output classes. However, the present invention is not limited thereto.
본 개시에서, 의사 정상 데이터 생성부의 제1 모델 및 비정상 탐지부의 제2 모델의 학습 중에 발생할 수 있는 그레디언트 익스플로딩(gradient exploding) 문제를 방지하기 위해 그레디언트 클리핑(gradient clipping)을 적용할 수 있다. 구체적으로, 그레디언트 익스플로딩 문제는, 큰 오류 그레디언트가 누적되어 학습 중에 모델 가중치에 너무 큰 업데이트를 유발할 수 있다.In the present disclosure, gradient clipping may be applied to prevent a gradient exploding problem that may occur during training of the first model of the pseudo-normal data generator and the second model of the abnormality detector. Specifically, the problem of gradient exploiting is that large error gradients can accumulate, causing too large updates to model weights during training.
한편, 그레디언트 클리핑은, 기울기(gradient)를 제한하여 작게 유지함으로써 구현할 수 있다. 특히, 기울기
Figure PCTKR2021013572-appb-img-000003
의 노름(norm)이 주어진 임계 값 c보다 크면 하기의 수학식 3을 통해 크기를 조절할 수 있다.
Meanwhile, gradient clipping can be implemented by limiting and keeping a gradient small. In particular, the slope
Figure PCTKR2021013572-appb-img-000003
If the norm of is greater than a given threshold value c, the size can be adjusted through Equation 3 below.
Figure PCTKR2021013572-appb-img-000004
Figure PCTKR2021013572-appb-img-000004
여기서 c는 하이퍼 파라미터, g는 기울기,
Figure PCTKR2021013572-appb-img-000005
는 g의 표준일 수 있다. 이때,
Figure PCTKR2021013572-appb-img-000006
가 c보다 작으면 클리핑되지 않을 수 있다. 이 경우, 기울기 클리핑은 기울기 g가 최대 c의 표준을 갖도록 하여 모델 학습 프로세스를 보다 안정적으로 만들 수 있다. 다만, 이에 한정되는 것은 아니다.
where c is the hyperparameter, g is the slope,
Figure PCTKR2021013572-appb-img-000005
may be the standard of g. At this time,
Figure PCTKR2021013572-appb-img-000006
If is less than c, it may not be clipped. In this case, gradient clipping can make the model training process more stable by allowing gradient g to have a norm of max c. However, the present invention is not limited thereto.
도 4는, 본 개시의 일 실시예에 따라, 학습 데이터에 따른 지도 학습 모델의 결정 경계 예시를 보여주는 도면이다.4 is a diagram illustrating an example of a decision boundary of a supervised learning model according to learning data, according to an embodiment of the present disclosure.
도 4에 도시된 바와 같이, 차량에서 발생하는 데이터에는, 정상 데이터와 비정상 데이터(공격 데이터)가 포함되는 경우(a), 정상 데이터만이 포함되는 경우(b), 그리고 노이즈 의사 데이터와 정상 데이터가 포함되는 경우(c)를 가질 수 있다. 라벨링된 정상 데이터와 비정상 데이터 샘플의 양이 충분하다면 이상징후 탐지 모델은, 정상 데이터 및 비정상 데이터를 분류하도록 학습될 수 있다. 하지만, 정상 데이터 및 비정상 데이터가 포함된 데이터로부터 정상 데이터만 분류하는 것이 어려운 문제가 있다. 따라서, 본 개시는, 정상 데이터로부터 노이즈를 갖는 의사 정상 데이터를 생성하고 생성한 노이즈 의사 정상 데이터과 정상 데이터를 기초로 이상징후 탐지 모델을 학습시켜 모델 성능을 향상시킬 수 있다.As shown in FIG. 4 , the data generated from the vehicle includes normal data and abnormal data (attack data) (a), only normal data (b), and noise pseudo data and normal data. There may be a case (c) included. If the amount of labeled normal data and anomalous data samples is sufficient, the anomaly detection model can be trained to classify normal data and abnormal data. However, there is a problem in that it is difficult to classify only normal data from data including normal data and abnormal data. Accordingly, the present disclosure can improve model performance by generating pseudo-normal data having noise from normal data and learning an anomaly detection model based on the generated noisy pseudo-normal data and normal data.
이와 같이, 본 개시는, 자가 감독 학습의 성능적 이점을 유지하면서 모델이 학습하지 못한 새로운 유형의 이상징후를 탐지할 수 있도록 의사 정상 데이터를 생성하여 이를 모델 학습에 활용할 수 있다. 따라서, 본 개시는, 생성된 모델이 학습된 유형의 이상징후뿐만 아니라 새로운 유형의 공격 데이터도 탐지할 수 있다.As such, the present disclosure may generate pseudo-normal data to detect a new type of anomaly that the model has not learned while maintaining the performance advantage of self-supervised learning and utilize it for model training. Accordingly, according to the present disclosure, the generated model can detect not only the learned type of anomaly but also the new type of attack data.
본 개시는, 모델 학습에 이용된 유형의 이상징후뿐만 아니라, 새로운 유형의 이상징후를 모두 탐지할 수 있다. 기존의 자가 감독 학습 기법 기반의 모델은, 데이터 공간상에서 정상 데이터 포인트들과 비정상 데이터 포인트들의 경계를 학습하는 방식을 이용하기 때문에, 학습에 사용된 비정상 데이터에 의존적이며, 새로운 유형의 비정상 데이터를 올바르게 판단하지 못하는 한계점이 있으나, 본 개시에서는, 모델이 정상 데이터 포인트들이 분포한 공간 영역의 경계를 학습하도록 함으로써 학습된 유형의 이상징후뿐만 아니라 새로운 유형의 이상징후를 모두 탐지할 수 있다.The present disclosure can detect not only the types of anomalies used for model training, but also new types of anomalies. Since the existing self-supervised learning method-based model uses a method of learning the boundary between normal and abnormal data points in the data space, it is dependent on the abnormal data used for training, Although there is a limitation in not being able to determine, in the present disclosure, both the learned type of anomaly as well as the new type of anomaly can be detected by allowing the model to learn the boundary of the spatial region where normal data points are distributed.
도 5는, 본 개시의 일 실시예에 따라, 차량 이상징후 탐지 방법의 순서도를 도시한 도면이다.5 is a diagram illustrating a flowchart of a method for detecting anomalies in a vehicle according to an embodiment of the present disclosure.
도 5에 도시된 바와 같이, 본 개시의 컴퓨팅 장치는, 차량에서 발생하는 정상 데이터를 획득할 수 있다(S10). 여기서, 컴퓨팅 장치는, 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터를 획득할 수 있다.As shown in FIG. 5 , the computing device of the present disclosure may acquire normal data generated in the vehicle ( S10 ). Here, the computing device may acquire controller area network (CAN) traffic data generated in a vehicle in a normal state.
그리고, 본 개시의 컴퓨팅 장치는, 획득한 정상 데이터를 전처리할 수 있다(S20). 여기서, 컴퓨팅 장치는, 정상 데이터에 포함된 CAN 메시지들로부터 CAN ID를 추출하고, 추출한 CAN ID를 기초로 하여 CAN ID 시퀀스(sequence)를 생성할 수 있다.And, the computing device of the present disclosure may pre-process the acquired normal data (S20). Here, the computing device may extract a CAN ID from CAN messages included in normal data and generate a CAN ID sequence based on the extracted CAN ID.
이어, 본 개시의 컴퓨팅 장치는, 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성할 수 있다(S30). 컴퓨팅 장치는, 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하고, 사전 학습된 제1 뉴럴 네트워크 모델을 통해 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID를 예측하여 의사 정상 데이터를 생성할 수 있다. 컴퓨팅 장치는, 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력할 때, 임의의 CAN ID 또는 CAN ID 시퀀스를 포함하는 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력할 수 있다. 컴퓨팅 장치는, 의사 정상 데이터를 생성할 때, 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID의 확률 분포(probability distribution)에 따라 다음 CAN ID를 예측하여 선택할 수 있다. 또한, 컴퓨팅 장치는, 다음 CAN ID를 선택할 때, 균일 분포(uniform distribution)에 따라 임의의 CAN ID를 선택하여 노이즈를 추가할 수 있다. 일 예로, 컴퓨팅 장치는, 노이즈를 추가할 때, 미리 설정된 노이즈 비율에 기초하여 균일 분포로 임의의 CAN ID를 선택할 수 있다. 여기서, 제1 뉴럴 네트워크 모델은, 정상 데이터로부터 추출된 CAN ID 또는 CAN ID 시퀀스가 입력되면 입력된 CAN ID 또는 CAN ID 시퀀스의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하도록 사전 학습될 수 있다. 제1 뉴럴 네트워크 모델의 사전 학습은, 정상 데이터로부터 추출된 CAN ID를 입력 받아 일정 크기의 벡터로 변환하고, 변환된 벡터에 기초하여 주어진 시퀀스의 컨텍스트(context)를 추출하며, 추출된 시퀀스의 컨텍스트에 기초하여 입력된 CAN ID의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하여 학습할 수 있다.Next, the computing device of the present disclosure may generate pseudo normal data by inputting the pre-processed normal data to the pre-trained first neural network model ( S30 ). The computing device inputs the pre-processed normal data to the pre-trained first neural network model, predicts the CAN ID that appears next to each CAN ID included in the normal data through the pre-trained first neural network model, data can be generated. When inputting the pre-processed normal data to the pre-trained first neural network model, the computing device may input normal data including an arbitrary CAN ID or CAN ID sequence to the pre-trained first neural network model. When generating the pseudo normal data, the computing device may predict and select the next CAN ID according to a probability distribution of a CAN ID that appears next to each CAN ID included in the normal data. Also, when selecting the next CAN ID, the computing device may add noise by selecting an arbitrary CAN ID according to a uniform distribution. For example, when adding noise, the computing device may select an arbitrary CAN ID with a uniform distribution based on a preset noise ratio. Here, when a CAN ID or a CAN ID sequence extracted from normal data is input, the first neural network model may be pre-trained to predict a probability distribution for a CAN ID that appears next to the input CAN ID or CAN ID sequence. Pre-learning of the first neural network model receives the CAN ID extracted from normal data, transforms it into a vector of a certain size, extracts the context of a given sequence based on the transformed vector, and the context of the extracted sequence It is possible to learn by predicting a probability distribution for the CAN ID that appears next to the input CAN ID based on the .
다음, 본 개시의 컴퓨팅 장치는, 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시킬 수 있다(S40). 컴퓨팅 장치는, 제2 뉴럴 네트워크 모델을 학습시킬 때, 전처리한 정상 데이터와 의사 정상 데이터를 제2 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터를 비정상 데이터로 분류하도록 학습시킬 수 있다. 또한, 컴퓨팅 장치는, 제2 뉴럴 네트워크 모델을 학습시킬 때, 전처리한 정상 데이터와 추가로 획득한 공격 유형의 힌트 데이터를 제2 뉴럴 네트워크 모델에 입력하여 공격 유형의 힌트 데이터를 비정상 데이터로 분류하도록 학습시킬 수 있다. 또한, 컴퓨팅 장치는, 의사 정상 데이터, 공격 유형의 힌트 데이터, 그리고 비정상 데이터 중 적어도 어느 하나에 기초하여 제2 뉴럴 네트워크 모델을 학습시키는 경우, 역전파되는 그레디언트의 크기를 임계값 이하로 제한할 수 있다.Next, the computing device of the present disclosure may train the second neural network model based on the generated pseudo-normal data ( S40 ). When training the second neural network model, the computing device may input the pre-processed normal data and the pseudo-normal data into the second neural network model to learn to classify the pseudo-normal data as abnormal data. In addition, when training the second neural network model, the computing device inputs the pre-processed normal data and additionally acquired hint data of the attack type into the second neural network model to classify the hint data of the attack type as abnormal data. can learn In addition, when the computing device trains the second neural network model based on at least one of pseudo normal data, attack type hint data, and abnormal data, the size of the gradient back propagated may be limited to less than or equal to a threshold value. there is.
이어, 본 개시의 컴퓨팅 장치는, 차량에서 발생하는 데이터를 학습된 제2 뉴럴 네트워크 모델에 입력하여 차량의 이상징후를 탐지할 수 있다(S50). 컴퓨팅 장치는, 차량의 이상징후를 탐지할 때, 차량에서 발생하는 데이터를 획득하고, 획득한 데이터를 전처리하며, 전처리한 데이터를 사전 학습된 제2 뉴럴 네트워크 모델에 입력하여 정상 데이터 또는 비정상 데이터로 분류하여 차량의 이상징후를 탐지할 수 있다. 컴퓨팅 장치는, 차량에서 발생하는 데이터를 획득할 때, 비정상 및 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터를 획득할 수 있다. 컴퓨팅 장치는, 데이터를 전처리할 때, 데이터에 포함된 CAN 메시지들로부터 CAN ID를 추출하고, 추출한 CAN ID를 기초로 하여 CAN ID 시퀀스(sequence)를 생성할 수 있다.Next, the computing device of the present disclosure may input data generated from the vehicle into the learned second neural network model to detect an abnormal symptom of the vehicle ( S50 ). The computing device acquires data generated in the vehicle, pre-processes the obtained data, and inputs the pre-processed data to the pre-trained second neural network model when detecting an abnormal symptom of the vehicle to normal data or abnormal data. By classifying, it is possible to detect abnormal signs of the vehicle. When acquiring data generated in the vehicle, the computing device may acquire controller area network (CAN) traffic data generated in the vehicle in an abnormal and normal state. When preprocessing data, the computing device may extract a CAN ID from CAN messages included in the data, and may generate a CAN ID sequence based on the extracted CAN ID.
도 6은 본 개시내용의 실시예들이 구현될 수 있는 예시적인 컴퓨팅 환경에 대한 일반적인 개략도를 도시한다.6 depicts a general schematic diagram of an example computing environment in which embodiments of the present disclosure may be implemented.
본 개시내용이 일반적으로 하나 이상의 컴퓨터 상에서 실행될 수 있는 컴퓨터 실행가능 명령어와 관련하여 전술되었지만, 당업자라면 본 개시내용 기타 프로그램 모듈들과 결합되어 및/또는 하드웨어와 소프트웨어의 조합으로서 구현될 수 있다는 것을 잘 알 것이다.Although the present disclosure has been described above generally in the context of computer-executable instructions that may be executed on one or more computers, those skilled in the art will appreciate that the present disclosure may be implemented as a combination of hardware and software and/or in combination with other program modules. you will know
일반적으로, 본 명세서에서의 모듈은 특정의 태스크를 수행하거나 특정의 추상 데이터 유형을 구현하는 루틴, 프로시져, 프로그램, 컴포넌트, 데이터 구조, 기타 등등을 포함한다. 또한, 당업자라면 본 개시의 방법이 단일-프로세서 또는 멀티프로세서 컴퓨터 시스템, 미니컴퓨터, 메인프레임 컴퓨터는 물론 퍼스널 컴퓨터, 핸드헬드 컴퓨팅 장치, 마이크로프로세서-기반 또는 프로그램가능 가전 제품, 기타 등등(이들 각각은 하나 이상의 연관된 장치와 연결되어 동작할 수 있음)을 비롯한 다른 컴퓨터 시스템 구성으로 실시될 수 있다는 것을 잘 알 것이다.Generally, modules herein include routines, procedures, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types. In addition, those skilled in the art will appreciate that the methods of the present disclosure can be applied to single-processor or multiprocessor computer systems, minicomputers, mainframe computers as well as personal computers, handheld computing devices, microprocessor-based or programmable consumer electronics, etc. (each of which is It will be appreciated that other computer system configurations may be implemented, including those that may operate in connection with one or more associated devices.
본 개시의 설명된 실시예들은 또한 어떤 태스크들이 통신 네트워크를 통해 연결되어 있는 원격 처리 장치들에 의해 수행되는 분산 컴퓨팅 환경에서 실시될 수 있다. 분산 컴퓨팅 환경에서, 프로그램 모듈은 로컬 및 원격 메모리 저장 장치 둘다에 위치할 수 있다.The described embodiments of the present disclosure may also be practiced in distributed computing environments where certain tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
컴퓨터는 통상적으로 다양한컴퓨터 판독가능 매체를 포함한다. 컴퓨터에 의해 액세스 가능한 매체 로서, 휘발성 및 비휘발성 매체, 일시적(transitory) 및 비일시적(non-transitory) 매체, 이동식 및 비-이동식 매체를 포함한다. 제한이 아닌 예로서, 컴퓨터 판독가능 매체는 컴퓨터 판독가능 저장 매체 및 컴퓨터 판독가능 전송 매체를 포함할 수 있다. Computers typically include a variety of computer-readable media. Media accessible by a computer includes volatile and nonvolatile media, transitory and non-transitory media, removable and non-removable media. By way of example, and not limitation, computer-readable media may include computer-readable storage media and computer-readable transmission media.
컴퓨터 판독가능 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보를 저장하는 임의의 방법 또는 기술로 구현되는 휘발성 및 비휘발성 매체, 일시적 및 비-일시적 매체, 이동식 및 비이동식 매체를 포함한다. 컴퓨터 판독가능 저장 매체는 RAM, ROM, EEPROM, 플래시 메모리 또는 기타 메모리 기술, CD-ROM, DVD(digital video disk) 또는 기타 광 디스크 저장 장치, 자기 카세트, 자기 테이프, 자기 디스크 저장 장치 또는 기타 자기 저장 장치, 또는 컴퓨터에 의해 액세스될 수 있고 원하는 정보를 저장하는 데 사용될 수 있는 임의의 기타 매체를 포함하지만, 이에 한정되지 않는다.Computer readable storage media includes volatile and nonvolatile media, temporary and non-transitory media, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. includes media. A computer-readable storage medium may be RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital video disk (DVD) or other optical disk storage device, magnetic cassette, magnetic tape, magnetic disk storage device, or other magnetic storage device. device, or any other medium that can be accessed by a computer and used to store the desired information.
컴퓨터 판독가능 전송 매체는 통상적으로 반송파(carrier wave) 또는 기타 전송 메커니즘(transport mechanism)과 같은 피변조 데이터 신호(modulated data signal)에 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터등을 구현하고 모든 정보 전달 매체를 포함한다. 피변조 데이터 신호라는 용어는 신호 내에 정보를 인코딩하도록 그 신호의 특성들 중 하나 이상을 설정 또는 변경시킨 신호를 의미한다. 제한이 아닌 예로서, 컴퓨터 판독가능 전송 매체는 유선 네트워크 또는 직접 배선 접속(direct-wired connection)과 같은 유선 매체, 그리고 음향, RF, 적외선, 기타 무선 매체와 같은 무선 매체를 포함한다. 상술된 매체들 중 임의의 것의 조합도 역시 컴퓨터 판독가능 전송 매체의 범위 안에 포함되는 것으로 한다.A computer readable transmission medium typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and the like. Includes all information delivery media. The term modulated data signal means a signal in which one or more of the characteristics of the signal is set or changed so as to encode information in the signal. By way of example, and not limitation, computer-readable transmission media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared, and other wireless media. Combinations of any of the above are also intended to be included within the scope of computer-readable transmission media.
컴퓨터(1102)를 포함하는 본 개시의 여러가지 측면들을 구현하는 예시적인 환경(1100)이 나타내어져 있으며, 컴퓨터(1102)는 처리 장치(1104), 시스템 메모리(1106) 및 시스템 버스(1108)를 포함한다. 시스템 버스(1108)는 시스템 메모리(1106)(이에 한정되지 않음)를 비롯한 시스템 컴포넌트들을 처리 장치(1104)에 연결시킨다. 처리 장치(1104)는 다양한 상용 프로세서들 중 임의의 프로세서일 수 있다. 듀얼 프로세서 및 기타 멀티프로세서 아키텍처도 역시 처리 장치(1104)로서 이용될 수 있다.An example environment 1100 implementing various aspects of the disclosure is shown including a computer 1102 , the computer 1102 including a processing unit 1104 , a system memory 1106 , and a system bus 1108 . do. A system bus 1108 couples system components, including but not limited to system memory 1106 , to the processing device 1104 . The processing device 1104 may be any of a variety of commercially available processors. Dual processor and other multiprocessor architectures may also be used as processing unit 1104 .
시스템 버스(1108)는 메모리 버스, 주변장치 버스, 및 다양한 상용 버스 아키텍처 중 임의의 것을 사용하는 로컬 버스에 추가적으로 상호 연결될 수 있는 몇 가지 유형의 버스 구조 중 임의의 것일 수 있다. 시스템 메모리(1106)는 판독 전용 메모리(ROM)(1110) 및 랜덤 액세스 메모리(RAM)(1112)를 포함한다. 기본 입/출력 시스템(BIOS)은 ROM, EPROM, EEPROM 등의 비휘발성 메모리(1110)에 저장되며, 이 BIOS는 시동 중과 같은 때에 컴퓨터(1102) 내의 구성요소들 간에 정보를 전송하는 일을 돕는 기본적인 루틴을 포함한다. RAM(1112)은 또한 데이터를 캐싱하기 위한 정적 RAM 등의 고속 RAM을 포함할 수 있다.The system bus 1108 may be any of several types of bus structures that may further interconnect a memory bus, a peripheral bus, and a local bus using any of a variety of commercial bus architectures. System memory 1106 includes read only memory (ROM) 1110 and random access memory (RAM) 1112 . A basic input/output system (BIOS) is stored in non-volatile memory 1110, such as ROM, EPROM, EEPROM, etc., the BIOS is the basic input/output system (BIOS) that helps transfer information between components within computer 1102, such as during startup. contains routines. RAM 1112 may also include high-speed RAM, such as static RAM, for caching data.
컴퓨터(1102)는 또한 내장형 하드 디스크 드라이브(HDD)(1114)(예를 들어, EIDE, SATA)―이 내장형 하드 디스크 드라이브(1114)는 또한 적당한 섀시(도시 생략) 내에서 외장형 용도로 구성될 수 있음―, 자기 플로피 디스크 드라이브(FDD)(1116)(예를 들어, 이동식 디스켓(1118)으로부터 판독을 하거나 그에 기록을 하기 위한 것임), 및 광 디스크 드라이브(1120)(예를 들어, CD-ROM 디스크(1122)를 판독하거나 DVD 등의 기타 고용량 광 매체로부터 판독을 하거나 그에 기록을 하기 위한 것임)를 포함한다. 하드 디스크 드라이브(1114), 자기 디스크 드라이브(1116) 및 광 디스크 드라이브(1120)는 각각 하드 디스크 드라이브 인터페이스(1124), 자기 디스크 드라이브 인터페이스(1126) 및 광 드라이브 인터페이스(1128)에 의해 시스템 버스(1108)에 연결될 수 있다. 외장형 드라이브 구현을 위한 인터페이스(1124)는 예를 들어, USB(Universal Serial Bus) 및 IEEE 1394 인터페이스 기술 중 적어도 하나 또는 그 둘 다를 포함한다.The computer 1102 may also include an internal hard disk drive (HDD) 1114 (eg, EIDE, SATA) - this internal hard disk drive 1114 may also be configured for external use within a suitable chassis (not shown). Yes—a magnetic floppy disk drive (FDD) 1116 (eg, for reading from or writing to removable diskette 1118), and an optical disk drive 1120 (eg, a CD-ROM) for reading from, or writing to, disk 1122, or other high capacity optical media, such as DVD. The hard disk drive 1114 , the magnetic disk drive 1116 , and the optical disk drive 1120 are connected to the system bus 1108 by the hard disk drive interface 1124 , the magnetic disk drive interface 1126 , and the optical drive interface 1128 , respectively. ) can be connected to The interface 1124 for external drive implementation includes, for example, at least one or both of Universal Serial Bus (USB) and IEEE 1394 interface technologies.
이들 드라이브 및 그와 연관된 컴퓨터 판독가능 매체는 데이터, 데이터 구조, 컴퓨터 실행가능 명령어, 기타 등등의 비휘발성 저장을 제공한다. 컴퓨터(1102)의 경우, 드라이브 및 매체는 임의의 데이터를 적당한 디지털 형식으로 저장하는 것에 대응한다. 상기에서의 컴퓨터 판독가능 저장 매체에 대한 설명이 HDD, 이동식 자기 디스크, 및 CD 또는 DVD 등의 이동식 광 매체를 언급하고 있지만, 당업자라면 집 드라이브(zip drive), 자기 카세트, 플래쉬 메모리 카드, 카트리지, 기타 등등의 컴퓨터에 의해 판독가능한 다른 유형의 저장 매체도 역시 예시적인 운영 환경에서 사용될 수 있으며 또 임의의 이러한 매체가 본 개시의 방법들을 수행하기 위한 컴퓨터 실행가능 명령어를 포함할 수 있다는 것을 잘 알 것이다.These drives and their associated computer-readable media provide non-volatile storage of data, data structures, computer-executable instructions, and the like. In the case of computer 1102, drives and media correspond to storing any data in a suitable digital format. Although the description of computer readable storage media above refers to HDDs, removable magnetic disks, and removable optical media such as CDs or DVDs, those skilled in the art will use zip drives, magnetic cassettes, flash memory cards, cartridges, It will be appreciated that other tangible computer-readable storage media and the like may also be used in the exemplary operating environment and any such media may include computer-executable instructions for performing the methods of the present disclosure. .
운영 체제(1130), 하나 이상의 애플리케이션 프로그램(1132), 기타 프로그램 모듈(1134) 및 프로그램 데이터(1136)를 비롯한 다수의 프로그램 모듈이 드라이브 및 RAM(1112)에 저장될 수 있다. 운영 체제, 애플리케이션, 모듈 및/또는 데이터의 전부 또는 그 일부분이 또한 RAM(1112)에 캐싱될 수 있다. 본 개시가 여러가지 상업적으로 이용가능한 운영 체제 또는 운영 체제들의 조합에서 구현될 수 있다는 것을 잘 알 것이다.A number of program modules may be stored in the drive and RAM 1112 , including an operating system 1130 , one or more application programs 1132 , other program modules 1134 , and program data 1136 . All or portions of the operating system, applications, modules, and/or data may also be cached in RAM 1112 . It will be appreciated that the present disclosure may be implemented in various commercially available operating systems or combinations of operating systems.
사용자는 하나 이상의 유선/무선 입력 장치, 예를 들어, 키보드(1138) 및 마우스(1140) 등의 포인팅 장치를 통해 컴퓨터(1102)에 명령 및 정보를 입력할 수 있다. 기타 입력 장치(도시 생략)로는 마이크, IR 리모콘, 조이스틱, 게임 패드, 스타일러스 펜, 터치 스크린, 기타 등등이 있을 수 있다. 이들 및 기타 입력 장치가 종종 시스템 버스(1108)에 연결되어 있는 입력 장치 인터페이스(1142)를 통해 처리 장치(1104)에 연결되지만, 병렬 포트, IEEE 1394 직렬 포트, 게임 포트, USB 포트, IR 인터페이스, 기타 등등의 기타 인터페이스에 의해 연결될 수 있다.A user may enter commands and information into the computer 1102 via one or more wired/wireless input devices, for example, a pointing device such as a keyboard 1138 and a mouse 1140 . Other input devices (not shown) may include a microphone, IR remote control, joystick, game pad, stylus pen, touch screen, and the like. Although these and other input devices are connected to the processing unit 1104 through an input device interface 1142 that is often connected to the system bus 1108, parallel ports, IEEE 1394 serial ports, game ports, USB ports, IR interfaces, and the like may be connected by other interfaces.
모니터(1144) 또는 다른 유형의 디스플레이 장치도 역시 비디오 어댑터(1146) 등의 인터페이스를 통해 시스템 버스(1108)에 연결된다. 모니터(1144)에 부가하여, 컴퓨터는 일반적으로 스피커, 프린터, 기타 등등의 기타 주변 출력 장치(도시 생략)를 포함한다.A monitor 1144 or other type of display device is also coupled to the system bus 1108 via an interface, such as a video adapter 1146 . In addition to the monitor 1144, the computer typically includes other peripheral output devices (not shown), such as speakers, printers, and the like.
컴퓨터(1102)는 유선 및/또는 무선 통신을 통한 원격 컴퓨터(들)(1148) 등의 하나 이상의 원격 컴퓨터로의 논리적 연결을 사용하여 네트워크화된 환경에서 동작할 수 있다. 원격 컴퓨터(들)(1148)는 워크스테이션, 서버 컴퓨터, 라우터, 퍼스널 컴퓨터, 휴대용 컴퓨터, 마이크로프로세서-기반 오락 기기, 피어 장치 또는 기타 통상의 네트워크 노드일 수 있으며, 일반적으로 컴퓨터(1102)에 대해 기술된 구성요소들 중 다수 또는 그 전부를 포함하지만, 간략함을 위해, 메모리 저장 장치(1150)만이 도시되어 있다. 도시되어 있는 논리적 연결은 근거리 통신망(LAN)(1152) 및/또는 더 큰 네트워크, 예를 들어, 원거리 통신망(WAN)(1154)에의 유선/무선 연결을 포함한다. 이러한 LAN 및 WAN 네트워킹 환경은 사무실 및 회사에서 일반적인 것이며, 인트라넷 등의 전사적 컴퓨터 네트워크(enterprise-wide computer network)를 용이하게 해주며, 이들 모두는 전세계 컴퓨터 네트워크, 예를 들어, 인터넷에 연결될 수 있다. Computer 1102 may operate in a networked environment using logical connections to one or more remote computers, such as remote computer(s) 1148 via wired and/or wireless communications. Remote computer(s) 1148 may be workstations, server computers, routers, personal computers, portable computers, microprocessor-based entertainment devices, peer devices, or other common network nodes, and are generally Although including many or all of the components described, only memory storage device 1150 is shown for simplicity. The logical connections shown include wired/wireless connections to a local area network (LAN) 1152 and/or a larger network, eg, a wide area network (WAN) 1154 . Such LAN and WAN networking environments are common in offices and companies, and facilitate enterprise-wide computer networks, such as intranets, all of which can be connected to a worldwide computer network, for example, the Internet.
LAN 네트워킹 환경에서 사용될 때, 컴퓨터(1102)는 유선 및/또는 무선 통신 네트워크 인터페이스 또는 어댑터(1156)를 통해 로컬 네트워크(1152)에 연결된다. 어댑터(1156)는 LAN(1152)에의 유선 또는 무선 통신을 용이하게 해줄 수 있으며, 이 LAN(1152)은 또한 무선 어댑터(1156)와 통신하기 위해 그에 설치되어 있는 무선 액세스 포인트를 포함하고 있다. WAN 네트워킹 환경에서 사용될 때, 컴퓨터(1102)는 모뎀(1158)을 포함할 수 있거나, WAN(1154) 상의 통신 서버에 연결되거나, 또는 인터넷을 통하는 등, WAN(1154)을 통해 통신을 설정하는 기타 수단을 갖는다. 내장형 또는 외장형 및 유선 또는 무선 장치일 수 있는 모뎀(1158)은 직렬 포트 인터페이스(1142)를 통해 시스템 버스(1108)에 연결된다. 네트워크화된 환경에서, 컴퓨터(1102)에 대해 설명된 프로그램 모듈들 또는 그의 일부분이 원격 메모리/저장 장치(1150)에 저장될 수 있다. 도시된 네트워크 연결이 예시적인 것이며 컴퓨터들 사이에 통신 링크를 설정하는 기타 수단이 사용될 수 있다는 것을 잘 알 것이다.When used in a LAN networking environment, the computer 1102 is coupled to the local network 1152 through a wired and/or wireless communication network interface or adapter 1156 . Adapter 1156 may facilitate wired or wireless communication to LAN 1152 , which LAN 1152 also includes a wireless access point installed therein for communicating with wireless adapter 1156 . When used in a WAN networking environment, the computer 1102 may include a modem 1158 , connected to a communication server on the WAN 1154 , or otherwise establishing communications over the WAN 1154 , such as over the Internet. have the means A modem 1158 , which may be internal or external and a wired or wireless device, is coupled to the system bus 1108 via a serial port interface 1142 . In a networked environment, program modules described for computer 1102 , or portions thereof, may be stored in remote memory/storage device 1150 . It will be appreciated that the network connections shown are exemplary and other means of establishing a communication link between the computers may be used.
컴퓨터(1102)는 무선 통신으로 배치되어 동작하는 임의의 무선 장치 또는 개체, 예를 들어, 프린터, 스캐너, 데스크톱 및/또는 휴대용 컴퓨터, PDA(portable data assistant), 통신 위성, 무선 검출가능 태그와 연관된 임의의 장비 또는 장소, 및 전화와 통신을 하는 동작을 한다. 이것은 적어도 Wi-Fi 및 블루투스 무선 기술을 포함한다. 따라서, 통신은 종래의 네트워크에서와 같이 미리 정의된 구조이거나 단순하게 적어도 2개의 장치 사이의 애드혹 통신(ad hoc communication)일 수 있다.The computer 1102 may be associated with any wireless device or object that is deployed and operates in wireless communication, for example, a printer, scanner, desktop and/or portable computer, portable data assistant (PDA), communication satellite, wireless detectable tag. It operates to communicate with any device or place and phone. This includes at least Wi-Fi and Bluetooth wireless technologies. Accordingly, the communication may be a predefined structure as in a conventional network or may simply be an ad hoc communication between at least two devices.
Wi-Fi(Wireless Fidelity)는 유선 없이도 인터넷 등으로의 연결을 가능하게 해준다. Wi-Fi는 이러한 장치, 예를 들어, 컴퓨터가 실내에서 및 실외에서, 즉 기지국의 통화권 내의 아무 곳에서나 데이터를 전송 및 수신할 수 있게 해주는 셀 전화와 같은 무선 기술이다. Wi-Fi 네트워크는 안전하고 신뢰성 있으며 고속인 무선 연결을 제공하기 위해 IEEE 802.11(a,b,g, 기타)이라고 하는 무선 기술을 사용한다. 컴퓨터를 서로에, 인터넷에 및 유선 네트워크(IEEE 802.3 또는 이더넷을 사용함)에 연결시키기 위해 Wi-Fi가 사용될 수 있다. Wi-Fi 네트워크는 비인가 2.4 및 5 GHz 무선 대역에서, 예를 들어, 11Mbps(802.11a) 또는 54 Mbps(802.11b) 데이터 레이트로 동작하거나, 양 대역(듀얼 대역)을 포함하는 제품에서 동작할 수 있다.Wi-Fi (Wireless Fidelity) makes it possible to connect to the Internet, etc. without a wired connection. Wi-Fi is a wireless technology such as cell phones that allows these devices, eg, computers, to transmit and receive data indoors and outdoors, ie anywhere within range of a base station. Wi-Fi networks use a radio technology called IEEE 802.11 (a, b, g, etc.) to provide secure, reliable, and high-speed wireless connections. Wi-Fi can be used to connect computers to each other, to the Internet, and to wired networks (using IEEE 802.3 or Ethernet). Wi-Fi networks may operate in unlicensed 2.4 and 5 GHz radio bands, for example, at 11 Mbps (802.11a) or 54 Mbps (802.11b) data rates, or in products that include both bands (dual band). there is.
본 개시의 기술 분야에서 통상의 지식을 가진 자는 여기에 개시된 실시예들과 관련하여 설명된 다양한 예시적인 논리 블록들, 모듈들, 프로세서들, 수단들, 회로들 및 알고리즘 단계들이 전자 하드웨어, (편의를 위해, 여기에서 "소프트웨어"로 지칭되는) 다양한 형태들의 프로그램 또는 설계 코드 또는 이들 모두의 결합에 의해 구현될 수 있다는 것을 이해할 것이다. 하드웨어 및 소프트웨어의 이러한 상호 호환성을 명확하게 설명하기 위해, 다양한 예시적인 컴포넌트들, 블록들, 모듈들, 회로들 및 단계들이 이들의 기능과 관련하여 위에서 일반적으로 설명되었다. 이러한 기능이 하드웨어 또는 소프트웨어로서 구현되는지 여부는 특정한 애플리케이션 및 전체 시스템에 대하여 부과되는 설계 제약들에 따라 좌우된다. 본 개시의 기술 분야에서 통상의 지식을 가진 자는 각각의 특정한 애플리케이션에 대하여 다양한 방식들로 설명된 기능을 구현할 수 있으나, 이러한 구현 결정들은 본 개시의 범위를 벗어나는 것으로 해석되어서는 안 될 것이다.Those of ordinary skill in the art of the present disclosure will recognize that the various illustrative logical blocks, modules, processors, means, circuits, and algorithm steps described in connection with the embodiments disclosed herein include electronic hardware, (convenience For this purpose, it will be understood that it may be implemented by various forms of program or design code (referred to herein as "software") or a combination of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. A person skilled in the art of the present disclosure may implement the described functionality in various ways for each specific application, but such implementation decisions should not be interpreted as a departure from the scope of the present disclosure.
여기서 제시된 다양한 실시예들은 방법, 장치, 또는 표준 프로그래밍 및/또는 엔지니어링 기술을 사용한 제조 물품(article)으로 구현될 수 있다. 용어 "제조 물품"은 임의의 컴퓨터-판독가능 장치로부터 액세스 가능한 컴퓨터 프로그램 또는 매체(media)를 포함한다. 예를 들어, 컴퓨터-판독가능 저장 매체는 자기 저장 장치(예를 들면, 하드 디스크, 플로피 디스크, 자기 스트립, 등), 광학 디스크(예를 들면, CD, DVD, 등), 스마트 카드, 및 플래쉬 메모리 장치(예를 들면, EEPROM, 카드, 스틱, 키 드라이브, 등)를 포함하지만, 이들로 제한되는 것은 아니다. 용어 "기계-판독가능 매체"는 명령(들) 및/또는 데이터를 저장, 보유, 및/또는 전달할 수 있는 무선 채널 및 다양한 다른 매체를 포함하지만, 이들로 제한되는 것은 아니다. The various embodiments presented herein may be implemented as methods, apparatus, or articles of manufacture using standard programming and/or engineering techniques. The term “article of manufacture” includes a computer program or media accessible from any computer-readable device. For example, computer-readable storage media include magnetic storage devices (eg, hard disks, floppy disks, magnetic strips, etc.), optical disks (eg, CDs, DVDs, etc.), smart cards, and flash drives. memory devices (eg, EEPROMs, cards, sticks, key drives, etc.). The term “machine-readable medium” includes, but is not limited to, wireless channels and various other media that can store, hold, and/or convey instruction(s) and/or data.
제시된 실시예들에 대한 설명은 임의의 본 개시의 기술 분야에서 통상의 지식을 가진 자가 본 개시를 이용하거나 또는 실시할 수 있도록 제공된다. 이러한 실시예들에 대한 다양한 변형들은 본 개시의 기술 분야에서 통상의 지식을 가진 자에게 명백할 것이며, 여기에 정의된 일반적인 원리들은 본 개시의 범위를 벗어남이 없이 다른 실시예들에 적용될 수 있다. 그리하여, 본 개시는 여기에 제시된 실시예들로 한정되는 것이 아니라, 여기에 제시된 원리들 및 신규한 특징들과 일관되는 최광의의 범위에서 해석되어야 할 것이다.The description of the presented embodiments is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the scope of the present disclosure. Thus, the present disclosure is not intended to be limited to the embodiments presented herein, but is to be construed in the widest scope consistent with the principles and novel features presented herein.

Claims (15)

  1. 차량 이상징후 탐지 방법으로서,As a vehicle anomaly detection method,
    상기 차량에서 발생하는 정상 데이터를 획득하는 단계;acquiring normal data generated in the vehicle;
    상기 획득한 정상 데이터를 전처리하는 단계;pre-processing the acquired normal data;
    상기 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성하는 단계;generating pseudo normal data by inputting the pre-processed normal data into a pre-trained first neural network model;
    상기 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시키는 단계; 및training a second neural network model based on the generated pseudo-normal data; and
    상기 차량에서 발생하는 데이터를 상기 학습된 제2 뉴럴 네트워크 모델에 입력하여 상기 차량의 이상징후를 탐지하는 단계;detecting abnormal signs of the vehicle by inputting data generated from the vehicle into the learned second neural network model;
    를 포함하는,containing,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  2. 제1 항에 있어서,According to claim 1,
    상기 정상 데이터를 획득하는 단계는,The step of acquiring the normal data includes:
    정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터를 획득하는,Acquiring CAN (Controller Area Network) traffic data generated from a vehicle in a normal state,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  3. 제1 항에 있어서,According to claim 1,
    상기 정상 데이터를 전처리하는 단계는,The step of pre-processing the normal data,
    상기 정상 데이터에 포함된 CAN 메시지들로부터 CAN ID를 추출하는 단계; 및extracting a CAN ID from CAN messages included in the normal data; and
    상기 추출한 CAN ID를 기초로 하여 CAN ID 시퀀스(sequence)를 생성하는 단계;generating a CAN ID sequence based on the extracted CAN ID;
    를 포함하는,containing,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  4. 제1 항에 있어서,According to claim 1,
    상기 의사 정상 데이터를 생성하는 단계는,The generating of the pseudo-normal data comprises:
    상기 전처리한 정상 데이터를 상기 사전 학습된 제1 뉴럴 네트워크 모델에 입력하는 단계; 및inputting the pre-processed normal data into the pre-trained first neural network model; and
    상기 사전 학습된 제1 뉴럴 네트워크 모델을 통해, 상기 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID를 예측하여 의사 정상 데이터를 생성하는 단계;generating pseudo-normal data by predicting a CAN ID that appears next to each CAN ID included in the normal data through the pre-trained first neural network model;
    를 포함하는,containing,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  5. 제4 항에 있어서,5. The method of claim 4,
    상기 전처리한 정상 데이터를 상기 사전 학습된 제1 뉴럴 네트워크 모델에 입력하는 단계는,The step of inputting the pre-processed normal data into the pre-trained first neural network model comprises:
    임의의 CAN ID 또는 CAN ID 시퀀스를 포함하는 정상 데이터를 상기 사전 학습된 제1 뉴럴 네트워크 모델에 입력하는,Inputting normal data including any CAN ID or CAN ID sequence to the pre-trained first neural network model,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  6. 제4 항에 있어서,5. The method of claim 4,
    상기 의사 정상 데이터를 생성하는 단계는,The generating of the pseudo-normal data comprises:
    상기 정상 데이터에 포함되는 각 CAN ID의 다음에 나타나는 CAN ID의 확률 분포(probability distribution)에 따라 다음 CAN ID를 예측하여 선택하는,Predicting and selecting the next CAN ID according to a probability distribution of a CAN ID appearing next to each CAN ID included in the normal data,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  7. 제6 항에 있어서,7. The method of claim 6,
    상기 의사 정상 데이터를 생성하는 단계는,The generating of the pseudo-normal data comprises:
    상기 다음 CAN ID를 선택할 때, 균일 분포(uniform distribution)에 따라 임의의 CAN ID를 선택하여 노이즈를 추가하는,When selecting the next CAN ID, selecting a random CAN ID according to a uniform distribution to add noise,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  8. 제7 항에 있어서,8. The method of claim 7,
    상기 노이즈를 추가할 때, 미리 설정된 노이즈 비율에 기초하여 상기 균일 분포로 임의의 CAN ID를 선택하는,When adding the noise, selecting a random CAN ID as the uniform distribution based on a preset noise ratio,
    차량 이상징후 탐지 방법.Vehicle anomaly detection method.
  9. 제1 항에 있어서,According to claim 1,
    상기 제1 뉴럴 네트워크 모델은,The first neural network model is
    상기 정상 데이터로부터 추출된 CAN ID 또는 CAN ID 시퀀스가 입력되면 상기 입력된 CAN ID 또는 CAN ID 시퀀스의 다음에 나타나는 CAN ID에 대한 확률 분포를 예측하도록 사전 학습되는,When the CAN ID or CAN ID sequence extracted from the normal data is input, it is pre-learned to predict the probability distribution for the CAN ID that appears next to the input CAN ID or CAN ID sequence,
    차량 이상징후 탐지 방법.Vehicle anomaly detection method.
  10. 제1 항에 있어서,According to claim 1,
    상기 제2 뉴럴 네트워크 모델을 학습시키는 단계는,The step of training the second neural network model comprises:
    상기 전처리한 정상 데이터와 상기 의사 정상 데이터를 상기 제2 뉴럴 네트워크 모델에 입력하여 상기 의사 정상 데이터를 비정상 데이터로 분류하도록 학습되는,learning to classify the pseudo-normal data as abnormal data by inputting the pre-processed normal data and the pseudo-normal data into the second neural network model;
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  11. 제1 항에 있어서,According to claim 1,
    상기 제2 뉴럴 네트워크 모델을 학습시키는 단계는,The step of training the second neural network model comprises:
    상기 전처리한 정상 데이터와 추가로 획득한 공격 유형의 힌트 데이터를 상기 제2 뉴럴 네트워크 모델에 입력하여 상기 공격 유형의 힌트 데이터를 비정상 데이터로 분류하도록 학습되는,Learning to classify the hint data of the attack type as abnormal data by inputting the pre-processed normal data and the additionally acquired hint data of the attack type into the second neural network model,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  12. 제1 항에 있어서,According to claim 1,
    상기 차량의 이상징후를 탐지하는 단계는,The step of detecting abnormal signs of the vehicle,
    상기 차량에서 발생하는 데이터를 획득하는 단계;acquiring data generated in the vehicle;
    상기 획득한 데이터를 전처리하는 단계; 및pre-processing the obtained data; and
    상기 전처리한 데이터를 사전 학습된 제2 뉴럴 네트워크 모델에 입력하여 정상 데이터 또는 비정상 데이터로 분류하여 상기 차량의 이상징후를 탐지하는 단계;detecting abnormal signs of the vehicle by inputting the pre-processed data into a pre-trained second neural network model and classifying it as normal data or abnormal data;
    를 포함하는,containing,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  13. 제12 항에 있어서,13. The method of claim 12,
    상기 차량에서 발생하는 데이터를 획득하는 단계는,The step of acquiring data generated in the vehicle includes:
    비정상 및 정상적인 상태의 차량에서 발생하는 CAN(Controller Area Network) 트래픽 데이터를 획득하는,Acquiring CAN (Controller Area Network) traffic data generated from abnormal and normal vehicles,
    차량 이상징후 탐지 방법.How to detect vehicle anomalies.
  14. 컴퓨터 판독가능 저장 매체 저장된 컴퓨터 프로그램으로서, 상기 컴퓨터 프로그램은 하나 이상의 프로세서에서 실행되는 경우, 차량의 이상징후를 탐지하기 위한 이하의 동작들을 수행하도록 하며, 상기 동작들은:A computer program stored in a computer readable storage medium, wherein, when the computer program is executed on one or more processors, it performs the following operations for detecting abnormal signs of a vehicle, the operations comprising:
    상기 차량에서 발생하는 정상 데이터를 획득하는 동작;acquiring normal data generated in the vehicle;
    상기 획득한 정상 데이터를 전처리하는 동작;pre-processing the acquired normal data;
    상기 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성하는 동작;generating pseudo normal data by inputting the pre-processed normal data into a pre-trained first neural network model;
    상기 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시키는 동작; 및training a second neural network model based on the generated pseudo-normal data; and
    상기 차량에서 발생하는 데이터를 상기 학습된 제2 뉴럴 네트워크 모델에 입력하여 상기 차량의 이상징후를 탐지하는 동작;detecting abnormal signs of the vehicle by inputting data generated from the vehicle into the learned second neural network model;
    을 포함하는,containing,
    컴퓨터 판독가능 저장매체에 저장된 컴퓨터 프로그램.A computer program stored in a computer-readable storage medium.
  15. 차량 이상징후 탐지 방법을 제공하기 위한 컴퓨팅 장치로서,A computing device for providing a vehicle anomaly detection method, comprising:
    하나 이상의 코어를 포함하는 프로세서; 및a processor including one or more cores; and
    메모리;Memory;
    를 포함하고,including,
    상기 프로세서는,The processor is
    상기 차량에서 발생하는 정상 데이터를 획득하고,Acquire normal data generated in the vehicle,
    상기 획득한 정상 데이터를 전처리하며,pre-processing the obtained normal data,
    상기 전처리한 정상 데이터를 사전 학습된 제1 뉴럴 네트워크 모델에 입력하여 의사 정상 데이터(pseudo normal data)를 생성하고,generating pseudo normal data by inputting the pre-processed normal data into a pre-trained first neural network model;
    상기 생성한 의사 정상 데이터에 기초하여 제2 뉴럴 네트워크 모델을 학습시키며, 그리고training a second neural network model based on the generated pseudo-normal data, and
    상기 차량에서 발생하는 데이터를 상기 학습된 제2 뉴럴 네트워크 모델에 입력하여 상기 차량의 이상징후를 탐지하는,Inputting data generated from the vehicle into the learned second neural network model to detect abnormal symptoms of the vehicle,
    컴퓨팅 장치.computing device.
PCT/KR2021/013572 2020-10-07 2021-10-05 Apparatus and method for detecting abnormal symptoms of vehicle based on self-supervised learning by using pseudo normal data WO2022075678A2 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
KR20200129476 2020-10-07
KR10-2020-0129476 2020-10-07
KR1020210006212A KR102506805B1 (en) 2020-10-07 2021-01-15 Self-supervised learning based in-vehicle network anomaly detection system using pseudo normal data
KR10-2021-0006212 2021-01-15

Publications (2)

Publication Number Publication Date
WO2022075678A2 true WO2022075678A2 (en) 2022-04-14
WO2022075678A3 WO2022075678A3 (en) 2022-10-27

Family

ID=81125873

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2021/013572 WO2022075678A2 (en) 2020-10-07 2021-10-05 Apparatus and method for detecting abnormal symptoms of vehicle based on self-supervised learning by using pseudo normal data

Country Status (1)

Country Link
WO (1) WO2022075678A2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115035913A (en) * 2022-08-11 2022-09-09 合肥中科类脑智能技术有限公司 Sound abnormity detection method
US20220398146A1 (en) * 2021-06-09 2022-12-15 Kabushiki Kaisha Toshiba Information processing apparatus, information processing method, and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102030837B1 (en) * 2013-09-30 2019-10-10 한국전력공사 Apparatus and method for intrusion detection
KR101714520B1 (en) * 2015-10-30 2017-03-09 현대자동차주식회사 In-Vehicle Network Attack Detection Method and Apparatus
KR101843930B1 (en) * 2016-08-03 2018-04-02 고려대학교 산학협력단 Device for detecting anomaly of vehicle based on sequence mining
KR102088428B1 (en) * 2018-03-22 2020-04-24 슈어소프트테크주식회사 Automobile, server, method and system for estimating driving state
JP7215131B2 (en) * 2018-12-12 2023-01-31 株式会社オートネットワーク技術研究所 Determination device, determination program, determination method, and neural network model generation method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220398146A1 (en) * 2021-06-09 2022-12-15 Kabushiki Kaisha Toshiba Information processing apparatus, information processing method, and storage medium
US11860716B2 (en) * 2021-06-09 2024-01-02 Kabushiki Kaisha Toshiba Information processing apparatus, information processing method, and storage medium
CN115035913A (en) * 2022-08-11 2022-09-09 合肥中科类脑智能技术有限公司 Sound abnormity detection method

Also Published As

Publication number Publication date
WO2022075678A3 (en) 2022-10-27

Similar Documents

Publication Publication Date Title
WO2022075678A2 (en) Apparatus and method for detecting abnormal symptoms of vehicle based on self-supervised learning by using pseudo normal data
WO2019074195A1 (en) Device and method for deep learning-based image comparison, and computer program stored in computer-readable recording medium
WO2020005049A1 (en) Learning method for artificial neural network
WO2019027208A1 (en) Training method for artificial neural network
KR102093275B1 (en) Malicious code infection inducing information discrimination system, storage medium in which program is recorded and method
KR20220046408A (en) Self-supervised learning based in-vehicle network anomaly detection system using pseudo normal data
WO2019039757A1 (en) Method and device for generating training data and computer program stored in computer-readable recording medium
WO2021261825A1 (en) Device and method for generating meteorological data on basis of machine learning
WO2021040354A1 (en) Data processing method using neural network
WO2020004815A1 (en) Method of detecting anomaly in data
WO2019031839A1 (en) System and method for neural networks
WO2022265292A1 (en) Method and device for detecting abnormal data
WO2024080791A1 (en) Method for generating dataset
KR20200133644A (en) Artificial intelligence based apparatus and method for classifying malicious multimedia file, and computer readable recording medium recording program for performing the method
US20230035291A1 (en) Generating Authentication Template Filters Using One or More Machine-Learned Models
WO2016208817A1 (en) Apparatus and method for interfacing key input
WO2021251691A1 (en) Anchor-free rpn-based object detection method
WO2022092335A1 (en) Personal authentication method
WO2022145584A1 (en) Method by which wearable device authenticates user by using vibration signal
CN113992419A (en) User abnormal behavior detection and processing system and method thereof
KR102202448B1 (en) Artificial intelligence based apparatus for handling malicious threats in files, method thereof and recording medium thereof
WO2023075351A1 (en) Artificial intelligence training method for industrial robot
WO2021066266A1 (en) Method for generating sound by using artificial intelligence
WO2020013494A1 (en) Anomaly detection
WO2023027280A1 (en) Method for deriving epitope candidate

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21877930

Country of ref document: EP

Kind code of ref document: A2

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21877930

Country of ref document: EP

Kind code of ref document: A2