Generation method, detection method, device and equipment of data anomaly detection model

By training a data anomaly detection model containing a multi-level network model, and dynamically adjusting the detection standards in environmental information, the problem of insufficient accuracy and robustness of data anomaly detection of intelligent connected vehicles CAN buses is solved, and more efficient data anomaly detection is achieved.

CN120387124AActive Publication Date: 2025-07-29ZHIZI AUTOMOTIVE TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510874290.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-07-29
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

In the existing intelligent connected vehicle CAN bus data abnormality detection scheme, preset rules and thresholds are difficult to adapt to data fluctuations in different models and under different operating conditions, resulting in insufficient detection accuracy and robustness.

Method used

By collecting the driving data, environmental information and time information of the target vehicle under different working conditions, a preset network model including the vector conversion layer, the encoder layer, the environmental factor fusion layer and the multi-branch output layer is trained, a data abnormality detection model is generated, and the detection standards are dynamically adjusted to adapt to different working conditions.

Benefits of technology

It improves the accuracy and robustness of data abnormality detection of intelligent connected vehicles, reduces the possibility of false alarms, and makes the detection standards more reasonably adapt to the current environment and working conditions of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387124A_ABST
    Figure CN120387124A_ABST
Patent Text Reader

Abstract

The invention discloses a data anomaly detection model generation method, a data anomaly detection method, a data anomaly detection device and data anomaly detection equipment, and relates to the technical field of automobile detection. The data anomaly detection model generation method comprises the steps that a training data set is acquired, and the training data set comprises driving data, environment information, corresponding time information and anomaly detection results of a target vehicle model under different working conditions; the training data set is adopted to train a preset network model, a data anomaly detection model is obtained, and the data anomaly detection model is used for detecting whether the target vehicle type is abnormal or not. According to the method, the specific training data set is used for training the preset network model containing the multiple levels such as the environmental factor fusion layer to obtain the data anomaly detection model, the data anomaly detection model is used for data anomaly detection, and the data anomaly detection model can dynamically adjust the detection standard in combination with the environmental information. Therefore, the accuracy and robustness of the data anomaly detection of the intelligent networked automobile are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of vehicle detection, and particularly relates to a method for generating a data anomaly detection model, a detection method, a device, and a device. Background Art

[0002] With the progress of technology, vehicles are gradually developing towards intelligent networking. Intelligent connected vehicles usually upload various driving data of the vehicle to the cloud server through the CAN (Controller Area Network) bus. These driving data of intelligent connected vehicles can be used for model training, fault diagnosis, driving behavior analysis, etc. related to intelligent connected vehicles. Before the data is uploaded, the vehicle side usually performs anomaly detection on the uploaded data.

[0003] In the current intelligent connected vehicle CAN bus data anomaly detection solution, it is usually the vehicle side that completes the anomaly detection of the CAN bus data based on stored preset rules, preset thresholds, etc.

[0004] However, due to the variety of driving data of intelligent connected vehicles, with different data formats, frequencies, etc., using the above intelligent connected vehicle CAN bus data anomaly detection solution, it is difficult for preset rules and preset thresholds to fully meet the anomaly detection of different vehicle models and different types of data. Moreover, the driving data of the same vehicle may also fluctuate in different scenarios, and fixed preset rules and preset thresholds cannot be adjusted in a timely manner with the change of scenarios, resulting in insufficient accuracy and robustness of the intelligent connected vehicle CAN bus data anomaly detection. Summary of the Invention

[0005] The main purpose of this application is to propose a method for generating a data anomaly detection model, a detection method, a device, and a device, aiming to improve the accuracy and robustness of intelligent connected vehicle data anomaly detection.

[0006] In a first aspect, the present invention provides a method for generating a data anomaly detection model, including: Collect and obtain a training data set, where the training data set includes driving data, environmental information, corresponding time information, and anomaly detection results of a target vehicle model under different working conditions; Use the training data set to train a preset network model to obtain a data anomaly detection model, where the preset network model includes multiple layers, and the multiple layers include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer. The environmental factor fusion layer is used to fuse the environmental information with the driving data under different working conditions and the corresponding anomaly detection results. The data anomaly detection model is used to detect whether there is an anomaly in the target vehicle model.

[0007] In an alternative embodiment, training the preset network model using the training data set to obtain a data anomaly detection model includes: Inputting the training data set into the preset network model; Based on the vector transformation layer, converting the driving data corresponding to different working conditions into a multi-dimensional vector matrix; Based on the encoder layer and the multi-dimensional vector matrix, generating a vector sequence; Based on the environmental factor fusion layer, fusing the vector sequence and the environmental information to generate a fusion matrix; Based on the multi-branch output layer, using the fusion matrix and the corresponding anomaly detection results to perform anomaly check training to obtain a data anomaly detection model.

[0008] In an alternative embodiment, the converting the driving data corresponding to different working conditions into a multi-dimensional vector matrix based on the vector transformation layer includes: Based on the vector transformation layer, generating a numerical sequence of the driving data and a position encoding corresponding to each driving data according to the time information corresponding to each driving data; Determining the length of the sliding window according to a preset duration and determining the embedding dimension at each time point; Generating the multi-dimensional vector matrix according to the numerical sequence of the driving data, the preset duration, and the embedding dimension.

[0009] In an alternative embodiment, the fusing the vector sequence and the environmental information based on the environmental factor fusion layer to generate a fusion matrix includes: Based on the environmental factor fusion layer, associating the environmental information corresponding to the vector sequence according to the time information; Using a preset algorithm in the environmental factor fusion layer to learn and train to fuse the vector sequence and the environmental information to generate a fusion matrix with time series.

[0010] In an alternative embodiment, the collecting and obtaining the training data set includes: During the operation of the target vehicle model in different working conditions respectively, collecting the driving data and environmental information of the target vehicle model under each working condition, and respectively performing anomaly detection on the driving data under each working condition according to a preset static detection rule to obtain the anomaly detection results corresponding to the driving data under each working condition; Respectively storing the driving data, the environmental information, and the anomaly detection results corresponding to the driving data under each working condition in a preset storage structure to obtain multiple training data sets of the target vehicle model under different working conditions.

[0011] In an alternative embodiment, the anomaly detection result includes: a detection dimension, an anomaly flag, and an anomaly score. After performing anomaly detection on the driving data under each working condition according to the preset static detection rules respectively to obtain the corresponding anomaly detection results of the driving data under each working condition, the method further includes: Storing the anomaly detection results according to a preset detection result structure; Calculating and obtaining a comprehensive anomaly score corresponding to the anomaly detection result according to the detection dimension, the anomaly flag, the anomaly score, and a preset comprehensive anomaly score algorithm; Obtaining the anomaly classification corresponding to the driving data according to the comprehensive anomaly score and a preset anomaly classification rule.

[0012] In an alternative embodiment, storing the driving data, the environmental information, and the corresponding anomaly detection results of the driving data under each working condition according to a preset storage structure to obtain multiple training data sets of the target vehicle model under different working conditions includes: Respectively storing the driving data, the environmental information, and the corresponding anomaly classification under each working condition according to a preset storage structure to obtain multiple training data sets of the target vehicle model under different working conditions.

[0013] In a second aspect, the present invention provides a data anomaly detection method, including: Collecting and obtaining the driving data and environmental information of a target vehicle model at the current moment; Using the data anomaly detection model trained by the method according to any one of the foregoing embodiments, and obtaining a data anomaly detection result based on the driving data and the environmental information.

[0014] In a third aspect, the present invention provides a data anomaly detection model generation device, including: A first collection module, configured to collect and obtain a training data set, where the training data set includes the driving data, environmental information, corresponding time information, and anomaly detection results of a target vehicle model under different working conditions; A training module, configured to train a preset network model using the training data set to obtain a data anomaly detection model, where the preset network model includes multiple levels, and the multiple levels include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer, where the environmental factor fusion layer is configured to fuse the environmental information with the driving data and the corresponding anomaly detection results under different working conditions, and the data anomaly detection model is used to detect whether there is an anomaly in the target vehicle model.

[0015] In a fourth aspect, the present invention provides a data anomaly detection device, including: The second acquisition module is configured to acquire the driving data and environmental information of the target vehicle model at the current moment; The detection module is configured to use the data anomaly detection model obtained by training with the method described in any of the foregoing embodiments, and based on the driving data and the environmental information, obtain a data anomaly detection result.

[0016] In a fifth aspect, the present application provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. The processor communicates with the storage medium through the bus. The processor executes the machine-readable instructions to execute the method described in any of the foregoing embodiments.

[0017] In a sixth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the method described in any of the foregoing embodiments.

[0018] The beneficial effects of the present application are as follows: The method for generating a data anomaly detection model provided by the embodiments of the present application includes: acquiring a training data set, where the training data set includes the driving data, environmental information, corresponding time information, and anomaly detection results of the target vehicle model under different working conditions; training a preset network model with the training data set to obtain a data anomaly detection model, where the preset network model includes multiple levels, and the multiple levels include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer. The environmental factor fusion layer is configured to fuse the environmental information with the driving data under different working conditions and the corresponding anomaly detection results. The data anomaly detection model is used to detect whether there is an anomaly in the target vehicle model. This method trains a preset network model including multiple levels such as an environmental factor fusion layer with a training data set including the driving data, environmental information, corresponding time information, and anomaly detection results of the target vehicle model under different working conditions to obtain a data anomaly detection model, realizing the use of this data anomaly detection model to detect data anomalies during the driving process of the target vehicle model. Moreover, this data anomaly detection model can dynamically adjust the detection standard (such as an anomaly detection threshold) in combination with environmental information. This detection standard can be more adaptable to the current environment and working conditions of the target vehicle compared to the traditional fixed threshold standard, thereby reducing the possibility of false alarms in the data anomaly detection during the driving process of the target vehicle model, making the detection standard more reasonable, and further improving the accuracy and robustness of data anomaly detection for intelligent connected vehicles. Description of the Drawings

[0019] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the structures shown in these drawings.

[0020] Figure 1 Schematic flow chart of the method for generating a data anomaly detection model provided by an embodiment of the present application; Figure 2 Schematic flow chart of the method for generating a data anomaly detection model provided by another embodiment of the present application; Figure 3 Schematic flow chart of the method for generating a data anomaly detection model provided by yet another embodiment of the present application; Figure 4 Schematic flow chart of a data anomaly detection method provided by an embodiment of the present application; Figure 5 Schematic structural diagram of a device for generating a data anomaly detection model provided by an embodiment of the present application; Figure 6 Schematic structural diagram of a data anomaly detection device provided by an embodiment of the present application; Figure 7 Schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Usually, the components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations.

[0022] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but merely represents the selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.

[0023] It should be noted that like reference numerals and letters denote like items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. The terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus. Without further limitation, an element defined by the statement "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.

[0024] The following will describe in detail some embodiments of the present application with reference to the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments may be combined with each other.

[0025] In the current intelligent connected vehicle data anomaly detection solutions, such as the data anomaly detection of the CAN bus, fixed anomaly detection rules or anomaly detection thresholds for various driving data are usually preset in the intelligent connected vehicle. However, since multiple driving data acquisition methods, multiple sensor models, and multiple data transmission formats may be used simultaneously in an intelligent connected vehicle, the above-mentioned anomaly detection rules or anomaly detection thresholds also need to be set separately for each driving data acquisition method, each sensor model, and each data transmission format. Therefore, the setting work of the anomaly detection rules or anomaly detection thresholds in the intelligent connected vehicle is relatively complex. Moreover, even if comprehensive anomaly detection rules or anomaly detection thresholds are set, due to the fluctuations in the driving data of the vehicle under different working conditions, the same driving data may lead to different anomaly detection conclusions under different working conditions. The fixed anomaly detection rules or anomaly detection thresholds cannot meet the need for adaptive anomaly detection of the driving data of the target vehicle under different working conditions, resulting in insufficient accuracy and robustness in the data anomaly detection of the CAN bus of the intelligent connected vehicle. Against this background, the main purpose of the present application is to propose a method for training a data anomaly detection model, which aims to improve the accuracy and robustness of the data anomaly detection of the CAN bus of the intelligent connected vehicle.

[0026] Figure 1 It is a schematic flowchart of a method for generating a data anomaly detection model provided in an embodiment of the present application. The execution subject of this method may be, for example, a device with computing and processing capabilities such as a computer, but is not limited thereto. As Figure 1 shown, this method may include: S101. Collect and obtain a training data set, where the above training data set includes the driving data, environmental information, corresponding time information, and anomaly detection results of the target vehicle model under different working conditions.

[0027] Among them, the training data set includes data collected during the operation of the target vehicle model under different working conditions. For example, it can refer to data collected through methods including but not limited to direct reading and sensor monitoring. These collected data can be uploaded to the cloud server of the target vehicle model to achieve model training, fault diagnosis, driving behavior analysis, etc. related to the target vehicle model. Taking the data collected during the operation of the target vehicle model under different working conditions and uploaded to the cloud server through the CAN bus as an example, the above-mentioned training data set obtained by collection can be, for example, the training data set obtained by collecting CAN frame data in the CAN bus.

[0028] Exemplarily, the above-mentioned training data set can be managed using a Parquet (wooden floor) structure. Further, it can also achieve efficient indexing according to time, signal number, working condition classification, etc. Of course, the above-mentioned training data set can also be of other structures and be indexed according to other contents, and is not limited to the Parquet structure and indexing according to time, signal number, working condition classification, etc.

[0029] The above-mentioned training data set can be expressed in the following form, for example:

[0030] Exemplarily, the above That is, it can be, for example, the above-mentioned training data set, among which, For example, it can be the number of the above-mentioned training data set. This training data set For example, it can correspond to the driving data, environmental information, corresponding time information, and abnormal detection results of a certain target vehicle model under a certain working condition. That is, if the driving data, environmental information, corresponding time information, and abnormal detection results of a certain target vehicle model are collected for 3 working conditions respectively, then three training data sets corresponding to the above 3 working conditions can be obtained respectively , , , and of course, the above content is only a possible example, and the actual types of working conditions, naming of training data sets, etc. can all be different from the above example content.

[0031] The above For example, it can be multiple values of the above-mentioned driving data at a certain moment t. That is, the above t is the time information corresponding to the driving data. The above represents the first type of driving data value of the target vehicle at moment t under a certain working condition. And so on, the above n is the number of types of driving data of the target vehicle. For example, a certain target vehicle has 3 types of driving data, namely battery temperature, tire pressure, and remaining power. Then at moment t, the above For example, it can be (67°C, 2.4 bar, 73%). Of course, the above content is only a possible example. The actual types and representation forms of driving data are not limited to the above content. It can be understood that the driving data of a certain target vehicle under a certain working condition can be collected periodically. Therefore, the numerical values of the driving data in it can also correspond to multiple different moments, that is, the time information represented by t can be non-unique. Or the time information represented by t is unique, and the numerical values of the driving data collected at different moments when the same target vehicle is driving under the same working condition form multiple different training data sets. Specifically, it is not limited to this.

[0032] The above For example, it can be the anomaly detection result of the above driving data numerical value. This anomaly detection result can be marked, for example, after being judged based on a preset rule. This anomaly detection result can be "anomaly", "not an anomaly", or it can also be an integer, such as 0 - 5, representing the anomaly level or degree of anomaly. For example, 0 represents no anomaly at all, and 5 represents the most serious anomaly. Of course, the specific representation form of the anomaly detection result can also be other forms, which are not limited here.

[0033] The above For example, it can be the above environmental information. This environmental information can specifically include meta-information such as vehicle speed, vehicle load, geographical location, and weather, but it is not limited to this. It can be understood that this environmental information can be the average value during the driving process of the target vehicle under a certain working condition, or it can be similar to the above driving data numerical value, and the environmental information corresponding to multiple moments during the driving process recorded according to the collection period. Specifically, it is not limited here.

[0034] Of course, the representation form of the above training data set is only a possible example. The actual representation method of the training data set can be different from the content of the above example, and it can include the driving data, environmental information, corresponding time information, and anomaly detection results of the above target vehicle under different working conditions.

[0035] S102. Use the above training data set to train a preset network model to obtain a data anomaly detection model.

[0036] Among them, the above preset network model includes multiple layers, and the multiple layers include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer.

[0037] It should be noted that the above environmental factor fusion layer is used to fuse the above environmental information with the driving data under different working conditions and the corresponding anomaly detection results. The above data anomaly detection model is used to detect whether there is an anomaly in the target vehicle.

[0038] Exemplarily, the above-mentioned pre-trained preset network model, i.e., the above-mentioned data anomaly detection model, can, for example, process the input driving data and environmental information of the target vehicle at the current moment through the above-mentioned vector conversion layer, encoder layer, and environmental factor fusion layer, and finally output, through the above-mentioned multi-branch output layer, the result of the data anomaly detection of the driving data of the target vehicle at the current moment, as well as the anomaly detection threshold for the data anomaly detection of the driving data of the target vehicle at the next moment. Among them, the result of the data anomaly detection of the driving data of the target vehicle at a certain moment can, for example, be "anomaly", "not anomalous", or an integer such as 0 - 5, representing the anomaly level or degree of anomaly. For example, 0 represents completely non-anomalous, and 5 represents the most severe anomaly. Of course, the specific representation form of the result of the data anomaly detection of the driving data of the target vehicle at a certain moment can also be other forms, which are not limited here.

[0039] The anomaly detection threshold output by the above-mentioned multi-branch output layer for the data anomaly detection of the driving data of the target vehicle at the next moment can, for example, be achieved by the above-mentioned data anomaly detection model according to the following principle:

[0040] Exemplarily, the above For example, it can be the anomaly detection threshold output by the above-mentioned multi-branch output layer for the data anomaly detection of the driving data of the target vehicle at the next moment. The above For example, it can be the anomaly detection threshold of the above-mentioned data anomaly detection model for the driving data of the target vehicle at the current moment. If the current moment is the moment of the first collection, then the above Can be a preset base value. The above For example, it can be the environmental information closely related to the above-mentioned anomaly detection threshold, that is, the influencing factor closely related to the above-mentioned anomaly detection threshold. The above For example, it can be the sensitivity parameter corresponding to the above-mentioned environmental information. The above For example, it can be an offset, which can be preset according to the actual situation.

[0041] Taking the above As the anomaly detection threshold of the battery temperature, and the environmental information closely related to the battery temperature includes: vehicle speed, environmental temperature, and charging power as an example, then the above For example, it can be expressed as Among them, Is the vehicle speed, Is the environmental temperature, Is the charging power. Correspondingly, the above For example, it can be expressed as That is, the above vehicle speed The corresponding sensitivity parameter is 0.05, and the above ambient temperature The corresponding sensitivity parameter is 0.1, and the sensitivity parameter corresponding to the above charging power is 0.3. It can be understood that the above content only takes three environmental information closely related to the battery temperature, including vehicle speed, ambient temperature, and charging power, as examples. The actual abnormal detection threshold is not limited to the abnormal detection threshold of the battery temperature, and the actual influencing factors closely related to the above abnormal detection threshold are not limited to the three environmental information of vehicle speed, ambient temperature, and charging power either.

[0042] In addition, the above example content is only a possible principle of the abnormal detection threshold for the data abnormal detection model output by the above multi-branch output layer for the driving data of the target vehicle at the next moment. The actual principle on which the abnormal detection threshold of the data abnormal detection model output by the above multi-branch output layer for the driving data of the target vehicle at the next moment is based can be different from the principle in the above example.

[0043] The method for generating a data abnormal detection model provided by an embodiment of the present application includes: collecting and obtaining a training data set, where the training data set includes driving data, environmental information, corresponding time information, and abnormal detection results of a target vehicle under different working conditions; training a preset network model using the training data set to obtain a data abnormal detection model, where the preset network model includes multiple levels, and the multiple levels include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer, where the environmental factor fusion layer is used to fuse the environmental information with the driving data under different working conditions and the corresponding abnormal detection results, and the data abnormal detection model is used to detect whether there is an abnormality in the target vehicle. This method trains a preset network model including multiple levels such as an environmental factor fusion layer using a training data set including driving data, environmental information, corresponding time information, and abnormal detection results of a target vehicle under different working conditions to obtain a data abnormal detection model, realizing the use of this data abnormal detection model to perform data abnormal detection during the driving process of the target vehicle, and this data abnormal detection model can dynamically adjust the detection standard (such as an abnormal detection threshold) in combination with environmental information. This detection standard can be more adaptable to the current environment and working conditions of the target vehicle compared to the traditional fixed threshold standard, so that the possibility of false alarms in the data abnormal detection during the driving process of the target vehicle is lower, the detection standard is more reasonable, and thus the accuracy and robustness of the data abnormal detection of intelligent connected vehicles are improved.

[0044] Figure 2 For the schematic flow chart of the method for generating a data abnormal detection model provided by another embodiment of the present application, refer to Figure 2 ., optionally, in the above Figure 1Based on the embodiments, training the preset network model using the above training dataset to obtain a data anomaly detection model may include: S201. Input the above training dataset into the above preset network model.

[0045] Exemplarily, inputting the above training dataset into the above preset network model may, for example, refer to inputting the driving data and environmental information in the above training dataset as input data into the above preset network model. The above training dataset may, for example, refer to multiple training datasets corresponding to the target vehicle model under different working conditions. Among them, the preset network model may, for example, be a multi-level dynamic threshold prediction network, and the multi-level dynamic threshold prediction network may, for example, be constructed by combining the Transformer (converter) time series architecture, but is not limited thereto.

[0046] S202. Based on the above vector conversion layer, convert the driving data corresponding to the above different working conditions into a multi-dimensional vector matrix.

[0047] Exemplarily, converting the driving data corresponding to the above different working conditions into a multi-dimensional vector matrix may, for example, be for facilitating the above preset network model to understand and analyze the above driving data, etc., but is not limited thereto.

[0048] S203. Based on the above encoder layer and the above multi-dimensional vector matrix, generate a vector sequence.

[0049] Exemplarily, generating a vector sequence based on the above encoder layer and the above multi-dimensional vector matrix may, for example, be for analyzing the influence relationship between the driving data in the above multi-dimensional vector matrix, etc., so as to extract deeper features, but is not limited thereto.

[0050] S204. Based on the above environmental factor fusion layer, fuse the above vector sequence and the above environmental information to generate a fusion matrix.

[0051] Exemplarily, based on the above environmental factor fusion layer, fusing the above vector sequence and the above environmental information to generate a fusion matrix may, for example, be for establishing a relationship between the data in the above vector sequence and the environmental information, so that the trained preset network model, that is, the data anomaly detection model, can comprehensively consider the environmental information and more reasonably perform anomaly detection on the driving data of the target vehicle. However, the specific role of the environmental factor fusion layer can be determined according to the actual situation and is not limited to the above role.

[0052] S205. Based on the above multi-branch output layer, use the above fusion matrix and the corresponding anomaly detection results to perform anomaly check training to obtain a data anomaly detection model.

[0053] Exemplarily, based on the above multi-branch output layer, using the above fusion matrix and the corresponding anomaly detection results, anomaly check training is performed to obtain a data anomaly detection model. For example, it may be to guide the model to establish a judgment logic such as "in the environment corresponding to a certain environmental information, whether the corresponding driving data should be judged as abnormal, or what the abnormal level of the corresponding driving data should be judged as".

[0054] Further, on the basis of the Figure 2 embodiment, based on the above vector conversion layer, the driving data corresponding to different working conditions is converted into a multi-dimensional vector matrix. For example, it may include: Based on the above vector conversion layer, according to the time information corresponding to each of the above driving data, a numerical sequence of the driving data and a position encoding corresponding to each driving data are generated.

[0055] The length of the sliding window is determined according to a preset duration, and the embedding dimension of each time point is determined.

[0056] According to the numerical sequence of the above driving data, the above preset duration, and the above embedding dimension, the above multi-dimensional vector matrix is generated.

[0057] Exemplarily, the content of the above embodiment of the present invention may be represented by the following formula:

[0058] Among them, the above is the above multi-dimensional vector matrix, and the above may represent the above sliding window, which may perform a one-dimensional convolution operation, which may be used to extract the change pattern of the above driving data in time, and then determine the embedding dimension of each time point , the above represents the specific time length of the time information corresponding to the above driving data. For example, assuming that the acquisition frequency of the above driving data is 3 seconds / time and a total of 3 cycles of driving data are acquired, then the above T = 3s × 3 cycles = 9 seconds. The above may represent from moment to moment of the driving data , that is, the numerical sequence of the driving data generated according to the time information corresponding to each of the above driving data. The above is the driving data from moment to moment corresponding position encoding, that is, the position encoding corresponding to each driving data, which is used to enable the model to understand the time sequence order between the driving data in the above .

[0059] On this basis, for example, there can be , that is, the above-mentioned multi-dimensional vector matrix For example, it can be a real number matrix with a shape of T×d.

[0060] Of course, the above content is only a possible example, and the actual generation method of the multi-dimensional vector matrix may be different from the content of the above example, and is not limited to the content of the above example.

[0061] Furthermore, continuing with the example based on the above content, the generation of the vector sequence based on the above encoder layer and the above multi-dimensional vector matrix can be represented by the following formula, for example:

[0062] Exemplarily, the above For example, it can represent the above vector sequence, the above For example, it can represent the input value input into this encoder layer, that is, the above For example, it can represent that the above multi-dimensional vector matrix is used as the input value and input into this encoder layer, the above , for example, it can refer to a Feed-Forward Network, a feed-forward neural network, which can specifically represent a small fully connected network independent at each position and can be used to implement non-linear feature transformation, the above , for example, it can refer to a Multi-Head Self-Attention, a multi-head self-attention mechanism, which is used to help the model parallelly distinguish the importance of different training data sets, the above For example, it can refer to the above vector sequence is generated based on the vector sequence of the previous layer input into the above .

[0063] On this basis, for example, there can be , and then the following vector sequence is obtained:

[0064] Among them, the above For example, it can represent a vector with an embedding dimension d at each time point.

[0065] In addition, on the basis of the above Figure 2 embodiment, the above-mentioned environment factor fusion layer fuses the above vector sequence and the above environment information to generate a fusion matrix, which can include, for example: Based on the above environment factor fusion layer, the environment information corresponding to the above vector sequence is associated according to the time information.

[0066] Using the preset algorithm in the above environmental factor fusion layer, learn and train to fuse the above vector sequence and the above environmental information to generate a fusion matrix with time series.

[0067] Exemplarily, the preset algorithm in the above environmental factor fusion layer can be expressed as the following formula:

[0068] Among them, the above can be, for example, the environmental information corresponding to the above vector sequence, and the above can refer to, for example, copy times to ensure that each time point in the time information can obtain the same environmental information, that is, the above-mentioned environmental information corresponding to the vector sequence is associated according to the time information. The above can refer to, for example, a column-wise concatenation function, that is, concatenating the above and the above to form a matrix, where c is the number of environmental information corresponding to the above vector sequence associated according to the time information, that is, the number of rows of the above matrix , and each row represents the environmental information corresponding to a time point. The above is a preset fusion weight matrix, and the above can have, for example, , is the embedding dimension of each time point after fusion, and finally, there can be . This fusion matrix with time series can include, for example, the association relationship between driving data and environmental information at time points.

[0069] Of course, the preset algorithm in the actual environmental factor fusion layer can also be different from the formula in the above example, as long as it can train to fuse the above vector sequence and the above environmental information to generate a fusion matrix with time series, and specific limitations are not made here.

[0070] Finally, continue to give an example based on the above example. After generating the fusion matrix with time series, this fusion matrix with time series can, for example, continue to be used as input data and input into the above multi-branch output layer. The above multi-branch output layer can include at least two branches. Taking the case where the above multi-branch output layer includes two branches as an example, the two branches can be, for example, an anomaly judgment branch and a threshold prediction branch.

[0071] Among them, the above anomaly judgment branch can be expressed by the following formula:

[0072] Exemplarily, the above That is, for example, it can represent the above abnormal judgment branch, the above For example, it can represent a time-dimensional average pooling function, and the above fusion matrix with time series is input into this time-dimensional average pooling function as an input value, and this time-dimensional average pooling function can obtain an overall dimensional vector, representing "feature summary" under the time length, Specifically, for example, it can be expressed as:

[0073] The above and For example, they can respectively represent the weight vector and bias term under the time length, For example, it can be used to represent the abnormal sensitivity of each pooling vector, For example, it can be a parameter of an adjustable nature, and specifically can be a preset value determined by means such as experiments. These two parameters can jointly form a linear classifier, and the output result can be, for example, , used to represent the abnormal situation of the above pooling vector in the form of a continuous value. This For example, it can be expressed as:

[0074] Among them, the above For example, it can represent the output result of the above , that is, the already pooled vector.

[0075] The above For example, it can be a Sigmoid (S-shaped) function. This Sigmoid function can be used to take the above as an input value and output a value between 0 and 1. This value between 0 and 1 can be expressed as:

[0076] Among them, the above That is, for example, it can be the value between 0 and 1 output by the above Sigmoid function. The above is a preset parameter in the function. The value between 0 and 1 output by the above Sigmoid function can be used to represent the abnormal degree of the above fusion matrix with time series corresponding to the driving data. The closer the value between 0 and 1 output by this Sigmoid function is to 1, the more abnormal the driving data corresponding to the above fusion matrix with time series can be represented. On the contrary, the closer the value between 0 and 1 output by the above Sigmoid function is to 0, the more the above fusion matrix with time series can be represented corresponding driving data is less abnormal. The corresponding driving data is more normal.

[0077] The above threshold prediction branch can be expressed, for example, by the following formula:

[0078] Exemplarily, the above can represent, for example, the anomaly detection threshold output by the threshold prediction branch, where and can respectively represent the lower and upper limits of the next value of signal i. The above data anomaly detection model can, for example, perform anomaly detection on the next signal i based on the lower and upper limits of the next value of this signal i. If the next signal i is within the above , it can indicate that the next signal i is normal. The greater the difference between the next signal i and this anomaly detection threshold, the more abnormal the next signal i can be indicated.

[0079] The above can be, for example, the time-sequence-containing fusion vector of signal i at the current moment. The time-sequence-containing fusion vector of signal i at the current moment can be derived from the above time-sequence-containing fusion matrix , that is:

[0080] Among them, the above represents the last time point within the above . The above and the above are similar to the above and and can respectively represent, for example, the weight vector and bias term within the time length of T. Their principles and functions will not be elaborated here.

[0081] It can be understood that the above example content regarding the vector conversion layer, encoder layer, environmental factor fusion layer, and multi-branch output layer is only one possible situation of each of the above vector conversion layer, encoder layer, environmental factor fusion layer, and multi-branch output layer, and does not mean that the above vector conversion layer, encoder layer, environmental factor fusion layer, and multi-branch output layer can only be set according to the formulas and content in the above examples.

[0082] Optionally, on the basis of the above embodiment content, after training the above preset network model to obtain a data anomaly detection model, the obtained data anomaly detection model can also be evaluated. Exemplarily, evaluating the performance of the obtained data anomaly detection model can, for example, use the anomaly detection results in the above training dataset Take it out as independent verification data, and then take out the driving data in the above training dataset , and the environmental information . Take them as independent test data and input them into the above-obtained data anomaly detection model. Compare the output result of the data anomaly detection model with the above verification data, that is, the above driving data and the above anomaly detection result obtained by judging based on the preset rules . Calculate the loss value of the output result of the data anomaly detection model to evaluate the performance of the data anomaly detection model

[0083] . For example, take the output result of the above data anomaly detection model as the value between 0 and 1 output by the Sigmoid function in the above anomaly judgment branch and the anomaly detection threshold output by the above threshold prediction branch . Then, calculate the loss value of the output result of the data anomaly detection model to evaluate the performance of the model. Specifically, for example, it can include calculating the anomaly judgment loss and the threshold regression loss in the output result of the data anomaly detection model respectively

[0084] . Among them, the above anomaly judgment loss can be realized by the following formula, for example

[0085] Exemplarily, the above can represent the above anomaly judgment loss, and the above can refer to the above verification data, that is, the anomaly detection result in the above training dataset .

[0086] And the above threshold regression loss can be realized by the following formula, for example

[0087] Exemplarily, the above can represent the above threshold regression loss, and the above can be the ReLU (Rectified Linear Unit) function, which is used to perform penalty calculation on the anomaly detection threshold output by the threshold prediction branch that does not include the true value of the driving data (that is, the anomaly detection threshold output by the threshold prediction branch is the interval where the model thinks the normal driving data should be. If this interval does not include the corresponding true value of the driving data , it proves that the interval is not reasonably delimited, and a penalty needs to be imposed to correct the model).

[0088] After calculating the above anomaly judgment loss and threshold regression loss, for example, the total loss of the output result of the data anomaly detection model in this time can be calculated through the following weighted calculation method

[0089] Among them, the above can be the total loss of the output result of the above-mentioned current data anomaly detection model, and the above and are weights, which can be freely adjusted and determined according to the actual situation and are not limited here.

[0090] Calculate the total loss of the output result of the above-mentioned current data anomaly detection model After that, it can be compared with the preset qualified total loss value. If the total loss of the output result of the above-mentioned current data anomaly detection model ≤ the above-mentioned preset qualified total loss value, it can indicate that the output error of the above-mentioned data anomaly detection model meets the requirements and the performance is qualified. If the total loss of the output result of the above-mentioned current data anomaly detection model > the above-mentioned preset qualified total loss value, it can indicate that the output error of the above-mentioned data anomaly detection model is on the high side and the performance is unqualified. At this time, the model can be optimized by strengthening training or by selecting an optimizer, etc., until the total loss of the output result of a certain data anomaly detection model ≤ the above-mentioned preset qualified total loss value.

[0091] Of course, the above method for evaluating the performance of the data anomaly detection model and the method for optimizing the data anomaly detection model are both possible examples. In fact, the performance of the data anomaly detection model can also be evaluated and the data anomaly detection model can be optimized by other methods, and it is not limited to the above-mentioned example content.

[0092] In addition, on the basis of the above Figure 1 embodiment, the above acquisition of the training data set can include, for example: During the operation of the target vehicle in different working conditions, collect the driving data and environmental information of the target vehicle under each working condition, and perform anomaly detection on the driving data under each working condition according to the preset static detection rules, and respectively obtain the anomaly detection results corresponding to the driving data under each working condition.

[0093] Respectively store the driving data, the above environmental information, and the above anomaly detection results corresponding to the driving data under each working condition according to the preset storage structure to obtain multiple training data sets of the target vehicle under different working conditions.

[0094] Similar to the content in the above Figure 1 embodiment, the above training data set can refer to the above Figure 1 in the embodiment, and this training data set For example, it can correspond to the driving data, environmental information, corresponding time information, and anomaly detection results of a certain target vehicle under a certain working condition. That is, if the driving data, environmental information, corresponding time information, and anomaly detection results of the target vehicle are collected for 3 working conditions of a certain target vehicle, then for example, three training data sets corresponding to the above 3 working conditions can be obtained respectively. , , , of course, the above content is only a possible example, and the actual types of working conditions, naming of training data sets, etc. can all be different from the above example content.

[0095] Figure 3 It is a schematic flowchart of the method for generating a data anomaly detection model provided by another embodiment of the present application. As Figure 3 shown, optionally, on the basis of the foregoing embodiment, the above anomaly detection results may include: detection dimension, anomaly flag, anomaly score. After performing anomaly detection on the above driving data under each working condition respectively according to the preset static detection rules, and obtaining the anomaly detection results corresponding to the driving data under each working condition respectively, the above method may further include: S301. Store the above anomaly detection results according to the preset detection result structure.

[0096] Exemplarily, the above preset detection result structure may, for example, refer to the following structure:

[0097] Among them, the above may be, for example, the detection dimension, may be, for example, the flag of whether there is an anomaly, may be, for example, the anomaly score. The above may be, for example, a preset set, and this set may, for example, contain all supported detection types, which are configured by the cloud for different vehicle models. The above may represent the anomaly score under the current detection dimension. The anomaly score may, for example, be a real number between 0 and 1, used to represent the severity of the anomaly, and can be calculated by different detection methods. Each type of inspection method is configured and sent down by the cloud. For example indicates that the current driving data is normal, indicates that the current driving data is slightly abnormal, indicates that the current driving data is severely abnormal, but not limited thereto.

[0098] S302. Calculate and obtain the comprehensive anomaly score corresponding to the above anomaly detection results according to the above detection dimension, the above anomaly flag, the above anomaly score, and the preset comprehensive anomaly score algorithm.

[0099] Exemplarily, the above calculation obtains a comprehensive anomaly score corresponding to the above anomaly detection result. For example, it can be obtained through the following formula:

[0100] Wherein, the above That is, for example, it can be the comprehensive anomaly score corresponding to the above anomaly detection result at time t. The above For example, it can be the weight of dimension indicating the sensitivity of different dimensions to anomalies. It should be noted that the above only takes effect when . If , then there can be:

[0101] S303. According to the above comprehensive anomaly score and the preset anomaly classification rule, obtain the anomaly classification corresponding to the above driving data.

[0102] Exemplarily, the above obtaining the anomaly classification corresponding to the above driving data according to the above comprehensive anomaly score and the preset anomaly classification rule can be implemented according to the following rules:

[0103] Wherein, the above That is, for example, it can represent the anomaly classification corresponding to the above driving data at time t. The above , , For example, it can be an anomaly classification boundary, which can be a preset value and is not specifically limited here.

[0104] Further, on the basis of the Figure 3 embodiment, respectively storing the above driving data, the above environmental information, and the above anomaly detection result corresponding to the above driving data in a preset storage structure under each working condition to obtain multiple training data sets of the above target vehicle model under different working conditions may include: Respectively storing the above driving data, the above environmental information, and the anomaly classification corresponding to the above driving data in a preset storage structure under each working condition to obtain multiple training data sets of the above target vehicle model under different working conditions.

[0105] Exemplarily, the above preset storage structure can be, for example, Figure 1 the Parquet structure described in the Figure 1 embodiment, etc. For the specific method of obtaining multiple training data sets of the above target vehicle model under different working conditions, reference can be made to the content in the

[0106] Figure 4Schematic diagram of a method for detecting data anomalies provided by an embodiment of the present application. This method can be applied to the data anomaly detection model trained by the method for generating a data anomaly detection model in the above embodiment. Please refer to Figure 4 , the method may include: S401. Collect and obtain the driving data and environmental information of the target vehicle model at the current moment.

[0107] Exemplarily, the forms and contents of the above driving data and environmental information can be understood with reference to the contents in the above Figure 1 embodiment, but may be the same as or different from the contents in the above Figure 1 embodiment.

[0108] S402. Use the data anomaly detection model trained by the method described in any of the foregoing embodiments, and based on the above driving data and the above environmental information, obtain the data anomaly detection result.

[0109] The above obtaining the data anomaly detection result based on the above driving data and the above environmental information may, for example, refer to obtaining the anomaly judgment result made by the above anomaly judgment branch for the driving data at the current moment, that is, the value of 0 to 1 in the above embodiment, and the anomaly detection threshold output by the above threshold prediction branch based on the driving data and environmental information at the current moment. The anomaly judgment branch of this data anomaly detection model can make an anomaly judgment on the driving data at the next moment based on this anomaly detection threshold.

[0110] Figure 5 Schematic diagram of the structure of a device for generating a data anomaly detection model provided by an embodiment of the present application. This device for generating a data anomaly detection model can execute the method for generating a data anomaly detection model described above. This device can be integrated into the above computer and other devices with computing and processing functions, such as Figure 5 shown, the device may include: The first acquisition module 510 is configured to collect and obtain a training data set, where the above training data set includes the driving data, environmental information, corresponding time information, and anomaly detection results of the target vehicle model under different working conditions.

[0111] The training module 520 is configured to train a preset network model using the above training data set to obtain a data anomaly detection model, where the above preset network model includes multiple levels, and the above multiple levels include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer. Among them, the above environmental factor fusion layer is used to fuse the above environmental information with the driving data under the above different working conditions and the corresponding anomaly detection results. The above data anomaly detection model is used to detect whether there is an anomaly in the target vehicle model.

[0112] The method for generating a data anomaly detection model provided by an embodiment of the present application includes: collecting and obtaining a training data set, where the training data set includes driving data, environmental information, corresponding time information, and anomaly detection results of a target vehicle model under different working conditions; using the training data set to train a preset network model to obtain a data anomaly detection model, where the preset network model includes multiple layers, and the multiple layers include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer, where the environmental factor fusion layer is used to fuse the environmental information with the driving data under different working conditions and the corresponding anomaly detection results, and the data anomaly detection model is used to detect whether there is an anomaly in the target vehicle model. This method trains a preset network model including multiple layers such as an environmental factor fusion layer with a training data set including driving data, environmental information, corresponding time information, and anomaly detection results of a target vehicle model under different working conditions to obtain a data anomaly detection model, realizing the use of this data anomaly detection model to detect data anomalies during the driving process of the target vehicle model, and this data anomaly detection model can dynamically adjust the detection standard (for example, it can be an anomaly detection threshold) in combination with environmental information. This detection standard can be more adaptable to the environment and working conditions of the target vehicle currently compared with the traditional fixed threshold standard, so that the possibility of false alarms in the data anomaly detection during the driving process of the target vehicle model is lower, the detection standard is more reasonable, and thus the accuracy and robustness of the data anomaly detection of intelligent connected vehicles are improved.

[0113] Optionally, the above training module 520 is specifically configured to input the above training data set into the above preset network model. Based on the above vector conversion layer, convert the driving data corresponding to the above different working conditions into a multi-dimensional vector matrix. Based on the above encoder layer and the above multi-dimensional vector matrix, generate a vector sequence. Based on the above environmental factor fusion layer, fuse the above vector sequence and the above environmental information to generate a fusion matrix. Based on the above multi-branch output layer, use the above fusion matrix and the corresponding anomaly detection results to perform anomaly check training to obtain a data anomaly detection model.

[0114] Optionally, the above training module 520 is specifically configured to, based on the above vector conversion layer, generate a numerical sequence of the driving data and a position encoding corresponding to each driving data according to the time information corresponding to each driving data. Determine the length of the sliding window according to a preset duration and determine the embedding dimension of each time point. Generate the above multi-dimensional vector matrix according to the numerical sequence of the driving data, the above preset duration, and the above embedding dimension.

[0115] Optionally, the above-mentioned training module 520 is specifically configured to associate the environmental information corresponding to the above-mentioned vector sequence according to the time information based on the above-mentioned environmental factor fusion layer. Using the preset algorithm in the above-mentioned environmental factor fusion layer, learn and train to fuse the above-mentioned vector sequence and the above-mentioned environmental information to generate a fused matrix with time series.

[0116] Optionally, the above-mentioned first acquisition module 510 is specifically configured to collect the driving data and environmental information of the above-mentioned target vehicle model during the operation of the target vehicle model in different working conditions respectively, and perform anomaly detection on the driving data in each working condition according to the preset static detection rules to obtain the anomaly detection results corresponding to the driving data in each working condition respectively. Store the driving data, the above-mentioned environmental information, and the above-mentioned anomaly detection results corresponding to the driving data in each working condition in a preset storage structure respectively to obtain multiple training data sets of the above-mentioned target vehicle model in different working conditions.

[0117] Optionally, the above-mentioned anomaly detection results include: detection dimension, anomaly flag, and anomaly score. The above-mentioned first acquisition module 510 can also be used to store the above-mentioned anomaly detection results in a preset detection result structure. According to the above-mentioned detection dimension, the above-mentioned anomaly flag, the above-mentioned anomaly score, and the preset comprehensive anomaly score algorithm, calculate and obtain the comprehensive anomaly score corresponding to the above-mentioned anomaly detection results. According to the above-mentioned comprehensive anomaly score and the preset anomaly classification rules, obtain the anomaly classification corresponding to the above-mentioned driving data.

[0118] Optionally, the above-mentioned first acquisition module 510 is specifically configured to store the driving data, the above-mentioned environmental information, and the anomaly classification corresponding to the driving data in each working condition in a preset storage structure respectively to obtain multiple training data sets of the above-mentioned target vehicle model in different working conditions.

[0119] The above-mentioned device is used to execute the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and will not be elaborated here.

[0120] Figure 6 The figure is a schematic structural diagram of a data anomaly detection device provided by an embodiment of the present application. The data anomaly detection device can execute the above-mentioned data anomaly detection method, and the device can be integrated into the above-mentioned computer and other devices with computing and processing functions, such as Figure 6 As shown, the device includes: A second acquisition module 610, configured to acquire the driving data and environmental information of the target vehicle model at the current moment.

[0121] A detection module 620, configured to use the data anomaly detection model trained by using the method described in any one of the foregoing embodiments to obtain a data anomaly detection result based on the above-mentioned driving data and the above-mentioned environmental information.

[0122] The above device is used to execute the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0123] Figure 7 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present application. The electronic device may be a device with computing and processing functions such as the above computer, such as Figure 7 As shown, the device 700 includes: A processor 710, a storage medium 720, and a bus 730. The processor 710 is communicatively connected to the storage medium 720 through the bus 730.

[0124] Among them, the storage medium 720 stores machine-readable instructions executable by the processor 710. When the electronic device runs, the processor 710 executes the above machine-readable instructions to execute the above method for generating a data anomaly detection model or a data anomaly detection method.

[0125] It should be understood that Figure 7 The structure shown is only a schematic structural diagram of the electronic device. The electronic device may further include more or fewer components than those shown in Figure 7 or have a different configuration from that shown in Figure 7 The components shown in can be implemented by hardware, software, or a combination thereof. Figure 7 The components shown in can be implemented by hardware, software, or a combination thereof.

[0126] An embodiment of the present application also provides a computer-readable storage medium. A computer program is stored in the computer-readable medium, and when the computer program is executed by a processor, it can implement the method for generating a data anomaly detection model or a data anomaly detection method described in the above method embodiment.

[0127] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has a storage space for program codes for executing any method steps in the above methods. These program codes can be read out from or written into one or more computer program products. The program codes can be compressed in a suitable form, for example.

[0128] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and a module, a program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0129] In addition, in each embodiment of the present application, the various functional modules can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.

[0130] If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in each embodiment of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0131] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the specification and drawings of the present application under the inventive concept of the present application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.

Claims

1. A method for generating a data anomaly detection model, characterized in that, Including: Collect and obtain a training data set, where the training data set includes driving data, environmental information, corresponding time information, and anomaly detection results of a target vehicle model under different working conditions; Use the training data set to train a preset network model to obtain a data anomaly detection model, where the preset network model includes multiple levels, and the multiple levels include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer. Among them, the environmental factor fusion layer is used to fuse the environmental information with the driving data under different working conditions and the corresponding anomaly detection results, and the data anomaly detection model is used to detect whether there is an anomaly in the target vehicle model.

2. The method according to claim 1, wherein The step of using the training data set to train a preset network model to obtain a data anomaly detection model includes: Input the training data set into the preset network model; Based on the vector conversion layer, convert the driving data corresponding to different working conditions into a multi-dimensional vector matrix; Based on the encoder layer and the multi-dimensional vector matrix, generate a vector sequence; Based on the environmental factor fusion layer, fuse the vector sequence and the environmental information to generate a fusion matrix; Based on the multi-branch output layer, use the fusion matrix and the corresponding anomaly detection results to perform anomaly inspection training to obtain a data anomaly detection model.

3. The method according to claim 2, wherein The step of based on the vector conversion layer, converting the driving data corresponding to different working conditions into a multi-dimensional vector matrix includes: Based on the vector conversion layer, generate a numerical sequence of the driving data and a position encoding corresponding to each driving data according to the time information corresponding to each driving data; Determine the length of the sliding window according to a preset time duration and determine the embedding dimension of each time point; Generate the multi-dimensional vector matrix according to the numerical sequence of the driving data, the preset time duration, and the embedding dimension.

4. The method according to claim 2, characterized in that, The step of based on the environmental factor fusion layer, fusing the vector sequence and the environmental information to generate a fusion matrix includes: Based on the environmental factor fusion layer, associate the environmental information corresponding to the vector sequence according to the time information; Use a preset algorithm in the environmental factor fusion layer to learn and train to fuse the vector sequence and the environmental information to generate a fusion matrix with time series.

5. The method according to claim 1, wherein The step of collecting and obtaining a training data set includes: During the operation of the target vehicle model in different working conditions, respectively collect the driving data and environmental information of the target vehicle model under each working condition, and perform anomaly detection on the driving data under each working condition according to a preset static detection rule to respectively obtain the anomaly detection results corresponding to the driving data under each working condition; Respectively store the driving data, the environmental information, and the anomaly detection results corresponding to the driving data under each working condition in a preset storage structure to obtain multiple training data sets of the target vehicle model under different working conditions.

6. The method according to claim 5, wherein The anomaly detection results include: detection dimension, anomaly flag, and anomaly score. After performing anomaly detection on the driving data under each working condition according to a preset static detection rule to respectively obtain the anomaly detection results corresponding to the driving data under each working condition, the method further includes: Store the abnormal detection result according to a preset detection result structure; Calculate and obtain a comprehensive abnormal score corresponding to the abnormal detection result according to the detection dimension, the abnormal flag, the abnormal score, and a preset comprehensive abnormal score algorithm; Obtain the abnormal classification corresponding to the driving data according to the comprehensive abnormal score and a preset abnormal classification rule.

7. The method according to claim 6, wherein Respectively store the driving data, the environmental information, and the abnormal detection result corresponding to the driving data under each working condition according to a preset storage structure to obtain multiple training data sets of the target vehicle model under different working conditions, including: Respectively store the driving data, the environmental information, and the abnormal classification corresponding to the driving data under each working condition according to a preset storage structure to obtain multiple training data sets of the target vehicle model under different working conditions.

8. A method for detecting data anomalies, characterized in that, Including: Collect and obtain the driving data and environmental information of the target vehicle model at the current moment; Use the data abnormal detection model trained by the method according to any one of claims 1-7, and based on the driving data and the environmental information, obtain a data abnormal detection result.

9. A generating device for a data anomaly detection model, characterized in that, Including: A first acquisition module, configured to collect and obtain a training data set, where the training data set includes the driving data, environmental information, and corresponding time information and abnormal detection results of the target vehicle model under different working conditions; A training module, configured to train a preset network model using the training data set to obtain a data abnormal detection model, where the preset network model includes multiple levels, and the multiple levels include: a vector conversion layer, an encoder layer, an environmental factor fusion layer, and a multi-branch output layer, where the environmental factor fusion layer is configured to fuse the environmental information with the driving data and the corresponding abnormal detection results under different working conditions, and the data abnormal detection model is configured to detect whether there is an abnormality in the target vehicle model.

10. An electronic device, characterized in that, Including: A processor, a storage medium, and a bus, where the storage medium stores machine-readable instructions executable by the processor, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to execute the method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Abnormality detection method and device, computer equipment, storage medium and program product

    CN117150401A

  • Deep flyback ESD protection device and method thereof

    CN117559373A

  • Vehicle driving log anomaly detection model construction method and device

    CN118861954A

  • Transportation agent intelligent cargo tracking method, device and equipment and storage medium

    CN119398645A

  • Abnormality detection device

    JP2019200459A