Vehicle fault early warning method and device, storage medium and electronic equipment
By using the Transformer model's self-attention encoder and decoder to process subway sound signals, the problem of difficult to automatically identify vehicle failures in the prior art is solved, and efficient and accurate fault warning is achieved.
Patent Information
- Application Number
- CN202510095417.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing subway abnormality monitoring systems rely mostly on optical signals or manual judgments, making it difficult to identify and warn of potential vehicle failures, and insufficient sound signal monitoring equipment.
The self-attention encoder and self-attention decoder of the Transformer model are used to perform Fourier transform and double division of the sound signals during subway operation, and the spectrum word element sequence is constructed. Through the comparison of data in different sequences, the differences in normal and abnormal sound timings are amplified to determine the probability, type and location of the fault.
Automatic vehicle fault recognition is realized, the accuracy and efficiency of fault recognition is improved, and the dependence on manual judgment is reduced.
Smart Images

Figure CN119943062A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of rail transit control technology, and in particular to a vehicle fault warning method, a vehicle fault warning device, a storage medium and an electronic device. Background Art
[0002] With the rapid development of urban public transportation, subways, as the main means of transportation in large cities, are receiving more and more attention for their safe operation. Subways generate various sounds during operation, which contain rich information and can reflect the status of subway operation. Mainstream subway anomaly monitoring is mostly based on optical signals, and there are fewer devices that use sound signals. Even traditional subway sound monitoring systems rely more on manual judgment or simple sound intensity monitoring, which makes it difficult to identify and warn of potential problems. Summary of the invention
[0003] In view of this, the embodiments of the present disclosure are intended to provide a vehicle fault warning method, a vehicle fault warning device, a storage medium and an electronic device.
[0004] The technical solution of the present disclosure is achieved as follows:
[0005] In a first aspect, the present disclosure provides a vehicle fault warning method.
[0006] The vehicle fault warning method provided by the embodiment of the present disclosure includes:
[0007] Collect the sound signals generated by the train when it is running in the predetermined track section;
[0008] Performing Fourier transform on the sound signal, and constructing a spectrum word sequence based on dual division of the sound signal in the spatial domain and the frequency domain;
[0009] By inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, the difference between the normal sound time sequence and the abnormal sound time sequence is amplified by comparing different time series data, and the sound signal decoding features are obtained;
[0010] Based on the sound signal decoding features output by the self-attention decoder and the fault analysis model, the fault probability, fault type and fault location of the train operation fault obtained by analyzing the sound signal are determined.
[0011] In some embodiments, the step of collecting the sound signal generated by the train when it is running in a predetermined track section includes:
[0012] N is set at different positions within the predetermined track interval d A sound collector;
[0013] By the N dA sound collector collects sound signals at N positions when the train is running in the predetermined section of the track;
[0014] The method of performing Fourier transform on the sound signal and constructing a spectrum word sequence based on dual division of the sound signal in the space domain and the frequency domain includes:
[0015] For the N d N sound collectors collect d The sound signal at each position is Fourier transformed, and a spectrum word sequence is constructed based on the dual division of the sound signal in the spatial domain and the frequency domain.
[0016] In some embodiments, the d N sound collectors collect d The sound signal at each position is Fourier transformed, and based on the dual division of the sound signal in the spatial domain and the frequency domain, a spectrum word sequence is constructed, including:
[0017] The sound signal at each position is divided into N t segment sound signal;
[0018] After Fourier transform of each sound signal at each position, divide it into N f spectral word units;
[0019] Each sound signal at all positions is divided into N segments according to the superposition of the last sound signal at the previous position and the first sound signal at the next position. d The spectral word sequence corresponding to the sound signal at the position.
[0020] In some embodiments, the self-attention encoder has a plurality of self-attention encoding layers; the self-attention decoder has a plurality of self-attention decoding layers;
[0021] The method inputs the spectrum word sequence into the self-attention encoder and the self-attention decoder, and uses the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series to obtain the sound signal decoding features, including:
[0022] Inputting the spectrum word sequence into the multiple self-attention coding layers, and outputting the sound signal coding features in the last self-attention coding layer;
[0023] The sound signal encoding features are input into the multiple self-attention decoding layers, and the sound signal decoding features are output at the last self-attention decoding layer.
[0024] In some embodiments, the step of inputting the spectrum word sequence into the plurality of self-attention coding layers and outputting the sound signal coding features at the last self-attention coding layer comprises:
[0025] Get the initial spectrum word sequence f0; where f0 = [X j ], j∈{0, 1, …, N l ×N f -1};[X j ] is the jth spectral word; N l =(N t -1)*N d +1,N t N is the number of segments into which the sound signal generated within the predetermined duration of the train is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal;
[0026] The initial spectrum word sequence f0 is input into multiple self-attention coding layers for iteration, and the sound signal coding feature f output by the last self-attention coding layer is obtained. k ;in,
[0027] i represents the i-th self-attention encoding layer; 1≤i≤K;
[0028]
[0029] MHA stands for multi-head attention, FFN stands for feed-forward neural network; Q i is the query vector corresponding to the i-th self-attention encoding layer, K i The key vector corresponding to the i-th self-attention encoding layer, V i is the value vector corresponding to the i-th self-attention encoding layer.
[0030] In some embodiments, inputting the sound signal encoding feature into the multiple self-attention decoding layers, and outputting the sound signal decoding feature at the last self-attention decoding layer, comprises:
[0031] The sound signal encoding feature f output by the last self-attention encoding layer k As the input g0 of the first self-attention decoding layer; where g0 = [f kj ], j∈{0, 1, …, N l ×N f -1}; N l =(N t -1)*N d +1,N tN is the number of segments into which the sound signal generated within the predetermined duration of the train is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal;
[0032] The input g0 of the first self-attention decoding layer is input to multiple self-attention decoding layers for iteration, and the sound signal decoding feature g output by the last self-attention decoding layer is obtained. k ;in,
[0033]
[0034] MHA stands for multi-head attention, and FFN stands for feed-forward neural network; is the query vector corresponding to the i-th self-attention decoding layer, is the key vector corresponding to the i-th self-attention decoding layer, is the value vector corresponding to the i-th self-attention decoding layer.
[0035] In some embodiments, the fault analysis model includes a first fully connected layer, a second fully connected layer, and a third fully connected layer;
[0036] The method of determining the fault probability, fault type and fault location of a train operation fault obtained by analyzing the sound signal based on the sound signal decoding characteristics and the fault analysis model output by the self-attention decoder comprises:
[0037] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the first fully connected layer to obtain the failure probability p of the train running failure p ;
[0038] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the second fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train operation failure is determined by c ;
[0039] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the third fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train running fault is determined by the fault location section p s .
[0040] In some embodiments, the sound signal decoding feature is obtained by inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, and using the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series, including:
[0041] By inputting sample time series sound signal data with annotated abnormal information and sample time series sound signal data without annotated abnormal information into the self-attention encoder, sound signal encoding is performed, and sound signal decoding is performed in the self-attention decoder. The fault probability, fault type and fault location determined by the sound signal decoding characteristics output by the self-attention decoder meet the predetermined requirements, and the learning parameters of the self-attention encoder and the self-attention decoder are adjusted to obtain the self-attention encoder and the self-attention decoder for train operation fault analysis; wherein the learning parameters are used to determine the query vector, key vector and value vector in the self-attention encoder and the self-attention decoder.
[0042] In a second aspect, the present disclosure provides a vehicle fault warning device, comprising:
[0043] A signal acquisition module, used to collect sound signals generated by the train running in a predetermined track section;
[0044] A signal processing module, used for performing Fourier transform on the sound signal and constructing a spectrum word sequence based on dual division of the sound signal in the space domain and the frequency domain;
[0045] The sound signal decoding feature acquisition module is used to obtain the sound signal decoding feature by inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, and using the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series;
[0046] A fault prediction module is used to determine the fault probability, fault type and fault location of a train operation fault obtained by analyzing the sound signal based on the sound signal decoding characteristics output by the self-attention decoder and the fault analysis model.
[0047] In a third aspect, the present disclosure provides a computer-readable storage medium on which a vehicle fault warning program is stored. When the vehicle fault warning program is executed by a processor, the vehicle fault warning method described in the first aspect is implemented.
[0048] In a fourth aspect, the present disclosure provides an electronic device comprising a memory, a processor, and a vehicle fault warning program stored in the memory and executable on the processor, wherein when the processor executes the vehicle fault warning program, the vehicle fault warning method described in the first aspect is implemented.
[0049] The vehicle fault warning method provided by the embodiment of the present disclosure includes: collecting the sound signal generated by the train when it runs in the predetermined section of the track; performing Fourier transform on the sound signal, and constructing a spectrum word sequence based on the dual division of the spatial domain and frequency domain of the sound signal; by inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, using the comparison of different time series data, amplifying the difference between the normal sound time series and the abnormal sound time series, and obtaining the sound signal decoding feature; based on the sound signal decoding feature output by the self-attention decoder, determining the fault probability, fault type and fault location of the train operation fault obtained by analyzing the sound signal. In the vehicle fault warning method of the present application, the whole process does not require manual judgment, and the self-attention encoder and self-attention decoder of the Transformer model are used to process the spectrum word sequence features, and then the sound signal decoding feature is used to analyze the fault probability, fault type and fault location of the train operation fault. The whole process is conducive to improving the accuracy and efficiency of fault identification.
[0050] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a flow chart of a vehicle fault warning method according to an exemplary embodiment;
[0052] Figure 2 is a schematic diagram of the structure of a vehicle fault warning system according to an exemplary embodiment;
[0053] Figure 3 The figure is a schematic diagram of the structure of a vehicle fault warning device according to an exemplary embodiment. DETAILED DESCRIPTION
[0054] Embodiments of the present disclosure are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0055] With the rapid development of urban public transportation, subways, as the main means of transportation in large cities, are receiving more and more attention for their safe operation. Subways generate various sounds during operation, which contain rich information and can reflect the status of subway operation. Mainstream subway anomaly monitoring is mostly based on optical signals, and there are fewer devices that use sound signals. Even traditional subway sound monitoring systems rely more on manual judgment or simple sound intensity monitoring, which makes it difficult to identify and warn of potential problems.
[0056] In view of the above situation, the present disclosure provides a vehicle fault warning method. Figure 1 FIG. 1 is a flow chart of a vehicle fault warning method according to an exemplary embodiment. Figure 1 As shown, the vehicle fault warning method includes:
[0057] Step 10, collecting sound signals generated when the train runs in a predetermined track section;
[0058] Step 11, performing Fourier transform on the sound signal, and constructing a spectrum word sequence based on dual division of the sound signal in the spatial domain and the frequency domain;
[0059] Step 12: Input the spectrum word sequence into the self-attention encoder and the self-attention decoder, and use the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series to obtain the sound signal decoding feature;
[0060] Step 13: Based on the sound signal decoding features output by the self-attention decoder and the fault analysis model, determine the fault probability, fault type and fault location of the train operation fault obtained by analyzing the sound signal.
[0061] In this exemplary embodiment, the predetermined track section can be a fault detection track section for train operation that is set autonomously; the air domain is the space domain when the train is running, and the frequency domain is the signal frequency domain of the sound signal. Among them, the spectrum word sequence contains the space domain information of the sound signal and the signal spectrum characteristics of the sound signal corresponding to the space domain.
[0062] In this exemplary embodiment, the self-attention encoder and self-attention decoder in the Transformer model can be used to process the spectrum word sequence in this application, and the difference between the normal sound sequence and the abnormal sound sequence can be amplified by comparing different time series data to obtain the sound signal decoding features; the sound signal decoding features are then processed through a fully connected layer to determine the fault probability, fault type and fault location of the train operation fault. In the vehicle fault warning method of this application, the entire process does not require manual judgment. The self-attention encoder and self-attention decoder of the Transformer model are used to process the spectrum word sequence features, and then the sound signal decoding features are used to analyze the fault probability, fault type and fault location of the train operation fault. The entire process is conducive to improving the accuracy and efficiency of fault identification.
[0063] In some embodiments, the step of collecting the sound signal generated by the train when it is running in a predetermined track section includes:
[0064] N is set at different positions within the predetermined track interval d A sound collector;
[0065] By the N d The sound collectors collect N sound of the train running in the predetermined section of the track. d The sound signal at the position;
[0066] The method of performing Fourier transform on the sound signal and constructing a spectrum word sequence based on dual division of the sound signal in the space domain and the frequency domain includes:
[0067] For the N d N sound collectors collect d The sound signal at each position is Fourier transformed, and a spectrum word sequence is constructed based on the dual division of the sound signal in the spatial domain and the frequency domain.
[0068] In this exemplary embodiment, when collecting sound signals during train operation, sound collectors may be set at different locations in a predetermined track section to collect sound signals. d N sound collectors collect d The sound signal at each position is Fourier transformed, and a spectrum word sequence is constructed based on the dual division of the sound signal in the spatial domain and the frequency domain. The sound collection at multiple positions is conducive to more accurate fault analysis during train operation and improves the accuracy of fault analysis.
[0069] In some embodiments, the d N sound collectors collect d The sound signal at each position is Fourier transformed, and based on the dual division of the sound signal in the spatial domain and the frequency domain, a spectrum word sequence is constructed, including:
[0070] The sound signal at each position is divided into N t segment sound signal;
[0071] After Fourier transform of each sound signal at each position, divide it into N f spectral word units;
[0072] Each sound signal at all positions is divided into N segments according to the superposition of the last sound signal at the previous position and the first sound signal at the next position. d The spectral word sequence corresponding to the sound signal at the position.
[0073] In this exemplary embodiment, Figure 2 FIG. 1 is a schematic diagram of a vehicle fault warning system according to an exemplary embodiment. Figure 2As shown, the vehicle fault warning system may include four parts, which are divided into a terminal sound analysis device, a centralized analysis device, an alarm device and an external system. Among them, the terminal sound analysis device includes a sound collection module, a data preprocessing module, and a communication module; the centralized analysis device includes a prediction operation module and a communication module; wherein the terminal sound analysis device and the centralized analysis device communicate with each other through the communication module; the alarm device includes a display module and a buzzer. Among them, the communication module is used to send preprocessed sound signals and receive three signals sent by the centralized analysis device: vehicle code, start monitoring, and end monitoring. The sound collection module includes a plurality of high-sensitivity microphone arrays arranged beside the subway track to capture the sound signals during the operation of the subway in real time. The data preprocessing unit uses the Arm processor to perform preliminary processing of the sound signal, including signal amplification, filtering and digital conversion, and divides the sound signal during the travel time of a train into N according to uniform distribution. t = 100 segments, each segment divides the sound signal into N segments according to uniform distribution after Fourier transformation f = 100 spectral words, the dimension of each word is adjusted to N by principal component analysis d = 128, which is sent by the communication module to the centralized analysis device. In this way, the total number of spectral words can be obtained: N l *N f -1; where N l =(N t -1)*N d +1 to construct a spectrum word sequence, and then input the spectrum word sequence into the self-attention encoder and self-attention decoder, and use the comparison of different time series data to amplify the difference between normal sound time series and abnormal sound time series to obtain the sound signal decoding features. Then, the vehicle operation fault analysis is performed based on the sound signal decoding features. If a vehicle operation fault occurs, an alarm can be sounded through a buzzer.
[0074] In some embodiments, the self-attention encoder has a plurality of self-attention encoding layers; the self-attention decoder has a plurality of self-attention decoding layers;
[0075] The method inputs the spectrum word sequence into the self-attention encoder and the self-attention decoder, and uses the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series to obtain the sound signal decoding features, including:
[0076] Inputting the spectrum word sequence into the multiple self-attention coding layers, and outputting the sound signal coding features in the last self-attention coding layer;
[0077] The sound signal encoding features are input into the multiple self-attention decoding layers, and the sound signal decoding features are output at the last self-attention decoding layer.
[0078] In this exemplary embodiment, the step of inputting the spectrum word sequence into the plurality of self-attention coding layers and outputting the sound signal coding features in the last self-attention coding layer includes:
[0079] Get the initial spectrum word sequence f0; where f0 = [X j ], j∈{0, 1, …, N l ×N f -1};[X j ] is the jth spectral word; N l =(N t -1)*N d +1,N t N is the number of segments into which the sound signal generated within the predetermined duration of the train is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal;
[0080] The initial spectrum word sequence f0 is input into multiple self-attention coding layers for iteration, and the sound signal coding feature f output by the last self-attention coding layer is obtained. k ;in,
[0081] i represents the i-th self-attention encoding layer; 1≤i≤K;
[0082]
[0083] MHA stands for multi-head attention, FFN stands for feed-forward neural network; Q i is the query vector corresponding to the i-th self-attention encoding layer, K i The key vector corresponding to the i-th self-attention encoding layer, V i is the value vector corresponding to the i-th self-attention encoding layer.
[0084] In this exemplary embodiment, in, and are all learnable parameter matrices, f i-1 It is the sound signal encoding feature output by the i-1th self-attention encoding layer; 1≤i≤K.
[0085] In this exemplary embodiment, multi-head attention Among them, Q, K, and V are three matrices, namely the query vector (Query), the key vector (Key), and the value vector (Value); among them, the attention function is In this way, by iteratively encoding the spectral word-unit sequence in multiple self-attention coding layers, the sound signal coding features output by the last self-attention coding layer are finally obtained, and the spectral word-unit sequence encoding in the encoder has been completed.
[0086] In some embodiments, inputting the sound signal encoding feature into the multiple self-attention decoding layers, and outputting the sound signal decoding feature at the last self-attention decoding layer, comprises:
[0087] The sound signal encoding feature f output by the last self-attention encoding layer k As the input g0 of the first self-attention decoding layer; where g0 = [f kj ], j∈{0, 1, …, N l ×N f -1}; N l =(N t -1)*N d +1,N t N is the number of segments into which the sound signal generated within the predetermined duration of the train is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal;
[0088] The input g0 of the first self-attention decoding layer is input to multiple self-attention decoding layers for iteration, and the sound signal decoding feature g output by the last self-attention decoding layer is obtained. k ;in,
[0089]
[0090] MHA stands for multi-head attention, and FFN stands for feed-forward neural network; is the first query vector corresponding to the i-th self-attention decoding layer, is the first key vector corresponding to the i-th self-attention decoding layer, is the first value vector corresponding to the i-th self-attention decoding layer.
[0091] In this exemplary embodiment,
[0092] in,
[0093] g0=[f kj ], j∈{0, 1, …, N l ×N f -1};
[0094] in, and are all learnable parameter matrices, g i-1 is the sound signal decoding feature output by the i-1th self-attention decoding layer; 1≤i≤K; where Q in this embodiment i is the second query vector corresponding to the i-th self-attention decoding layer, K i The second key vector corresponding to the i-th self-attention decoding layer, V i is the second value vector corresponding to the i-th self-attention decoding layer.
[0095] In this exemplary embodiment, the data [X j ] Input the self-attention encoder. The encoder adds Multi-Head Attention (MHA) and FeedForward (FFN) based on the self-attention mechanism.
[0096] Then, the attention weight is obtained by calculating the similarity between the query vector and the key vector (used to characterize the influence of different elements in the value vector on the final result, and the weight of each word in the value vector on the output result). Then, the final attention value is obtained on the value vector through the similarity of the attention weight. Finally, the values returned by each attention head are concatenated together to obtain the decoded features of the sound signal output from the attention decoding layer.
[0097] In some embodiments, the fault analysis model includes a first fully connected layer, a second fully connected layer, and a third fully connected layer;
[0098] The method of determining the fault probability, fault type and fault location of a train operation fault obtained by analyzing the sound signal based on the sound signal decoding characteristics and the fault analysis model output by the self-attention decoder comprises:
[0099] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the first fully connected layer to obtain the failure probability p of the train running failure p ;
[0100] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the second fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train operation failure is determined by c ;
[0101] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the third fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train running fault is determined by the fault location section p s .
[0102] In this exemplary embodiment, the first fully connected layer is a fault probability prediction fully connected layer, which is used to predict the fault probability of a train running fault; wherein p p =FFN p (g k ), FFN p () is the first fully connected layer;
[0103] The second fully connected layer is a fault type prediction fully connected layer, which is used to predict the fault type of the train operation fault; where p c =FFN c (g k )Sigmoid(p p ), FFN c is the second fully connected layer, and Sigmoid() is the gating module;
[0104] The third fully connected layer is the fault location prediction fully connected layer, which is used to predict the fault location of the train running fault; among them, FFN s It is the third fully connected layer, and Sigmoid() is the gating module.
[0105] In this exemplary embodiment, the fault types include power abnormality, circuit abnormality, fuel supply abnormality, pressure abnormality, and equipment jam. p After a sigmoid gating module, if there is no fault, then p c and p s The output is invalid. In this way, the fault probability, fault type and fault location of the train operation fault can be obtained based on the sound signal decoding feature analysis through the above three fully connected layers.
[0106] In some embodiments, before obtaining the sound signal decoding feature by inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, and using the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series, the method includes:
[0107] Acquire sample time-series sound signal data with abnormal information marked and sample time-series sound signal data without abnormal information marked;
[0108] Inputting sample time series sound signal data labeled with abnormal information and sample time series sound signal data not labeled with abnormal information into the self-attention encoder, encoding the sound signals, and obtaining sample sound signal encoding features;
[0109] Decoding the sample sound signal encoding features through a self-attention decoder to obtain the sample sound signal decoding features;
[0110] Based on the sample sound signal decoding characteristics and the fault analysis model, the fault probability, fault type and fault location determined by the sample time series sound signal data are obtained, and the learning parameters of the self-attention encoder and the self-attention decoder are adjusted based on the fault probability, fault type and fault location determined by the sample time series sound signal data meeting the predetermined requirements, so as to optimize the self-attention encoder and the self-attention decoder for train operation fault analysis; wherein the learning parameters are used to determine the query vector, key vector and value vector in the self-attention encoder and the self-attention decoder.
[0111] In this exemplary embodiment, before vehicle fault diagnosis is performed, the learning parameters of the self-attention encoder and the self-attention decoder need to be trained to determine suitable learning parameters of the self-attention encoder and the self-attention decoder. The training process of the learning parameters can train the self-attention encoder and the self-attention decoder through sample time-series sound signal data with abnormal information and sample time-series sound signal data without abnormal information, and adjust the learning parameters of the self-attention encoder and the self-attention decoder based on the fault probability, fault type and fault location determined by the sample time-series sound signal data to meet the predetermined requirements, so as to optimize the self-attention encoder and the self-attention decoder used for train operation fault analysis, thereby obtaining suitable learning parameters of the self-attention encoder and the self-attention decoder.
[0112] Among them, the predetermined requirements can be determined according to the prediction accuracy of the required model. For example, the fault probability of the model meets the first prediction accuracy, the fault type of the model meets the second prediction accuracy, and the fault location of the model meets the third prediction accuracy; when the fault probability determined by analyzing the sample time series sound signal data meets the first prediction accuracy, the fault type meets the second prediction accuracy, and the fault location meets the third prediction accuracy, the learning parameters of the self-attention encoder and the self-attention decoder obtained at this time are the appropriate learning parameters of the self-attention encoder and the self-attention decoder. In this way, the appropriate learning parameters of the self-attention encoder and the self-attention decoder are determined, which is conducive to vehicle fault diagnosis.
[0113] The present disclosure provides a vehicle fault warning device. Figure 3 FIG. 1 is a schematic diagram of the structure of a vehicle fault warning device according to an exemplary embodiment. Figure 3 As shown, the vehicle fault warning device includes:
[0114] The signal acquisition module 30 is used to collect the sound signals generated by the train when it runs in the predetermined track section;
[0115] The signal processing module 31 is used to perform Fourier transform on the sound signal and construct a spectrum word sequence based on the dual division of the sound signal in the space domain and the frequency domain;
[0116] The sound signal decoding feature acquisition module 32 is used to obtain the sound signal decoding feature by inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, and using the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series;
[0117] The fault prediction module 33 is used to determine the fault probability, fault type and fault location of the train operation fault obtained by analyzing the sound signal based on the sound signal decoding characteristics output by the self-attention decoder and the fault analysis model.
[0118] In this exemplary embodiment, the self-attention encoder and self-attention decoder in the Transformer model can be used to process the spectrum word sequence in this application, and the difference between the normal sound sequence and the abnormal sound sequence can be amplified by comparing different time series data to obtain the sound signal decoding features; the sound signal decoding features are then processed through a fully connected layer to determine the fault probability, fault type and fault location of the train operation fault. In the vehicle fault warning method of this application, the entire process does not require manual judgment. The self-attention encoder and self-attention decoder of the Transformer model are used to process the spectrum word sequence features, and then the sound signal decoding features are used to analyze the fault probability, fault type and fault location of the train operation fault. The entire process is conducive to improving the accuracy and efficiency of fault identification.
[0119] In some embodiments, the signal acquisition module is used to
[0120] N is set at different positions within the predetermined track interval d A sound collector;
[0121] By the N d A sound collector collects sound signals at N positions when the train is running in the predetermined section of the track;
[0122] The signal processing module is used to
[0123] For the N d N sound collectors collect dThe sound signal at each position is Fourier transformed, and a spectrum word sequence is constructed based on the dual division of the sound signal in the spatial domain and the frequency domain.
[0124] In this exemplary embodiment, when collecting sound signals during train operation, sound collectors may be set at different locations in a predetermined track section to collect sound signals. d N sound collectors collect d The sound signal at each position is Fourier transformed, and a spectrum word sequence is constructed based on the dual division of the sound signal in the spatial domain and the frequency domain. The sound collection at multiple positions is conducive to more accurate fault analysis during train operation and improves the accuracy of fault analysis.
[0125] In some embodiments, the signal processing module is used to
[0126] The sound signal at each position is divided into N t segment sound signal;
[0127] After Fourier transform of each sound signal at each position, divide it into N f spectral word units;
[0128] Each sound signal at all positions is divided into N segments according to the superposition of the last sound signal at the previous position and the first sound signal at the next position. d The spectral word sequence corresponding to the sound signal at the position.
[0129] In this exemplary embodiment, the Arm processor is used to perform preliminary processing of the sound signal, including signal amplification, filtering and digital conversion, and the sound signal during the travel time of a train is divided into N uniformly distributed t = 100 segments, each segment divides the sound signal into N segments according to uniform distribution after Fourier transformation f = 100 spectral words, the dimension of each word is adjusted to d = 128 by principal component analysis, and sent to the centralized analysis device by the communication module. In this way, the total number of spectral words can be obtained: N l *N f -1; where N l =(N t -1)*N d +1 to construct a spectral word sequence, which is then input into the self-attention encoder and self-attention decoder. By comparing different time series data, the difference between normal sound time series and abnormal sound time series is amplified to obtain the decoding features of the sound signal.
[0130] In some embodiments, the self-attention encoder has a plurality of self-attention encoding layers; the self-attention decoder has a plurality of self-attention decoding layers;
[0131] The sound signal decoding feature acquisition module is used to
[0132] Get the initial spectrum word sequence f0; where f0 = [X j ], j∈{0, 1, …, N l ×N f -1};[X j ] is the jth spectral word; N l =(N t -1)*N d +1,N t N is the number of segments into which the sound signal generated within the predetermined duration of the train is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal;
[0133] The initial spectrum word sequence f0 is input into multiple self-attention coding layers for iteration, and the sound signal coding feature f output by the last self-attention coding layer is obtained. k ;in,
[0134] i represents the i-th self-attention encoding layer; 1≤i≤K;
[0135]
[0136] MHA stands for multi-head attention, FFN stands for feed-forward neural network; Q i is the query vector corresponding to the i-th self-attention encoding layer, K i The key vector corresponding to the i-th self-attention encoding layer, V i is the value vector corresponding to the i-th self-attention encoding layer.
[0137] In this exemplary embodiment, in, and are all learnable parameter matrices, f i-1 It is the sound signal encoding feature output by the i-1th self-attention encoding layer; 1≤i≤K.
[0138] In this exemplary embodiment, multi-head attention Among them, Q, K, and V are three matrices, namely the query vector (Query), the key vector (Key), and the value vector (Value); among them, the attention function is In this way, by iteratively encoding the spectral word-unit sequence in multiple self-attention coding layers, the sound signal coding features output by the last self-attention coding layer are finally obtained, and the spectral word-unit sequence encoding in the encoder has been completed.
[0139] The sound signal decoding feature acquisition module is used to
[0140] The sound signal encoding feature f output by the last self-attention encoding layer k As the input g0 of the first self-attention decoding layer; where g0 = [f kj ], j∈{0, 1, …, N l ×N f -1}; N l =(N t -1)*N d +1,N t N is the number of segments into which the sound signal generated within the predetermined duration of the train is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal;
[0141] The input g0 of the first self-attention decoding layer is input to multiple self-attention decoding layers for iteration, and the sound signal decoding feature g output by the last self-attention decoding layer is obtained. k ;in,
[0142]
[0143] MHA stands for multi-head attention, and FFN stands for feed-forward neural network; is the first query vector corresponding to the i-th self-attention decoding layer, is the first key vector corresponding to the i-th self-attention decoding layer, is the first value vector corresponding to the i-th self-attention decoding layer.
[0144] In this exemplary embodiment,
[0145] in,
[0146] g0=[f kj ], j∈{0, 1, …, N l ×N f -1};
[0147] in, and are all learnable parameter matrices, g i-1is the sound signal decoding feature output by the i-1th self-attention decoding layer; 1≤i≤K; where Q in this embodiment i is the second query vector corresponding to the i-th self-attention decoding layer, K i The second key vector corresponding to the i-th self-attention decoding layer, V i is the second value vector corresponding to the i-th self-attention decoding layer.
[0148] In this exemplary embodiment, the data [X j ] Input the self-attention encoder. The encoder adds Multi-Head Attention (MHA) and FeedForward (FFN) based on the self-attention mechanism.
[0149] The attention weight is obtained by calculating the similarity between the query vector and the key vector (used to characterize the influence of different elements in the value vector on the final result, and the weight of each word in the value vector on the output result). Then, the final attention value is obtained on the value vector through the similarity of the attention weight. Then, the values returned by each attention head are concatenated together through the concatenation operation (Concat).
[0150] In some embodiments, the fault analysis model includes a first fully connected layer, a second fully connected layer, and a third fully connected layer; the fault prediction module is used to
[0151] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the first fully connected layer to obtain the failure probability p of the train running failure p ;
[0152] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the second fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train operation failure is determined by c ;
[0153] The sound signal decoding feature g output by the last self-attention decoding layer k Input to the third fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train running fault is determined by the fault location section p s .
[0154] In this exemplary embodiment, the first fully connected layer is a fault probability prediction fully connected layer, which is used to predict the fault probability of a train running fault; wherein p p =FFN p (gk ), FFN p () is the first fully connected layer;
[0155] The second fully connected layer is a fault type prediction fully connected layer, which is used to predict the fault type of the train operation fault; where p c =FFN c (g k )Sigmoid(p p ), FFN c is the second fully connected layer, and Sigmoid() is the gating module;
[0156] The third fully connected layer is the fault location prediction fully connected layer, which is used to predict the fault location of the train running fault; among them, FFN s It is the third fully connected layer, and Sigmoid() is the gating module.
[0157] In this exemplary embodiment, the fault types include power abnormality, circuit abnormality, fuel supply abnormality, pressure abnormality, and equipment jam. p After a sigmoid gating module, if there is no fault, then p c and p s The output is invalid. In this way, the fault probability, fault type and fault location of the train operation fault can be obtained based on the sound signal decoding feature analysis through the above three fully connected layers.
[0158] In some embodiments, the sound signal decoding feature acquisition module 32 is used to obtain the sound signal decoding feature by inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, and using the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series.
[0159] Acquire sample time-series sound signal data with abnormal information marked and sample time-series sound signal data without abnormal information marked;
[0160] Inputting sample time series sound signal data labeled with abnormal information and sample time series sound signal data not labeled with abnormal information into the self-attention encoder, encoding the sound signals, and obtaining sample sound signal encoding features;
[0161] Decoding the sample sound signal encoding features through a self-attention decoder to obtain the sample sound signal decoding features;
[0162] Based on the sample sound signal decoding characteristics and the fault analysis model, the fault probability, fault type and fault location determined by the sample time series sound signal data are obtained, and the learning parameters of the self-attention encoder and the self-attention decoder are adjusted based on the fault probability, fault type and fault location determined by the sample time series sound signal data meeting the predetermined requirements, so as to optimize the self-attention encoder and the self-attention decoder for train operation fault analysis; wherein the learning parameters are used to determine the query vector, key vector and value vector in the self-attention encoder and the self-attention decoder.
[0163] In this exemplary embodiment, before vehicle fault diagnosis is performed, the learning parameters of the self-attention encoder and the self-attention decoder need to be trained to determine suitable learning parameters of the self-attention encoder and the self-attention decoder. The training process of the learning parameters can train the self-attention encoder and the self-attention decoder through sample time-series sound signal data with abnormal information and sample time-series sound signal data without abnormal information, and adjust the learning parameters of the self-attention encoder and the self-attention decoder based on the fault probability, fault type and fault location determined by the sample time-series sound signal data to meet the predetermined requirements, so as to optimize the self-attention encoder and the self-attention decoder used for train operation fault analysis, thereby obtaining suitable learning parameters of the self-attention encoder and the self-attention decoder.
[0164] Among them, the predetermined requirements can be determined according to the prediction accuracy of the required model. For example, the fault probability of the model meets the first prediction accuracy, the fault type of the model meets the second prediction accuracy, and the fault location of the model meets the third prediction accuracy; when the fault probability determined by analyzing the sample time series sound signal data meets the first prediction accuracy, the fault type meets the second prediction accuracy, and the fault location meets the third prediction accuracy, the learning parameters of the self-attention encoder and the self-attention decoder obtained at this time are the appropriate learning parameters of the self-attention encoder and the self-attention decoder. In this way, the appropriate learning parameters of the self-attention encoder and the self-attention decoder are determined, which is conducive to vehicle fault diagnosis.
[0165] The present disclosure provides a computer-readable storage medium on which a vehicle fault warning program is stored. When the vehicle fault warning program is executed by a processor, the vehicle fault warning method described in the above embodiments is implemented.
[0166] The present disclosure provides an electronic device, including a memory, a processor, and a vehicle fault warning program stored in the memory and executable on the processor. When the processor executes the vehicle fault warning program, the vehicle fault warning method described in the above embodiments is implemented.
[0167] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can determine instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or otherwise processing in a suitable manner if necessary, and then stored in a computer memory.
[0168] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0169] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0170] In the description of the present disclosure, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present disclosure and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present disclosure.
[0171] In addition, the terms "first", "second", etc. used in the embodiments of the present disclosure are only used for descriptive purposes and should not be understood as indicating or implying relative importance, or implicitly indicating the number of technical features indicated in the embodiments. Therefore, the features defined by the terms "first", "second", etc. in the embodiments of the present disclosure may explicitly or implicitly indicate that at least one of the features is included in the embodiment. In the description of the present disclosure, the word "multiple" means at least two or two or more, such as two, three, four, etc., unless otherwise clearly and specifically defined in the embodiments.
[0172] In the present disclosure, unless otherwise clearly specified or limited in the embodiments, the terms "installed", "connected", "connected" and "fixed" etc. appearing in the embodiments should be understood in a broad sense. For example, the connection can be a fixed connection, a detachable connection, or an integrated connection. It can be understood that it can also be a mechanical connection, an electrical connection, etc.; of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal connection of two elements, or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present disclosure can be understood according to the specific implementation situation.
[0173] In the present disclosure, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.
[0174] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.
Claims
1. A vehicle fault warning method, characterized in that: include: Collect the sound signals generated by the train when it is running in the predetermined track section; Performing Fourier transform on the sound signal, and constructing a spectrum word sequence based on dual division of the sound signal in the spatial domain and the frequency domain; By inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, the difference between the normal sound time sequence and the abnormal sound time sequence is amplified by comparing different time series data, and the sound signal decoding features are obtained; Based on the sound signal decoding features output by the self-attention decoder and the fault analysis model, the fault probability, fault type and fault location of the train operation fault obtained by analyzing the sound signal are determined.
2. The vehicle failure warning method according to claim 1, characterized in that: The collecting of sound signals generated by the train when it is running in a predetermined track section includes: N is set at different positions within the predetermined track interval d A sound collector; By the N d A sound collector collects sound signals at N positions when the train is running in the predetermined section of the track; The method of performing Fourier transform on the sound signal and constructing a spectrum word sequence based on dual division of the sound signal in the space domain and the frequency domain includes: For the N d N sound collectors collect d The sound signal at each position is Fourier transformed, and a spectrum word sequence is constructed based on the dual division of the sound signal in the spatial domain and the frequency domain.
3. The vehicle failure warning method according to claim 2, characterized in that: The N d N sound collectors collect d The sound signal at each position is Fourier transformed, and based on the dual division of the sound signal in the spatial domain and the frequency domain, a spectrum word sequence is constructed, including: The sound signal at each position is divided into N t segment sound signal; After Fourier transform of each sound signal at each position, divide it into N f spectral word units; Each sound signal at all positions is divided into N segments according to the superposition of the last sound signal at the previous position and the first sound signal at the next position. d The spectral word sequence corresponding to the sound signal at the position.
4. The vehicle failure warning method according to claim 2, characterized in that: The self-attention encoder has multiple self-attention encoding layers; the self-attention decoder has multiple self-attention decoding layers; The method inputs the spectrum word sequence into the self-attention encoder and the self-attention decoder, and uses the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series to obtain the sound signal decoding features, including: Inputting the spectrum word sequence into the multiple self-attention coding layers, and outputting the sound signal coding features in the last self-attention coding layer; The sound signal encoding features are input into the multiple self-attention decoding layers, and the sound signal decoding features are output at the last self-attention decoding layer.
5. The vehicle failure warning method according to claim 2, characterized in that: The spectral word sequence is input into multiple self-attention coding layers, and the sound signal coding features are output in the last self-attention coding layer, including: Get the initial spectrum word sequence f0; where f0 = [X j ], j∈{0, 1, …, N l ×N f -1};[X j ] is the jth spectral word; N l =(N t -1)*N d +1, N t N is the number of segments into which the sound signal generated within the predetermined duration of the train travel is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal; The initial spectrum word sequence f0 is input into multiple self-attention coding layers for iteration, and the sound signal coding feature f output by the last self-attention coding layer is obtained. k ;in, i represents the i-th self-attention encoding layer; 1≤i≤K; MHA stands for multi-head attention, FFN stands for feed-forward neural network; Q i is the query vector corresponding to the i-th self-attention encoding layer, K i The key vector corresponding to the i-th self-attention encoding layer, V i is the value vector corresponding to the i-th self-attention encoding layer.
6. The vehicle failure warning method according to claim 5, characterized in that: The step of inputting the sound signal encoding feature into the plurality of self-attention decoding layers and outputting the sound signal decoding feature at the last self-attention decoding layer comprises: The sound signal encoding feature f output by the last self-attention encoding layer k As the input g0 of the first self-attention decoding layer; where g0 = [f kj ], j∈{0, 1, …, N l ×N f -1}; N l =(N t -1)*N d +1, N t N is the number of segments into which the sound signal generated within the predetermined duration of the train travel is evenly divided. d is 128; N f The number of spectral words divided evenly after Fourier transformation of each sound signal; The input g0 of the first self-attention decoding layer is input to multiple self-attention decoding layers for iteration, and the sound signal decoding feature g output by the last self-attention decoding layer is obtained. k ;in, MHA stands for multi-head attention, and FFN stands for feed-forward neural network; is the query vector corresponding to the i-th self-attention decoding layer, is the key vector corresponding to the i-th self-attention decoding layer, is the value vector corresponding to the i-th self-attention decoding layer.
7. The vehicle failure warning method according to claim 2, characterized in that: The fault analysis model includes a first fully connected layer, a second fully connected layer and a third fully connected layer; The method of determining the fault probability, fault type and fault location of a train operation fault obtained by analyzing the sound signal based on the sound signal decoding characteristics and the fault analysis model output by the self-attention decoder comprises: The sound signal decoding feature g output by the last self-attention decoding layer k Input to the first fully connected layer to obtain the failure probability p of the train running failure p ; The sound signal decoding feature g output by the last self-attention decoding layer k Input to the second fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train operation failure is determined by c ; The sound signal decoding feature g output by the last self-attention decoding layer k Input to the third fully connected layer, and combine with the gating module to calculate the fault probability p p The output result of the train running fault is determined by the fault location section p s .
8. A vehicle fault warning device, characterized in that: include: A signal acquisition module, used to collect sound signals generated by the train running in a predetermined track section; A signal processing module, used for performing Fourier transform on the sound signal and constructing a spectrum word sequence based on dual division of the sound signal in the space domain and the frequency domain; The sound signal decoding feature acquisition module is used to obtain the sound signal decoding feature by inputting the spectrum word sequence into the self-attention encoder and the self-attention decoder, and using the comparison of different time series data to amplify the difference between the normal sound time series and the abnormal sound time series; A fault prediction module is used to determine the fault probability, fault type and fault location of a train operation fault obtained by analyzing the sound signal based on the sound signal decoding characteristics output by the self-attention decoder and the fault analysis model.
9. A computer-readable storage medium, characterized in that: A vehicle fault warning program is stored thereon, and when the vehicle fault warning program is executed by the processor, the vehicle fault warning method described in any one of claims 1 to 7 is implemented.
10. An electronic device, characterized in that: The invention comprises a memory, a processor and a vehicle fault warning program stored in the memory and executable on the processor. When the processor executes the vehicle fault warning program, the vehicle fault warning method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Voice recognition method, voice recognition device and terminal equipment
CN112037776A
Named entity identification method and device, equipment, medium and product
CN114298049A
Vehicle engine fault acoustic diagnosis method and system
CN115452392A
Bearing life prediction method based on improved Transform model
CN117473411A
Method and device for predicting noise outside railway vehicle and medium
CN117591822A