CN117077062A - Method and device for detecting abnormality of automobile instruction - Google Patents

Method and device for detecting abnormality of automobile instruction Download PDF

Info

Publication number
CN117077062A
CN117077062A CN202311118057.7A CN202311118057A CN117077062A CN 117077062 A CN117077062 A CN 117077062A CN 202311118057 A CN202311118057 A CN 202311118057A CN 117077062 A CN117077062 A CN 117077062A
Authority
CN
China
Prior art keywords
log
log key
sequence
parameter vector
historical
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311118057.7A
Other languages
Chinese (zh)
Inventor
申小平
王宏超
王英杰
汪明伟
云朋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Callisto Beijing Technology Co ltd
Original Assignee
Callisto Beijing Technology Co ltd
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
Application filed by Callisto Beijing Technology Co ltd filed Critical Callisto Beijing Technology Co ltd
Priority to CN202311118057.7A priority Critical patent/CN117077062A/en
Publication of CN117077062A publication Critical patent/CN117077062A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2123/00Data types
    • G06F2123/02Data types in the time domain, e.g. time-series data

Abstract

The application provides an automobile instruction abnormality detection method, which comprises the following steps: acquiring historical automobile state data; processing to obtain a historical time sequence log; training the historical log key sequence through a neural network model to obtain an original classifier; according to the vehicle type, the original classifier is adjusted to obtain a target classifier; training a historical parameter vector sequence of each historical log key to obtain a network model of each historical parameter vector; acquiring automobile state data at the time t-1, and processing to obtain a log key sequence and a parameter vector sequence at the time t-1; inputting the log key sequence of the step length h at the time t-1 into a target classifier; when the log key at the moment t is abnormal, outputting a first abnormal result; when the log key at the time t is normal, inputting the parameter vector of each log key in the log key sequence of the step length h into a corresponding network model, and judging whether the parameter vector of each log key is normal or not; and outputting a second abnormal result when the error occurs.

Description

Method and device for detecting abnormality of automobile instruction
Technical Field
The application relates to the field of data processing, in particular to a method and a device for detecting abnormal automobile instructions.
Background
With the continuous development of intelligent automobile technology, functions such as data-driven automobile driving behavior monitoring, driving safety early warning and remote control become research hotspots. However, since the vehicle models are various in the automotive industry, the driving mode is complex, and it is difficult for a general anomaly detection algorithm to cope with such complexity. Traditional anomaly detection methods rely mainly on thresholding or using statistical methods, which may be effective in handling some simple scenarios, but their effectiveness tends to be compromised in complex, diverse practical environments. The main reason is that these methods require a large amount of abnormal sample data as support, however, in actual operation, these abnormal data are not easy to acquire.
Recently, machine learning and deep learning techniques have demonstrated superior performance in the field of anomaly detection. The implementation approach closest to the present application is likely to be anomaly detection using deep learning networks. Such methods first train the network using a large amount of normal data, then detect the new data using the trained network, and consider the new data to be potentially anomalous if there is a significant difference from the training data. Although this approach may achieve good results in some scenarios, it may not be ideal in handling complex and diverse vehicle driving patterns because it is global and fails to take into account the differences between different vehicle models. If an attempt is made to train an anomaly detection model for a particular vehicle model alone, the problem is faced that the overall behavior pattern cannot be covered due to insufficient data.
The prior art mainly has the following defects:
(a) Dependence on abnormal sample data is too heavy: training and adjusting models often requires a large amount of abnormal sample data, which is not readily available in practice.
(b) The generalization capability is limited: since training data is collected primarily based on a particular model or scene, the trained model may not perform well in other models or scenes.
(c) The difference treatment of various vehicle types is insufficient: the conventional global model method does not sufficiently consider the difference of different vehicle types, thereby resulting in poor effect when dealing with complex and diverse vehicle driving modes.
Disclosure of Invention
The embodiment of the application aims to provide an automobile instruction abnormality detection method for solving the problems existing in the prior art.
In a first aspect, the present application provides a method for detecting an abnormality of an automobile instruction, the method comprising:
acquiring historical automobile state data; the historical automobile state data comprises automobile types;
processing the historical automobile state data to obtain a historical time sequence log; the history time sequence log comprises a history log key sequence and a history parameter vector sequence of each history log key; the history log key sequence includes a plurality of history log keys;
training the history log key sequence through a neural network model to obtain an original training model;
according to the vehicle model, the original training model is adjusted to obtain a target training model;
training a historical parameter vector sequence of each historical log key to obtain a network model of each historical parameter vector;
acquiring automobile state data at the time t-1, and processing to obtain a log key sequence at the time t-1 and a parameter vector sequence of each log key in the log key sequence at the time t-1;
inputting the log key sequence of the step length h at the time t-1 into the target training model, and judging whether the log key at the time t is normal or not;
when the log key at the moment t is abnormal, outputting a first abnormal result;
when the log key at the time t is normal, inputting the parameter vector of each log key in the log key sequence of the step length h into a corresponding network model, and judging whether the parameter vector of each log key is normal or not;
and outputting a second abnormal result when the error occurs.
In one possible implementation manner, the processing the historical automobile state data to obtain a historical time series log specifically includes:
sequencing the collected automobile state data in the automobile state data set according to the timestamp of the collected automobile state data;
the state change screening is carried out on the automobile state data, and the automobile state data with state change at continuous time points is reserved;
converting the reserved automobile state data into action data;
converting the motion data into a time series log for each motion data;
and analyzing the time sequence log to obtain a log key and a parameter vector.
In one possible implementation manner, the adjusting the original training model according to the vehicle model to obtain the target training model specifically includes:
removing the original full connection layer, the activation layer, the Dropout layer and the last LSTM layer in the original training model;
freezing other layers of the original training model;
adding a new LSTM layer, a Dropout layer, a full connection layer and an activation layer into the original training model;
and updating weights of the added new LSTM layer, the Dropout layer, the full connection layer and the activation layer to obtain the target training model.
In one possible implementation manner, the training the historical parameter vector sequence of each historical log key to obtain the network model of each historical parameter vector specifically includes:
inputting the parameter vector sequence into a network model to be trained to obtain a predicted parameter vector;
calculating errors of a predicted parameter vector and an actual parameter vector through a square difference loss function;
and when the error is in a preset range, determining the network model to be trained as the network model of the historical parameter vector sequence.
In one possible implementation manner, the step h log key sequence at the time t-1 is input into the target training model, and the step h log key at the time t is determined to be normal or not specifically includes:
dividing the log key sequence at the time t-1 according to the step length h to obtain log key sequences of a plurality of step lengths h;
inputting a log key sequence of a first step length h into a target training model, and predicting the conditional probability that the log key after the first step length h is k under the condition of w at the moment t;
when the conditional probability is not the previous C, determining that the log key at the moment t is abnormal; where C is the set parameter threshold.
In a second aspect, the present application provides an automobile instruction abnormality detection apparatus, the apparatus comprising:
the system comprises a historical automobile state acquisition unit, a control unit and a control unit, wherein the historical automobile state acquisition unit is used for acquiring historical automobile state data; the historical automobile state data comprises automobile types;
the processing unit is used for processing the historical automobile state data to obtain a historical time sequence log; the history time sequence log comprises a history log key sequence and a history parameter vector sequence of each history log key; the history log key sequence includes a plurality of history log keys;
the log key training unit is used for training the historical log key sequence through a neural network model to obtain an original training model;
the model adjusting unit is used for adjusting the original training model according to the vehicle model to obtain a target training model;
the parameter vector training unit is used for training the historical parameter vector sequence of each historical log key to obtain a network model of each historical parameter vector;
the current automobile state acquisition unit is used for acquiring automobile state data at the time t-1 and processing to obtain a log key sequence at the time t-1 and a parameter vector sequence of each log key in the log key sequence at the time t-1;
the log key abnormality judging unit is used for inputting the log key sequence of the step length h at the time t-1 into the target training model and judging whether the log key at the time t is normal or not;
the log key abnormality output unit is used for outputting a first abnormality result when the log key at the moment t is abnormal;
the parameter vector abnormality judging unit is used for inputting the parameter vector of each log key into a corresponding network model in the log key sequence of the step length h when the log key at the moment t is normal, and judging whether the parameter vector of each log key is normal or not;
and the parameter vector abnormal output unit is used for outputting a second abnormal result when abnormal.
In one possible implementation manner, the model adjustment unit adjusts the original training model, and the obtaining the target training model specifically includes:
removing the original full connection layer, the activation layer, the Dropout layer and the last LSTM layer in the original training model;
freezing other layers of the original training model;
adding a new LSTM layer, a Dropout layer, a full connection layer and an activation layer into the original training model;
and updating weights of the added new LSTM layer, the Dropout layer, the full connection layer and the activation layer to obtain the target training model.
In a third aspect, the present application provides a computer server comprising: memory, processor, and transceiver;
the processor is coupled with the memory, reads and executes the instruction in the memory to realize the automobile instruction abnormality detection method according to any one of the first aspect;
the transceiver is coupled to the processor and is controlled by the processor to transmit and receive messages.
In a fourth aspect, the present application provides a chip system, comprising a processor coupled to a memory, the memory storing program instructions, which when executed by the processor, implement the method for detecting an abnormality in an automotive instruction according to any one of the first aspects.
In a fifth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to perform the automobile instruction abnormality detection method according to any one of the first aspects.
By applying the method for detecting the abnormal automobile command provided by the embodiment of the application, a mode of pre-training a model is adopted, a large amount of command data in a normal driving data set is input, and a general model capable of understanding and identifying the normal use mode of the automobile is trained. Further, fine adjustment is performed according to a specific vehicle model, so that the abnormality detection accuracy on the specific vehicle model is improved.
Drawings
FIG. 1 is a flow chart of a method for detecting an abnormality of an automobile command according to an embodiment of the application;
FIG. 2 is a flow chart of step 120 of FIG. 1;
FIG. 3 is a flow chart of a training log key sequence;
fig. 4 is a schematic structural diagram of an automobile command abnormality detection device according to a second embodiment of the present application;
fig. 5 is a schematic diagram of a computer server according to a third embodiment of the present application;
fig. 6 is a schematic diagram of a chip system according to a fourth embodiment of the present application;
fig. 7 is a schematic diagram of a chip system according to a fifth embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be noted that, for convenience of description, only the portions related to the present application are shown in the drawings.
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Example 1
An embodiment of the present application provides a method for detecting an abnormality of an automobile command, where an execution body of the method is a server, or a processor of the automobile itself, such as a processor of an automatic driving automobile, and the like, with a computing function, as shown in fig. 1, and the method includes the following steps:
step 110, acquiring historical automobile state data; the historical automobile state data comprises automobile types;
specifically, the automobile state data is the state of a component on the automobile, and can be acquired by acquiring information of various sensors, such as a speed sensor, a temperature sensor and the like, or a vehicle controller, a vehicle body controller and a steering system on vehicles of different vehicle types, so that the automobile state data is acquired, such as the state data of opening an air conditioner, stepping on a brake pedal, opening a driving cab door and the like.
The historical automobile state data is the automobile state data collected before the current time. In order to distinguish the process of pre-training the model from the process of abnormality detection by applying the trained model, the vehicle state data in the pre-training process is referred to as historical vehicle state data.
Step 120, processing the historical automobile state data to obtain a historical time sequence log; the history time sequence log comprises a history log key sequence and a history parameter vector sequence of each history log key; the history log key sequence includes a plurality of history log keys;
specifically, referring to fig. 2, step 120 includes steps 1201-1205, and is a process of processing historical automobile state data to obtain a time series log, and of course, in order to distinguish between the pre-training process and the model application process, the time series log in the pre-training process is referred to as a historical time series log. Steps 1201-1205 are specifically described below.
Step 1201, sorting the collected automobile state data in the automobile state data set according to the time stamp of the collected automobile state data;
specifically, the automobile state data are ordered according to the time stamps so as to ensure the consistency of the time sequence of the data. The collected vehicle state data set is shown in table 1:
Time battery temperature Tyre pressure Brake amplitude
08:00:00 40 200 0
08:00:05 50 200 0
08:00:10 50 198 0
08:00:15 50 198 20
08:00:20 50 198 30
08:00:25 40 200 35
TABLE 1
Step 1202, performing state change screening on the automobile state data, and reserving the automobile state data with state change at continuous time points;
wherein step 1202 comprises:
cleaning the automobile state data set;
aiming at the cleaned automobile state data set, judging whether the automobile state data of two adjacent time nodes change or not according to the time nodes, and when the automobile state data of the two adjacent time nodes change, reserving the automobile state data of the two adjacent time nodes;
when no change occurs, the field of the car status data of the two adjacent time nodes is set to a null value.
Specifically, the automobile state data includes a plurality of fields, each field has a field value, the field value of each field is subjected to normalized cleaning, and the useless state record such as a null value is deleted. Then, state change screening is carried out, specifically, a vehicle state data set after traversing and sorting is carried out, checking is carried out on the vehicle state data of each time node, and if the fields of the vehicle state data change on continuous time nodes, the vehicle state data are reserved; otherwise, it is set to a null value. Thereby retaining the data of the state change in the automobile state data set.
For example, referring to table 1, for battery temperatures, the battery temperature detected at 08:00:00 is 40 ℃, the battery temperature of 08:00:05 is 50 ℃, the battery temperatures of 08:00:10, 08:00:15, and 08:00:20 are all 50 ℃, the battery temperature of 08:00:25 is 40 ℃, it is stated that the battery temperatures change for two periods of 08:00:00 to 08:00:05 and 08:00:20 to 08:00:25, and the battery temperatures of 08:00:00 to 08:00:05 and 08:00:20 to 08:00:25 are preserved, and the battery temperatures of 08:00:10, 08:00:15 are deleted.
Step 1203, converting the reserved automobile state data into action data;
specifically, dense automobile state data is converted into sparse action data, namely, change of the automobile state data is abstracted into specific actions, the action data comprises a time and a specific state change action, and the action data in a time period can be represented by an action curve changing with time. For example, with continued reference to Table 1, the converted motion data are "08:00:00 to 08:00:05 rise in battery temperature" and motion data "fall in battery temperature at 08:00:20 to 08:00:25", with motion data "08:00:05 to 08:00:10 fall in tire pressure" and "08:00:20 to 08:00:25 rise in tire pressure" for tire pressure, and motion data "08:00:05 to 08:00:20 increase in brake amplitude" and "08:00:20 to 08:00:25 increase in brake amplitude" for brake amplitude.
Step 1204, converting the motion data into a time series log for each motion data;
specifically, for the case that there is more than one motion data per time node, for example, referring to table 1, at 08:00:05, the motion data includes the battery temperature and the tire pressure, and each motion data may be reorganized into a one-dimensional time series log for each piece of motion data. The generated one-dimensional time series log is as follows:
the 08:00:05 cell temperature was increased to 50 ℃;
the 08:00:10 tire pressure drops to 198 kilopascals;
08:00:15 pedal effort 20 degrees;
the brake pedal amplitude is 30 degrees when the pedal is pressed down by 08:00:20;
for the situation that a plurality of action data exist in the same time node, for example, 3 action data including battery temperature, tire pressure and brake pedal exist in 08:00:25, a plurality of time sequence logs can be ordered according to preset field priorities, for example, the preset field priorities are that the priorities of the battery temperature, the tire pressure and the brake pedal are gradually reduced, and then the time sequence logs of 08:00:25 are as follows:
the temperature of the battery is reduced to 40 ℃ at a ratio of 08:00:25;
tire pressure was increased to 200 kilopascals at 08:00:25;
the brake pedal is stamped down by 35 degrees in a ratio of 08:00:25;
after traversing all the motion data, a time sequence log is generated. The time series log completely retains the abnormal changes. For example, the time series log may be 20 degrees of brake pedal effort for the first second, 30 degrees of brake pedal effort for the second, 35 degrees of brake pedal effort for the third second, and so on.
The method and the device can obtain the total time sequence log of the preset duration according to the time sequence log of each action.
Specifically, each action data corresponds to a time sequence log, and in a preset duration, the time sequence logs in the time can be summarized due to at least one action, so that a total time sequence log is obtained.
Specifically, each action corresponds to a time sequence log, and in a preset duration, the time sequence logs in the time can be summarized due to at least one action, so that the time sequence log in the preset duration is obtained.
Step 1205, analyzing the time sequence log to obtain a log key and a parameter vector;
for the time sequence log, the time sequence log can be stored in a database in a data table form, so that the time sequence log can be analyzed to obtain a log key and a parameter vector for convenience in storage and processing, the log key represents specific actions to be executed, the parameter vector represents execution time and execution strength of the actions, and the two parts of contents included in the time sequence log are convenient for subsequent abnormality detection.
Specifically, as shown in table 2, the parameter vector is composed of a time stamp and a parameter value, and the parameter value may be null.
TABLE 2
Step 130, training the history log key sequence through a neural network model to obtain an original training model;
specifically, the set of log keys is a finite set, which is a set of all log key categories, and the log key located at the current position among the log key sequence is strongly dependent on the latest log key that has occurred before. According to the dependency relationship between the adjacent log keys, the historical log key sequence can be trained to obtain a pre-training model through training.
Specifically, the history log key sequence can be learned by the neural network model to extract the behavior pattern therein. The neural network model may be a Long Short-Term Memory (LSTM) network, and the number of LSTM layers depends on the size and complexity of the pre-trained log key sequence, the larger the log key sequence, the richer the features, and the more LSTM layers.
The input log key sequence is processed through a one-dimensional convolution layer so as to extract local features in the sequence. These extracted features are then fed into the LSTM layer for processing because LSTM has the ability to learn and remember long-term dependencies in the log key sequence. Next, using a custom attention layer, the outputs of the LSTM are assigned different weights, which can emphasize more important information. Finally, the weighted information is fed into the full connection layer for classification. The neural network structure is shown in fig. 3.
When the training of the pre-training model is carried out, the log key sequence is based on offline automobile state data of various automobile types. The training set contains thousands of field data records of tens of vehicles for nearly one month.
Step 140, according to the vehicle model, adjusting the original training model to obtain a target training model;
in particular, although there is a similarity in driving patterns among the various types of automobiles, there are significant differences in specific driving details. For example, cars and trucks may have significant differences in travel patterns such as steering, braking, etc. command logs. It is assumed that a pre-training model has been obtained by training 100 models of vehicles on the market during the pre-training phase. However, when a brand new vehicle model is released, if the pre-training model is directly used for a new vehicle model, the pre-training model has poor effect because the data fields recorded by the sensors of the new vehicle model are different and the new vehicle model possibly has a new driving mode. At this time, if a dedicated model for a new vehicle model is trained, the model may face reasons such as insufficient data volume, insufficient data to cover all abnormal scenes, and the like. At this time, the pre-training model can be finely tuned, so that the model can be accurately adapted to a specific driving mode and environment.
The specific fine tuning comprises the following steps:
first, the layer is removed.
Specifically, the original full connection layer, activation layer, dropout layer, and last LSTM layer are removed from the original training model.
Next, the model layer is frozen.
Specifically, to preserve knowledge learned during the pre-training phase, other layers of the original training model are frozen, i.e., the frozen layers are not updated with weights during the subsequent training process.
Next, a new layer is added.
Specifically, a new LSTM layer, dropout layer, full connection layer, and activation layer are added to the pre-training model. The initial values of the weights of these newly added layers are random and will be updated in the next fine-tuning process.
And finally, performing fine adjustment by using the log key sequence of the specific vehicle type.
Specifically, the newly added network layer is finely tuned by using the log key sequence of the specific model, and the process is similar to the training process of the pre-training model, and as most layers of the pre-training model are frozen, only the weight of the newly added layer can be updated, so that the target training model obtained by training is more suitable for the running mode and environment of the specific model.
Step 150, training the historical parameter vector sequence of each historical log key to obtain a network model of each historical parameter vector;
specifically, some abnormal conditions may cause abnormal parameter vectors, for example, in a high Wen Cangshi environment, the air conditioner is turned on by remote control, wherein the "on" is a log key, and obviously there is no abnormality, but the corresponding parameter vector "heating" is an abnormal condition. These anomalies originate from a sequence of parameter vectors of different log keys rather than the log keys themselves, which is important for performance monitoring and anomaly detection.
The application can consider the parameter vector corresponding to each log key as a multidimensional time sequence, so that the problem can be simplified into multidimensional time sequence abnormality detection. For example, for a log key, such as temperature adjustment, the feature vector may be temperature data at each time, so that an independent neural network model is built for the parameter vector sequence of each log key. In this neural network model, the input is a sequence of parameter value vectors corresponding to a certain log key, and the values in the vectors are normalized using the mean and standard deviation of all values of the same parameter vector in the training data. Wherein the normalization is performed for each parameter vector in the sequence of parameter vectors. Specifically, the average value of the parameter vectors at the corresponding positions in the training data is subtracted from each parameter vector and divided by the standard deviation of the average value, so that the purpose of normalization is achieved.
The output of the neural network model of the sequence of parameter vectors is a real-valued vector, and the next parameter vector is predicted from the sequence of historical parameter vectors of the most recent sliding window size. The training objective function is to minimize the error between the predicted parameter vector and the actual parameter vector, and for the multidimensional time series data, the neural network model is evaluated by using a square loss function, when the error between the actual parameter vector and the predicted parameter vector output by the neural network model is within a preset range, the neural network model is determined to be trained, and the trained neural network model is used as the network model of the parameter vector sequence. In the abnormality detection stage after training is completed, the error is measured by calculating the difference between the predicted parameter vector and the actual parameter vector, instead of performing abnormality detection by setting a threshold value. The error between the predicted parameter vector and the actual parameter vector follows a gaussian distribution, so if the error of the predicted value vector and the observed value vector is within a high confidence interval of the gaussian distribution, the parameter vector input to the log key is considered to be normal; otherwise, it is considered abnormal.
The actual parameter vector generally refers to a parameter vector of the real record of the automobile. The predicted parameter vector is the output predicted by the neural network model from the input sequence of parameter vectors. Thus, assuming that the neural network model predicts that the data of the parameter vector and the actual parameter vector are very different, it is explained that the actual parameter vector is abnormal because the neural network model already has the ability to predict with high accuracy through a great deal of training. For example, the input parameter vector sequence is the temperature {22 degrees, 21 degrees, 23 degrees, 20 degrees, 22 degrees }, the neural network model predicts that the next time point is 22 degrees, but the actual temperature recorded by the automobile sensor at the next time point is 30 degrees, and obviously, the deviation is a serious abnormal situation, and the abnormality caused by the sensor fault is possible. The parameter vector anomaly may be determined by predicting the difference between the parameter vector and the actual parameter vector.
Step 160, acquiring the automobile state data at the time t-1, and processing to obtain a log key sequence at the time t-1 and a parameter vector sequence of each log key in the log key sequence at the time t-1;
specifically, in step 160, processing as in step 120 is performed on the acquired vehicle state data to obtain a corresponding log key sequence and a parameter vector sequence of each log key. The specific process is similar to step 120 and will not be described again.
Step 170, inputting the log key sequence of the step length h at the time t-1 into the target training model, and judging whether the log key at the time t is normal or not;
specifically, step 170 includes:
dividing the log key sequence at the time t-1 according to the step length h to obtain log key sequences of a plurality of step lengths h;
inputting a log key sequence of a first step length h into a target training model, and predicting the conditional probability that the log key after the first step length h is k under the condition of w at the moment t;
when the conditional probability is not the previous C, determining that the log key at the moment t is abnormal; where C is the set parameter threshold.
Step 180 is executed when the log key at time t is abnormal, and step 190 is executed when the parameter key at time t is normal.
Step 180, when the log key at the moment t is abnormal, outputting a first abnormal result;
specifically, the first abnormal result may be a log key for outputting an abnormality, or a reminder.
Step 190, when the log key at the time t is normal, inputting the parameter vector of each log key in the log key sequence of the step h into a corresponding network model, and judging whether the parameter vector of each log key is normal or not;
specifically, the parameter vector sequence is input into a trained network model corresponding to the parameter vector sequence of the log key, and then whether the parameter vector sequence is normal is judged. And when the parameter vector sequence is normal, continuing to judge the log key of the next h step length until the judgment is finished. When the parameter vector sequence is abnormal, step 200 is performed.
Step 200, when the abnormal state occurs, outputting a second abnormal result.
Specifically, the second abnormal result may be information for indicating an abnormality, such as: the log key is normal and the parameter vector is abnormal. The second exception result may further include: the position of the abnormality, the abnormal data, the predicted data, and the like, and then detection at the next time point is performed.
By applying the method for detecting the abnormal automobile command provided by the embodiment of the application, a mode of pre-training a model is adopted, a large amount of command data in a normal driving data set is input, and a general model capable of understanding and identifying the normal use mode of the automobile is trained. Further, fine adjustment is performed according to a specific vehicle model, so that the abnormality detection accuracy on the specific vehicle model is improved.
Example two
An embodiment II of the present application provides an apparatus for detecting abnormal commands of an automobile, as shown in FIG. 4, the apparatus includes: the system comprises a historical automobile state acquisition unit 400, a processing unit 410, a log key training unit 420, a model adjustment unit 430, a parameter vector training unit 440, a current automobile state acquisition unit 450, a log key abnormality judgment unit 460, a log key abnormality output unit 470, a parameter vector abnormality judgment unit 480 and a parameter vector abnormality output unit 490.
The historical automobile state acquisition unit 400 is used for acquiring historical automobile state data; the historical automobile state data comprises automobile types;
the processing unit 410 is configured to process the historical automobile state data to obtain a historical time series log; the history time sequence log comprises a history log key sequence and a history parameter vector sequence of each history log key; the history log key sequence includes a plurality of history log keys;
the log key training unit 420 is configured to train the historical log key sequence through a neural network model to obtain an original training model;
the model adjustment unit 430 is configured to adjust the original training model according to the vehicle model to obtain a target training model;
the parameter vector training unit 440 is configured to train the historical parameter vector sequence of each historical log key to obtain a network model of each historical parameter vector;
the current automobile state obtaining 450 unit is used for obtaining automobile state data at the time t-1 and processing to obtain a log key sequence at the time t-1 and a parameter vector sequence of each log key in the log key sequence at the time t-1;
the log key abnormality judging unit 460 is configured to input the log key sequence of the step h at the time t-1 into the target training model, and judge whether the log key at the time t is normal;
the log key abnormality output unit 470 is configured to output a first abnormality result when the log key at time t is abnormal;
the parameter vector anomaly determination unit 480 is configured to, when the log key at the time t is normal, input the parameter vector of each log key in the log key sequence of the step h into a corresponding network model, and determine whether the parameter vector of each log key is normal;
the parameter vector anomaly output unit 490 is used for outputting a second anomaly result when anomalies occur.
Further, the processing unit 410 processes the historical automobile status data to obtain a historical time series log specifically includes: sequencing the collected automobile state data in the automobile state data set according to the timestamp of the collected automobile state data; the state change screening is carried out on the automobile state data, and the automobile state data with state change at continuous time points is reserved; converting the reserved automobile state data into action data; converting the motion data into a time series log for each motion data; and analyzing the time sequence log to obtain a log key and a parameter vector.
Further, the model adjustment unit 430 adjusts the original training model according to the vehicle model, and the obtaining the target training model specifically includes: removing the original full connection layer, the activation layer, the Dropout layer and the last LSTM layer in the original training model; freezing other layers of the original training model; adding a new LSTM layer, a Dropout layer, a full connection layer and an activation layer into the original training model; and updating weights of the added new LSTM layer, the Dropout layer, the full connection layer and the activation layer to obtain the target training model.
Further, the training unit 440 trains the historical parameter vector sequence of each historical log key to obtain the network model of each historical parameter vector specifically includes:
inputting the parameter vector sequence into a network model to be trained to obtain a predicted parameter vector; calculating errors of a predicted parameter vector and an actual parameter vector through a square difference loss function; and when the error is in a preset range, determining the network model to be trained as the network model of the historical parameter vector sequence.
Further, the log key abnormality determination unit 460 inputs the log key sequence of the step h at the time t-1 into the target training model, and determines whether the log key at the time t is normal specifically includes:
dividing the log key sequence at the time t-1 according to the step length h to obtain log key sequences of a plurality of step lengths h; inputting a log key sequence of a first step length h into a target training model, and predicting the conditional probability that the log key after the first step length h is k under the condition of w at the moment t; when the conditional probability is not the previous C, determining that the log key at the moment t is abnormal; where C is the set parameter threshold.
Example III
A third embodiment of the present application provides a computer server, as shown in FIG. 5, including: memory, processor, and transceiver;
the processor is coupled with the memory, reads and executes the instructions in the memory, so as to implement any one of the automobile instruction abnormality detection methods provided in the first embodiment;
the transceiver is coupled to the processor, and the processor controls the transceiver to transmit and receive messages.
Example IV
A fourth embodiment of the present application provides a chip system, as shown in FIG. 6, including a processor, where the processor is coupled to a memory, and the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, any one of the methods for detecting an abnormality of an automobile instruction provided in the first embodiment is implemented.
Example five
A fifth embodiment of the present application provides a computer readable storage medium, as shown in fig. 7, including a program or an instruction, where when the program or the instruction runs on a computer, the method for detecting an abnormality of an automobile instruction according to any one of the first embodiment is implemented.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of function in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The foregoing detailed description of the application has been presented for purposes of illustration and description, and it should be understood that the application is not limited to the particular embodiments disclosed, but is intended to cover all modifications, equivalents, alternatives, and improvements within the spirit and principles of the application.

Claims (10)

1. A method for detecting an abnormality in an automotive command, the method comprising:
acquiring historical automobile state data; the historical automobile state data comprises automobile types;
processing the historical automobile state data to obtain a historical time sequence log; the history time sequence log comprises a history log key sequence and a history parameter vector sequence of each history log key; the history log key sequence includes a plurality of history log keys;
training the history log key sequence through a neural network model to obtain an original training model;
according to the vehicle model, the original training model is adjusted to obtain a target training model;
training a historical parameter vector sequence of each historical log key to obtain a network model of each historical parameter vector;
acquiring automobile state data at the time t-1, and processing to obtain a log key sequence at the time t-1 and a parameter vector sequence of each log key in the log key sequence at the time t-1;
inputting the log key sequence of the step length h at the time t-1 into the target training model, and judging whether the log key at the time t is normal or not;
when the log key at the moment t is abnormal, outputting a first abnormal result;
when the log key at the time t is normal, inputting the parameter vector of each log key in the log key sequence of the step length h into a corresponding network model, and judging whether the parameter vector of each log key is normal or not;
and outputting a second abnormal result when the error occurs.
2. The method of claim 1, wherein the processing the historical vehicle state data to obtain a historical time series log specifically comprises:
sequencing the collected automobile state data in the automobile state data set according to the timestamp of the collected automobile state data;
the state change screening is carried out on the automobile state data, and the automobile state data with state change at continuous time points is reserved;
converting the reserved automobile state data into action data;
converting the motion data into a time series log for each motion data;
and analyzing the time sequence log to obtain a log key and a parameter vector.
3. The method of claim 1, wherein the adjusting the original training model according to the vehicle model to obtain the target training model specifically includes:
removing the original full connection layer, the activation layer, the Dropout layer and the last LSTM layer in the original training model;
freezing other layers of the original training model;
adding a new LSTM layer, a Dropout layer, a full connection layer and an activation layer into the original training model;
and updating weights of the added new LSTM layer, the Dropout layer, the full connection layer and the activation layer to obtain the target training model.
4. The method of claim 1, wherein training the historical parameter vector sequence of each historical log key to obtain the network model of each historical parameter vector specifically comprises:
inputting the parameter vector sequence into a network model to be trained to obtain a predicted parameter vector;
calculating errors of a predicted parameter vector and an actual parameter vector through a square difference loss function;
and when the error is in a preset range, determining the network model to be trained as the network model of the historical parameter vector sequence.
5. The method according to claim 1, wherein the step h log key sequence at time t-1 is input into the target training model, and the step of determining whether the log key at time t is normal specifically includes:
dividing the log key sequence at the time t-1 according to the step length h to obtain log key sequences of a plurality of step lengths h;
inputting a log key sequence of a first step length h into a target training model, and predicting the conditional probability that the log key after the first step length h is k under the condition of w at the moment t;
when the conditional probability is not the previous C, determining that the log key at the moment t is abnormal; where C is the set parameter threshold.
6. An automobile instruction abnormality detection device, characterized by comprising:
the system comprises a historical automobile state acquisition unit, a control unit and a control unit, wherein the historical automobile state acquisition unit is used for acquiring historical automobile state data; the historical automobile state data comprises automobile types;
the processing unit is used for processing the historical automobile state data to obtain a historical time sequence log; the history time sequence log comprises a history log key sequence and a history parameter vector sequence of each history log key; the history log key sequence includes a plurality of history log keys;
the log key training unit is used for training the historical log key sequence through a neural network model to obtain an original training model;
the model adjusting unit is used for adjusting the original training model according to the vehicle model to obtain a target training model;
the parameter vector training unit is used for training the historical parameter vector sequence of each historical log key to obtain a network model of each historical parameter vector;
the current automobile state acquisition unit is used for acquiring automobile state data at the time t-1 and processing to obtain a log key sequence at the time t-1 and a parameter vector sequence of each log key in the log key sequence at the time t-1;
the log key abnormality judging unit is used for inputting the log key sequence of the step length h at the time t-1 into the target training model and judging whether the log key at the time t is normal or not;
the log key abnormality output unit is used for outputting a first abnormality result when the log key at the moment t is abnormal;
the parameter vector abnormality judging unit is used for inputting the parameter vector of each log key into a corresponding network model in the log key sequence of the step length h when the log key at the moment t is normal, and judging whether the parameter vector of each log key is normal or not;
and the parameter vector abnormal output unit is used for outputting a second abnormal result when abnormal.
7. The apparatus according to claim 6, wherein the model adjustment unit adjusts the original training model to obtain the target training model specifically includes:
removing the original full connection layer, the activation layer, the Dropout layer and the last LSTM layer in the original training model;
freezing other layers of the original training model;
adding a new LSTM layer, a Dropout layer, a full connection layer and an activation layer into the original training model;
and updating weights of the added new LSTM layer, the Dropout layer, the full connection layer and the activation layer to obtain the target training model.
8. A computer server, comprising: memory, processor, and transceiver;
the processor is coupled with the memory, reads and executes the instructions in the memory to realize the automobile instruction abnormality detection method according to any one of claims 1 to 5;
the transceiver is coupled to the processor and is controlled by the processor to transmit and receive messages.
9. A system on a chip comprising a processor coupled to a memory, the memory storing program instructions that when executed by the processor implement the method of detecting an automotive instruction anomaly of any one of claims 1-5.
10. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, the computer program being executed by a processor to perform the automobile instruction abnormality detection method according to any one of claims 1 to 5.
CN202311118057.7A 2023-08-31 2023-08-31 Method and device for detecting abnormality of automobile instruction Pending CN117077062A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311118057.7A CN117077062A (en) 2023-08-31 2023-08-31 Method and device for detecting abnormality of automobile instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311118057.7A CN117077062A (en) 2023-08-31 2023-08-31 Method and device for detecting abnormality of automobile instruction

Publications (1)

Publication Number Publication Date
CN117077062A true CN117077062A (en) 2023-11-17

Family

ID=88719422

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311118057.7A Pending CN117077062A (en) 2023-08-31 2023-08-31 Method and device for detecting abnormality of automobile instruction

Country Status (1)

Country Link
CN (1) CN117077062A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019060327A1 (en) * 2017-09-20 2019-03-28 University Of Utah Research Foundation Online detection of anomalies within a log using machine learning
CN113434357A (en) * 2021-05-17 2021-09-24 中国科学院信息工程研究所 Log abnormity detection method and device based on sequence prediction
US20210334656A1 (en) * 2018-09-05 2021-10-28 Sartorius Stedim Data Analytics Ab Computer-implemented method, computer program product and system for anomaly detection and/or predictive maintenance
CN114584379A (en) * 2022-03-07 2022-06-03 四川大学 Log anomaly detection method based on optimized feature extraction granularity
CN115269304A (en) * 2021-04-29 2022-11-01 超聚变数字技术有限公司 Log anomaly detection model training method, device and equipment
CN115794480A (en) * 2023-02-10 2023-03-14 成都工业学院 System abnormal log detection method and system based on log semantic encoder
CN116030548A (en) * 2023-01-03 2023-04-28 重庆长安汽车股份有限公司 Remote log diagnosis method and device, electronic equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019060327A1 (en) * 2017-09-20 2019-03-28 University Of Utah Research Foundation Online detection of anomalies within a log using machine learning
US20210334656A1 (en) * 2018-09-05 2021-10-28 Sartorius Stedim Data Analytics Ab Computer-implemented method, computer program product and system for anomaly detection and/or predictive maintenance
CN115269304A (en) * 2021-04-29 2022-11-01 超聚变数字技术有限公司 Log anomaly detection model training method, device and equipment
CN113434357A (en) * 2021-05-17 2021-09-24 中国科学院信息工程研究所 Log abnormity detection method and device based on sequence prediction
CN114584379A (en) * 2022-03-07 2022-06-03 四川大学 Log anomaly detection method based on optimized feature extraction granularity
CN116030548A (en) * 2023-01-03 2023-04-28 重庆长安汽车股份有限公司 Remote log diagnosis method and device, electronic equipment and storage medium
CN115794480A (en) * 2023-02-10 2023-03-14 成都工业学院 System abnormal log detection method and system based on log semantic encoder

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
月梦·剑心: "DeepLog:基于深度学习的系统日志异常检测与诊断", pages 1 - 13, Retrieved from the Internet <URL:https://cloud.tencent.com/developer/article/2105952> *

Similar Documents

Publication Publication Date Title
US10520947B2 (en) Machine learning for event detection and classification in autonomous vehicles
JP6830540B2 (en) Cloud-based vehicle failure diagnostic methods, equipment and systems
US10739736B2 (en) Apparatus and method for event detection and duration determination
US7567878B2 (en) Evaluating anomaly for one class classifiers in machine condition monitoring
CN114585983B (en) Method, device and system for detecting abnormal operation state of equipment
CN110826772A (en) Vehicle exhaust emission prediction method, device, equipment and storage medium
CN112287602B (en) Motor train axle temperature fault early warning method based on machine learning and isolated forest
US20220101666A1 (en) Method and Apparatus for Determining a Residual Service Life based on a Predictive Diagnosis of Components of an Electric Drive System Using Artificial Intelligence Techniques
US20220004163A1 (en) Apparatus for predicting equipment damage
CN112284440A (en) Sensor data deviation self-adaptive correction method
CN116010885A (en) Method and system for detecting abnormal space-time data of vehicle under long-sequence condition
CN111046303A (en) Automatic detection method, device and system for hot spot area
CN115563503A (en) Fault prediction method, system and storage medium based on vehicle historical data
CN115958990A (en) V2G charging pile information diagnosis and safety protection method
CN114281054A (en) LSTM-CNN-based airplane remote fault analysis method and system
CN112256686B (en) MES-based fault data compression and prediction method and system
CN116714437B (en) Hydrogen fuel cell automobile safety monitoring system and monitoring method based on big data
CN117077062A (en) Method and device for detecting abnormality of automobile instruction
CN116907772A (en) Self-diagnosis and fault source identification method and system of bridge structure monitoring sensor
CN116432397A (en) Rail transit fault early warning method based on data model
CN114004143B (en) Method and device for predicting tire life, terminal device and storage medium
US11970178B2 (en) Computer-implemented method for machine learning for operating a vehicle component, and method for operating a vehicle component
CN117011962A (en) Log serialization-based automobile state data anomaly detection method and system
Mrowca et al. Discovering groups of signals in in-vehicle network traces for redundancy detection and functional grouping
CN114861762A (en) Information processing method and device, storage medium and vehicle-mounted electronic controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination