Data anomaly detection model generation method, detection method, device and equipment

By training a data anomaly detection model containing a multi-level network model and dynamically adjusting the detection criteria based on environmental information, the problems of insufficient accuracy and robustness in data anomaly detection on the CAN bus of intelligent connected vehicles are solved, and more efficient data anomaly detection is achieved.

CN120387124BActive Publication Date: 2025-10-24ZHIZI AUTOMOTIVE TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

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

Method used

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

Benefits of technology

The accuracy and robustness of data anomaly detection in intelligent connected vehicles have been improved, the false alarm rate has been reduced, and the detection standards have been made more reasonably adapted to the vehicle's current environment and operating conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387124B_ABST
    Figure CN120387124B_ABST
Patent Text Reader

Abstract

The application discloses a data anomaly detection model generation method, a detection method, a device and equipment, and relates to the technical field of automobile detection. The data anomaly detection model generation method comprises: collecting a training data set, wherein the training data set comprises driving data, environment information and corresponding time information of a target vehicle model under different working conditions, and an anomaly detection result; training a preset network model by using the training data set to obtain a data anomaly detection model, and the data anomaly detection model is used for detecting whether the target vehicle model is abnormal. The method trains a preset network model comprising an environment factor fusion layer and multiple levels by using a specific training data set to obtain a data anomaly detection model, realizes data anomaly detection by using the data anomaly detection model, and the data anomaly detection model can dynamically adjust the detection standard in combination with the environment information, thereby improving the accuracy and robustness of intelligent networked vehicle data anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automobile detection, and particularly relates to a data anomaly detection model generation method, a detection method, a device and equipment. BACKGROUND

[0002] With the progress of science and technology, automobiles gradually develop in the direction of intelligent networking. Intelligent networked vehicles usually upload various driving data of the vehicle to a cloud server through a CAN (Controller Area Network) bus. The driving data of the intelligent networked vehicles can be used for intelligent networked vehicle related model training, fault diagnosis, driving behavior analysis, etc. Before data uploading, the vehicle end usually performs anomaly detection on the uploaded data.

[0003] In the current intelligent networked vehicle CAN bus data anomaly detection scheme, the vehicle end usually performs anomaly detection on the CAN bus data based on stored preset rules, preset thresholds, etc.

[0004] However, since the driving data of intelligent networked vehicles are of various types, and the data formats and frequencies are different, the above intelligent networked vehicle CAN bus data anomaly detection scheme cannot comprehensively meet the anomaly detection of different vehicle models and different types of data. In addition, the driving data of the same vehicle in different scenarios may fluctuate, and the fixed preset rules and preset thresholds cannot be adjusted in time with the change of the scene, resulting in insufficient accuracy and robustness of intelligent networked vehicle CAN bus data anomaly detection. SUMMARY

[0005] The main purpose of the present application is to provide a data anomaly detection model generation method, a detection method, a device and equipment, which aims to improve the accuracy and robustness of intelligent networked vehicle data anomaly detection.

[0006] In a first aspect, the present application provides a data anomaly detection model generation method, comprising:

[0007] Collecting and acquiring a training data set, wherein the training data set comprises driving data, environmental information and corresponding time information, and anomaly detection results of a target vehicle model under different working conditions;

[0008] training a preset network model by using the training data set to obtain a data anomaly detection model, wherein the preset network model comprises a plurality of levels, and the plurality of levels comprise a vector conversion layer, an encoder layer, an environment factor fusion layer, and a multi-branch output layer, wherein the environment factor fusion layer is configured to fuse the environment information with the driving data under different working conditions and corresponding anomaly detection results, and the data anomaly detection model is configured to detect whether a target vehicle model is abnormal.

[0009] In an optional implementation, the training of the preset network model by using the training data set to obtain the data anomaly detection model comprises:

[0010] feeding the training data set into the preset network model;

[0011] converting the driving data corresponding to the different working conditions into a multi-dimensional vector matrix based on the vector conversion layer;

[0012] generating a vector sequence based on the encoder layer and the multi-dimensional vector matrix;

[0013] fusing the vector sequence and the environment information based on the environment factor fusion layer to generate a fusion matrix;

[0014] performing anomaly checking training based on the multi-branch output layer by using the fusion matrix and corresponding anomaly detection results to obtain the data anomaly detection model.

[0015] In an optional implementation, the conversion of the driving data corresponding to the different working conditions into the multi-dimensional vector matrix based on the vector conversion layer comprises:

[0016] generating a numerical sequence of the driving data and a position code corresponding to each driving data based on time information corresponding to each driving data according to the vector conversion layer;

[0017] determining the length of a sliding window according to a preset time length to determine an embedding dimension of each time point;

[0018] generating the multi-dimensional vector matrix according to the numerical sequence of the driving data, the preset time length, and the embedding dimension.

[0019] In an optional implementation, the fusion of the vector sequence and the environment information based on the environment factor fusion layer to generate the fusion matrix comprises:

[0020] associating environment information corresponding to the vector sequence based on time information according to the environment factor fusion layer;

[0021] The preset algorithm in the environmental factor fusion layer is used to learn and train the fusion of the vector sequence and the environmental information to generate a fusion matrix containing time sequence.

[0022] In an optional implementation, the collection of the training data set comprises:

[0023] During the operation of the target vehicle in different working conditions respectively, the driving data and the environmental information of the target vehicle in each working condition are collected, and the driving data in each working condition is detected for abnormality according to a preset static detection rule, respectively, to obtain an abnormality detection result corresponding to the driving data in each working condition.

[0024] The driving data, the environmental information and the abnormality detection result corresponding to the driving data in each working condition are stored according to a preset storage structure, respectively, to obtain a plurality of training data sets of the target vehicle in different working conditions.

[0025] In an optional implementation, the abnormality detection result comprises a detection dimension, an abnormality flag and an abnormality score, and after the driving data in each working condition is detected for abnormality according to a preset static detection rule, respectively, to obtain an abnormality detection result corresponding to the driving data in each working condition, the method further comprises:

[0026] The abnormality detection result is stored according to a preset detection result structure.

[0027] According to the detection dimension, the abnormality flag, the abnormality score and a preset comprehensive abnormality score algorithm, a comprehensive abnormality score corresponding to the abnormality detection result is calculated and obtained.

[0028] According to the comprehensive abnormality score and a preset abnormality classification rule, an abnormality classification corresponding to the driving data is obtained.

[0029] In an optional implementation, the storage of the driving data, the environmental information and the abnormality detection result corresponding to the driving data in each working condition according to a preset storage structure, respectively, to obtain a plurality of training data sets of the target vehicle in different working conditions comprises:

[0030] The driving data, the environmental information and the abnormality classification corresponding to the driving data in each working condition are stored according to a preset storage structure, respectively, to obtain a plurality of training data sets of the target vehicle in different working conditions.

[0031] In a second aspect, the application provides a data abnormality detection method, comprising:

[0032] The driving data and the environmental information of a target vehicle at a current time are collected.

[0033] The data anomaly detection model is trained by using the method in any one of the preceding embodiments, and the data anomaly detection result is obtained based on the driving data and the environment information.

[0034] In a third aspect, the present application provides a data anomaly detection model generation device, comprising:

[0035] A first acquisition module is configured to acquire a training data set, wherein 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;

[0036] A training module is configured to train a preset network model by using the training data set to obtain a data anomaly detection model, wherein the preset network model comprises a plurality of levels, and the plurality of levels comprise a vector conversion layer, an encoder layer, an environment factor fusion layer and a multi-branch output layer, wherein the environment factor fusion layer is configured to fuse the environment information, the driving data under different working conditions and the corresponding anomaly detection results, and the data anomaly detection model is configured to detect whether the target vehicle model is abnormal.

[0037] In a fourth aspect, the present application provides a data anomaly detection device, comprising:

[0038] A second acquisition module is configured to acquire driving data and environment information of a target vehicle model at a current time point;

[0039] A detection module is configured to train a data anomaly detection model by using the method in any one of the preceding embodiments, and obtain a data anomaly detection result based on the driving data and the environment information.

[0040] In a fifth aspect, the present application provides an electronic device, comprising a processor, a storage medium and a bus, wherein the storage medium stores machine readable instructions executable by the processor, the processor and the storage medium communicate through the bus, and the processor executes the machine readable instructions to perform the method in any one of the preceding embodiments.

[0041] In a sixth aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to perform the method in any one of the preceding embodiments.

[0042] The present application has the following beneficial effects:

[0043] The method for generating a data anomaly detection model provided by the embodiment of the application comprises: collecting a training data set, wherein the training data set comprises driving data of a target vehicle model under different working conditions, environment information, corresponding time information and an anomaly detection result; training a preset network model by using the training data set to obtain a data anomaly detection model, wherein the preset network model comprises multiple levels, and the multiple levels comprise a vector conversion layer, an encoder layer, an environment factor fusion layer and a multi-branch output layer, wherein the environment factor fusion layer is configured to fuse the environment information and the driving data under the different working conditions and the corresponding anomaly detection result, and the data anomaly detection model is configured to detect whether the target vehicle model is abnormal. The method trains the preset network model comprising the environment factor fusion layer and other multiple levels by using the training data set comprising the driving data of the target vehicle model under the different working conditions, the environment information, the corresponding time information and the anomaly detection result, to obtain the data anomaly detection model, so that the data anomaly detection model is used to detect data anomalies in the driving process of the target vehicle model, and the data anomaly detection model can dynamically adjust a detection standard (for example, an anomaly detection threshold) in combination with the environment information. The detection standard is more suitable for the current environment and working condition of the target vehicle than a traditional fixed threshold standard, so that the possibility of false positives of the data anomaly detection in the driving process of the target vehicle model is lower, the detection standard is more reasonable, and the accuracy and robustness of data anomaly detection of the intelligent networked vehicle are improved. BRIEF DESCRIPTION OF DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the drawings shown.

[0045] Figure 1 The flowchart of the method for generating a data anomaly detection model provided by an embodiment of the present application is shown in the figure.

[0046] Figure 2 The flowchart of the method for generating a data anomaly detection model provided by another embodiment of the present application is shown in the figure.

[0047] Figure 3 The flowchart of the method for generating a data anomaly detection model provided by another embodiment of the present application is shown in the figure.

[0048] Figure 4 The flowchart of the method for generating a data anomaly detection model provided by an embodiment of the present application is shown in the figure.

[0049] Figure 5A structural schematic diagram of a data anomaly detection model generation apparatus provided by an embodiment of the present application is provided.

[0050] Figure 6 A structural schematic diagram of a data anomaly detection apparatus provided by an embodiment of the present application is provided.

[0051] Figure 7 A structural schematic diagram of an electronic device provided by an embodiment of the present application is provided. DETAILED DESCRIPTION

[0052] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the following will be combined with the accompanying drawings for the embodiments of the present application to make a clear and complete description of the technical solutions of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations.

[0053] 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 claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative labor are within the scope of protection of the present application.

[0054] It should be noted that: similar reference numerals and letters represent similar items in the following drawings, therefore, once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. The term “comprise”, “include” or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement “comprises a” does not exclude the presence of additional identical elements in the process, method, article or equipment including the element.

[0055] The following will be combined with the accompanying drawings for a detailed description of some embodiments of the present application. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.

[0056] In current intelligent connected vehicle data anomaly detection schemes, such as CAN bus data anomaly detection, fixed anomaly detection rules or anomaly detection thresholds for various driving data are usually preset in the intelligent connected vehicle. However, due to the use of multiple driving data collection methods, multiple sensor models and multiple data transmission formats in one intelligent connected vehicle, the above-mentioned anomaly detection rules or anomaly detection thresholds also need to be set for each driving data collection method, each sensor model and each data transmission format respectively. Therefore, the setting of the anomaly detection rules or anomaly detection thresholds in the intelligent connected vehicle is relatively complex. Even if comprehensive anomaly detection rules or anomaly detection thresholds are set, due to the fluctuations of driving data 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 demand of adaptive anomaly detection for driving data of the target vehicle under different working conditions, resulting in insufficient accuracy and robustness of intelligent connected vehicle CAN bus data anomaly detection. In this background, the main purpose of the present application is to provide a data anomaly detection model training method, which aims to improve the accuracy and robustness of intelligent connected vehicle CAN bus data anomaly detection.

[0057] Figure 1 The generation method flowchart of the data anomaly detection model provided by an embodiment of the present application can be executed by a computer or other device with computing processing function, but is not limited thereto. As shown in the figure, the method can include: Figure 1

[0058] S101, collect and acquire a training data set, wherein the training data set includes driving data, environmental information and corresponding time information of the target vehicle under different working conditions, and an anomaly detection result.

[0059] The training data set includes data collected during the operation of the target vehicle under different working conditions. For example, the data can be collected by direct reading, sensor monitoring and other methods. The collected data can be uploaded to the cloud server of the target vehicle to realize model training, fault diagnosis and driving behavior analysis of the target vehicle. For example, the data collected by CAN bus during the operation of the target vehicle under different working conditions is uploaded to the cloud server. The collection and acquisition of the training data set can be realized by collecting and acquiring CAN frame data in the CAN bus.

[0060] ​Exemplarily, the training data set can be managed in a Parquet structure, and further, can be efficiently indexed according to time, signal number, working condition classification, etc. Of course, the training data set can also be of other structures, and can 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.

[0061] The training data set can be expressed in the following form, for example:

[0062]

[0063] Exemplarily, the training data set can be expressed in the following form, for example: That is, for example, the training data set can be expressed in the following form, for example: For example, the signal number can be the number of the training data set, and the training data set can correspond to the driving data, environmental information, corresponding time information, and abnormal detection result of a target vehicle in a certain working condition. For example, the signal number can be the number of the training data set, and the training data set can correspond to the driving data, environmental information, corresponding time information, and abnormal detection result of a target vehicle in a certain working condition. 、 、 Of course, the above content is only an example, and the actual working condition type, training data set naming, etc. can be different from the above example.

[0064] The training data set can be expressed in the following form, for example: For example, the signal number can be the number of the training data set, and the training data set can correspond to the driving data, environmental information, corresponding time information, and abnormal detection result of a target vehicle in a certain working condition. The first driving data value of the target vehicle at time t in a certain working condition, and so on. The n is the number of driving data types of the target vehicle, for example, a target vehicle has three types of driving data, namely battery temperature, tire pressure, and remaining power. For example, it can be (67°C, 2.4 bar, 73%), and of course, the above content is only an example, and the actual driving data type, representation form, etc. is not limited to the above content. It can be understood that the driving data of a certain target vehicle in a certain working condition can be periodically collected, and therefore the driving data values in the above can also correspond to multiple different times, that is, the time information represented by t can not be unique. Or the time information represented by t is unique, and the driving data values collected at different times of the same target vehicle driving in the same working condition form multiple different training data sets, and the specific implementation is not limited thereto.

[0065] The training data set can be expressed in the following form, for example: ​For example, the abnormality detection result of the driving data value can be annotated based on preset rules. The abnormality detection result can be "abnormal" or "not abnormal", or an integer such as 0-5 representing the abnormality level or degree, for example, 0 representing completely not abnormal and 5 representing the most serious abnormality. Of course, the specific form of the abnormality detection result can also be other forms, which is not limited here.

[0066] The above For example, the above-mentioned environment information can include vehicle speed, vehicle load, geographical location, weather, etc., but is not limited thereto. It can be understood that the environment information can be the average value of the target vehicle during driving under a certain working condition, or can be similar to the driving data value, i.e., the environment information corresponding to multiple time points during driving recorded according to the collection period, which is not limited here.

[0067] Of course, the above-mentioned training data set is only one possible example, and the actual training data set representation method can be different from the above-mentioned example, which can include the driving data, environment information and corresponding time information, and abnormality detection result of the above-mentioned target vehicle under different working conditions.

[0068] S102, training a preset network model using the above-mentioned training data set to obtain a data anomaly detection model.

[0069] The preset network model includes multiple levels, and the multiple levels include a vector conversion layer, an encoder layer, an environment factor fusion layer, and a multi-branch output layer.

[0070] It should be noted that the environment factor fusion layer is used to fuse the environment information, driving data under different working conditions, and corresponding abnormality detection results, and the data anomaly detection model is used to detect whether the target vehicle has an abnormality.

[0071] Exemplarily, the preset network model trained above, i.e., the data anomaly detection model above, can process the input driving data of the target vehicle at the current time and the environmental information in sequence through the vector conversion layer, the encoder layer, and the environmental factor fusion layer, and finally output the result of data anomaly detection of the driving data of the target vehicle at the current time and the anomaly detection threshold of the driving data of the target vehicle at the next time through the multi-branch output layer. The result of data anomaly detection of the driving data of the target vehicle at a certain time can be "abnormal" or "not abnormal", or an integer such as 0-5 representing the abnormal level or degree, for example, 0 representing completely not abnormal and 5 representing the most serious abnormality. Of course, the representation form of the result of data anomaly detection of the driving data of the target vehicle at a certain time can also be other forms, which is not limited herein.

[0072] The anomaly detection threshold of the data anomaly detection model of the multi-branch output layer for the driving data of the target vehicle at the next time can be realized by the data anomaly detection model according to the following principle:

[0073]

[0074] Exemplarily, the preset network model trained above, i.e., the data anomaly detection model above, can process the input driving data of the target vehicle at the current time and the environmental information in sequence through the vector conversion layer, the encoder layer, and the environmental factor fusion layer, and finally output the result of data anomaly detection of the driving data of the target vehicle at the current time and the anomaly detection threshold of the driving data of the target vehicle at the next time through the multi-branch output layer. The result of data anomaly detection of the driving data of the target vehicle at a certain time can be "abnormal" or "not abnormal", or an integer such as 0-5 representing the abnormal level or degree, for example, 0 representing completely not abnormal and 5 representing the most serious abnormality. Of course, the representation form of the result of data anomaly detection of the driving data of the target vehicle at a certain time can also be other forms, which is not limited herein. For example, the anomaly detection threshold of the data anomaly detection model of the multi-branch output layer for the driving data of the target vehicle at the next time, the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value, and the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value if the current time is the first time of collection. For example, the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value, and the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value if the current time is the first time of collection. For example, the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value, and the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value if the current time is the first time of collection. For example, the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value, and the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value if the current time is the first time of collection. For example, the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value, and the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value if the current time is the first time of collection. For example, the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value, and the anomaly detection threshold of the data anomaly detection model of the target vehicle at the current time can be a preset basic value if the current time is the first time of collection.

[0075] The above-mentioned is 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. For example, the above-mentioned For example, it can be represented as wherein, is the vehicle speed, is the environmental temperature, is the charging power, and the above-mentioned For example, it can be represented as That is, the vehicle speed The corresponding sensitivity parameter is 0.05, and the above environmental temperature The corresponding sensitivity parameter is 0.1, and the corresponding sensitivity parameter of the above charging power is 0.3. It can be understood that the above content is only an example of three environmental information including vehicle speed, environmental temperature and charging power closely related to the battery temperature. The actual abnormal detection threshold is not limited to the abnormal detection threshold of the battery temperature, and the actual influence factor closely related to the abnormal detection threshold is not limited to the three environmental information of vehicle speed, environmental temperature and charging power.

[0076] In addition, the above example is only one possible principle of the abnormal detection threshold of the data anomaly detection model of the multi-branch output layer for data anomaly detection of the driving data of the target vehicle at the next moment. The principle of the abnormal detection threshold of the data anomaly detection model of the multi-branch output layer for data anomaly detection of the driving data of the target vehicle at the next moment can be different from the principle in the above example.

[0077] The method for generating a data anomaly detection model provided by the embodiment of the application comprises: collecting a training data set, wherein the training data set comprises driving data of a target vehicle model under different working conditions, environmental information, corresponding time information and abnormal detection results; training a preset network model by using the training data set to obtain a data anomaly detection model, wherein the preset network model comprises a plurality of levels, and the plurality of levels comprise 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, the driving data under different working conditions and the corresponding abnormal detection results, and the data anomaly detection model is used to detect whether the target vehicle model is abnormal. The method trains a preset network model comprising an environmental factor fusion layer and other levels by using a training data set comprising driving data of a target vehicle model under different working conditions, environmental information, corresponding time information and abnormal detection results to obtain a data anomaly detection model. The data anomaly detection model is used for data anomaly detection of the target vehicle model during driving, and the data anomaly detection model can dynamically adjust the detection standard (for example, the abnormal detection threshold) in combination with the environmental information. The detection standard is more suitable for the current environment and working condition of the target vehicle compared with the traditional fixed threshold standard, so that the possibility of false alarm of the data anomaly detection of the target vehicle model during driving is lower, the detection standard is more reasonable, and the accuracy and robustness of the data anomaly detection of the intelligent network connected vehicle are improved.

[0078] Figure 2 The flowchart of the method for generating a data anomaly detection model provided by another embodiment of the application is shown in Figure 2 Optionally, in the above Figure 1On the basis of the embodiment, the preset network model is trained by using the training data set, and the data anomaly detection model is obtained, which can include:

[0079] S201, the training data set is brought into the preset network model.

[0080] For example, the training data set is brought into the preset network model, for example, the driving data and environmental information in the training data set can be brought into the preset network model as input data. The training data set can be, for example, a plurality of training data sets corresponding to different working conditions of the target vehicle. The preset network model can be, for example, a multi-level dynamic threshold prediction network, and the multi-level dynamic threshold prediction network can be constructed in combination with a Transformer (transformer) time sequence architecture, but is not limited thereto.

[0081] S202, based on the vector conversion layer, the driving data corresponding to different working conditions is converted into a multi-dimensional vector matrix.

[0082] For example, the driving data corresponding to different working conditions is converted into a multi-dimensional vector matrix, for example, in order to facilitate the preset network model to understand and analyze the driving data, but not limited thereto.

[0083] S203, based on the encoder layer and the multi-dimensional vector matrix, a vector sequence is generated.

[0084] For example, based on the encoder layer and the multi-dimensional vector matrix, a vector sequence is generated, for example, in order to analyze the influence relationship between the driving data in the multi-dimensional vector matrix, and further extract deeper features, but not limited thereto.

[0085] S204, based on the environmental factor fusion layer, the vector sequence and the environmental information are fused to generate a fusion matrix.

[0086] For example, based on the environmental factor fusion layer, the vector sequence and the environmental information are fused to generate a fusion matrix, for example, in order to establish a relationship between the data in the vector sequence and the environmental information, so as to make the trained preset network model, that is, the data anomaly detection model can comprehensively consider the environmental information, and more reasonably detect the driving data of the target vehicle. However, the specific function of the environmental factor fusion layer can be determined according to the actual situation, and is not limited to the above function.

[0087] S205, based on the multi-branch output layer, the fusion matrix and the corresponding anomaly detection result are used for anomaly checking training to obtain a data anomaly detection model.

[0088] For example, based on the multi-branch output layer, the fusion matrix and the corresponding anomaly detection result are used for anomaly checking training to obtain a data anomaly detection model. For example, the model can be used to guide the establishment of a judgment logic, such as "whether the corresponding driving data should be judged as abnormal or the abnormal level of the corresponding driving data should be judged as much in a certain environment information corresponding environment".

[0089] Further, in Figure 2 Based on the embodiment, the vector conversion layer is used to convert the driving data corresponding to different working conditions into a multi-dimensional vector matrix, for example, which can include:

[0090] Based on the vector conversion layer, the numerical sequence of the driving data and the position code corresponding to each driving data are generated according to the time information corresponding to each driving data.

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

[0092] The multi-dimensional vector matrix is generated according to the numerical sequence of the driving data, the preset time length, and the embedding dimension.

[0093] For example, the content of the embodiment can be represented by the following formula:

[0094]

[0095] Wherein, the The multi-dimensional vector matrix is the multi-dimensional vector matrix, and the For example, the sliding window can be represented by the sliding window, which can perform one-dimensional convolution operation, which can be used to extract the change pattern of the driving data in time, and further determine the embedding dimension of each time point The The specific time length of the time information corresponding to the driving data is represented. For example, assuming that the collection frequency of the driving data is 3 seconds / time, and a total of 3 cycles of driving data are collected, then T=3s*3 cycles=9s. The For example, the driving data from to is represented. That is, the numerical sequence of the driving data generated according to the time information corresponding to each driving data, and the is the driving data from to is represented. The position code corresponding to each driving data is used to make the model understand the The time sequence between the driving data in .

[0096] On this basis, for example, we can have , that is, the multidimensional vector matrix mentioned above For example, it can be a real matrix with a shape of T×d.

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

[0098] Furthermore, continuing with the above example, the vector sequence generated based on the above encoder layer and the above multidimensional vector matrix can be expressed by the following formula, for example:

[0099]

[0100] For example, the above For example, the above vector sequence can be represented as For example, it can represent the input value of the encoder layer, that is, the above For example, it can be represented by inputting the above multidimensional vector matrix as the input value into the encoder layer. , for example, it can refer to Feed-Forward Network, a feed-forward neural network, which can specifically represent a small fully connected network independent of each position, which can be used to implement nonlinear feature transformation. For example, it can refer to Multi-Head Self-Attention, a multi-head self-attention mechanism that helps the model distinguish the importance of different training data sets in parallel. For example, the above vector sequence can be referred to It is based on the vector sequence of the previous layer Enter the above Generated in .

[0101] On this basis, for example, we can have , and then we get the following vector sequence:

[0102]

[0103] Among them, the above For example, we can represent a vector of embedding dimension d at each time point.

[0104] In addition, in the above Figure 2 Based on the embodiment, the above-mentioned environmental factor fusion layer fuses the above-mentioned vector sequence and the above-mentioned environmental information to generate a fusion matrix, which may include:

[0105] According to the time information, the environment information corresponding to the vector sequence is associated.

[0106] The preset algorithm in the environment factor fusion layer is used to learn and train the fusion of the vector sequence and the environment information to generate a fusion matrix containing time sequence.

[0107] For example, the preset algorithm in the environment factor fusion layer can be represented by the following formula:

[0108]

[0109] The environment information corresponding to the vector sequence can be associated according to the time information. For example, the environment information corresponding to the vector sequence can be associated according to the time information. For example, it can refer to the concatenation of the vector sequence and the environment information corresponding to the vector sequence. Copy times, to ensure that each time point in the time information can obtain the same environment information, that is, the environment information corresponding to the vector sequence is associated according to the time information. The environment information corresponding to the vector sequence can be associated according to the time information. For example, it can refer to the concatenation of the vector sequence and the environment information corresponding to the vector sequence. And the environment information corresponding to the vector sequence can be associated according to the time information. Splicing forms a matrix of , where c is the number of environment information corresponding to the vector sequence associated according to the time information, that is, the number of rows of the matrix , and each row represents the environment information corresponding to a time point. The environment information corresponding to the vector sequence can be associated according to the time information. is a preset fusion weight matrix, and the environment information corresponding to the vector sequence can be associated according to the time information. For example, there can be , The embedding dimension of each time point after fusion is , and finally there can be The association between driving data and time point environment information can be included in the fusion matrix containing time sequence.

[0110] Of course, the preset algorithm in the actual environment factor fusion layer can also be different from the formula in the above example, and the purpose of training the fusion of the vector sequence and the environment information to generate a fusion matrix containing time sequence can be achieved, and the specific implementation is not limited herein.

[0111] Finally, based on the content of the above example, after generating a fusion matrix containing time sequence, the fusion matrix containing time sequence can be input into the multi-branch output layer as input data. The multi-branch output layer can include at least two branches. Taking the multi-branch output layer including two branches as an example, the two branches can be an abnormality judgment branch and a threshold prediction branch, respectively.

[0112] wherein the abnormality determination branch can be represented by the following formula, for example:

[0113]

[0114] For example, the abnormality determination branch can be represented by the following formula, for example: wherein the abnormality determination branch can be represented by the following formula, for example: For example, the time-dimension average pooling function can be represented by the following formula, and the fusion matrix containing time sequence can be input into the time-dimension average pooling function. The time-dimension average pooling function can obtain an overall vector representing the “feature summary” under the time length. For example, the abnormality determination branch can be represented by the following formula, for example:

[0115] For example, the abnormality determination branch can be represented by the following formula, for example:

[0116] and For example, the weight vector and the bias term under the time length can be represented by the following formula, respectively. For example, the abnormality determination branch can be represented by the following formula, for example: For example, the abnormality determination branch can be represented by the following formula, for example: For example, the abnormality determination branch can be represented by the following formula, for example: For example, the two parameters can be parameters adjusting properties, and can be preset values determined by experiments or other means. The two parameters can jointly constitute a linear classifier, and the output result can be , which is used to represent the abnormality of the pooling vector in the form of a continuous value. For example, the abnormality determination branch can be represented by the following formula, for example:

[0117]

[0118] wherein the abnormality determination branch can be represented by the following formula, for example: For example, the abnormality determination branch can be represented by the following formula, for example: For example, the abnormality determination branch can be represented by the following formula, for example:

[0119] For example, the abnormality determination branch can be represented by the following formula, for example: For example, the Sigmoid function can be used as the abnormality determination branch, and the Sigmoid function can be used as the input value. For example, the Sigmoid function can output a value between 0 and 1, which can be represented by the following formula, for example:

[0120]

[0121] wherein the abnormality determination branch can be represented by the following formula, for example: For example, the value between 0 and 1 output by the Sigmoid function can be used to represent the fusion matrix containing time sequence. is a preset parameter in the function, and the value between 0 and 1 output by the Sigmoid function can be used to represent the fusion matrix containing time sequence. The closer the value of 0-1 output by the Sigmoid function is to 1, the more abnormal the corresponding driving data is, for example, the above fusion matrix containing time sequence The closer the value of 0-1 output by the Sigmoid function is to 0, the more normal the corresponding driving data is, for example, the above fusion matrix containing time sequence The closer the value of 0-1 output by the Sigmoid function is to 0, the more normal the corresponding driving data is, for example, the above fusion matrix containing time sequence

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

[0123]

[0124] For example, the above For example, the above And The data anomaly detection model can perform anomaly detection on the next signal i based on the numerical lower limit and the numerical upper limit of the next signal i, and the next signal i is in the above The next signal i is normal if it is within the above The greater the difference between the anomaly detection threshold and the next signal i, the more abnormal the next signal i is.

[0125] The above For example, the above That is:

[0126]

[0127] Wherein, the above represents the above The last time point in the time length The above and the above Similar to the above And For example, they can represent the weight vector and the bias term in the time length T, respectively, and their principles and functions will not be repeated here.

[0128] It can be understood that the above examples of vector conversion layer, encoder layer, environmental factor fusion layer and multi-branch output layer are only one possible situation of each of the vector conversion layer, encoder layer, environmental factor fusion layer and multi-branch output layer, and do not mean that the vector conversion layer, encoder layer, environmental factor fusion layer and multi-branch output layer can only be set according to the formula and content in the above examples.

[0129] Optionally, on the basis of the above embodiments, after the preset network model is trained and the data anomaly detection model is obtained, the obtained data anomaly detection model can be evaluated. For example, the performance of the obtained data anomaly detection model can be evaluated by taking the anomaly detection results in the training data set as independent verification data, taking the driving data and environmental information in the training data set as independent test data, inputting the obtained data anomaly detection model, comparing the data anomaly detection model output results with the anomaly detection results of the verification data, and calculating the loss value of the data anomaly detection model output results to evaluate the performance of the data anomaly detection model.

[0130] For example, taking the data anomaly detection model output results as the 0-1 values output by the Sigmoid function in the anomaly judgment branch and the anomaly detection threshold output by the threshold prediction branch, the loss value of the data anomaly detection model output results can be calculated to evaluate the performance of the model. For example, the anomaly judgment loss and the threshold regression loss in the data anomaly detection model output results can be calculated respectively.

[0131]

[0132]

[0133] For example, the anomaly judgment loss can be represented by the following formula: where y represents the anomaly detection results in the training data set, and y represents the anomaly detection results in the verification data.

[0134]

[0135]

[0136] For example, the threshold regression loss can be represented by the following formula: where y represents the anomaly detection threshold output by the threshold prediction branch, and y represents the anomaly detection threshold in the verification data. ​​​​​​​​​​​​​​the abnormality detection threshold value of the threshold prediction branch output is punished (that is, the abnormality detection threshold value of the threshold prediction branch output is the interval in which the model considers that the normal driving data should be located, and if the interval fails to include the real value of the corresponding driving data , it proves that the interval is unreasonable, and a penalty needs to be imposed to correct the model).

[0137] After calculating the above abnormality judgment loss and threshold regression loss, the total loss of the current data anomaly detection model output result can be calculated by, for example, the following weighted calculation method:

[0138]

[0139] Among them, the above , that is, the total loss of the current data anomaly detection model output result, and the above and , that is, the weight, which can be freely adjusted and determined according to actual conditions, and is not limited here.

[0140] After calculating the total loss of the current data anomaly detection model output result , it can be compared with the preset qualified total loss value. If the total loss of the current data anomaly detection model output result ≤ the preset qualified total loss value, it means that the output error of the data anomaly detection model meets the requirements and the performance is qualified. If the total loss of the current data anomaly detection model output result > the preset qualified total loss value, it means that the output error of the data anomaly detection model is high and the performance is unqualified. At this time, the model can be optimized by strengthening training or by selecting an optimizer until the total loss of the data anomaly detection model output result ≤ the preset qualified total loss value.

[0141] Of course, the method of evaluating the performance of the data anomaly detection model and the method of optimizing the data anomaly detection model are both possible examples. In practice, the performance of the data anomaly detection model can also be evaluated and the data anomaly detection model can also be optimized by other methods, and is not limited to the above examples.

[0142] In addition, on the basis of the above Figure 1 embodiment, the collection and acquisition of the training data set can include:

[0143] During the operation of the target vehicle in different working conditions, the driving data and environmental information of the target vehicle in each working condition are collected, and the driving data in each working condition is subjected to abnormality detection according to the preset static detection rule, and the abnormality detection result corresponding to the driving data in each working condition is obtained.

[0144] The driving data, the environment information, and the abnormality detection result corresponding to the driving data under each working condition are stored according to a preset storage structure, to obtain a plurality of training data sets of the target vehicle model under different working conditions.

[0145] Similar to the content in the above Figure 1 embodiments, the training data set may, for example, refer to the driving data, the environment information, and the corresponding time information and abnormality detection result of a target vehicle model under a working condition, that is, if the driving data, the environment information, and the corresponding time information and abnormality detection result of a target vehicle model are collected under three working conditions of the target vehicle model, three training data sets corresponding to the three working conditions may, for example, be obtained Figure 1 The training data set may, for example, correspond to the driving data, the environment information, and the corresponding time information and abnormality detection result of a target vehicle model under a working condition, that is, if the driving data, the environment information, and the corresponding time information and abnormality detection result of a target vehicle model are collected under three working conditions of the target vehicle model, three training data sets corresponding to the three working conditions may, for example, be obtained Of course, the above content is only an example, and the actual working condition type, training data set naming, etc. may be different from the above example content.

[0146] Figure 3 The generation method of the data anomaly detection model provided in another embodiment of the present application is shown in the flowchart of FIG. 6. Optionally, on the basis of the foregoing embodiments, the abnormality detection result may include a detection dimension, an abnormality flag, and an abnormality score. After the driving data under each working condition is detected according to the preset static detection rule to obtain the abnormality detection result corresponding to the driving data under each working condition, the method may further include: Figure 3

[0147] S301, store the abnormality detection result according to a preset detection result structure.

[0148] For example, the preset detection result structure may, for example, refer to the following structure:

[0149]

[0150] For example, the detection dimension may, for example, be a detection type,For example, the abnormality flag may, for example, be a flag indicating whether an abnormality exists,For example, the abnormality score may, for example, be a score indicating the degree of abnormality, and the detection type may, for example, be a preset set, which may, for example, contain all supported detection types and be configured by the cloud for different vehicle models. ​​​​​​​For example, it can represent the abnormal score under the current detection dimension, which can be a real number between 0 and 1, indicating the severity of the abnormality, and can be calculated by different detection methods, each type of detection method being configured and issued by the cloud. represents that the current driving data is normal, represents that the current driving data is slightly abnormal, represents that the current driving data is severely abnormal, but not limited thereto.

[0151] S302, according to the above detection dimension, the above abnormal flag, the above abnormal score and the preset comprehensive abnormal score algorithm, the comprehensive abnormal score corresponding to the above abnormal detection result is calculated and obtained.

[0152] For example, the comprehensive abnormal score corresponding to the above abnormal detection result is calculated and obtained, for example, by the following formula:

[0153]

[0154] wherein, the above that is, for example, the comprehensive abnormal score corresponding to the above abnormal detection result at time t. The above may be the weight of the dimension , indicating the sensitivity of different dimensions to abnormality. It should be noted that the above only takes effect when , if , then it can be:

[0155]

[0156] S303, according to the above comprehensive abnormal score and the preset abnormal classification rule, the abnormal classification corresponding to the above driving data is obtained.

[0157] For example, the abnormal classification corresponding to the above driving data is obtained according to the above comprehensive abnormal score and the preset abnormal classification rule, for example, according to the following rule:

[0158]

[0159] wherein, the above that is, for example, the abnormal classification corresponding to the above driving data at time t. The above , , For example, it can be an abnormal classification limit, which can be a preset value, which is not limited here.

[0160] Further, in Figure 3On the basis of the embodiment, the above-mentioned driving data, the above-mentioned environmental information, and the above-mentioned abnormality detection result corresponding to the above-mentioned driving data under each working condition are stored according to the preset storage structure, and a plurality of training data sets of the above-mentioned target vehicle under different working conditions are obtained, which can include:

[0161] The above-mentioned driving data, the above-mentioned environmental information, and the above-mentioned abnormality classification corresponding to the above-mentioned driving data under each working condition are stored according to the preset storage structure, and a plurality of training data sets of the above-mentioned target vehicle under different working conditions are obtained.

[0162] For example, the above-mentioned preset storage structure can be, for example, Figure 1 The Parquet structure and the like of the embodiment, and specific ways of obtaining the plurality of training data sets of the above-mentioned target vehicle under different working conditions can refer to the content of the embodiment. Figure 1 In the embodiment, and details are not repeated here.

[0163] Figure 4 A flowchart of a data anomaly detection method provided by an embodiment of the present application is provided, and the method can be applied to the data anomaly detection model trained by the data anomaly detection model generation method in the above-mentioned embodiments. Please refer to Figure 4 The method can include:

[0164] S401, collect and acquire driving data and environmental information of a target vehicle at a current time.

[0165] For example, the form and content of the above-mentioned driving data and environmental information can refer to the content of the above-mentioned Figure 1 Embodiment, but can be the same as or different from the content of the above-mentioned Figure 1 Embodiment.

[0166] S402, train the data anomaly detection model obtained by the method of any one of the above-mentioned embodiments, and obtain the data anomaly detection result based on the above-mentioned driving data and the above-mentioned environmental information.

[0167] For example, the above-mentioned data anomaly detection result based on the above-mentioned driving data and the above-mentioned environmental information can refer to the abnormality judgment result made by the abnormality judgment branch on the above-mentioned driving data at the above-mentioned current time, that is, the value of 0~1 in the above-mentioned embodiment, and the abnormality detection threshold value output by the threshold prediction branch based on the driving data and environmental information at the current time. The abnormality judgment branch of the data anomaly detection model can make abnormality judgment on the driving data at the next time based on the abnormality detection threshold value.

[0168] Figure 5A structural schematic diagram of a data anomaly detection model generation device provided by an embodiment of the present application is shown in the figure. The data anomaly detection model generation device can execute the data anomaly detection model generation method described above. The device can be integrated into a computer or other device with computing and processing capabilities, as shown in the figure. The device can include the following components: Figure 5

[0169] A first acquisition module 510 is configured to acquire a training data set. The training data set includes driving data of a target vehicle model under different working conditions, environmental information, corresponding time information, and abnormal detection results.

[0170] A training module 520 is configured to train a preset network model using the training data set to obtain a data anomaly detection model. The preset network model includes multiple levels, including 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 abnormal detection results. The data anomaly detection model is configured to detect whether the target vehicle model is abnormal.

[0171] The data anomaly detection model generation method provided by the embodiment of the present application includes the following steps: acquiring a training data set, wherein the training data set includes driving data of a target vehicle model under different working conditions, environmental information, corresponding time information, and abnormal detection results; and training a preset network model using the training data set to obtain a data anomaly detection model, wherein the preset network model includes multiple levels, including 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 abnormal detection results. The data anomaly detection model is configured to detect whether the target vehicle model is abnormal. This method trains a preset network model containing an environmental factor fusion layer and other multiple levels using a training data set including driving data of a target vehicle model under different working conditions, environmental information, corresponding time information, and abnormal detection results to obtain a data anomaly detection model. The data anomaly detection model is used to detect data anomalies during the driving process of the target vehicle model. The data anomaly detection model can dynamically adjust the detection standard (for example, the abnormal detection threshold) in combination with the environmental information. The detection standard is more suitable for the current environment and working conditions of the target vehicle compared to the traditional fixed threshold standard, thereby reducing the possibility of false positives in data anomaly detection during the driving process of the target vehicle model, making the detection standard more reasonable, and improving the accuracy and robustness of intelligent networked vehicle data anomaly detection.

[0172] ​Optionally, the training module 520 is specifically configured to input the training data set into the preset network model. Based on the vector conversion layer, the driving data corresponding to different working conditions is converted into a multi-dimensional vector matrix. Based on the encoder layer and the multi-dimensional vector matrix, a vector sequence is generated. Based on the environment factor fusion layer, the vector sequence and the environment information are fused to generate a fusion matrix. Based on the multi-branch output layer, the fusion matrix and the corresponding anomaly detection result are used for anomaly checking training to obtain a data anomaly detection model.

[0173] Optionally, the training module 520 is specifically configured to generate, based on the vector conversion layer, a numerical sequence of driving data and a position code corresponding to each driving data according to time information corresponding to each driving data. The length of a sliding window is determined according to a preset time length, and the embedding dimension of each time point is determined. The multi-dimensional vector matrix is generated according to the numerical sequence of driving data, the preset time length, and the embedding dimension.

[0174] Optionally, the training module 520 is specifically configured to associate, based on the environment factor fusion layer, environment information corresponding to the vector sequence according to time information. A preset algorithm in the environment factor fusion layer is used to learn and train the fusion of the vector sequence and the environment information to generate a fusion matrix containing time sequence.

[0175] Optionally, the first acquisition module 510 is specifically configured to acquire driving data and environment information of a target vehicle in each working condition during operation of the target vehicle in different working conditions, and perform anomaly detection on the driving data in each working condition according to a preset static detection rule to obtain an anomaly detection result corresponding to the driving data in each working condition. The driving data, the environment information, and the anomaly detection result corresponding to the driving data in each working condition are stored according to a preset storage structure to obtain a plurality of training data sets of the target vehicle in different working conditions.

[0176] Optionally, the anomaly detection result includes detection dimension, anomaly flag, and anomaly score. The first acquisition module 510 can also be configured to store the anomaly detection result according to a preset detection result structure. A comprehensive anomaly score corresponding to the anomaly detection result is calculated according to the detection dimension, the anomaly flag, the anomaly score, and a preset comprehensive anomaly score algorithm. An anomaly classification corresponding to the driving data is obtained according to the comprehensive anomaly score and a preset anomaly classification rule.

[0177] Optionally, the first acquisition module 510 is specifically used to 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, so as to obtain multiple training data sets of the target vehicle model under different working conditions.

[0178] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0179] Figure 6 This is a structural diagram of a data anomaly detection device provided in an embodiment of the present application. The data anomaly detection device can execute the above-mentioned data anomaly detection method. The device can be integrated into a device with computing and processing functions such as the above-mentioned computer, such as Figure 6 As shown, the device includes:

[0180] The second acquisition module 610 is used to acquire the driving data and environmental information of the target vehicle type at the current moment.

[0181] The detection module 620 is configured to obtain a data anomaly detection result based on the driving data and the environmental information by using a data anomaly detection model trained using the method described in any one of the aforementioned embodiments.

[0182] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0183] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may be a device with computing and processing functions such as the above-mentioned computer, such as Figure 7 As shown, the device 700 includes:

[0184] Processor 710 , storage medium 720 and bus 730 . Processor 710 and storage medium 720 are communicatively connected via bus 730 .

[0185] The storage medium 720 stores machine-readable instructions executable by the processor 710. When the electronic device is running, the processor 710 executes the machine-readable instructions to perform the data anomaly detection model generation method or the data anomaly detection method.

[0186] It should be understood that Figure 7 The structure shown is only a schematic diagram of the structure of the electronic device. The electronic device may also include Figure 7 More or fewer components than shown, or with Figure 7 Different configurations shown. Figure 7 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0187] The embodiment of the present application further provides a computer readable storage medium, the computer readable medium storing a computer program, and the computer program can be executed by a processor to implement the generation method of the data anomaly detection model or the data anomaly detection method described in the method embodiment.

[0188] The computer readable storage medium can be an electronic storage such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk or a ROM. Alternatively, the computer readable storage medium includes a non-transitory computer readable storage medium. The computer readable storage medium has a storage space for storing program codes for executing any method steps in the above method. The program codes can be read from or written into one or more computer program products. The program codes can be compressed in a suitable form, for example.

[0189] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented by other manners. The apparatus embodiments described above are only schematic, for example, the flow charts and block diagrams in the drawings show the possible implementation architectures, functions and operations of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flow charts or block diagrams can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in a different order than that noted in the drawings. For example, two consecutive blocks can actually be executed in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flow charts, and the combination of blocks in the block diagrams and / or flow charts, can be implemented by a dedicated hardware-based system for executing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0190] In addition, the functional modules in the embodiments of the present application can be integrated together to form a separate part, or each module can exist independently, or two or more modules can be integrated to form a separate part.

[0191] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the parts that contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of 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 embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0192] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or 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, the method comprising: The method comprises the following steps: Collecting a training data set, wherein the training data set comprises driving data of a target vehicle model under different working conditions, environment information, corresponding time information, and abnormal detection results; Training a preset network model using the training data set to obtain a data anomaly detection model, wherein the preset network model comprises multiple levels, including a vector conversion layer, an encoder layer, an environment factor fusion layer, and a multi-branch output layer, wherein the environment factor fusion layer is used to fuse the environment information with the driving data under different working conditions and the corresponding abnormal detection results, and the data anomaly detection model is used to detect whether the target vehicle model is abnormal; The multi-branch output layer is used to output abnormality judgment branch results and threshold prediction branch results, wherein the abnormality judgment branch results are used to represent the abnormality degree of the driving data, and the threshold prediction branch results are used to represent the next abnormal detection threshold of each driving data; The training of the preset network model using the training data set to obtain the data anomaly detection model comprises: Inputting the training data set into the preset network model; Converting the driving data corresponding to the different working conditions into a multi-dimensional vector matrix based on the vector conversion layer; Generating a vector sequence based on the encoder layer and the multi-dimensional vector matrix; Fusing the vector sequence and the environment information based on the environment factor fusion layer to generate a fusion matrix; Based on the multi-branch output layer, using the fusion matrix and the corresponding abnormal detection results to perform abnormality check training to obtain a data anomaly detection model; The conversion of the driving data corresponding to the different working conditions into a multi-dimensional vector matrix based on the vector conversion layer comprises: Based on the vector conversion layer, generating a numerical sequence of driving data and a position code corresponding to each driving data according to the time information corresponding to each driving data; Determining the length of a sliding window according to a preset time length to determine the embedding dimension of each time point; Generating the multi-dimensional vector matrix according to the numerical sequence of the driving data, the preset time length, and the embedding dimension; The fusion of the vector sequence and the environment information based on the environment factor fusion layer to generate a fusion matrix comprises: Based on the environment factor fusion layer, associating the environment information corresponding to the vector sequence according to the time information; Using a preset algorithm in the environment factor fusion layer to learn and train the fusion of the vector sequence and the environment information to generate a fusion matrix containing time sequences.

2. The method of claim 1, wherein, The collection of the training data set comprises: Collecting driving data and environment information of the target vehicle model under each working condition during the operation of the target vehicle model under different working conditions, and performing abnormal detection on the driving data under each working condition according to a preset static detection rule to obtain the abnormal detection results corresponding to the driving data under each working condition; Storing the driving data, the environment information, and the abnormal detection results 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.

3. The method of claim 2, wherein, The anomaly detection result comprises: a detection dimension, an anomaly flag, and an anomaly score. After performing anomaly detection on the driving data under each working condition according to a preset static detection rule and obtaining the anomaly detection result corresponding to the driving data under each working condition, the method further comprises: storing the anomaly detection result 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 an anomaly classification corresponding to the driving data according to the comprehensive anomaly score and a preset anomaly classification rule.

4. The method of claim 3, wherein, The anomaly detection result corresponding to the driving data under each working condition, the environment information, and the anomaly detection result corresponding to the driving data are stored according to a preset storage structure to obtain a plurality of training data sets of the target vehicle model under different working conditions, comprising: The anomaly detection result corresponding to the driving data under each working condition, the environment information, and the anomaly detection result corresponding to the driving data are stored according to a preset storage structure to obtain a plurality of training data sets of the target vehicle model under different working conditions.

5. A data anomaly detection method characterized by, comprising: collecting and obtaining driving data and environment information of a target vehicle model at a current time; training the obtained data anomaly detection model by the method of any one of claims 1-4, and obtaining data anomaly detection results based on the driving data and the environment information. 6.A device for generating a data anomaly detection model, comprising: comprising: a first collection module configured to collect and obtain a training data set, wherein the training data set comprises driving data, environment information, and corresponding time information of a target vehicle model under different working conditions, and anomaly detection results; a training module configured to train a preset network model using the training data set to obtain a data anomaly detection model, wherein the preset network model comprises a plurality of levels, and the plurality of levels comprise: a vector conversion layer, an encoder layer, an environment factor fusion layer, and a multi-branch output layer, wherein the environment factor fusion layer is configured to fuse the environment information with the driving data under different working conditions and the corresponding anomaly detection results, and the data anomaly detection model is configured to detect whether the target vehicle model is abnormal; the multi-branch output layer is configured to output an anomaly judgment branch result and a threshold prediction branch result, wherein the anomaly judgment branch result is used to represent the abnormality degree of the driving data, and the threshold prediction branch result is used to represent the anomaly detection threshold of the next time for each driving data; the training module is specifically configured to input the training data set into the preset network model, convert the driving data corresponding to the different working conditions into a multi-dimensional vector matrix based on the vector conversion layer, generate a vector sequence based on the encoder layer and the multi-dimensional vector matrix, fuse the vector sequence and the environment information based on the environment factor fusion layer to generate a fusion matrix, and perform anomaly checking training based on the multi-branch output layer using the fusion matrix and the corresponding anomaly detection result to obtain a data anomaly detection model; The training module is specifically configured to generate a numerical sequence of driving data and location encoding corresponding to each driving data based on the vector conversion layer and time information corresponding to each driving data; determine the length of a sliding window based on a preset time length, and determine the embedding dimension of each time point; and generate the multi-dimensional vector matrix based on the numerical sequence of driving data, the preset time length, and the embedding dimension. The training module is specifically configured to associate the vector sequence with environmental information corresponding to the vector sequence based on the environmental factor fusion layer and time information; and learn and train the environmental factor fusion layer to fuse the vector sequence and the environmental information to generate a fusion matrix containing time sequences.

7. An electronic device, comprising: Comprise: A processor, a storage medium, and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating through the bus, and the processor executing the machine-readable instructions to perform the method of any one of claims 1-5.

Citation Information

Patent Citations

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

    CN117150401A

  • Abnormality detection device

    JP2019200459A