Vehicle bus message processing method, device, vehicle terminal and storage medium

By performing segmented processing of vehicle-mounted bus messages and detecting multiple serial decision tree models, identifying attack types and adopting defense strategies, the information security problems in the vehicle-mounted network are solved, detection accuracy and security are improved, and the vehicle's network is ensured. Information security and driving safety.

CN115484059BActive Publication Date: 2024-11-26CHINA AUTOMOTIVE INNOVATION CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210951160.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2024-11-26
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

The CAN bus design in the existing vehicle network ignores network information security issues, which may cause serious accidents to hackers control the vehicle's ECU and lack effective abnormality detection and defense measures.

Method used

By performing segmented processing of vehicle-mounted bus messages, feature data is extracted and multiple serial decision tree models are input for abnormal detection, the attack type is identified and corresponding defense strategies are adopted to improve detection accuracy and effect.

Benefits of technology

It improves vehicle network information security and driving safety, reduces the harm of abnormal messages to vehicle information security, and enhances the ability to identify information security risk attack paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115484059B_ABST
    Figure CN115484059B_ABST
Patent Text Reader

Abstract

The present application discloses a vehicle bus message processing method, device, vehicle terminal and storage medium, which obtains a plurality of segmented messages by segmenting the vehicle bus message to be detected, extracts characteristic data information of each segmented message, inputs the characteristic data information of the plurality of segmented messages into a message anomaly detection model for anomaly detection processing, determines whether the vehicle bus message to be detected is an abnormal message according to the abnormal detection result, determines the attack type of the abnormal message and adopts a corresponding defense strategy to respond, wherein the message anomaly detection model is a plurality of serial decision tree models constructed according to the sample characteristic data information corresponding to the sample vehicle bus message. The present application improves the accuracy and effect of vehicle bus message detection by judging whether the vehicle bus message to be detected is abnormal and adopting a corresponding defense strategy, reduces the harm of abnormal messages to vehicle information security, and ensures the network information security of the vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle network security detection and defense technology, and in particular to a vehicle bus message processing method, device, vehicle terminal and storage medium. Background Art

[0002] With the application of information technologies such as AI, intelligent sensors, big data, and cloud computing in automotive electronic systems, traditional Internet of Vehicles technology can no longer meet the needs of the majority of users, and the automotive network space will undergo significant changes in the future. The continuous recall of automotive information security in recent years has attracted great attention from automakers and consumers. Attacks on automotive networks not only bring hidden dangers such as privacy leakage and property loss, but more seriously endanger the lives of drivers and other traffic participants. Therefore, the Internet of Vehicles network security issues have become a key issue for the implementation of connected cars and unmanned driving technologies in the current and future, and a core technology that is worth breaking through.

[0003] The CAN (Controller Area Network) bus network, which is widely used in vehicle networks, only ensures functional safety issues at the beginning of its design, but ignores the more important network information security issues. If the steering ECU and brake ECU of the car are controlled by hackers, serious accidents will occur. Therefore, the role of CAN bus anomaly detection and defense in the automotive safety architecture is particularly important. Summary of the invention

[0004] In order to solve the information security and traffic safety problems of intelligent networked vehicles, improve the detection accuracy and detection effect of vehicle bus messages, and take targeted defense measures for abnormal vehicle bus messages, the present invention provides a vehicle bus message processing method, device, vehicle terminal and storage medium, which judge whether the vehicle bus message to be detected is an abnormal message through a message anomaly detection model, identify the attack type of the abnormal message, and adopt corresponding defense strategies, thereby improving the detection accuracy and effect, reducing the harm of abnormal messages to vehicle information security, and ensuring the network information security and driving safety of the vehicle.

[0005] On the one hand, an embodiment of the present application provides a vehicle bus message processing method, including:

[0006] Obtain the vehicle bus message to be detected and its timestamp and message sequence number;

[0007] Segmenting the vehicle bus message to be detected to obtain a plurality of segmented messages, and extracting characteristic data information of each segmented message;

[0008] Inputting the timestamp, message sequence number and characteristic data information of the multiple segmented messages of the vehicle bus message to be detected into the message anomaly detection model to perform message anomaly detection processing to obtain an anomaly detection result; the anomaly detection result represents the probability that the vehicle bus message to be detected is abnormal, and the message anomaly detection model is a plurality of serial decision tree models constructed according to the timestamp, message sequence number and sample characteristic data information corresponding to the sample vehicle bus message;

[0009] Determining whether the vehicle bus message to be detected is an abnormal message according to the abnormality detection result;

[0010] When the vehicle bus message to be detected is the abnormal message, determining the attack type corresponding to the abnormal message;

[0011] Obtaining a defense strategy corresponding to the attack type;

[0012] The abnormal message is responded to according to the defense strategy.

[0013] Furthermore, the step of segmenting the vehicle bus message to be detected to obtain a plurality of segment messages and extracting characteristic data information of each segment message comprises:

[0014] Extracting field information of the vehicle bus message to be detected; the field information includes a field sequence and a field value corresponding to each field in the field sequence;

[0015] According to a division rule that two adjacent fields are regarded as one segment, the field sequence is divided into a plurality of segments; each segment in the plurality of segments corresponds to a different field;

[0016] According to the field value corresponding to the field in each segment, characteristic data information of each segment is obtained.

[0017] Furthermore, the method further comprises the step of training the message anomaly detection model:

[0018] Constructing a preset decision tree classification model, wherein the preset decision tree classification model includes a plurality of serial initial decision tree models;

[0019] Acquire a sample vehicle bus message and its timestamp and message sequence number, as well as label information corresponding to the sample vehicle bus message; the label information indicates whether the sample vehicle bus message is abnormal;

[0020] Segmenting the sample vehicle bus message to obtain a plurality of sample segmented messages, and extracting characteristic data information of each of the sample segmented messages;

[0021] The preset decision tree classification model is trained according to the timestamp and message sequence number of the sample vehicle bus message, the feature data information of a plurality of the sample segmented messages, and the label information corresponding to the sample vehicle bus message to obtain the message anomaly detection model.

[0022] Furthermore, the preset decision tree classification model is trained according to the timestamp and message sequence number of the sample vehicle bus message and the feature data information of the plurality of sample segmented messages and the label information corresponding to the sample vehicle bus message to obtain the message anomaly detection model, including:

[0023] Inputting the timestamp, message sequence number of the sample vehicle bus message and the characteristic data information of the sample segmented message into the preset decision tree classification model to obtain a prediction classification result;

[0024] Determining a target loss function value based on a difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0025] Determine the current optimal leaf node weight of each leaf node in the preset decision tree classification model according to the target loss function value;

[0026] The model parameters of the preset decision tree classification model are adjusted according to the current optimal leaf node weights of each leaf node, and the iterative training is continued based on the adjusted model parameters until the preset training end conditions are reached to obtain the message anomaly detection model.

[0027] Further, the determining of the target loss function value based on the difference between the predicted classification result and the label information corresponding to the sample vehicle bus message includes:

[0028] Determining a first loss function value based on a difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0029] Determining a current complexity value of the preset decision tree classification model according to the current optimal leaf node weight corresponding to each leaf node in the preset decision tree classification model;

[0030] The target loss function value is obtained according to the first loss function value and the current complexity value.

[0031] Furthermore, determining the current optimal leaf node weight of each leaf node in the preset decision tree classification model according to the target loss function value includes:

[0032] Perform a second-order Taylor expansion on the target loss function corresponding to the target loss function value, determine the extreme points after the target loss function is expanded, and determine the current optimal leaf node weights corresponding to each leaf node in the preset decision tree classification model based on the extreme points.

[0033] Further, determining whether the vehicle bus message to be detected is abnormal according to the abnormality detection result includes:

[0034] Determine whether the abnormality detection result is less than a preset threshold;

[0035] When the abnormality detection result is less than a preset threshold, it is determined that the vehicle bus message to be detected is abnormal.

[0036] In a second aspect, the present invention provides a vehicle bus message processing device, comprising:

[0037] Acquisition module: used to obtain the vehicle bus message to be detected and its timestamp and message sequence number;

[0038] A characteristic data information extraction module is used to segment the vehicle bus message to be detected to obtain a plurality of segmented messages, and extract characteristic data information of each segmented message;

[0039] Detection module: used for inputting the timestamp, message sequence number and characteristic data information of the multiple segmented messages of the vehicle bus message to be detected into the message anomaly detection model to perform message anomaly detection processing to obtain anomaly detection results; the anomaly detection results represent the probability that the vehicle bus message to be detected is abnormal, and the message anomaly detection model is a plurality of serial decision tree models constructed according to the timestamp, message sequence number and sample characteristic data information corresponding to the sample vehicle bus message;

[0040] Determination module: used for determining whether the vehicle bus message to be detected is an abnormal message according to the abnormal detection result;

[0041] An attack type determination module, used for determining the attack type corresponding to the abnormal message when the vehicle bus message to be detected is the abnormal message;

[0042] A defense strategy acquisition module, used to acquire the defense strategy corresponding to the attack type;

[0043] The response module is used to respond to the abnormal message according to the defense strategy.

[0044] Furthermore, the feature data information extraction module also includes:

[0045] A first extraction module: used to extract field information of the vehicle bus message to be detected; the field information includes a field sequence and a field value corresponding to each field in the field sequence;

[0046] A first division module: used to divide the field sequence into multiple segments according to a division rule that two adjacent fields are used as a segment; each segment in the multiple segments corresponds to a different field;

[0047] The first determination module: obtains characteristic data information of each segment according to the field value corresponding to the field in each segment.

[0048] Furthermore, the vehicle bus message processing device also includes a message anomaly detection model training module;

[0049] The message anomaly detection model training module includes:

[0050] Model building module: used to build a preset decision tree classification model, wherein the preset decision tree classification model includes multiple serial initial decision tree models;

[0051] Sample acquisition module: used to acquire a sample vehicle bus message and its timestamp and message sequence number, as well as label information corresponding to the sample vehicle bus message; the label information indicates whether the sample vehicle bus message is abnormal;

[0052] Sample information extraction module: used for segmenting the sample vehicle bus message to obtain a plurality of sample segment messages, and extracting characteristic data information of each sample segment message;

[0053] Model training module: used to train the preset decision tree classification model according to the timestamp and message sequence number of the sample vehicle bus message and the characteristic data information of multiple sample segmented messages and the label information corresponding to the sample vehicle bus message to obtain the message anomaly detection model.

[0054] Furthermore, the model training module includes:

[0055] Prediction and classification result confirmation module: used to input the characteristic data information of the sample segmented message into the preset decision tree classification model to obtain the prediction and classification result;

[0056] A target loss function value confirmation module is used to determine the target loss function value based on the difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0057] Leaf node weight confirmation module: used to determine the current optimal leaf node weight of each leaf node in the preset decision tree classification model according to the target loss function value;

[0058] Model confirmation module: used to adjust the model parameters of the preset decision tree classification model according to the current optimal leaf node weights of each leaf node, and continue iterative training based on the adjusted model parameters until the preset training end conditions are reached to obtain the message anomaly detection model.

[0059] Furthermore, the target loss function value confirmation module also includes:

[0060] A first loss function value confirmation module: used to determine a first loss function value based on a difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0061] Complexity value confirmation module: used to determine the current complexity value of the preset decision tree classification model according to the current optimal leaf node weight corresponding to each leaf node in the preset decision tree classification model;

[0062] Calculation module: used to obtain the target loss function value according to the first loss function value and the current complexity value.

[0063] Furthermore, the leaf node weight confirmation module includes:

[0064] An extreme point confirmation module is used to perform a second-order Taylor expansion on the target loss function corresponding to the target loss function value, and determine the extreme point after the target loss function is expanded;

[0065] Leaf node weight calculation module: used to determine the current optimal leaf node weight corresponding to each leaf node in the preset decision tree classification model according to the extreme value point.

[0066] Furthermore, the judging module includes:

[0067] The first judgment module is used to judge whether the abnormal detection result is less than a preset threshold;

[0068] A detection result confirmation module is used to determine that the vehicle bus message to be detected is the abnormal message when the abnormal detection result is less than a preset threshold.

[0069] Furthermore, the attack type determination module includes:

[0070] A target characteristic data information extraction module, used to extract target characteristic data information from the characteristic data information; the target characteristic data information is used to characterize the receiving end of the message;

[0071] A compiling module is used to compile the target characteristic data information to determine the attack type of the abnormal message.

[0072] On the other hand, a vehicle-mounted terminal is provided, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the above-mentioned vehicle bus message processing method.

[0073] On the other hand, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the vehicle bus message processing method as described above.

[0074] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in various optional implementations of the above-mentioned vehicle bus message processing.

[0075] The vehicle bus message processing method, device, vehicle terminal and storage medium provided by the embodiments of the present application have the following technical effects:

[0076] The present application divides the vehicle bus message to be detected into segments and extracts the characteristic data of each segment, inputs the timestamp, message sequence number and characteristic data of multiple segmented messages of the vehicle bus message to be detected into a message anomaly detection model for detection, obtains an anomaly detection result, and judges whether the vehicle bus message to be detected is an abnormal message according to the anomaly detection result; when the vehicle bus message to be detected is the abnormal message, determines the attack type corresponding to the abnormal message; obtains the defense strategy corresponding to the attack type; and responds to the abnormal message according to the defense strategy. Based on the timestamps, message numbers and sample feature data information corresponding to the sample vehicle bus messages, multiple serial decision tree models are constructed. Because the timestamps of the messages are taken into consideration, the connection between the abnormal messages is better. By classifying the messages according to the message numbers, the sources of the messages can be known, and the probability of discovering the attack paths of information security risks is increased. The model training speed and accuracy are significantly improved, while the detection accuracy and granularity are improved, and better detection effects can be achieved. By identifying the attack types of abnormal messages and taking corresponding defense strategies, the harm of abnormal messages to vehicle information security is reduced, ensuring the network information security and driving safety of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0078] Figure 1 This is a flow chart of a vehicle bus message processing method provided by an embodiment of the present application. Figure 1 ;

[0079] Figure 2 It is a flow chart of a training message anomaly detection model provided in an embodiment of the present application;

[0080] Figure 3 It is a structural schematic diagram of a vehicle bus message processing device provided in an embodiment of the present application;

[0081] Figure 4 This is a hardware structure block diagram of a vehicle-mounted terminal for processing vehicle-mounted bus messages provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0083] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0084] See also Figure 1 , Figure 1It is a flow chart of a vehicle bus message processing method provided by an embodiment of the present application. The method divides the vehicle bus message to be detected into segments and extracts the characteristic data of each segment, inputs the timestamp, message sequence number and characteristic data corresponding to the vehicle bus message to be detected into the message anomaly detection model for detection, obtains the anomaly detection result, and judges whether the vehicle bus message to be detected is an abnormal message according to the anomaly detection result; when the vehicle bus message to be detected is the abnormal message, determines the attack type corresponding to the abnormal message; obtains the defense strategy corresponding to the attack type; and responds to the abnormal message according to the defense strategy. The vehicle bus message processing method of the present invention can accurately determine whether the vehicle bus message with detection is abnormal, improves the efficiency and practicality of vehicle bus message anomaly detection, and reduces the harm of abnormal messages to vehicle information security by identifying the attack type of abnormal messages and taking corresponding defense strategies, thereby ensuring the network information security and driving safety of the vehicle.

[0085] This specification provides method operation steps such as embodiments or flow charts, but may include more or fewer operation steps based on routine or non-creative work. The order of steps listed in the embodiments is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processing or multi-threaded processing environment). Specifically, Figure 1 As shown, the method may include:

[0086] S101: Obtain a vehicle bus message to be detected and its timestamp and message sequence number;

[0087] Specifically, the timestamp is the time point when the vehicle bus message is received, and the message sequence number is the message ID, which is used to indicate the category of the vehicle bus message.

[0088] S102: Segmenting the vehicle bus message to be detected to obtain a plurality of segmented messages, and extracting characteristic data information of each segmented message;

[0089] In an embodiment of the present application, an optional method for extracting characteristic data information of a plurality of segmented messages is:

[0090] Extract the field information of the vehicle bus message to be detected; the field information includes each field sequence and the field value corresponding to each field; divide the extracted field sequence into multiple segments according to the division rule of two adjacent fields as a segment; wherein the field corresponding to each segment in the multiple segments is different; and obtain the characteristic data information of each segment according to the field value corresponding to the field in each segment.

[0091] For example, a common vehicle bus message includes 8 fields. The 8 fields are divided into 4 segments according to the rule of dividing two adjacent fields into one segment, and each segment corresponds to a different field; according to the field value corresponding to each segment in the 4 segments, the characteristic data information of each segment is determined.

[0092] S103: Inputting the timestamp, message sequence number and characteristic data information of the multiple segmented messages of the vehicle bus message to be detected into a message anomaly detection model to perform message anomaly detection processing to obtain an anomaly detection result; the anomaly detection result represents the probability that the vehicle bus message to be detected is abnormal, and the message anomaly detection model is a plurality of serial decision tree models constructed according to the timestamp, message sequence number and sample characteristic data information corresponding to the sample vehicle bus message;

[0093] In an embodiment of the present application, the timestamp and message sequence number of the vehicle bus message to be detected are also input into the message anomaly detection model for detection. Taking the timestamp of the message into consideration, the before and after connectivity of the abnormal message is better, because an external network attack may cause several consecutive messages to be abnormal. At the same time, the message is classified according to the sequence number, so the source of the message can be known, and the probability of discovering the attack path of information security risks is increased. Because the probability of message anomalies caused by different attack paths is different, adding the classification of timestamps and message sequence numbers is conducive to improving the classification effect of the model and improving the detection accuracy.

[0094] In an optional embodiment, the message anomaly detection model is a plurality of serial decision tree models constructed according to the timestamp, message sequence number and sample feature data information corresponding to the sample vehicle bus message, such as an XGboost model.

[0095] S104: Determine whether the vehicle bus message to be detected is an abnormal message according to the abnormality detection result;

[0096] Optionally, the method for determining whether the vehicle bus message to be detected is an abnormal message is:

[0097] Determine whether the abnormality detection result is less than a preset threshold; when the abnormality detection result is less than the preset threshold, determine that the vehicle bus message to be detected is an abnormal message.

[0098] S105: When the vehicle bus message to be detected is the abnormal message, determining the attack type corresponding to the abnormal message;

[0099] In an optional embodiment, when it is detected that the vehicle bus message to be detected is an abnormal message, the attack type of the abnormal message is determined, wherein the attack type includes at least one of an attack type against an assisted driving system, an attack type against a main control unit, an attack type against a central gateway, an attack type against an automatic driving system, an attack type against a vehicle infotainment system, and an attack type against a parking distance control system.

[0100] An optional method for determining the attack type corresponding to the abnormal message is:

[0101] Extracting target characteristic data information from the characteristic data information; the target characteristic data information is used to indicate a receiving end of the message;

[0102] The target characteristic data information is compiled to determine the attack type of the abnormal message.

[0103] In an optional embodiment, the characteristic data information of the vehicle bus message includes target characteristic data information for reflecting the receiving end of the vehicle bus message. By compiling the target characteristic data information, it can be determined to which module of the vehicle the vehicle bus message is sent. For example, the database file of the vehicle bus message (such as a DBC file) can be compiled to determine the receiving end of the vehicle bus message, and the attack type of the abnormal message can be determined based on the receiving end of the message.

[0104] When the receiving end of the abnormal message is an assisted driving system (ADAS), the corresponding attack type of the abnormal message is an attack type against the assisted driving system; when the receiving end of the abnormal message is a main control unit (BDC), the corresponding attack type of the abnormal message is an attack type against the main control unit; when the receiving end of the abnormal message is a central gateway (CGW gateway), the corresponding attack type of the abnormal message is an attack type against the central gateway; when the receiving end of the abnormal message is an autonomous driving system (HAD), the corresponding attack type of the abnormal message is an attack type against the autonomous driving system; when the receiving end of the abnormal message is an in-vehicle infotainment system (IVI), the corresponding attack type of the abnormal message is an attack type against the in-vehicle infotainment system; when the receiving end of the abnormal message is a parking distance control system (PDC), the corresponding attack type of the abnormal message is an attack type against the parking distance control system.

[0105] S106: Obtaining a defense strategy corresponding to the attack type;

[0106] S107: According to the defense strategy, respond to the abnormal message.

[0107] When the attack type of the abnormal message is the attack type against the assisted driving system, the abnormal message mainly performs a denial of service (DOS) attack on the assisted driving system, resulting in message blocking of the adaptive cruise system, the failure of the adaptive cruise system function, and the inability to complete automatic cruising in time according to the target vehicle speed and maintain a safe distance from the vehicle in front. At this time, a defense strategy for the assisted driving system can be obtained, including but not limited to triggering the vehicle's warning module, canceling automatic cruise, and reminding the driver to drive manually.

[0108] In an optional embodiment, the type of attack against the assisted driving system may also cause the vehicle's intelligent speed limit reminder to fail and be unable to provide a speed limit reminder. At this time, the vehicle's warning module can be triggered to work and remind the driver to limit the speed.

[0109] When the attack type of the abnormal message is the attack type against the main control unit, the abnormal message mainly replays the main control unit, which is specifically manifested in that the main control unit receives a large number of duplicate messages. At this time, a defense strategy for the main control unit can be obtained, including but not limited to when the car lighting system cannot trigger the signal lights and lighting lights normally, triggering the vehicle's warning module to work, restarting the on-board automatic detection system interface (OBD interface), detecting the vehicle's operating status, and reminding the driver to pull over; when the door control system has faults such as locking or unlocking, triggering the vehicle's warning module to work, restarting the OBD interface, and re-detecting the vehicle's operating status.

[0110] When the attack type of the abnormal message is the attack type against the central gateway, the abnormal message mainly performs fuzzy attacks on the central gateway. The central gateway receives a large number of messages with random IDs and random payloads, resulting in the leakage of the vehicle bus communication matrix and the leakage of the vehicle's privacy information. At this time, a defense strategy for the central gateway can be obtained, such as triggering the vehicle's warning module to work, uploading the abnormal message to the cloud for processing, restarting the OBD interface, and re-detecting the vehicle's operating status.

[0111] When the attack type of the abnormal message is the attack type against the automatic driving system, the abnormal message mainly denials the service attack on the automatic driving system, causing the message of the automobile electronic power steering system to be blocked or the message of the automobile safety detection system to be blocked. At this time, the defense strategy for the automatic driving system can be obtained to respond to the abnormal message. For example, when the message of the automobile electronic power steering system is blocked, the steering of the car is prone to greater risks. At this time, the warning module of the vehicle can be triggered to issue an emergency alarm, restart the OBD interface to re-detect the operating status of the vehicle, and remind the driver to repair the vehicle as soon as possible; when the message of the automobile safety detection system is blocked, the airbag is closed or the response is slow, and emergency treatment cannot be made. At this time, the warning module of the vehicle can be triggered to issue an emergency alarm and remind the driver to repair the vehicle as soon as possible.

[0112] When the attack type of the abnormal message is the attack type against the in-vehicle infotainment system, the abnormal message mainly denials the service attack on the in-vehicle infotainment system, causing the message blocking of the infotainment control domain system or the intelligent air conditioning system. At this time, the defense strategy for the in-vehicle infotainment system can be obtained to respond to the abnormal message. For example, when the message of the infotainment control domain system is blocked, the instrument panel display screen and the entertainment display screen cannot be displayed normally. At this time, the warning module of the vehicle can be triggered to issue an emergency alarm and remind the driver to pull over as soon as possible; when the message of the intelligent air conditioning system is blocked, the vehicle cannot accurately and intelligently adjust the temperature in the car. At this time, the warning module of the vehicle can be triggered to issue an emergency alarm and remind the driver of manual conditions.

[0113] When the attack type of the abnormal message is the attack type against the parking distance control system, the abnormal message mainly denials the service attack on the vehicle infotainment system, causing the anti-lock braking system message to be blocked or abnormal output results to appear in the vehicle bus. At this time, the defense strategy for the parking distance control system can be obtained to respond to the abnormal message. For example, when the anti-lock braking system message is blocked, the anti-lock braking system fails and cannot perform the anti-lock operation normally. At this time, the vehicle's warning module can be triggered to issue an emergency alarm and remind the driver to repair it as soon as possible; when the abnormal output results appear in the vehicle bus, the control bit in the car leaks and the braking system is abnormal. At this time, the OBD interface can be restarted to re-detect the vehicle's operating status and warn the driver to pull over.

[0114] In an optional embodiment, the attack types may also include other attack types against other control systems of the vehicle. Accordingly, defense strategies corresponding to other attack types may be obtained to respond to abnormal messages to reduce the harm of abnormal messages to vehicle information security and ensure the vehicle's network information security and driving safety.

[0115] Before detecting the vehicle bus message, it is necessary to train a message anomaly detection model. In another embodiment of the present application, Figure 2 As shown in the figure, a method for training a message anomaly detection model is:

[0116] S201: constructing a preset decision tree classification model, wherein the preset decision tree classification model includes a plurality of serial initial decision tree models;

[0117] S202: Acquire a sample vehicle bus message and its timestamp and message sequence number, as well as label information corresponding to the sample vehicle bus message; the label information indicates whether the sample vehicle bus message is abnormal;

[0118] Optionally, the label information may be 0 or 1, wherein 0 indicates that the sample vehicle bus message is abnormal, and 1 indicates that the sample vehicle bus message is normal.

[0119] S203: Segment the sample vehicle bus message to obtain a plurality of sample segmented messages, and extract characteristic data information of each of the sample segmented messages;

[0120] In the embodiment of the present application, the method of segmenting the sample vehicle bus message to obtain a plurality of sample segmented messages and extracting feature data is the same as the method in step S102.

[0121] S204: Training the preset decision tree classification model according to the timestamp and message sequence number of the sample vehicle bus message and the feature data information of the plurality of sample segmented messages and the label information corresponding to the sample vehicle bus message to obtain the message anomaly detection model.

[0122] Specifically, the method for training the preset decision tree classification model includes:

[0123] Inputting the timestamp, message sequence number of the sample vehicle bus message and the characteristic data information of the sample segmented message into the preset decision tree classification model to obtain a prediction classification result;

[0124] Determining a target loss function value based on a difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0125] In one embodiment of the present application, the method for determining the target loss function value is: determining a first loss function value based on the difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0126] Optionally, the calculation formula of the first loss function value is:

[0127]

[0128] Where n is the number of samples, is the predicted value, y i is the true value.

[0129] Determining a current complexity value of the preset decision tree classification model according to the current optimal leaf node weight corresponding to each leaf node in the preset decision tree classification model;

[0130] Optionally, the current complexity value is calculated as:

[0131]

[0132] Among them, T represents the number of leaf nodes, ω represents the score of leaf nodes, and the goal requires that the model prediction error is as small as possible, the leaf nodes T is as small as possible, and the node value ω is as not extreme as possible. γ is used to control the number of leaf nodes, and λ controls the score of leaf nodes not to be too large to prevent model overfitting.

[0133] The first loss function value and the current complexity value are added to obtain the target loss function value.

[0134] According to the target loss function value, the target loss function corresponding to the target loss function value is subjected to a second-order Taylor expansion to determine the extreme points after the expansion of the target loss function, and the current optimal leaf node weights corresponding to each leaf node in the preset decision tree classification model are determined according to the extreme points.

[0135] The model parameters of the preset decision tree classification model are adjusted according to the current optimal leaf node weights of each leaf node, and the iterative training is continued based on the adjusted model parameters until the preset training end conditions are reached to obtain the message anomaly detection model.

[0136] Optionally, the preset training end condition may be that the target loss function value is less than a preset loss function value.

[0137] The present application provides a vehicle bus message processing method, which segments a vehicle bus message to be detected and extracts characteristic data of each segment, inputs the timestamp, message sequence number and characteristic data of multiple segmented messages of the vehicle bus message to be detected into a message anomaly detection model for detection, obtains an anomaly detection result, and determines whether the vehicle bus message to be detected is an abnormal message according to the anomaly detection result; when the vehicle bus message to be detected is the abnormal message, determines the attack type corresponding to the abnormal message; obtains a defense strategy corresponding to the attack type; and responds to the abnormal message according to the defense strategy. Based on the timestamps, message numbers and sample feature data information corresponding to the sample vehicle bus messages, multiple serial decision tree models are constructed. Because the timestamps of the messages are taken into consideration, the connection between the abnormal messages is better. By classifying the messages according to the message numbers, the sources of the messages can be known, and the probability of discovering the attack paths of information security risks is increased. The model training speed and accuracy are significantly improved, while the detection accuracy and granularity are improved, and better detection effects can be achieved. By identifying the attack types of abnormal messages and taking corresponding defense strategies, the harm of abnormal messages to vehicle information security is reduced, ensuring the network information security and driving safety of the vehicle.

[0138] On the other hand, the embodiment of the present application also provides a vehicle bus message processing device, Figure 3 is a structural diagram of a vehicle bus message processing device provided in an embodiment of the present application, such as Figure 3 As shown, the device comprises:

[0139] Acquisition module 301: used to acquire the vehicle bus message to be detected and its timestamp and message sequence number;

[0140] The characteristic data information extraction module 302 is used to segment the vehicle bus message to be detected to obtain multiple segmented messages, and extract the characteristic data information of each segmented message;

[0141] Detection module 303: used to input the timestamp, message sequence number and characteristic data information of the vehicle bus message to be detected into the message anomaly detection model to perform message anomaly detection processing to obtain anomaly detection results; the anomaly detection results represent the probability that the vehicle bus message to be detected is abnormal, and the message anomaly detection model is a plurality of serial decision tree models constructed according to the timestamp, message sequence number and sample characteristic data information corresponding to the sample vehicle bus message;

[0142] Determination module 304: used to determine whether the vehicle bus message to be detected is an abnormal message according to the abnormality detection result;

[0143] An attack type determination module 305, for determining the attack type corresponding to the abnormal message when the vehicle bus message to be detected is the abnormal message;

[0144] A defense strategy acquisition module 306 is used to acquire a defense strategy corresponding to the attack type;

[0145] The response module 307 is used to respond to the abnormal message according to the defense strategy.

[0146] Optionally, the feature data information extraction module 302 further includes:

[0147] A first extraction module: used to extract field information of the vehicle bus message to be detected; the field information includes a field sequence and a field value corresponding to each field in the field sequence;

[0148] A first division module: used to divide the field sequence into multiple segments according to a division rule that two adjacent fields are used as a segment; each segment in the multiple segments corresponds to a different field;

[0149] The first determination module: obtains characteristic data information of each segment according to the field value corresponding to the field in each segment.

[0150] Optionally, the vehicle bus message processing device further includes a message anomaly detection model training module;

[0151] The message anomaly detection model training module includes:

[0152] Model building module: used to build a preset decision tree classification model, wherein the preset decision tree classification model includes multiple serial initial decision tree models;

[0153] Sample acquisition module: used to acquire a sample vehicle bus message and its timestamp and message sequence number, as well as label information corresponding to the sample vehicle bus message; the label information indicates whether the sample vehicle bus message is abnormal;

[0154] Sample information extraction module: used for segmenting the sample vehicle bus message to obtain a plurality of sample segment messages, and extracting characteristic data information of each sample segment message;

[0155] Model training module: train the preset decision tree classification model according to the timestamp and message sequence number of the sample vehicle bus message and the characteristic data information of multiple sample segmented messages and the label information corresponding to the sample vehicle bus message to obtain the message anomaly detection model.

[0156] Optionally, the model training module includes:

[0157] Prediction classification result confirmation module: used for inputting the timestamp, message sequence number and feature data information of the sample vehicle bus message into the preset decision tree classification model to obtain the prediction classification result;

[0158] A target loss function value confirmation module is used to determine the target loss function value based on the difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0159] Leaf node weight confirmation module: used to determine the current optimal leaf node weight of each leaf node in the preset decision tree classification model according to the target loss function value;

[0160] Model confirmation module: used to adjust the model parameters of the preset decision tree classification model according to the current optimal leaf node weights of each leaf node, and continue iterative training based on the adjusted model parameters until the preset training end conditions are reached to obtain the message anomaly detection model.

[0161] In the implementation of this application, the target loss function value confirmation module also includes:

[0162] A first loss function value confirmation module: used to determine a first loss function value based on a difference between the predicted classification result and the label information corresponding to the sample vehicle bus message;

[0163] Complexity value confirmation module: used to determine the current complexity value of the preset decision tree classification model according to the current optimal leaf node weight corresponding to each leaf node in the preset decision tree classification model;

[0164] Calculation module: used to obtain the target loss function value according to the first loss function value and the current complexity value.

[0165] Optionally, the leaf node weight confirmation module includes:

[0166] An extreme point confirmation module is used to perform a second-order Taylor expansion on the target loss function corresponding to the target loss function value, and determine the extreme point after the target loss function is expanded;

[0167] Leaf node weight calculation module: used to determine the current optimal leaf node weight corresponding to each leaf node in the preset decision tree classification model according to the extreme value point.

[0168] Optionally, the judging module includes:

[0169] The first judgment module is used to judge whether the abnormal detection result is less than a preset threshold;

[0170] The detection result confirmation module is used to determine that the vehicle bus message to be detected is abnormal when the abnormal detection result is less than a preset threshold.

[0171] Optionally, the attack type determination module includes:

[0172] A target characteristic data information extraction module, used to extract target characteristic data information from the characteristic data information; the target characteristic data information is used to indicate the receiving end of the message;

[0173] A compiling module is used to compile the target characteristic data information to determine the attack type of the abnormal message.

[0174] The device and method embodiments in the embodiments of the present application are based on the same application concept.

[0175] The vehicle bus message processing method, device, vehicle terminal, and storage medium provided by the above-mentioned present application are applied to the field of vehicle network vehicle safety detection and defense technology. The vehicle bus message to be detected is segmented and the characteristic data of each segment is extracted. The timestamp, message sequence number, and characteristic data of multiple segmented messages of the vehicle bus message to be detected are input into the message anomaly detection model for detection to obtain an anomaly detection result, and whether the vehicle bus message to be detected is an abnormal message is determined according to the anomaly detection result; when the vehicle bus message to be detected is the abnormal message, the attack type corresponding to the abnormal message is determined; the defense strategy corresponding to the attack type is obtained; and the abnormal message is responded to and processed according to the defense strategy. Based on the timestamps, message numbers and sample feature data information corresponding to the sample vehicle bus messages, multiple serial decision tree models are constructed. Because the timestamps of the messages are taken into consideration, the connection between the abnormal messages is better. By classifying the messages according to the message numbers, the sources of the messages can be known, and the probability of discovering the attack paths of information security risks is increased. The model training speed and accuracy are significantly improved, while the detection accuracy and granularity are improved, and better detection effects can be achieved. By identifying the attack types of abnormal messages and taking corresponding defense strategies, the harm of abnormal messages to vehicle information security is reduced, ensuring the network information security and driving safety of the vehicle.

[0176] An embodiment of the present invention provides a vehicle-mounted terminal, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the vehicle bus message processing method provided in the above method embodiment.

[0177] The memory can be used to store software programs and modules, and the processor executes various functional applications by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, application programs required for functions, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.

[0178] The method embodiment provided in the embodiment of the present invention can be executed on a vehicle-mounted terminal. Figure 4 As shown, the internal structure of the vehicle-mounted terminal may include but is not limited to: a processor, a network interface and a memory, wherein the processor, the network interface and the memory may be connected via a bus or other means.

[0179] Among them, the processor (or CPU (Central Processing Unit)) is the computing core and control core of the vehicle terminal. The network interface may optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.). The memory is used to store programs and data. It can be understood that the memory here can be a high-speed RAM storage device, or a non-volatile storage device (non-volatile memory), such as at least one disk storage device; optionally, it can also be at least one storage device located away from the aforementioned processor. The memory provides a storage space, which stores the operating system of the electronic device, which may include but is not limited to: Windows system (an operating system), Linux (an operating system), Android (Android, a mobile operating system) system, IOS (a mobile operating system) system, etc., and the present invention does not limit this; and, in the storage space, one or more instructions suitable for being loaded and executed by the processor are also stored, and these instructions can be one or more computer programs (including program codes). In the embodiment of this specification, the processor loads and executes one or more instructions stored in the memory to implement the vehicle bus message processing method provided in the above method embodiment.

[0180] An embodiment of the present invention also provides a computer-readable storage medium, which can be set in a terminal to store at least one instruction, at least one program, code set or instruction set related to implementing a vehicle bus message processing method. The at least one instruction, the at least one program, the code set or instruction set is loaded and executed by the processor to implement the vehicle bus message processing method provided by the above method embodiment.

[0181] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0182] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of this specification are described. Other embodiments are within the scope of the attached claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0183] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0184] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0185] The above description is only a preferred embodiment of the present invention and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present application.

Claims

1. A vehicle bus message processing method, characterized in that: include: Obtain the vehicle bus message to be detected and its timestamp and message sequence number; Segmenting the vehicle bus message to be detected to obtain a plurality of segmented messages, and extracting characteristic data information of each segmented message; Inputting the timestamp, message sequence number and characteristic data information of the vehicle bus message to be detected into the message anomaly detection model for message anomaly detection processing to obtain an anomaly detection result; the anomaly detection result represents the probability that the vehicle bus message to be detected is abnormal, the message anomaly detection model is a plurality of serial decision tree models constructed by training a preset decision tree classification model according to the timestamp, message sequence number, sample characteristic data information and label information corresponding to the sample vehicle bus message, the label information indicates whether the sample vehicle bus message is abnormal, and the preset decision tree classification model includes a plurality of serial initial decision tree models; According to the abnormality detection result, determining whether the vehicle bus message to be detected is an abnormal message; When the vehicle bus message to be detected is the abnormal message, determining the attack type corresponding to the abnormal message; Obtaining a defense strategy corresponding to the attack type; According to the defense strategy, the abnormal message is responded to and processed.

2. The vehicle bus message processing method according to claim 1, characterized in that: The step of segmenting the vehicle bus message to be detected to obtain a plurality of segment messages and extracting characteristic data information of each segment message comprises: Extracting field information of the vehicle bus message to be detected; the field information includes a field sequence and a field value corresponding to each field in the field sequence; According to a division rule that two adjacent fields are regarded as one segment, the field sequence is divided into a plurality of segments; each segment in the plurality of segments corresponds to a different field; According to the field value corresponding to the field in each segment, characteristic data information of each segment is obtained.

3. The vehicle bus message processing method according to claim 2, characterized in that: The method further comprises the step of training and obtaining the message anomaly detection model: Constructing the preset decision tree classification model; Obtaining a sample vehicle bus message and its timestamp and message sequence number, as well as label information corresponding to the sample vehicle bus message; Segmenting the sample vehicle bus message to obtain a plurality of sample segmented messages, and extracting characteristic data information of each of the sample segmented messages; The preset decision tree classification model is trained according to the timestamp and message sequence number of the sample vehicle bus message, the feature data information of a plurality of the sample segmented messages, and the label information corresponding to the sample vehicle bus message to obtain the message anomaly detection model.

4. The vehicle bus message processing method according to claim 3, characterized in that: The method of training the preset decision tree classification model according to the timestamp and message sequence number of the sample vehicle bus message and the feature data information of the plurality of sample segmented messages and the label information corresponding to the sample vehicle bus message to obtain the message anomaly detection model includes: Inputting the timestamp, message sequence number of the sample vehicle bus message and the characteristic data information of the sample segmented message into the preset decision tree classification model to obtain a prediction classification result; Determining a target loss function value based on a difference between the predicted classification result and the label information corresponding to the sample vehicle bus message; Determine the current optimal leaf node weight of each leaf node in the preset decision tree classification model according to the target loss function value; The model parameters of the preset decision tree classification model are adjusted according to the current optimal leaf node weights of each leaf node, and the iterative training is continued based on the adjusted model parameters until the preset training end conditions are reached to obtain the message anomaly detection model.

5. The vehicle bus message processing method according to claim 4, characterized in that: The determining of the target loss function value based on the difference between the predicted classification result and the label information corresponding to the sample vehicle bus message includes: Determining a first loss function value based on a difference between the predicted classification result and the label information corresponding to the sample vehicle bus message; Determining a current complexity value of the preset decision tree classification model according to the current optimal leaf node weight corresponding to each leaf node in the preset decision tree classification model; The target loss function value is obtained according to the first loss function value and the current complexity value.

6. The vehicle bus message processing method according to claim 4, characterized in that: Determining the current optimal leaf node weight of each leaf node in the preset decision tree classification model according to the target loss function value includes: Perform a second-order Taylor expansion on the target loss function corresponding to the target loss function value, determine the extreme points after the target loss function is expanded, and determine the current optimal leaf node weights corresponding to each leaf node in the preset decision tree classification model based on the extreme points.

7. The vehicle bus message processing method according to claim 1, characterized in that: The determining, according to the abnormality detection result, whether the vehicle bus message to be detected is an abnormal message comprises: Determine whether the abnormality detection result is less than a preset threshold; When the abnormality detection result is less than a preset threshold, the vehicle bus message to be detected is determined to be the abnormal message.

8. The vehicle bus message processing method according to claim 1, characterized in that: The attack type includes at least one of an attack type against an auxiliary driving system, an attack type against a main control unit, an attack type against a central gateway, an attack type against an automatic driving system, an attack type against an in-vehicle infotainment system, and an attack type against a parking distance control system. When the in-vehicle bus message to be detected is the abnormal message, determining the attack type of the abnormal message includes: Extracting target feature data information from the feature data information; The target characteristic data information is used to indicate the receiving end of the message; The target characteristic data information is compiled to determine the attack type of the abnormal message.

9. A vehicle bus message processing device, characterized in that: include: Acquisition module: used to obtain the vehicle bus message to be detected and its timestamp and message sequence number; A characteristic data information extraction module is used to segment the vehicle bus message to be detected to obtain a plurality of segmented messages, and extract characteristic data information of each segmented message; Detection module: used for inputting the timestamp, message sequence number and characteristic data information of the vehicle bus message to be detected into the message anomaly detection model for message anomaly detection processing to obtain anomaly detection results; the anomaly detection results represent the probability that the vehicle bus message to be detected is abnormal, the message anomaly detection model is a plurality of serial decision tree models constructed by training a preset decision tree classification model according to the timestamp, message sequence number, sample characteristic data information and label information corresponding to the sample vehicle bus message, the label information indicates whether the sample vehicle bus message is abnormal, and the preset decision tree classification model includes a plurality of serial initial decision tree models; Determination module: used for determining whether the vehicle bus message to be detected is an abnormal message according to the abnormal detection result; An attack type determination module, used for determining the attack type corresponding to the abnormal message when the vehicle bus message to be detected is the abnormal message; A defense strategy acquisition module, used to acquire the defense strategy corresponding to the attack type; The response module is used to respond to the abnormal message according to the defense strategy.

10. A vehicle-mounted terminal, characterized in that: The vehicle terminal includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement the vehicle bus message processing method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the vehicle bus message processing method as described in any one of claims 1 to 8.