Track geometric dynamic detection invalid data identification method and system

By applying the semi-twin network structure and loss calculation module based on Transformer in orbital geometric dynamic detection data, the problem of difficulty in identifying invalid data in the data is solved, the accurate identification and removal of data is achieved, and the accuracy of analysis results is improved.

CN119720012APending Publication Date: 2025-03-28BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411736602.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing technology has problems in the orbital geometric dynamic detection data such as overfitting, inaccurate modeling of correlation relationships between dimensions, insufficient capture of long-term evolution trends of dynamic detection data, and unclear decision-making boundaries of abnormal categories.

Method used

Using a semi-twin network structure based on Transformer, the encoder learns data trends and extracts features, the decoder generates a target sequence, and trains through the loss calculation module including mutual information loss, consistency loss and prediction loss to identify and remove invalid data.

Benefits of technology

The accurate identification and removal of orbital dynamic detection data is achieved, the availability of data and the accuracy of analysis results are improved, and the impact of noise on model effects is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119720012A_ABST
    Figure CN119720012A_ABST
Patent Text Reader

Abstract

The invention provides a track geometric dynamic detection invalid data identification method and system, and belongs to the technical field of data processing. Track geometric dynamic detection data to be identified are acquired; and performing anomaly detection on the obtained geometric dynamic detection data of the track by utilizing a pre-trained invalid data identification model, calculating an anomaly score by adopting a DTW algorithm, if the anomaly score is greater than or equal to a threshold value, determining that the data is abnormal data, and otherwise, determining that the data is normal data. According to the invention, the two decoders perform collaborative learning to realize selection of clean samples in a data set; a loss calculation module is calculated by combining multiple losses of an encoder, a decoder and output data, a semi-twin network structure is effectively trained, and accurate identification of invalid data is realized; training samples are selected by using a semi-twin network structure, the network is updated only by using clean samples, and the influence of noise on the model effect is reduced; mutual information loss is calculated in a loss calculation module, and the ability of the decoder to acquire information from the encoder is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a method and system for identifying invalid data in track geometry dynamic detection based on Transformer. Background Art

[0002] The health of the track is closely related to the safe operation of high-speed rail. Therefore, the railway department regularly dispatches comprehensive track inspection trains to collect various indicators of the track in order to understand the safety status of the track. The long-term inspection of the comprehensive inspection train has accumulated a large amount of dynamic inspection data. Using data mining methods to analyze this data can discover information related to the health of the railway and provide decision-making guidance for railway safety management.

[0003] The data collected by the track comprehensive inspection train contains data anomalies and state anomalies. Data anomalies refer to the phenomenon that the inspection data caused by the external environment such as climate conditions, equipment status and other non-track environments show different trends from the data under normal circumstances. State anomalies refer to the phenomenon that the inspection data caused by the deformation of the track is different from the trend of normal data. The generation of data anomalies has nothing to do with the track state, and this type of data has brought interference to the data analysis work of the railway department. The anomaly detection task aims to establish a binary classification model based on the collected track data to distinguish normal data from abnormal data, thereby providing a pure data set for subsequent dynamic inspection data mining work and ensuring the accuracy of the conclusions obtained. The railway department has different ways of dealing with anomalies detected in the anomaly detection task. When analyzing the track condition, data anomalies are usually directly eliminated, while state anomalies may be potential safety hazards and are usually the focus of attention.

[0004] Multivariate time series anomaly detection is a very active research direction in deep learning, and a large number of useful theories have been accumulated. At present, the more mainstream anomaly detection methods mostly use unsupervised learning methods, using recurrent neural networks, convolutional neural networks, attention mechanisms and other networks to learn the changing trends of normal data, capture the correlation of normal data and give reliable anomaly detection results. However, due to the characteristics of dynamic inspection data, existing methods face challenges such as overfitting abnormal data, inaccurate modeling of correlations between dimensions, insufficient capture of long-term evolution trends of dynamic inspection data, and unclear decision boundaries of abnormal categories. Summary of the invention

[0005] The purpose of the present invention is to provide a Transformer-based method and system for identifying invalid data in track geometry dynamic detection, which can effectively identify anomalies and invalid data in track dynamic detection data, improve data availability and accuracy of analysis results, and solve at least one technical problem existing in the above-mentioned background technology.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions:

[0007] In a first aspect, the present invention provides a method for identifying invalid data in track geometry dynamic detection, comprising:

[0008] Acquire the track geometry dynamic detection data to be identified;

[0009] The acquired track geometry dynamic detection data is detected for anomalies using a pre-trained invalid data recognition model, and the DTW algorithm is used to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data. The invalid data recognition model includes: learning normal patterns in data based on a semi-twin network structure including a Transformer; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder generates a target sequence using the encoder output, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

[0010] Furthermore, the Transformer structure is used as the encoder, including a multi-head attention mechanism, a feedforward network, a residual connection, and a layer normalization component; multiple parallel attention mechanisms are introduced, the Softmax function is used to calculate the attention weights, the attention scores of all heads are concatenated, and finally the final output is obtained through a mapping, capturing the key information of the input data from multiple dimensions; the feedforward network performs nonlinear mapping on the contextual information obtained by the attention mechanism; the residual connection adds the input and output of the network; and layer normalization is used to calculate the mean and variance of samples in different dimensions.

[0011] Furthermore, the decoder consists of a feedforward network and a sigmoid function to generate prediction values; the two decoders share the output of the encoder but have different parameters to capture independent feature representations.

[0012] Furthermore, the calculation of mutual information loss is based on the concept of information entropy. By comparing the conditional entropy of the decoder output given the encoder output with the entropy of the decoder output, the amount of information obtained by the decoder from the encoder is measured, thereby enhancing the decoder's ability to obtain information from the encoder.

[0013] Furthermore, the KL divergence between the outputs of the two decoders is calculated to obtain the consistency loss to ensure that the two decoders can produce similar prediction results during the training process; the prediction loss is achieved by calculating the MSE between the model prediction value and the true value to ensure the prediction performance of the model.

[0014] Furthermore, the two decoders in the model predict labels separately. During the training phase, both decoders are trained using the pseudo-twin paradigm. That is, although their parameters are different, a comprehensive loss function composed of mutual information loss, consistency loss and prediction loss is used to update the network.

[0015] In a second aspect, the present invention provides a track geometry dynamic detection invalid data identification system, comprising:

[0016] An acquisition module, used for acquiring track geometry dynamic detection data to be identified;

[0017] The recognition module is used to use a pre-trained invalid data recognition model to perform anomaly detection on the acquired track geometry dynamic detection data, and use the DTW algorithm to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data; wherein, the invalid data recognition model includes: based on a semi-twin network structure including a Transformer, learning normal patterns in the data; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder uses the encoder output to generate a target sequence, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

[0018] In a third aspect, the present invention provides a non-transitory computer-readable storage medium, which is used to store computer instructions. When the computer instructions are executed by a processor, the Transformer-based track geometry dynamic detection invalid data identification method as described in the first aspect is implemented.

[0019] In a fourth aspect, the present invention provides a computer device comprising a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the invalid data identification method for track geometry dynamic detection based on Transformer as described in the first aspect.

[0020] In a fifth aspect, the present invention provides an electronic device, comprising: a processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the invalid data identification method for dynamic detection of track geometry based on Transformer as described in the first aspect.

[0021] The beneficial effects of the present invention are as follows: the two decoders learn collaboratively to select clean samples from the data set; the loss calculation module is calculated by combining multiple losses of the encoder, decoder and output data, and the semi-twin network structure is effectively trained to achieve accurate identification of invalid data; the semi-twin network structure is used to select training samples, and only clean samples are used to update the network to reduce the impact of noise on the model effect; the mutual information loss is calculated in the loss calculation module to enhance the decoder's ability to obtain information from the encoder.

[0022] Additional advantages of the present invention will be more clearly given in the following description or learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0024] Figure 1 This is an overall framework diagram of the invalid data identification model for track geometry dynamic detection based on Transformer according to an embodiment of the present invention.

[0025] Figure 2 This is a structural framework diagram of the semi-twin network encoder described in an embodiment of the present invention.

[0026] Figure 3 This is a structural framework diagram of the semi-twin network decoder described in an embodiment of the present invention.

[0027] Figure 4 This is a joint loss principle diagram of the loss calculation module described in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below by the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.

[0029] It should be understood by those skilled in the art that unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs.

[0030] It should also be understood that terms, such as those defined in commonly used dictionaries, should be understood to have a meaning consistent with that in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless as defined herein.

[0031] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements and / or groups thereof.

[0032] 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 invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. Different embodiments or examples described in this specification and features of different embodiments or examples may be combined and combined by those skilled in the art without contradiction.

[0033] To facilitate understanding of the present invention, the present invention is further explained below with reference to specific embodiments in conjunction with the accompanying drawings, and the specific embodiments do not constitute a limitation on the embodiments of the present invention.

[0034] Those skilled in the art should understand that the drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily necessary for implementing the present invention.

[0035] The present invention discloses work carried out from the aspect of anomaly detection of dynamic inspection data, optimizes the dynamic inspection data analysis method based on deep learning, captures the changing trend of data, accurately models the correlation between dimensions, realizes accurate anomaly detection of dynamic inspection data, provides technical support for the railway department to monitor the track health status, and enriches the relevant theories of dynamic inspection data analysis.

[0036] Example 1

[0037] In this embodiment 1, a track geometry dynamic detection invalid data identification system is first provided, including: an acquisition module, used to acquire track geometry dynamic detection data to be identified; an identification module, used to use a pre-trained invalid data identification model to perform anomaly detection on the acquired track geometry dynamic detection data, and use the DTW algorithm to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data; wherein the invalid data identification model includes: based on a semi-twin network structure including a Transformer, learning normal patterns in the data; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder generates a target sequence using the output of the encoder, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

[0038] In this embodiment, the above-mentioned system is used to implement a method for identifying invalid data in track geometry dynamic detection, including: obtaining track geometry dynamic detection data to be identified; using a pre-trained invalid data identification model to perform anomaly detection on the acquired track geometry dynamic detection data, and using the DTW algorithm to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data; wherein the invalid data identification model includes: based on a semi-twin network structure including a Transformer, learning normal patterns in the data; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder uses the output of the encoder to generate a target sequence, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

[0039] Among them, the Transformer structure is used as the encoder, including a multi-head attention mechanism, a feedforward network, a residual connection, and a layer normalization component; multiple parallel attention mechanisms are introduced, the Softmax function is used to calculate the attention weight, the attention scores of all heads are spliced, and finally the final output is obtained through a mapping, and the key information of the input data is captured from multiple dimensions; the feedforward network performs nonlinear mapping on the context information obtained by the attention mechanism; the residual connection adds the input and output of the network; and layer normalization is used to calculate the mean and variance of the samples in different dimensions. The decoder consists of a feedforward network and a Sigmoid function to generate prediction values; the two decoders share the output of the encoder, but have different parameters to capture independent feature representations.

[0040] The calculation of mutual information loss is based on the concept of information entropy. By comparing the conditional entropy of the decoder output given the encoder output with the entropy of the decoder output, the amount of information obtained by the decoder from the encoder is measured, thereby enhancing the decoder's ability to obtain information from the encoder.

[0041] The KL divergence between the outputs of the two decoders is calculated to obtain the consistency loss to ensure that the two decoders can produce similar prediction results during training; the prediction loss is achieved by calculating the MSE between the model prediction value and the true value to ensure the prediction performance of the model.

[0042] In the model, two decoders predict labels separately. In the training phase, the first step is to divide the input data X into windows. w = {W1, ..., W N-L+1}, Transformer encoder tencoder, Transformer decoder t-decoder, decoders Decoder 1 and Decoder 2, training round N k and N, a fixed value τ, a prediction loss weight α, and a mutual information loss weight β. For each element x in the sequence i , through different linear transformations, we get the query, key, and value of each header. The calculation formula is as follows: In the formula is the output of the previous encoder, All three are learnable parameters, representing the query, key, and value of the i-th attention head, respectively. head is the output dimension of each attention head, d head =d model / h, h is the number of attention heads.

[0043] The second step is to calculate the attention weights of each attention head by using the scaled dot product method, as shown in the formula below: Then the attention scores of all heads are concatenated and mapped once to get the final output.

[0044] The third step is to introduce mutual information loss in order to allow t-decoder to obtain more information from t-encoder. According to the formula Calculation. Mutual Information is an information measure in information theory. When the information of a random variable is known, mutual information can measure the degree of reduction in the uncertainty of another random variable. At the same time, the mutual information loss formula is: mi =H(tdec)-H(tdec|tenc) where H is the information entropy; calculate the symmetric KL divergence between the predictions p1 and p2 generated by the two decoders, the formula is: con =D KL (p1||p2)+D KL (p2||p1) is used to measure the similarity between the two decoders to ensure the consistency of the model prediction results; the prediction loss formula is calculated using the mean square error: d1 =MSE(p1,y),l d2 =MSE(p2,y),l sup = l d1 +l d2 , where y is the real data, ensuring that the difference between the model prediction result and the real value is as small as possible; calculate the joint loss l = (1-α-β)l con +αl sup +βl mi , where α is the prediction loss weight and β is the mutual information loss weight. Finally, repeat the above steps until the set training round N is reached, and finally obtain the trained ADformer model.

[0045] Example 2

[0046] like Figures 1 to 4 As shown, in this embodiment 2, a Transformer-based track geometry dynamic detection invalid data identification model is disclosed, and the use of this model can realize invalid data identification of track set dynamic detection data.

[0047] The invalid data recognition model described in this embodiment is based on a semi-twin network structure including a Transformer to learn normal patterns in the data.

[0048] Abnormal simulation data was added to the full-line detection data of a high-speed railway line to form a dynamic detection data set (DDD). A total of 5 common track anomalies were constructed, namely: sunlight interference anomaly, paper hanging interference anomaly, isolated over-limit anomaly caused by detection equipment failure, vehicle vertical acceleration anomaly caused by height unevenness, and equipment failure anomaly. The proportion of abnormal data in the data set is 1.35%. In order to ensure the stability of model training, the dynamic detection data is normalized to the maximum and minimum values, and the data range after normalization is compressed to [0,1) to avoid bias towards certain dimensions during network learning due to the dimensional differences of different dimensions of the dynamic detection data.

[0049] The encoder in the semi-twin network structure adopts the traditional Transformer structure, which consists of an encoder and two decoders. The encoder is used to learn the trend of input data and extract data features. The two decoders share the output of the encoder but have different parameters to capture independent feature representations.

[0050] The Transformer structure is used as the encoder, including a multi-head attention mechanism, a feedforward network, a residual connection, and a layer normalization component. Multiple parallel attention mechanisms are introduced, and the attention weights are calculated using the Softmax function. The attention scores of all heads are concatenated, and the final output is obtained through a single mapping, capturing the key information of the input data from multiple dimensions. In order to mask the information about future moments in the input data, so as to ensure that during the decoding process, the output at time t is based only on the output before time t and is not affected by the information after time t, the sequence mask is filled in the first attention module in the decoder.

[0051] The feedforward network performs nonlinear mapping on the context information obtained by the attention mechanism to improve the representation ability of the model. The residual connection module is added to add the input and output of the network, and the result of the input derivative is increased by 1, which solves the gradient vanishing problem and improves the training efficiency of the model. Finally, layer normalization is used to calculate the mean and variance of samples in different dimensions to make the gradient conduction more stable and solve the gradient explosion problem.

[0052] The decoder consists of a feedforward network and a sigmoid function to generate predictions. The two decoders share the output of the encoder but have different parameters to capture independent feature representations. This design allows the model to improve the accuracy of anomaly detection by comparing the outputs of the two decoders during training.

[0053] The invalid data identification model described in this embodiment calculates mutual information loss, consistency loss and prediction loss through a loss calculation module.

[0054] The loss calculation module includes three parts: mutual information loss, consistency loss, and prediction loss, which aims to effectively train the semi-twin network structure. The calculation of mutual information loss is based on the concept of information entropy. By comparing the conditional entropy of the decoder output given the encoder output with the entropy of the decoder output, the amount of information obtained by the decoder from the encoder is measured, and the ability of the decoder to obtain information from the encoder is enhanced. The KL divergence between the outputs of the two decoders is calculated to obtain the consistency loss to ensure that the two decoders can produce similar prediction results during training. The prediction loss is achieved by calculating the MSE between the model prediction value and the true value to ensure the prediction performance of the model. Both decoders in the model can predict labels separately, but in the training stage, both are trained using the pseudo-twin paradigm, that is, although their parameters are different, a joint loss is used at the same time to update the network, combining the mutual information loss, consistency loss, and prediction loss to form a comprehensive loss function for network training. The design of this joint loss helps to balance the model's performance in information extraction, consistency maintenance, and prediction accuracy. Finally, samples with small training loss are regarded as “clean” samples for sample selection. After obtaining small loss instances, the average loss on these instances is calculated for subsequent back-propagation calculations.

[0055] In the specific application of track geometry dynamic data anomaly detection based on Transformer, the trained model is used to detect anomalies on the test data. The DTW algorithm is used to calculate the anomaly score, and the formula is: If the score is greater than or equal to the threshold, it is abnormal data, otherwise it is normal data.

[0056] Example 3

[0057] This embodiment 3 provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the above-mentioned Transformer-based track geometry dynamic detection invalid data identification method is implemented. The method includes:

[0058] Acquire the track geometry dynamic detection data to be identified;

[0059] The acquired track geometry dynamic detection data is detected for anomalies using a pre-trained invalid data recognition model, and the DTW algorithm is used to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data. The invalid data recognition model includes: learning normal patterns in data based on a semi-twin network structure including a Transformer; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder generates a target sequence using the encoder output, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

[0060] Example 4

[0061] This embodiment 4 provides a computer device, including a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions executable by the processor, the processor calls the program instructions to execute the above-mentioned Transformer-based track geometry dynamic detection invalid data identification method, the method comprising:

[0062] Acquire the track geometry dynamic detection data to be identified;

[0063] The acquired track geometry dynamic detection data is detected for anomalies using a pre-trained invalid data recognition model, and the DTW algorithm is used to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data. The invalid data recognition model includes: learning normal patterns in data based on a semi-twin network structure including a Transformer; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder generates a target sequence using the encoder output, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

[0064] Example 5

[0065] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory, so that the electronic device executes instructions for implementing the above-mentioned Transformer-based track geometry dynamic detection invalid data identification method, the method comprising:

[0066] Acquire the track geometry dynamic detection data to be identified;

[0067] The acquired track geometry dynamic detection data is detected for anomalies using a pre-trained invalid data recognition model, and the DTW algorithm is used to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data. The invalid data recognition model includes: learning normal patterns in data based on a semi-twin network structure including a Transformer; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder generates a target sequence using the encoder output, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

[0068] In summary, an embodiment of the present invention provides a Transformer-based invalid data identification model for track geometry dynamic detection, which aims to solve the problems of high noise, complex correlation between variables, sparse abnormal data samples, etc. in high-speed railway dynamic detection data. The model effectively reduces the impact of noise on the model effect through a semi-twin network structure and a loss calculation module, enhances the decoder's ability to obtain information from the encoder, and ensures the accuracy of the model's prediction. The present invention also provides an application example of the model on a dynamic detection dataset, demonstrating its effectiveness and superior performance in anomaly detection tasks.

[0069] The recognition strategy of the present invention utilizes a loss calculation module and a semi-twin network structure. The encoder learns the input data trend and extracts data features, and the decoder uses the output of the encoder to generate a target sequence. The two decoders learn collaboratively to select clean samples in the data set. By combining the encoder, decoder and multiple losses of the output data, the loss calculation module is calculated, and the semi-twin network structure is effectively trained to achieve accurate recognition of invalid data. The training samples are selected using the semi-twin network structure, and only clean samples are used to update the network to reduce the impact of noise on the model effect. The semi-twin network structure consists of an encoder and two decoders. The encoder learns the input data trend and extracts data features, and the decoder uses the output of the encoder to generate a target sequence. The mutual information loss is calculated in the loss calculation module to enhance the decoder's ability to obtain information from the encoder. The loss calculation module includes the calculation of mutual information loss, consistency loss and prediction loss. The mutual information loss is obtained by calculating the information entropy difference between the decoder output and the encoder output. The consistency loss is calculated to constrain the similarity of the twin branch results. The consistency loss is obtained by calculating the KL divergence between the outputs of the two decoders. The prediction loss is calculated to ensure the accuracy of the model. The prediction loss is obtained by calculating the mean squared error between the decoder output and the true value.

[0070] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0071] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0072] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0073] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0074] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Technical personnel in the relevant field should understand that various modifications or variations that can be made by those skilled in the art without creative work on the basis of the technical solution disclosed in the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for identifying invalid data in track geometry dynamic detection, characterized in that: include: Acquire the track geometry dynamic detection data to be identified; The acquired track geometry dynamic detection data is detected for anomalies using a pre-trained invalid data recognition model, and the DTW algorithm is used to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data. The invalid data recognition model includes: learning normal patterns in data based on a semi-twin network structure including a Transformer; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder generates a target sequence using the encoder output, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

2. The method for identifying invalid data in track geometry dynamic detection according to claim 1, characterized in that: The Transformer structure is used as the encoder, including a multi-head attention mechanism, a feedforward network, a residual connection, and a layer normalization component. Multiple parallel attention mechanisms are introduced, and the Softmax function is used to calculate the attention weights. The attention scores of all heads are concatenated, and the final output is obtained through a mapping. The key information of the input data is captured from multiple dimensions. The feedforward network performs nonlinear mapping on the context information obtained by the attention mechanism. The residual connection adds the input and output of the network. Layer normalization is used to calculate the mean and variance of samples in different dimensions.

3. The method for identifying invalid data in track geometry dynamic detection according to claim 2, characterized in that: The decoder consists of a feed-forward network and a sigmoid function to generate predictions; the two decoders share the output of the encoder but have different parameters to capture independent feature representations.

4. The method for identifying invalid data in track geometry dynamic detection according to claim 1, characterized in that: The calculation of mutual information loss is based on the concept of information entropy. By comparing the conditional entropy of the decoder output given the encoder output with the entropy of the decoder output, the amount of information obtained by the decoder from the encoder is measured, thereby enhancing the decoder's ability to obtain information from the encoder.

5. The method for identifying invalid data in track geometry dynamic detection according to claim 4, characterized in that: The KL divergence between the outputs of the two decoders is calculated to obtain the consistency loss to ensure that the two decoders can produce similar prediction results during training; the prediction loss is achieved by calculating the MSE between the model prediction value and the true value to ensure the prediction performance of the model.

6. The method for identifying invalid data in track geometry dynamic detection according to claim 5, characterized in that: The two decoders in the model predict labels separately. During the training phase, both decoders are trained using the pseudo-twin paradigm. That is, although their parameters are different, a comprehensive loss function composed of mutual information loss, consistency loss and prediction loss is used to update the network.

7. A track geometry dynamic detection invalid data identification system, characterized in that: include: An acquisition module, used for acquiring track geometry dynamic detection data to be identified; The recognition module is used to use a pre-trained invalid data recognition model to perform anomaly detection on the acquired track geometry dynamic detection data, and use the DTW algorithm to calculate the anomaly score. If the anomaly score is greater than or equal to a threshold, it is abnormal data, otherwise it is normal data; wherein, the invalid data recognition model includes: based on a semi-twin network structure including a Transformer, learning normal patterns in the data; the semi-twin network structure includes an encoder and two decoders, the encoder learns input data trends and extracts data features, the decoder uses the encoder output to generate a target sequence, selects training samples, and uses clean samples to update the network; the loss calculation module includes a mutual information loss calculation unit, a consistency loss calculation unit, and a prediction loss calculation unit; the mutual information loss calculation unit is used to calculate the information entropy difference between the decoder output and the encoder output; the consistency loss calculation unit is used to calculate the KL divergence between the two decoder outputs; the prediction loss calculation unit is used to calculate the mean square error between the decoder output and the true value.

8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by the processor, the method for identifying invalid data in dynamic detection of track geometry as described in any one of claims 1-6 is implemented.

9. A computer device, characterized in that: It includes a memory and a processor, the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method for identifying invalid data in dynamic detection of track geometry as described in any one of claims 1-6.

10. An electronic device, characterized in that: include: A processor, a memory and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory so that the electronic device executes instructions for implementing the method for identifying invalid data in dynamic detection of track geometry as described in any one of claims 1-6.