The application discloses a kind of vehicle
Ethernet intrusion detection and defense method based on
Transformer encoder, comprising the following steps: constructing vehicle
Ethernet intrusion detection model, extracting sample data from the
database containing normal communication message and / or
attack type message pre-set, optimizing the training of the intrusion detection model;Real-time acquisition of real vehicle
Ethernet message data, real-time
inference is carried out to real data by constructing optimized intrusion detection model, whether the flow is abnormal is judged, and potential
network attack or intrusion behavior is identified;According to the intrusion detection result, response unit carries out intrusion alarm and / or
intrusion response.The method of the application realizes efficient sequence
data processing capability, accurate
anomaly detection capability and real-
time response capability;At the same time, in order to maintain effective defense to new
attack, the
system updates the intrusion detection model periodically.The application also discloses a
system for implementing the above method, which has a wide range of application scenarios.