A vehicle fault warning method and system based on high-frequency time-series data
By sorting and dividing the vehicle operation data and dividing time windows, using abnormal motion detection and feature correlation graph analysis, the multi-scale spatiotemporal relationship between multiple timing data is captured, and the problem of insufficient real-time fault warning in the existing technology is solved, and efficient real-time fault warning is achieved.
Patent Information
- Application Number
- CN202210325250.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-03-30
AI Technical Summary
The existing big data-based fault warning methods have shortcomings in real-time and high-frequency data processing, resulting in poor real-time fault warning.
The vehicle fault warning method based on high-frequency timing data is adopted, and the vehicle operation data is sorted and divided in time windows, and abnormal motion detection and feature correlation graph analysis are used to capture the multi-scale spatiotemporal relationship between multiple timing data to achieve real-time fault warning.
It improves the accuracy and speed of fault warning, realizes real-time fault warning based on massive high-frequency timing data, and can detect faults earlier and take maintenance measures in advance.
Smart Images

Figure CN114676782B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle real-time fault warning, and particularly to a vehicle fault warning method and system based on high-frequency time-series data. Background Art
[0002] The statements in this section merely provide background technical information related to the present invention and do not necessarily constitute prior art.
[0003] The fault condition of a device can be mined and predicted through the device operation data before the fault occurs. According to the change of the device operation data, before the device actually fails, the abnormal condition of the device can be detected in time and the alarm information can be pushed in real time. The process from monitoring the operation data to alarm pushing is the fault warning.
[0004] With the continuous growth of logistics, the number of commercial trucks has increased accordingly. Commercial trucks have a high operating workload and are the main transportation tools for hazardous chemicals and flammable and explosive special materials. To ensure that the trucks reach the destination safely and in time, it is necessary to minimize the possibility of the trucks breaking down during operation. Therefore, real-time fault warning is crucial.
[0005] Currently, with the development of big data technology and Internet of Things technology, some real-time sensor devices can support the collection of device operation data at a frequency of once per second. Real-time fault warning usually involves the rapid processing of a large amount of high-frequency data. The entire process from data collection to alarm pushing needs to maintain low latency so that the driver can grasp the running state of the vehicle in real time. Once there is a possibility of a fault, targeted preventive maintenance can be carried out in advance to prevent problems before they occur.
[0006] Existing fault warning methods include two types: traditional fault warning methods and big data-based fault warning methods. Traditional fault warning methods include warning based on expert experience, fault warning based on high-performance sensors, and fault warning based on alarm thresholds.
[0007] The fault warning based on expert experience uses expert experience as the weight, and after an abnormal condition occurs, it infers and deduces according to the expert experience weight to achieve the effect of simulating an expert and complete the device warning. This method can achieve good results when the expert experience is rich, but due to the dependence on expert knowledge, it has a large subjectivity and is not as accurate as a mathematical model.
[0008] The fault warning based on high-performance sensors requires the installation of high-performance sensors on the device that can analyze the device data, and can timely feedback the analysis results to the user to achieve early warning. This method is relatively idealistic. Even for some devices with corresponding high-performance sensors, the price is relatively expensive and it is not convenient for wide use.
[0009] Fault warning based on alarm thresholds alarms according to the device thresholds set by the manufacturer before the device leaves the factory. The background monitors the device in real time. Once the device operation data exceeds the maximum threshold or is lower than the minimum threshold, the alarm device is activated. Although this customized method is relatively accurate, the alarm time is in the late stage of the fault, which is not conducive to the early detection and early repair of the fault, and has certain limitations.
[0010] The data sources of fault warning monitoring based on big data all come from the existing data integration center of the enterprise, with low input costs. By analyzing historical operation data, potential faults are discovered, and the future fault situation is predicted by building an algorithm model, and real-time alarm push is carried out to achieve early warning. Since expert knowledge and high-performance sensors are not required, the fault warning based on big data has strong versatility and is therefore widely applied.
[0011] However, current fault warning methods based on big data mostly give alarm signals by analyzing historical data. Moreover, in practical applications, the storage cost of a large amount of high-frequency historical data is too high, the time complexity of the data-driven model is relatively high, and the real-time performance of fault warning is poor. Summary of the Invention
[0012] To solve the above problems, the present invention proposes a vehicle fault warning method and system based on high-frequency time-series data, which quantifies the probability of fault occurrence using the relationships in the time-series data and feedbacks the fault type to achieve real-time fault warning during the vehicle operation process.
[0013] To achieve the above object, the present invention adopts the following technical solutions:
[0014] In a first aspect, the present invention provides a vehicle fault warning method based on high-frequency time-series data, including:
[0015] Sort the obtained vehicle operation data according to the vehicle ID and time sequence, and after dividing it using different time windows, obtain multivariate time-series data under different time windows;
[0016] Perform anomaly detection on the sorted vehicle operation data to determine potential abnormal vehicles;
[0017] According to the correlation relationships among multivariate variables, convert the multivariate time-series data of potential abnormal vehicles under different time windows into a feature correlation graph, and judge the anomaly degree of the potential abnormal vehicles according to the feature correlation graph to obtain the anomaly scores of the potential abnormal vehicles under different time windows;
[0018] According to the anomaly scores under different time windows, match the multivariate time-series data with anomaly scores exceeding the threshold to obtain the fault type.
[0019] As an alternative implementation, the obtained vehicle operation data is grouped by vehicle ID, sorted by time, a time window is set, and the vehicle operation data at the next moment is inserted into the end of the corresponding queue according to the vehicle ID. After the queue length reaches the length of the time window, the data at the head of the queue is extracted, and the new vehicle operation data is continuously inserted into the end, so that the queue always maintains the length of the time window.
[0020] As an alternative implementation, the process of detecting anomalies in the sorted vehicle operation data includes: judging whether there is an abnormal fluctuation in the vehicle state according to the correlation relationship of vehicle attributes between the current moment and the previous moment.
[0021] As an alternative implementation, the characteristic correlation matrix of the vehicle operation data at the current moment is obtained through the Pearson correlation coefficient; the size relationship between the characteristic correlation matrix at the current moment and the previous moment is compared through the matrix F norm, so as to judge whether there is an abnormal fluctuation in the vehicle state.
[0022] As an alternative implementation, the process of judging the anomaly degree of potential abnormal vehicles according to the characteristic correlation diagram includes: extracting the multi-scale spatio-temporal correlation features of the multivariate time series data according to the characteristic correlation diagram, so as to obtain the anomaly scores corresponding to the multivariate time series data under different time windows.
[0023] As an alternative implementation, the extraction of multi-scale spatio-temporal correlation features is based on a generative adversarial network, specifically including: the generative adversarial network is constructed by multiple convolutional layers and long short-term memory networks, the spatial features in the characteristic correlation diagram are encoded through the convolutional layer, the multi-scale spatial features are captured through multiple convolutional layers, the time features corresponding to each convolutional layer are captured through the long short-term memory network, and the most relevant time features are selected through the time attention mechanism to complete the extraction of multi-scale spatio-temporal correlation features.
[0024] As an alternative implementation, the process of fault type matching includes calculating the similarity between the multivariate time series data with anomaly scores exceeding the threshold and the historical fault sequences, and taking the fault type corresponding to the fault sequence with the highest similarity as the fault type of the vehicle.
[0025] In a second aspect, the present invention provides a vehicle fault warning system based on high-frequency time series data, including:
[0026] A data processing module, configured to sort the obtained vehicle operation data according to the vehicle ID and time sequence, and after dividing by different time windows, obtain multivariate time series data under different time windows;
[0027] An anomaly detection module, configured to detect anomalies in the sorted vehicle operation data to determine potential abnormal vehicles;
[0028] Anomaly detection module, configured to convert multivariate time-series data of potentially abnormal vehicles in different time windows into a feature correlation graph according to the correlation relationship between multivariate variables, and determine the degree of abnormality of the potentially abnormal vehicles based on the feature correlation graph to obtain the anomaly scores of the potentially abnormal vehicles in different time windows;
[0029] Fault type matching module, configured to match the fault type of the multivariate time-series data whose anomaly score exceeds the threshold according to the anomaly scores in different time windows to obtain the fault type.
[0030] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and computer instructions stored on the memory and running on the processor. When the computer instructions are run by the processor, the method described in the first aspect is completed.
[0031] In a fourth aspect, the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first aspect is completed.
[0032] Compared with the prior art, the beneficial effects of the present invention are:
[0033] The present invention proposes a vehicle fault warning method and system based on high-frequency time-series data, which captures multi-scale spatio-temporal relationships between multivariate time-series data to improve the accuracy of fault warning. On the one hand, online vehicles are grouped to obtain multivariate time-series data of each vehicle for a period of time. On the other hand, massive operation data is screened through anomaly detection to reduce the computational complexity of the fault warning model and improve the fault warning speed, realizing real-time fault warning based on massive high-frequency time-series data.
[0034] The present invention proposes a vehicle fault warning method and system based on high-frequency time-series data. Based on the anomaly detection module, spatio-temporal dependence features at different scales are captured, which can more accurately detect anomalies and judge the severity of anomalies; through the fault type matching module, further calculations are performed on severe anomalies to obtain the fault types that the anomalies will cause in the future. The present invention uses the relationships in the time-series data to quantify the probability of fault occurrence and feedback the fault type, realizing real-time fault warning during the vehicle operation process.
[0035] The advantages of the additional aspects of the present invention will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present invention. Description of the Drawings
[0036] The specification drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention.
[0037] Figure 1Flowchart of the vehicle fault warning method based on high-frequency time series data provided in Embodiment 1 of the present invention;
[0038] Figure 2 Schematic diagram of vehicle grouping provided in Embodiment 1 of the present invention;
[0039] Figure 3 Fault warning model framework diagram provided in Embodiment 1 of the present invention. Detailed implementation manners
[0040] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0041] It should be noted that the following detailed description is exemplary and is intended to provide further illustration of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0042] It should be noted that the terms used herein are only for describing specific implementation manners and are not intended to limit the exemplary embodiments of the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0043] In the case of no conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0044] Embodiment 1
[0045] This embodiment provides a vehicle real-time fault warning method based on a large amount of high-frequency time series data. By analyzing the acquired real-time multi-source time series data, fault warning during the vehicle operation is realized, as Figure 1 shown, and specifically includes:
[0046] Sort the acquired vehicle operation data according to the vehicle ID and time sequence, and after dividing by different time windows, obtain multi-source time series data under different time windows;
[0047] Perform anomaly detection on the sorted vehicle operation data to determine potential abnormal vehicles;
[0048] According to the correlation relationship among multiple variables, the multivariate time series data of potential abnormal vehicles in different time windows is converted into a feature correlation graph, and the abnormality degree of the potential abnormal vehicles is judged according to the feature correlation graph to obtain the abnormality scores of the potential abnormal vehicles in different time windows;
[0049] According to the abnormality scores in different time windows, the multivariate time series data with abnormality scores exceeding the threshold is matched for fault types to obtain the fault types.
[0050] In this embodiment, the attributes of the vehicle operation data include engine coolant temperature, engine speed, boost pressure, vehicle speed, torque, fuel consumption rate, etc.; first, the obtained vehicle operation data is preprocessed, and the preprocessing includes normalization and missing value filling;
[0051] Specifically: due to the interference of the environment, data lines, and human factors, the data is not 100% stable during transmission and may contain some noise and missing values; therefore, in this embodiment, the vehicle operation data is normalized and missing values are filled to make each attribute have the same scale and quantity, and the range of the normalized data is in [0, 1]:
[0052]
[0053] where max is the maximum value in each time series data, min is the minimum value in each time series data, and both the maximum value and the minimum value are within the defined valid range.
[0054] Since the data acquisition frequency is very high and the difference in data between two adjacent moments is not too large under normal circumstances, in this embodiment, the mean filling method is used to solve the missing value problem, and the formula is as follows:
[0055]
[0056] where x t-1 、x t 、x t+1 are the operation data at times t - 1, t, and t + 1 respectively.
[0057] After normalization and missing value filling, the vehicle operation data is defined as:
[0058] MTS = {x1, x2,..., x N}
[0059] where N is the length of the vehicle operation data MTS, and 1 to N represent certain moments respectively.
[0060] The value at time t is:
[0061]
[0062] Among them, x t is an M-dimensional vector, where t ≤ N, and x ∈ R N×M .
[0063] The subsequence from time t - w to time t is represented as:
[0064] {x t-w , x t-w+1 , …, x t}
[0065] Further expand it, and it is represented as:
[0066]
[0067] In this embodiment, by grouping vehicles and dividing different time windows, multivariate time-series data of each vehicle for a period of time can be obtained;
[0068] Specifically, the real-time operation data of online vehicles is transmitted to the vehicle networking data platform at a frequency of once per second. Due to the large data collection density, the order of data arrival each time is different. The analysis of the fault warning model requires input of multivariate time-series data of a vehicle for a period of time. Therefore, before the data is input into the model, the real-time operation data of vehicles needs to be processed in Flink to stack the disordered vehicle networking data in groups according to the vehicle ID, so as to obtain multivariate time-series data of each vehicle for a period of time for subsequent prediction of the fault warning model, as Figure 2 shown in the vehicle grouping schematic diagram.
[0069] Specifically, use an iterable key-value pair structure Map (mapping) to temporarily store the operation data of each vehicle in the stream data. Define the Key as the vehicle ID of String type, and the Value as the queue of vehicle operation data of List[String] type. The length of the List is defined as the sliding time window size w;
[0070] After the vehicle operation data at each moment arrives, find the corresponding List according to the vehicle ID and insert the data at the end of the queue; after the queue is full, when new data arrives, first dequeue the data at the head of the queue, and then continue to insert the new data at the end of the queue. The queue always maintains a length of w;
[0071] Each time the data when the queue is full is a segment of multivariate time-series data of a vehicle within a time window. Before deleting the data at the head of the queue, obtain the multivariate time-series data with a length of w in the current queue for subsequent processing.
[0072] At all times, the Map always stores multivariate time-series data of n vehicles with a length of w, where n is the total number of online vehicles and w is the time window size. In this embodiment, three time windows are set (w = 100, 200, 300) to obtain multivariate time-series data at different time scales. In this way, while realizing vehicle grouping, the division of the sliding time window is also realized.
[0073] In this embodiment, anomaly detection is performed on the sorted vehicle operation data to screen the massive time-series data, eliminate the vehicle operation data of normal operation, and screen the vehicle operation data with potential anomalies, turning the massive data into a small amount of data, reducing the computational complexity of the fault warning model, and improving the speed of the entire fault warning process.
[0074] Since the time interval for collecting real-time operation data of the vehicle network is only one second, the data generated by each device of the vehicle under normal conditions will not mutate within a short time interval. Therefore, the difference between the vehicle operation data at time t and the vehicle operation data at time t - 1 can be used to analyze whether there are abnormal fluctuations in the vehicle. If the difference in the vehicle state between time t and time t - 1 is large, it indicates that there are abnormal fluctuations. Some fluctuations are due to environmental changes or interference from other factors and are not real anomalies, while some fluctuations are caused by real device anomalies. Therefore, the role of anomaly detection is to screen out potential abnormal data, and accurate results still need to be obtained through further refined calculations by the model later.
[0075] Considering that no matter how the data of a single vehicle attribute changes, the relationship between attributes will not change, such as the inverse relationship between engine speed and torque. Therefore, the anomaly detection in this embodiment determines whether there are abnormal fluctuations in the vehicle state by comparing the attribute correlation relationship between the current moment and the previous moment. It is specifically divided into two steps: calculation and comparison.
[0076] First, calculate the feature correlation matrix C of a vehicle at time t through the Pearson correlation coefficient t ; then, compare the magnitude relationship between the two feature correlation matrices at the current moment and the previous moment through the matrix F norm. The matrix F norm calculation formula is as follows:
[0077]
[0078] where ∥C t ∥ F represents the matrix norm at time t, measuring the size of the feature correlation matrix at time t. If ∥C t ∥ F and ∥C t-1 ∥ FIf there are significant differences, it indicates that there are large fluctuations in the vehicle states at two moments. These vehicles are screened out as potential abnormal vehicles, and the multivariate time series data of these vehicles are further processed through the following steps and finally input into the model for fine calculation.
[0079] In this embodiment, since the vehicle operation data is divided into different time windows, the multivariate time series data of potential abnormal vehicles in different time windows are respectively converted into feature correlation graphs. Each element in the feature correlation graph is calculated through the Pearson correlation coefficient;
[0080] The specific conversion process of the feature correlation graph is as follows: Different from univariate time series data, there are some correlation relationships between variables in multivariate time series data. The correlation relationships are represented as a matrix. For a given subsequence of length w with dimension M:
[0081]
[0082] Its feature correlation graph C ∈ R M×M is calculated through the following formula:
[0083]
[0084] where and are the means of x i and x j , i, j ∈ [1, M], and the magnitude of V i,j represents the degree of correlation between two variables. A positive value indicates a positive correlation, and a negative value indicates a negative correlation; The subsequence of length w with dimension M is converted through the feature correlation graph to obtain an M×M feature matrix.
[0085] In this embodiment, a fault warning model is constructed and trained. As Figure 3 shown, the fault warning model includes an anomaly detection module. The anomaly detection module is constructed based on a generative adversarial network (GAN). According to the feature correlation graph, multi-scale spatio-temporal correlation features of the multivariate time series data are extracted to obtain anomaly scores corresponding to the multivariate time series data in different time windows.
[0086] The generative adversarial network includes a generator and a discriminator. The fake samples generated by the generator and the normal samples are used as the input of the discriminator. The label of the normal sample is 1, and the label of the fake sample is 0; And due to the scarcity of abnormal samples, this embodiment uses normal samples as the input of the generator for training.
[0087] During the adversarial process between the generator and the discriminator, the generator has a strong ability to reconstruct samples and can well fit the device state under normal conditions; the discriminator has a strong ability to distinguish whether a sample is normal; finally, the probability value output by the discriminator is called the anomaly score. That is, the reconstructed graphs are obtained by inputting the normal feature correlation graphs of three scales into the generator, and the reconstructed graphs and the normal feature correlation graphs are input into the discriminator to obtain the anomaly score, and the severity of the anomaly is judged according to the size of the anomaly score.
[0088] In this embodiment, each input time subsequence is divided into s different time scales, that is, each time subsequence will be converted into n feature matrices of M*M*s and then input into the anomaly detection module, where M represents the dimension of the multivariate time series data and s represents the number of time scales.
[0089] For example, there are 6 sensors, and data for 2h (7200s) is obtained for each sensor, then an original data matrix of 6*7200 is obtained; then a time window is set, such as w = 100s, and a time interval g = 100s is also set, and then the original matrix can be sliced. For example, at the 200s, the data from 101 - 200s for 100s is taken, and 6 vectors of length 100 will be obtained, which is a subsequence, and a 6*6 feature matrix can be obtained according to the above formula. Sampling once every 100s according to the time interval, 72 6*6 feature matrices will be obtained. Three time intervals are set (w = 100, 300, 600), so finally 72 6*6*3 feature matrices will be obtained.
[0090] In this embodiment, the severity of the anomaly is judged by the anomaly scores under different time windows. If the anomaly score obtained from a short time window is high, but the anomaly score obtained from a long time window is not high, then it may be considered that this is an anomaly with a short duration.
[0091] In the anomaly detection model, in this embodiment, an autoencoder-decoder and Conv-LSTM are used to construct the generator, as Figure 3 shown. The encoder part uses convolution to encode the spatial features of the feature matrix. Three convolutional layers, conv1 - conv3, are used, and the kernel settings are 8 kernels of size 3*3*3, 16 kernels of size 3*3*8, 32 kernels of size 2*2*16, and strides of 1*1, 2*2, 2*2 respectively.
[0092] The different convolutional layers encode spatial features of different scales, and the feature correlation graphs V of different scales at time t t are linked into a tensor X t,l ∈R M×M×s and input into the convolutional layer, and the output is obtained through the following formula:
[0093] X t,l = f(W l * X t,l-1 + b l )
[0094] where * represents convolution calculation, l is the number of convolutional layers, f is the activation function, W l represents the convolutional kernel, and b l represents the bias term. In this embodiment, SELU is used as the activation function.
[0095] In each layer of the encoder, the original feature map or the previous-level input first undergoes a convolution, and after obtaining the result, the result is further input into a Conv-LSTM layer combined with an attention mechanism. The attention mechanism can obtain the current-level output features from the hidden layer states of each step of the Conv-LSTM.
[0096] The current hidden layer state h t,l is updated through the following formula:
[0097]
[0098] where * represents convolution operation, represents Hadamard product operation, X t,l and h t-1,l are the inputs of the Conv-LSTM, and h t,l is the output, is the convolutional kernel of the l-th layer, is the bias parameter of the l-th layer.
[0099] In addition, in this embodiment, the step size h in the encoder is set to 10, and h represents the number of time steps of historical data. Since not all historical data is relevant to the current hidden layer state map, a time attention mechanism is set to automatically select the most relevant step and output The process formula is:
[0100]
[0101]
[0102] where α i is calculated using the softmax function.
[0103] Spatial features of different scales are captured through different convolutional layers, temporal features corresponding to each layer are captured through the Conv-LSTM layer, and then the most relevant temporal features are selected through the time attention mechanism. The joint modeling of convolution and Conv-LSTM can capture spatio-temporal features of different scales simultaneously and obtain the encoded feature map.
[0104] To decode the feature map obtained in the previous step and obtain the reconstructed feature matrix, the last convolutional layer is decoded using the following formula:
[0105]
[0106] In the remaining layers of the decoder, first the output features of the previous layer of the decoder and the output features of the corresponding level of the encoder are concatenated, and then the output is obtained through a layer of transposed convolution. This method enables the model to comprehensively utilize information at different scales to reconstruct the data. The decoding formula for the remaining layers is:
[0107]
[0108] where, represents the concatenation operation, represents the transposed convolution operation, is the kernel of the l-th layer, and its settings from the last layer to the first layer are: 16 kernels of size 2*2*32, 8 kernels of size 3*3*32, 3 kernels of size 3*3*16, and strides of 2*2, 2*2, 1*1.
[0109] As Figure 3 shown, the decoder can merge feature maps in different transposed convolutional layers and ConvLSTM layers, which is effective for improving the anomaly detection performance.
[0110] In the anomaly detection model, in this embodiment, a discriminator is set up to improve the ability of the generator to generate samples through the training of the discriminator; three convolutional layers are used to extract spatial features in sequence, and after each convolution, Conv-LSTM is further used to extract temporal features, and the dimensions are adjusted through two fully connected layers, and finally the anomaly score is obtained through the activation function softmax.
[0111] In this embodiment, three feature correlation maps with different time scales are divided. The anomaly scores obtained using the feature maps constructed with shorter time scales can reflect various abnormal situations with different durations, while the anomaly scores obtained using the feature maps constructed with longer time lengths are not sensitive to abnormal situations with long durations. Therefore, in this embodiment, the anomaly scores of three different time scales are used. If the final anomaly score is greater than the threshold, it indicates that the abnormal situations of all three scales are relatively serious, and it can be judged as an anomaly with a relatively long duration or a serious anomaly.
[0112] Since the GAN adopts the method of separate alternating iterative training, the loss function optimizes the generator and the discriminator respectively. First, the optimization expression for the discriminator is:
[0113]
[0114] Among them, D(X) represents the discrimination of normal samples, and the closer it is to 1, the better; G(Z) represents the samples generated by the generator, and the closer D(G(Z)) is to 0, the better. Therefore, the overall value needs to be maximized.
[0115] Secondly, optimize the generator, and the expression is as follows:
[0116]
[0117] Optimizing the generator requires the discrimination result D(G(Z)) to be close to 1, that is, obtaining the smallest total value.
[0118] Finally, after iterative training of the generator and the discriminator, the generator can reconstruct normal samples well, and the discriminator can distinguish normal samples and abnormal samples well.
[0119] In this embodiment, as Figure 3 shown, the fault warning model further includes a fault type matching module to obtain the fault type according to the multivariate time series data whose abnormal score exceeds the threshold.
[0120] The fault type matching module is constructed based on the DTW algorithm. Extract the vehicles with serious abnormal scores, calculate the similarity between the multivariate time series data corresponding to the vehicle and the historical fault sequences. The fault type corresponding to the fault sequence with a high similarity score is the most likely fault to occur in the future for the vehicle, and finally the fault type is fed back to the driver.
[0121] The abnormal score of each segment of multivariate time series data is obtained through the abnormal detection model. The higher the score, the more serious the abnormality of the current state; however, it is difficult to determine what kind of fault this abnormality will cause. Therefore, this embodiment uses a fast fault type matching algorithm to determine the fault type that the abnormality will trigger, specifically as follows:
[0122]
[0123] The input of the fault type matching algorithm is a time series and a radius parameter. When the abnormal score is greater than the threshold (this embodiment uses 0.5), the abnormal sequence S with a score greater than 0.5 is extracted from the data source and input into the fault type matching algorithm. The abnormal sequence S will be compared with the fault sequence F, F = {F1, F2, …, F n}, F i = {Y1, Y2, …, Y n}, F i is the abnormal sequence before the fault occurs in the fault history data, and the radius is the distance outside the projected warping path searched from the previous resolution when refining the warping path. The output of the algorithm is the most likely fault type to occur in the future for the abnormal sequence S. The implementation process of this algorithm is as follows:
[0124] First, define the necessary parameters (line 1). ScoreDict and ScoreT Dict store the similarity between S and G i i.e., the shortest path length; minTSsize represents the minimum length of the time series at the lowest resolution.
[0125] Then, through a loop, perform a coarse filtering on n faults. For very short time series, directly run the DTW algorithm (line 5) to obtain a warping path D and the distance along this warping path between two time series, and store the distance in ScoreDict. For time series with a length greater than minTSsize, first create two new low-resolution time series, the number of points of which is half of the input time series (lines 9, 10). Obtain the low-resolution path and distance through FastDTW (line 11), and the distance is also stored in ScoreDict. Then extract the keys of the three smallest values in ScoreDict to form an FSet, that is, the subscripts of the three fault sequences F that are most similar to S.
[0126] Next, run FastDTW to obtain the similarity (distance) between S and the three time series in FSet, and store the distance in ScoreT Dict (lines 17, 18).
[0127] Finally, return the key of the minimum value in ScoreT Dict, that is, the type of fault Z that may occur in the future.
[0128] The algorithm obtains the top three most similar fault sequences at the coarse-grained level, and then obtains the most similar fault sequence at the fine-grained level. Since the calculation time at the coarse-grained level is less than that at the fine-grained level, the strategy of first screening on a large scale at the coarse-grained level and then performing fine calculation at the fine-grained level will save a lot of time.
[0129] The distances in lines 5, 11, and 17 are calculated using the following formula:
[0130]
[0131] The fault warning method disclosed in this embodiment analyzes the real-time multi-source time series data transmitted by vehicle sensors to achieve real-time fault warning during vehicle operation. This fault warning method is divided into two modules, namely, the anomaly detection module and the fault type matching module. The anomaly detection module is constructed based on GAN, CNN, and Conv-LSTM to extract multi-scale spatio-temporal features of multi-source time series data, improve the accuracy of anomaly detection, and finally obtain an anomaly score; in the fault type matching module, based on the DTW algorithm, the speed of fault type matching is improved by combining coarse and fine granularities, and finally the type of fault that may be caused is fed back to the driver.
[0132] Embodiment 2
[0133] This embodiment provides a vehicle fault warning system based on high-frequency time series data, including:
[0134] A data processing module, configured to sort the acquired vehicle operation data according to vehicle ID and time sequence, and after dividing it with different time windows, obtain multivariate time series data under different time windows;
[0135] A change detection module, configured to perform change detection on the sorted vehicle operation data to determine potential abnormal vehicles;
[0136] An anomaly detection module, configured to convert the multivariate time series data of potential abnormal vehicles under different time windows into a feature correlation graph according to the correlation relationship between multivariate variables, and judge the anomaly degree of potential abnormal vehicles according to the feature correlation graph to obtain the anomaly scores of potential abnormal vehicles under different time windows;
[0137] A fault type matching module, configured to match the fault type of the multivariate time series data whose anomaly score exceeds the threshold according to the anomaly scores under different time windows to obtain the fault type.
[0138] It should be noted here that the above modules correspond to the steps described in Embodiment 1, and the examples and application scenarios implemented by the above modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 1. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer executable instructions.
[0139] In more embodiments, there is also provided:
[0140] An electronic device, including a memory and a processor, and computer instructions stored on the memory and running on the processor. When the computer instructions are run by the processor, the method described in Embodiment 1 is completed. For the sake of brevity, it will not be elaborated here.
[0141] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0142] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0143] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the method described in Embodiment 1.
[0144] The method in Embodiment 1 can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can be located in well-known storage media in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0145] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0146] Although the specific implementation manners of the present invention have been described above in conjunction with the accompanying drawings, they do not limit the protection scope of the present invention. Those skilled in the art should understand that based on the technical solution of the present invention, various modifications or deformations that can be made by those skilled in the art without creative efforts are still within the protection scope of the present invention.
Claims
1. A vehicle fault warning method based on high-frequency time-series data, characterized in that Including: Sort the obtained vehicle operation data according to vehicle ID and time sequence, and after dividing by different time windows, obtain multivariate time series data under different time windows; Perform anomaly detection on the sorted vehicle operation data to determine potential abnormal vehicles; According to the correlation relationship between multivariate variables, convert the multivariate time series data of potential abnormal vehicles under different time windows into a feature correlation graph, and judge the degree of abnormality of potential abnormal vehicles according to the feature correlation graph to obtain the anomaly scores of potential abnormal vehicles under different time windows; According to the anomaly scores under different time windows, match the fault types of the multivariate time series data whose anomaly scores exceed the threshold to obtain the fault types; The process of judging the degree of abnormality of potential abnormal vehicles according to the feature correlation graph includes: extracting multi-scale spatio-temporal correlation features of the multivariate time series data according to the feature correlation graph to obtain the anomaly scores corresponding to the multivariate time series data under different time windows; Extract multi-scale spatio-temporal correlation features based on a generative adversarial network, specifically including: the generative adversarial network is constructed by multiple convolutional layers and long short-term memory networks, encodes the spatial features in the feature correlation graph through the convolutional layer, captures multi-scale spatial features through multiple convolutional layers, captures the time features corresponding to each convolutional layer through the long short-term memory network, and selects the most relevant time features through the time attention mechanism to complete the extraction of multi-scale spatio-temporal correlation features; The attributes of the vehicle operation data include engine coolant temperature, engine speed, boost pressure, vehicle speed, torque, and fuel consumption rate.
2. The vehicle fault warning method based on high-frequency time-series data according to claim 1, wherein Group the obtained vehicle operation data according to vehicle ID, sort by time, set a time window, insert the vehicle operation data at the next moment into the end of the corresponding queue according to vehicle ID, and extract the data at the head of the queue until the length of the queue reaches the length of the time window, and continue to insert the new vehicle operation data into the end of the queue to keep the queue length at the length of the time window all the time.
3. The vehicle fault warning method based on high-frequency time series data according to claim 1, wherein, The process of performing anomaly detection on the sorted vehicle operation data includes: judging whether there is abnormal fluctuation in the vehicle state according to the correlation relationship between the vehicle attributes at the current moment and the previous moment.
4. The vehicle fault warning method based on high-frequency time-series data according to claim 3, characterized in that, Obtain the feature correlation matrix of the vehicle operation data at the current moment through the Pearson correlation coefficient; Compare the size relationship between the feature correlation matrix at the current moment and the previous moment through the matrix F norm to judge whether there is abnormal fluctuation in the vehicle state.
5. A vehicle fault warning method based on high-frequency time-series data according to claim 1, characterized in that The process of fault type matching includes calculating the similarity between the multivariate time series data whose anomaly scores exceed the threshold and the historical fault sequence, and taking the fault type corresponding to the fault sequence with the highest similarity as the fault type of the vehicle.
6. A vehicle fault warning system based on high-frequency time-series data, characterized in that, Including: A data processing module configured to sort the obtained vehicle operation data according to vehicle ID and time sequence, and after dividing by different time windows, obtain multivariate time series data under different time windows; An anomaly detection module configured to perform anomaly detection on the sorted vehicle operation data to determine potential abnormal vehicles; Anomaly detection module, configured to convert multivariate time series data of potential abnormal vehicles in different time windows into a feature correlation graph according to the correlation relationship between multivariate variables, and determine the anomaly degree of potential abnormal vehicles based on the feature correlation graph to obtain the anomaly scores of potential abnormal vehicles in different time windows; Fault type matching module, configured to match the fault type of multivariate time series data with anomaly scores exceeding the threshold according to the anomaly scores in different time windows to obtain the fault type; The process of determining the anomaly degree of potential abnormal vehicles based on the feature correlation graph includes: extracting multi-scale spatio-temporal correlation features of multivariate time series data from the feature correlation graph to obtain the anomaly scores corresponding to the multivariate time series data in different time windows; The extraction of multi-scale spatio-temporal correlation features is based on a generative adversarial network, specifically including: the generative adversarial network is constructed by multiple convolutional layers and long short-term memory networks, encoding the spatial features in the feature correlation graph through convolutional layers, capturing multi-scale spatial features through multiple convolutional layers, capturing the time features corresponding to each convolutional layer through long short-term memory networks, and selecting the most relevant time features through a time attention mechanism to complete the extraction of multi-scale spatio-temporal correlation features; The attributes of the vehicle operation data include engine coolant temperature, engine speed, boost pressure, vehicle speed, torque, and fuel consumption rate.
7. An electronic device, characterized in that, It includes a memory, a processor, and computer instructions stored on the memory and running on the processor. When the computer instructions are run by the processor, the method according to any one of claims 1-5 is completed.
8. A computer-readable storage medium, characterized in that, For storing computer instructions, when the computer instructions are executed by the processor, the method according to any one of claims 1-5 is completed.
Citation Information
Patent Citations
Multivariate time series-based train brake system fault detection method
CN107703920A
Fault diagnosis method and fault diagnosis device for construction vehicle
CN112418460A
Toll station next-lane flow short-term prediction method fusing multi-scale LSTM and BP neural network
CN112801400A
Vehicle operation process fault diagnosis method and system based on multivariate time series data
CN113485302A