Vehicle data anomaly detection method and device, electronic equipment and storage medium
By classifying and optimizing the Internet of Vehicles data, a target abnormality detection model is formed, which solves the problems of frequent false alarms and missed reports in the existing technology, and improves the detection accuracy and efficiency of Internet of Vehicles data.
Patent Information
- Application Number
- CN202411047188.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-19
AI Technical Summary
The existing Internet of Vehicles abnormality detection technology is based on fixed rules and thresholds, and it is difficult to adapt to the complex and changeable Internet of Vehicles environment, resulting in frequent false alarms and missed alarms, and low detection accuracy and efficiency.
By obtaining the Internet of Vehicles data of the vehicle historical period, classification is performed to obtain the training data set of sensing data, communication data and behavioral data, and using the corresponding data processing unit to perform abnormal detection, optimize the initial abnormality detection model until the preset conditions are met. Form a target anomaly detection model to improve detection accuracy and efficiency.
It reduces false alarms and missed reports, improves the accuracy and efficiency of abnormal detection of Internet of Vehicles data, and can more accurately identify complex and diverse Internet of Vehicles data anomalies.
Smart Images

Figure CN118984288A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of vehicle anomaly detection, and in particular to a vehicle data anomaly detection method, device, electronic device and storage medium. Background Art
[0002] With the rapid development of Internet of Vehicles technology, the communication between vehicles and the external environment is becoming more and more frequent, and it is crucial to ensure the safety and stability of the Internet of Vehicles system. Anomaly detection of Internet of Vehicles data can timely detect whether there are abnormalities in the vehicle and avoid dangerous incidents caused by abnormal conditions.
[0003] Current IoV anomaly detection technologies are often based on fixed rules and thresholds, which are difficult to adapt to the complex and ever-changing IoV environment. IoV data has a large amount of data and complex and non-uniform data types. This anomaly detection method with fixed rules and thresholds is not accurate enough and is prone to false positives and missed positives. Summary of the invention
[0004] The embodiments of the present invention provide a vehicle data anomaly detection method, device, electronic device and storage medium, which can accurately detect anomalies in complex and diverse Internet of Vehicles data, reduce the occurrence of false positives and missed positives, and improve the accuracy and efficiency of anomaly detection.
[0005] In a first aspect, an embodiment of the present invention provides a vehicle data anomaly detection method, comprising:
[0006] When the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle's Internet of Vehicles data in the historical period is obtained;
[0007] Classifying the Internet of Vehicles data to obtain training data sets of various types; wherein the types of the Internet of Vehicles data include sensor data, communication data, and behavior data;
[0008] Each data processing unit based on the initial anomaly detection model performs anomaly detection on the training data set of the corresponding type to obtain result features of each type; wherein each data processing unit includes a sensor data processing unit, a communication data processing unit and a behavior data processing unit;
[0009] The initial anomaly detection model is optimized according to the result features of each type until the initial anomaly detection model meets the preset conditions, thereby obtaining a target anomaly detection model; wherein the target anomaly detection model is used to perform anomaly detection on Internet of Vehicles data.
[0010] In a second aspect, an embodiment of the present invention provides a vehicle data anomaly detection device, the device comprising:
[0011] A data acquisition module, used to acquire the vehicle's Internet of Vehicles data in a historical period when the pre-established initial anomaly detection model does not meet the preset conditions;
[0012] A data classification module, used to classify the Internet of Vehicles data to obtain various types of training data sets; wherein the types of the Internet of Vehicles data include sensor data, communication data and behavior data;
[0013] A feature determination module, configured to perform anomaly detection on a training data set of a corresponding type based on each data processing unit of the initial anomaly detection model to obtain result features of each type; wherein each data processing unit includes a sensor data processing unit, a communication data processing unit, and a behavior data processing unit;
[0014] A model optimization module is used to optimize the initial anomaly detection model according to the result characteristics of each type until the initial anomaly detection model meets the preset conditions to obtain a target anomaly detection model; wherein the target anomaly detection model is used to perform anomaly detection on Internet of Vehicles data.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a vehicle data anomaly detection method as described in any one of the embodiments of the present invention is implemented.
[0016] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a vehicle data anomaly detection method as described in any one of the embodiments of the present invention.
[0017] In an embodiment of the present invention, when the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle network data of the vehicle in the historical period is obtained; the vehicle network data is classified to obtain various types of training data sets; wherein the types of vehicle network data include sensor data, communication data and behavior data; each data processing unit based on the initial anomaly detection model performs anomaly detection on the training data set of its corresponding type to obtain various types of result features; the initial anomaly detection model is optimized according to the result features of each type until the initial anomaly detection model meets the preset conditions to obtain the target anomaly detection model. The method of the embodiment of the present invention can classify the vehicle network data, and in the process of model training, different data processing units are used to process different types of vehicle network data to obtain a target anomaly detection model that can accurately detect anomalies in complex and diverse vehicle network data. Thereby, the occurrence of false positives and false negatives is reduced through the target anomaly detection model, and the accuracy and efficiency of anomaly detection are improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A first flow chart of a vehicle data anomaly detection method provided by an embodiment of the present invention;
[0020] Figure 2 A second flow chart of a vehicle data anomaly detection method provided by an embodiment of the present invention;
[0021] Figure 3 A third flow chart of a vehicle data anomaly detection method provided by an embodiment of the present invention;
[0022] Figure 4 A schematic diagram of the structure of a vehicle data anomaly detection device provided by an embodiment of the present invention;
[0023] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0025] Figure 1 This is the first flow chart of a vehicle data anomaly detection method provided by an embodiment of the present invention. The method of the embodiment of the present invention can accurately detect anomalies in complex and diverse Internet of Vehicles data, reduce the occurrence of false positives and false negatives, and improve the accuracy and efficiency of anomaly detection. The method can be executed by a vehicle data anomaly detection device provided by an embodiment of the present invention, and the device can be implemented in software and / or hardware. The following embodiments will be described by taking the device integrated in an electronic device as an example. The electronic device can be a server or a computer device, etc. Figure 1 , the method may specifically include the following steps:
[0026] Step 101: When the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle networking data in the historical period is obtained.
[0027] Among them, the initial anomaly detection model is a model that has been pre-established and has not been trained. By training and optimizing the initial anomaly detection model, a target anomaly detection model that can accurately detect anomalies in the Internet of Vehicles data can be obtained. The Internet of Vehicles data of vehicles in historical periods includes basic vehicle data, communication data, and environmental data, such as the vehicle speed, acceleration, steering angle, location information, communication records between the vehicle and other devices, data packet content, engine status, and brake system status. The vehicle's Internet of Vehicles data is used to train the initial anomaly detection model to obtain the target anomaly detection model.
[0028] In an optional implementation, the vehicle's speed, acceleration, steering angle, engine status, brake system status and other data can be obtained through the vehicle's control local area network bus. The vehicle's global positioning system can receive signals from satellites to obtain the vehicle's latitude and longitude information, that is, location information. The communication records and data packet contents between the vehicle and other devices are obtained through a pre-set communication interface. In this solution, when the initial anomaly detection model needs to be trained, the Internet of Vehicles data of one or more vehicles in historical periods can be obtained.
[0029] Step 102: Classify the Internet of Vehicles data to obtain training data sets of various types.
[0030] The types of IoV data include sensor data, communication data or behavior data. The training data set is used to train the initial anomaly detection model.
[0031] Specifically, after obtaining the Internet of Vehicles data of at least one vehicle in a historical period, the Internet of Vehicles data is classified according to the characteristics of the Internet of Vehicles data. The data such as the vehicle speed, acceleration and engine temperature directly measured by the sensor are determined as sensor data. The communication records, data packet size and signal strength generated when the vehicle communicates with other devices are determined as communication data. The location information, driving trajectory, steering angle, engine status and braking system status are determined as behavioral data. In an optional implementation, after the Internet of Vehicles data is classified, all data of each type are cleaned, including missing value processing and outlier detection. The cleaned data of each type are sorted according to the time series relationship to obtain a training data set of each type.
[0032] Step 103: Each data processing unit based on the initial anomaly detection model performs anomaly detection on the training data set of its corresponding type to obtain result features of each type.
[0033] Among them, each data processing unit includes a sensor data processing unit, a communication data processing unit and a behavior data processing unit. The sensor data processing unit is used to process a training data set of the sensor data type, the communication data processing unit is used to process a training data set of the communication data type, and the behavior data processing unit is used to process a training data set of the behavior data type. The result feature is used to determine whether there is an abnormality in the corresponding input feature.
[0034] In this solution, the initial anomaly detection model can be a model based on multi-task learning. The initial anomaly detection model includes a basic network, which includes three branch units and a shared unit. The three branch units are respectively a sensor data processing unit, a communication data processing unit, and a behavior data processing unit. After obtaining each type of training data set, the data in the training data set is input into the branch unit of the corresponding type, and each training data set is independently trained through each branch unit, but all branch units can share part of the weights of the basic network. In this way, the entire initial anomaly detection model is jointly optimized, so that the performance of different branch units is improved, and the generalization ability of the overall model can also be improved.
[0035] In an optional embodiment, after obtaining each training data set, for each training data set, the current training data set is input into the corresponding current data processing unit. The current data processing unit performs anomaly detection on the current data set to obtain various types of result features. For example, the training data set of sensor data is input into the sensor data processing unit, and the long short-term memory network or recurrent neural network of the sensor data processing unit performs anomaly detection on the training data set of sensor data to obtain anomaly detection results of sensor data types. The training data set of communication data is input into the communication data processing unit, and the decision tree model or support vector machine of the communication data processing unit performs anomaly detection on the training data set of communication data to obtain anomaly detection results of communication data types. The training data set of behavior data is input into the behavior data processing unit, and the spatial clustering or support vector machine of the behavior data processing unit performs anomaly detection on the training data set of behavior data to obtain anomaly detection results of behavior data types.
[0036] Step 104: Optimize the initial anomaly detection model according to the result features of each type until the initial anomaly detection model meets the preset conditions to obtain the target anomaly detection model.
[0037] The target anomaly detection model is used to detect anomalies in the Internet of Vehicles data. The preset condition may be that the value of a preset loss function reaches convergence, or the number of iterations reaches a preset number.
[0038] Specifically, the data of each training data set is arranged in a time series relationship. The first data is selected from the training data set as the current data, and the current data is input into the corresponding data processing unit to obtain the current anomaly detection result corresponding to the current data. Then, according to the current anomaly detection result, the predetermined standard detection result and the loss function of the data processing unit, the non-shared parameters in the data processing unit are adjusted. All types of current anomaly detection results are input into the shared unit of the initial anomaly detection model, and the features corresponding to different types of data sets are combined or fused through the shared unit to generate a comprehensive feature containing information of each type of data. The shared loss function value is calculated according to the comprehensive feature and the pre-set shared loss function, and the shared parameters of the initial anomaly detection model are adjusted according to the shared loss function value. Further, the next data is selected from the training data set as the current data, and the operation of inputting the current data into the corresponding data processing unit is repeatedly performed, and the parameters of each output processing unit and the shared parameters of the initial anomaly detection model are continuously adjusted until the initial anomaly detection model meets the preset conditions to obtain the target anomaly detection model.
[0039] The technical solution of this embodiment, when the pre-established initial anomaly detection model does not meet the preset conditions, obtain the vehicle network data of the vehicle in the historical period; classify the vehicle network data to obtain various types of training data sets; wherein the types of vehicle network data include sensor data, communication data and behavior data; each data processing unit based on the initial anomaly detection model performs anomaly detection on the training data set of its corresponding type to obtain various types of result features; wherein each data processing unit includes a sensor data processing unit, a communication data processing unit and a behavior data processing unit; optimize the initial anomaly detection model according to the result features of each type until the initial anomaly detection model meets the preset conditions to obtain a target anomaly detection model; wherein the target anomaly detection model is used to perform anomaly detection on the vehicle network data. The technical solution of this embodiment can classify the vehicle network data, and in the process of model training, different data processing units are used to process different types of vehicle network data to obtain a target anomaly detection model that can accurately perform anomaly detection on complex and diverse vehicle network data. Thereby, the occurrence of false positives and false negatives is reduced through the target anomaly detection model, and the accuracy and efficiency of anomaly detection are improved.
[0040] Figure 2 This is a second flow chart of a vehicle data anomaly detection method provided by an embodiment of the present invention. This embodiment is a refinement based on the above embodiment. The specific method can be as follows Figure 2 As shown, the method may include the following steps:
[0041] Step 201: When the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle networking data in the historical period is obtained.
[0042] Step 202: Classify the Internet of Vehicles data to obtain training data sets of various types.
[0043] Among them, the types of Internet of Vehicles data include sensor data, communication data and behavior data.
[0044] Step 203: for each type of training data set, determine the current feature extraction index corresponding to the current type of training data set.
[0045] The feature extraction index is used to instruct each data processing unit to extract features from the training data set. Specifically, different types of data have different characteristics, and the corresponding feature extraction methods will also be different.
[0046] For sensor data such as speed and acceleration, the model needs to capture the general trend and volatility of the sensor data. Therefore, in this solution, when the current type is sensor data, the feature extraction indicators corresponding to the training data set of the current type are determined to include time series indicators, frequency domain indicators, time domain indicators and morphological indicators. The time series indicators are used to instruct the initial anomaly detection model to extract features from the training data set of sensor data according to the time series, such as extracting mean, standard deviation, variance, skewness and kurtosis. The frequency domain indicators are used to instruct the initial anomaly detection model to perform Fourier transform or wavelet transform on the signal to obtain frequency domain information, thereby helping the initial anomaly detection model to identify periodic or non-periodic signal changes. The time-frequency indicators are used to instruct the initial anomaly detection model to use short-time Fourier transform to combine time domain and frequency domain information for feature extraction. The morphological indicators are used to instruct the initial anomaly detection model to apply morphological operations to extract geometric structural features of sensor data.
[0047] When the current type is communication data, the feature extraction indicators corresponding to the training data set of the current type are determined to include signal quality indicators, network topology indicators, traffic indicators and time series indicators. The signal quality indicators are used to instruct the initial anomaly detection model to calculate indicators such as the rate of change of signal strength, packet loss rate and number of retransmissions to evaluate the stability and reliability of communication. The network topology indicators are used to instruct the initial anomaly detection model to analyze the node connection pattern and path length distribution in the network to identify potential network bottlenecks and anomalies. The traffic indicators are used to instruct the initial anomaly detection model to measure the size distribution, transmission rate and traffic peak of the data packet to detect network congestion or abnormal traffic behavior. The time series indicators are used to instruct the initial anomaly detection model to perform autocorrelation and cross-correlation analysis on the time series data of signal strength to discover temporal dependencies and periodic changes.
[0048] When the current type is behavior data, the feature extraction indicators corresponding to the training data set of the current type are determined to include spatial indicators, dynamic indicators, and temporal geographic information indicators. The spatial indicators are used to instruct the initial anomaly detection model to identify the vehicle's driving mode and trajectory shape by calculating spatial geometric features such as the center point, curvature, and direction angle of the driving trajectory. The dynamic indicators are used to instruct the initial anomaly detection model to analyze the frequency and amplitude of changes in the steering angle, as well as the mutation points of speed and acceleration, to detect abnormal driving behavior. The temporal geographic information indicators are used to instruct the initial anomaly detection model to use the spatial location information in the geographic information system to extract features related to road types, traffic signs, etc. to assist in driving safety analysis.
[0049] Using different feature extraction methods for different data types can fully tap the potential value of the data. Using the features extracted in this way to train the model can improve the accuracy and robustness of the anomaly detection model.
[0050] Step 204: extract features of the current type of training data set based on the current feature extraction index to obtain each feature vector of the current type.
[0051] Specifically, after determining the feature extraction index of each training data set, feature extraction is performed on the data in each type of training data set according to the feature extraction index corresponding to each type of training data set to obtain each type of feature vector.
[0052] For example, after obtaining the behavior data, each data in the training data set of the behavior data is represented as a two-dimensional input tensor, where each channel represents a different attribute, such as longitude, latitude, and turning angle. Assuming that there are behavior data at n moments, and each moment has information on m geographic location points, each behavior data can be represented as an input tensor with a shape of (n, m, 3). Furthermore, the convolutional neural network of the behavior data processing unit is used to extract features from the input tensor to obtain each feature vector corresponding to the behavior data.
[0053] Step 205: For each feature vector of each type, when the current type is sensor data, perform dimension conversion and gating mechanism processing on the current feature vector of the current type according to the long short-term memory network of the sensor data processing unit to obtain result features of the current feature vector of the current type.
[0054] Among them, the long short-term memory network is used to process and predict time series data. The long short-term memory network includes an input layer, a core layer, and an output layer. The core layer includes an input gate, a forget gate, an output gate, and a memory cell. The forget gate determines which sensor data should be discarded. The memory cell is used to store information from sensor data at different times. The memory cell updates its own output value based on the output information of the input gate and the forget gate.
[0055] Specifically, the training data set of the sensor data is input into the long short-term memory network, and the long short-term memory network reduces the dimension of the feature vector corresponding to each sensor data according to the time series, and converts it into a low-dimensional embedding vector. Further, the embedding vector is processed by the input gate, forget gate, output gate and memory cell of the core layer through the gating mechanism to obtain a state vector, whose state includes the detection result predicted by the sensor data processing unit. Further, the result feature of the feature vector is determined according to the state vector.
[0056] Step 206: When the current type is communication data, a decision tree corresponding to the feature vector of the current type is obtained according to the random forest model of the communication data processing unit, and a result feature of the current feature vector of the current type is determined based on the decision tree.
[0057] Among them, random forest is an integrated learning model containing multiple decision trees, each of which can make predictions independently. Random forest includes an input layer, a decision tree layer and an output layer. In an optional implementation, after obtaining the feature vector corresponding to the communication data, the root node of the decision tree is generated according to the feature information (such as signal strength, data packet and transmission delay, etc.), and the leaf node is determined according to the specific value of the feature information (such as signal strength value and data packet size). Further, a decision tree is generated based on the root node and the leaf node.
[0058] After obtaining the decision tree, for each branch in the decision tree, the features and rules can be further refined to create internal nodes. For example, on the path of a strong signal, an internal node can be set to further classify based on the size of the data packet: large packet node and small packet node. The leaf node at the end of each branch represents the corresponding result feature. For example, the leaf node at the end determines the anomaly detection result based on whether data tampering has occurred, and the leaf node will output a classification result (result feature) of "normal" or "abnormal".
[0059] Step 207: When the Internet of Vehicles data corresponding to the feature vector of the current type is behavior data, graph convolution is performed on the feature vector of the current type according to the graph convolution network of the behavior data processing unit to obtain updated features corresponding to the feature vector of the current type, and result features of the current feature vector of the current type are determined based on the updated features.
[0060] Among them, the graph convolutional network structure is suitable for processing data with geospatial features. The graph convolutional network captures the dependencies between nodes by propagating information in the graph. Specifically, after obtaining the feature vector corresponding to the behavior data, the feature information of the feature vector (such as the location coordinates and timestamp of the vehicle) is input into the input layer of the graph convolutional network. According to at least one graph convolutional layer, the feature vector is updated using the graph convolutional layer to obtain updated features. The updated features are input into the output layer of the graph convolutional network, and the result features are obtained through the classifier of the output layer.
[0061] Step 208: Optimize the initial anomaly detection model according to the result features of each type until the initial anomaly detection model meets the preset conditions to obtain the target anomaly detection model.
[0062] Among them, the target anomaly detection model is used to perform anomaly detection on Internet of Vehicles data. The preset condition may be that the value of a preset loss function reaches convergence, or the number of iterations reaches a preset number. In this scheme, the initial anomaly detection model is optimized according to the result features of each type until the initial anomaly detection model meets the preset conditions, and the target anomaly detection model is obtained, including: through a shared unit, all result features of all types are subjected to feature fusion to obtain comprehensive features; the comprehensive features are input into the non-shared layer of each data processing unit to obtain the high-level features corresponding to each type; the shared parameters and non-shared parameters of the initial anomaly detection model are optimized according to the high-level features of each type, Internet of Vehicles data and the shared loss function of the initial anomaly detection model, until the initial anomaly detection model meets the preset conditions, and the target anomaly detection model is obtained.
[0063] Among them, the initial anomaly detection model includes various data processing units and a shared unit. The shared unit includes a shared loss function and shared parameters. The shared unit of this solution includes a convolutional layer and a fully connected layer. Each data processing unit includes a corresponding loss function and non-shared parameters. In an optional embodiment, after obtaining each type of result feature, the result feature of each type is input into the shared unit, and all the result features are fused through the shared unit to obtain a high-level feature containing information of each type of data. The high-level features are brought into the shared loss function, and the shared parameters of the initial anomaly detection model and the non-shared parameters of each data processing unit are adjusted according to the shared loss function value until the initial anomaly detection model meets the preset conditions to obtain the target anomaly detection model.
[0064] Through the above steps, multi-task learning can be effectively used to train an anomaly detection model that can process multiple types of data simultaneously, thereby improving the training efficiency of the initial anomaly detection model.
[0065] In the technical solution of this embodiment, when the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle networking data of the vehicle in the historical period is obtained. The vehicle networking data is classified to obtain training data sets of various types; wherein the types of vehicle networking data include sensor data, communication data and behavior data. For each type of training data set, the current feature extraction index corresponding to the training data set of the current type is determined. Based on the current feature extraction index, feature extraction is performed on the training data set of the current type to obtain each feature vector of the current type. For each feature vector of each type, when the current type is sensor data, the current feature vector of the current type is dimensionally converted and gated according to the long short-term memory network of the sensor data processing unit to obtain the result feature of the current feature vector of the current type. When the current type is communication data, the decision tree corresponding to the feature vector of the current type is obtained according to the random forest model of the communication data processing unit, and the result feature of the current feature vector of the current type is determined based on the decision tree. When the Internet of Vehicles data corresponding to the feature vector of the current type is behavior data, the feature vector of the current type is graph convolved according to the graph convolution network of the behavior data processing unit to obtain the updated features corresponding to the feature vector of the current type, and the result features of the current feature vector of the current type are determined based on the updated features. The initial anomaly detection model is optimized according to the result features of each type until the initial anomaly detection model meets the preset conditions to obtain the target anomaly detection model. The scheme of this embodiment processes the long-term dependencies in the sensor data through the gating mechanism of the long short-term memory network, distinguishes the normal and abnormal communication data through random forest processing, and captures the geospatial features and time series features of the behavior data through the graph convolution network. According to different types of data characteristics, the accuracy of the model's anomaly detection can be improved by using a suitable data processing unit for anomaly detection. When processing anomaly detection tasks of multiple types of data at the same time, computing resources are saved and the training efficiency of the model is improved by sharing some parameters or feature representations, so as to obtain a target anomaly detection model that can accurately detect anomalies in complex and diverse Internet of Vehicles data. Thereby, the occurrence of false positives and false negatives is reduced through the target anomaly detection model, and the accuracy and efficiency of anomaly detection are improved.
[0066] Figure 3 The third flow chart of a vehicle data anomaly detection method provided by an embodiment of the present invention. The specific method can be as follows Figure 3 As shown, the method may include the following steps:
[0067] Step 301: Acquire the to-be-detected data of the to-be-detected vehicle, and classify the to-be-detected data to obtain the data type of the to-be-detected data.
[0068] The data to be detected is data that needs to be detected for anomalies. The types of data to be detected include sensor data, communication data or behavior data. The training data set is used to train the initial anomaly detection model. In practical applications, when it is necessary to perform anomaly detection on the data to be detected, the server can obtain the data to be detected of the vehicle to be detected through a preset interface or a wireless communication protocol. After obtaining the data to be detected, the data to be detected is classified according to its data content to determine the type of the data to be detected.
[0069] Step 302: input the data to be detected into the target anomaly detection model according to the data type, and obtain the detection result of the data to be detected through the target anomaly detection model.
[0070] Among them, the target anomaly detection model is used to perform anomaly detection on the Internet of Vehicles data. After obtaining the data to be detected, the data to be detected is input into the target anomaly detection model. The target anomaly detection model inputs the data to be detected into the data processing unit corresponding to its type according to the type of the data to be detected. The data processing unit and the shared unit of the target anomaly detection model perform anomaly detection on the data to be detected to obtain the detection result of the data to be detected.
[0071] Step 303: Display the detection result to the user.
[0072] Specifically, after obtaining the test results, the server can display the test results to the user through the display screen of the vehicle, or send the test results to the user's mobile phone, tablet or other terminal device, so that the user can view the test results through the terminal device.
[0073] The technical solution of this embodiment obtains the data to be detected of the vehicle to be detected, and classifies the data to be detected to obtain the data type of the data to be detected; inputs the data to be detected into the target anomaly detection model according to the data type, obtains the detection result of the data to be detected through the target anomaly detection model; and displays the detection result to the user. The solution of this embodiment can accurately detect anomalies in complex and diverse Internet of Vehicles data, reduce the occurrence of false positives and false negatives, and improve the accuracy and efficiency of anomaly detection.
[0074] An embodiment of the present invention also provides a computer program product.
[0075] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer program products, which can include one or more computer programs, which can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor, which can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0076] Figure 4 Schematic diagram of the structure of the vehicle data anomaly detection device provided by the embodiment of the present invention, which is suitable for executing the vehicle data anomaly detection method provided by the embodiment of the present invention. Figure 4 As shown, the device may specifically include:
[0077] The data acquisition module 401 is used to acquire the vehicle networking data of the vehicle in the historical period when the pre-established initial anomaly detection model does not meet the preset conditions;
[0078] A data classification module 402 is used to classify the Internet of Vehicles data to obtain training data sets of various types; wherein the types of the Internet of Vehicles data include sensor data, communication data and behavior data;
[0079] A feature determination module 403 is used to perform anomaly detection on the training data set of the corresponding type based on each data processing unit of the initial anomaly detection model to obtain result features of each type; wherein each data processing unit includes a sensor data processing unit, a communication data processing unit and a behavior data processing unit;
[0080] The model optimization module 404 is used to optimize the initial anomaly detection model according to the result characteristics of each type until the initial anomaly detection model meets the preset conditions to obtain a target anomaly detection model; wherein the target anomaly detection model is used to perform anomaly detection on Internet of Vehicles data.
[0081] Optionally, the feature determination module 403 is specifically used to: determine, for each type of training data set, a current feature extraction index corresponding to the current type of training data set;
[0082] Performing feature extraction on the training data set of the current type based on the current feature extraction index to obtain each feature vector of the current type;
[0083] Each feature vector of the current type is input into the initial anomaly detection model, and anomaly detection is performed on each feature vector of the current type based on a data processing unit of the initial anomaly detection model corresponding to the current type to obtain result features of the current type.
[0084] Optionally, the feature determination module 403 is further used to: when the current type is the sensor data, determine that the feature extraction index corresponding to the training data set of the current type includes a time series index, a frequency domain index, a time domain index and a morphological index;
[0085] When the current type is the communication data, determining that the feature extraction index corresponding to the training data set of the current type includes a signal quality index, a network topology feature index, a flow index, and a time series index;
[0086] When the current type is the behavior data, it is determined that the feature extraction index corresponding to the training data set of the current type includes a spatial index, a dynamic index and a temporal geographic information index.
[0087] Optionally, the feature determination module 403 is further used to: for each feature vector of each type, when the current type is the sensor data, perform dimension conversion and gating mechanism processing on the current feature vector of the current type according to the long short-term memory network of the sensor data processing unit to obtain result features of the current feature vector of the current type;
[0088] When the current type is the communication data, obtaining a decision tree corresponding to the feature vector of the current type according to the random forest model of the communication data processing unit, and determining result features of the current feature vector of the current type based on the decision tree;
[0089] When the Internet of Vehicles data corresponding to the feature vector of the current type is the behavior data, graph convolution is performed on the feature vector of the current type according to the graph convolution network of the behavior data processing unit to obtain updated features corresponding to the feature vector of the current type, and result features of the current feature vector of the current type are determined based on the updated features.
[0090] Optionally, the model optimization module 404 is specifically used to: perform feature fusion on all result features of all types through the shared unit to obtain comprehensive features;
[0091] Inputting the comprehensive features into the non-shared layers of each data processing unit to obtain high-level features corresponding to each type;
[0092] The shared parameters and non-shared parameters of the initial anomaly detection model are optimized according to various types of high-level features, the Internet of Vehicles data, and the shared loss function of the initial anomaly detection model until the initial anomaly detection model meets the preset conditions, thereby obtaining the target anomaly detection model.
[0093] Optionally, the model optimization module 404 is specifically used to: obtain the to-be-detected data of the to-be-detected vehicle, and classify the to-be-detected data to obtain the data type of the to-be-detected data;
[0094] Inputting the data to be detected into the target anomaly detection model according to the data type, and obtaining the detection result of the data to be detected through the target anomaly detection model;
[0095] The detection result is displayed to the user.
[0096] The vehicle data anomaly detection device provided in the embodiment of the present invention can execute the vehicle data anomaly detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not described in detail in this embodiment, reference can be made to the description in any method embodiment of the present invention.
[0097] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, referring to Figure 5 , Figure 5 The electronic device 12 shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 5 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0098] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0099] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0100] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present application.
[0101] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0102] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 12, and / or may communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0103] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, a vehicle data anomaly detection method provided in an embodiment of the present invention is implemented: when the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle network data of the vehicle in the historical period is obtained; the vehicle network data is classified to obtain various types of training data sets; wherein the types of the vehicle network data include sensor data, communication data and behavior data; based on the initial anomaly detection model, each data processing unit performs anomaly detection on the training data set of its corresponding type to obtain various types of result features; wherein the various data processing units include a sensor data processing unit, a communication data processing unit and a behavior data processing unit; the initial anomaly detection model is optimized according to the result features of each type until the initial anomaly detection model meets the preset conditions to obtain a target anomaly detection model; the target anomaly detection model is used to perform anomaly detection on the vehicle network data.
[0104] The embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a vehicle data anomaly detection method provided by all the embodiments of the present invention is implemented: when the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle network data of the vehicle in the historical period is obtained; the vehicle network data is classified to obtain various types of training data sets; wherein the types of the vehicle network data include sensor data, communication data and behavior data; based on each data processing unit of the initial anomaly detection model, the training data set of its corresponding type is subjected to anomaly detection to obtain various types of result features; wherein the each data processing unit includes a sensor data processing unit, a communication data processing unit and a behavior data processing unit; the initial anomaly detection model is optimized according to the result features of each type until the initial anomaly detection model meets the preset conditions to obtain a target anomaly detection model. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electronic device, device or device of electrical, magnetic, optical, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0105] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction-executing electronic device, apparatus, or device.
[0106] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0107] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0108] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A vehicle data anomaly detection method, characterized in that: The method comprises: When the pre-established initial anomaly detection model does not meet the preset conditions, the vehicle's Internet of Vehicles data in the historical period is obtained; Classifying the Internet of Vehicles data to obtain training data sets of various types; wherein the types of the Internet of Vehicles data include sensor data, communication data or behavior data; Each data processing unit based on the initial anomaly detection model performs anomaly detection on the training data set of the corresponding type to obtain result features of each type; wherein each data processing unit includes a sensor data processing unit, a communication data processing unit and a behavior data processing unit; The initial anomaly detection model is optimized according to the result features of each type until the initial anomaly detection model meets the preset conditions, thereby obtaining a target anomaly detection model; wherein the target anomaly detection model is used to perform anomaly detection on the vehicle's Internet of Vehicles data.
2. The method according to claim 1, characterized in that Each data processing unit based on the initial anomaly detection model performs anomaly detection on the training data set of the corresponding type to obtain result features of each type, including: For each type of training data set, determine the current feature extraction index corresponding to the current type of training data set; Performing feature extraction on the training data set of the current type based on the current feature extraction index to obtain each feature vector of the current type; Each feature vector of the current type is input into the initial anomaly detection model, and anomaly detection is performed on each feature vector of the current type based on a data processing unit of the initial anomaly detection model corresponding to the current type to obtain result features of the current type.
3. The method according to claim 2, characterized in that For each type of training data set, determine the current feature extraction index corresponding to the current type of training data set, including: When the current type is the sensor data, determining that the feature extraction index corresponding to the training data set of the current type includes a time series index, a frequency domain index, a time domain index and a morphological index; When the current type is the communication data, determining that the feature extraction index corresponding to the training data set of the current type includes a signal quality index, a network topology feature index, a flow index, and a time series index; When the current type is the behavior data, it is determined that the feature extraction index corresponding to the training data set of the current type includes a spatial index, a dynamic index and a temporal geographic information index.
4. The method according to claim 2, characterized in that: The data processing unit corresponding to the current type based on the initial anomaly detection model performs anomaly detection on each feature vector of the current type to obtain result features of the current type, including: For each feature vector of each type, when the current type is the sensor data, a current feature vector of the current type is subjected to dimension conversion and gating mechanism processing according to a long short-term memory network of the sensor data processing unit to obtain result features of the current feature vector of the current type; When the current type is the communication data, obtaining a decision tree corresponding to the feature vector of the current type according to the random forest model of the communication data processing unit, and determining result features of the current feature vector of the current type based on the decision tree; When the current type is the behavior data, graph convolution is performed on the feature vector of the current type according to the graph convolution network of the behavior data processing unit to obtain updated features corresponding to the feature vector of the current type, and result features of the current feature vector of the current type are determined based on the updated features.
5. The method according to claim 1, characterized in that The initial anomaly detection model further includes a sharing unit, which optimizes the initial anomaly detection model according to the result features of each type until the initial anomaly detection model meets the preset conditions, thereby obtaining a target anomaly detection model, including: Through the shared unit, all result features of all types are fused to obtain comprehensive features; Inputting the comprehensive features into the non-shared layers of each data processing unit to obtain high-level features corresponding to each type; The shared parameters and non-shared parameters of the initial anomaly detection model are optimized according to various types of high-level features, the Internet of Vehicles data, and the shared loss function of the initial anomaly detection model until the initial anomaly detection model meets the preset conditions, thereby obtaining the target anomaly detection model.
6. The method according to claim 1, characterized in that The method further comprises: Acquire the data to be detected of the vehicle to be detected, and classify the data to be detected to obtain the data type of the data to be detected; Inputting the data to be detected into the target anomaly detection model according to the data type, and obtaining the detection result of the data to be detected through the target anomaly detection model; The detection result is displayed to the user.
7. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements a vehicle data anomaly detection method according to any one of claims 1 to 6.
8. A vehicle data anomaly detection device, characterized in that: include: A data acquisition module, used to acquire the vehicle's Internet of Vehicles data in a historical period when the pre-established initial anomaly detection model does not meet the preset conditions; A data classification module, used to classify the Internet of Vehicles data to obtain various types of training data sets; wherein the types of the Internet of Vehicles data include sensor data, communication data and behavior data; A feature determination module, configured to perform anomaly detection on a training data set of a corresponding type based on each data processing unit of the initial anomaly detection model to obtain result features of each type; wherein each data processing unit includes a sensor data processing unit, a communication data processing unit, and a behavior data processing unit; A model optimization module is used to optimize the initial anomaly detection model according to the result characteristics of each type until the initial anomaly detection model meets the preset conditions to obtain a target anomaly detection model; wherein the target anomaly detection model is used to perform anomaly detection on Internet of Vehicles data.
9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, a vehicle data anomaly detection method as described in any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a vehicle data anomaly detection method as described in any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Vehicle state monitoring method and system based on Internet of Vehicles data, terminal and medium
CN119814839A
Vehicle status monitoring method, system, terminal and medium based on Internet of Vehicles data
CN119814839B
Railway vehicle fault detection method, device and equipment and storage medium
CN120524383A
