Railway track automatic detection method for rail turnout
By using overlapping sliding windows and deep learning temporal pattern recognition technology, the rail flaw detection vehicle data is divided into a temporal feature matrix. The MDTC backbone network and classifier are used to automatically detect the turnout points, which solves the problems of low detection efficiency and high false detection rate in the turnout area and achieves efficient and stable turnout area detection.
Patent Information
- Application Number
- CN202610808421.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-08-25
AI Technical Summary
Existing rail flaw detection vehicles have low detection efficiency, high false detection rate and difficulty in feature extraction in turnout areas. Traditional methods have poor adaptability and cannot meet the needs of high-speed detection.
The data collected by the rail flaw detection vehicle is divided into fixed-length window samples by using an overlapping sliding window, which is mapped into a temporal feature matrix. Then, the deep learning temporal pattern recognition method is used to automatically learn the fork center features through the MDTC backbone network and classifier, and output the fork center position and confidence level.
It enables automatic detection of rail turnout sections, improves detection efficiency, reduces false detection rate, adapts to different track and turnout section types, supports edge deployment, and has robustness and high generalization ability.
Smart Images

Figure CN122634149A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of railway rail flaw detection technology and is applied to large railway maintenance machinery. In particular, it relates to an automatic detection method for rail turnout areas based on deep learning temporal pattern recognition. Background Technology
[0002] Currently, the mainstream rail flaw detection methods include manual rail flaw detectors and rail flaw detection vehicles, both based on the principle of ultrasonic testing. Unlike manual rail flaw detectors, which can repeatedly detect flaws on-site, rail flaw detection vehicles rely on B-mode images generated from multi-channel ultrasonic information (including location, depth, and channels) reflected from internal rail damage for analysis. When the rail flaw detection vehicle passes through turnout areas at high speed, factors such as the material and structure of the turnouts create blind spots and generate significant clutter interference in the B-mode images, increasing the difficulty of damage identification during playback analysis. Therefore, damage identification in turnout areas currently relies primarily on manual rail flaw detectors, supplemented by rail flaw detection vehicles. However, manual rail flaw detectors require a large workforce and have a slow detection speed (<2km / h), making them unsuitable for the high-speed inspection requirements of railways.
[0003] There are numerous classification standards for turnouts. Based on function and purpose, they are divided into five standard types: single turnout, symmetrical turnout, three-way turnout, crossover, and double-crossing turnout. Based on rail type, they are divided into 43 kg / m, 50 kg / m, 60 kg / m, and 75 kg / m rail turnouts. Based on number, they are divided into 6, 7, 8, 9, 12, 18, and larger numbers (30, 38, 42), etc. Based on track gauge, they are divided into standard gauge turnouts (1435mm), narrow gauge turnouts (1000mm), wide gauge turnouts (1520mm), and double-track turnouts. Based on sleeper type, they are divided into wooden sleeper turnouts, reinforced concrete sleeper turnouts, and integral ballast turnouts. Based on design year, they are divided into Type 55, Type 57, Type 62, Type 75, Type 92, high-speed type, and passenger dedicated line turnouts, etc. Faced with the complex and ever-changing structure of branch areas, traditional methods based on manual rules, sampling distribution, and clustering have emerged in the past. However, results show that these methods have poor adaptability, insufficient generalization ability, and are prone to missed detections and false detections. At the same time, due to the multidimensional, temporal, and sparsity characteristics of the inspection data collected by rail flaw detection vehicles, traditional methods are unable to reliably extract key features that can be used for discrimination.
[0004] With the rapid development of artificial intelligence technology and its widespread application in industrial inspection, even when faced with complex and ever-changing turnout structures, AI algorithms can enable the discovery of subtle features in turnouts. However, in current rail flaw detection scenarios, there is still a lack of complete technical solutions that combine pattern recognition with turnout detection while balancing accuracy and lightweight design for multi-dimensional, sparse, and highly time-series rail inspection data.
[0005] Among the existing technologies, the following documents are most similar to this application: Reference 1 is a Chinese invention application filed by Xi'an University of Technology on June 22, 2022, and published on September 20, 2022, with publication number CN115082404A. This application discloses a method for identifying rail damage based on ultrasonic B-mode data. The steps are as follows: 1) Collecting B-mode data of damage using an ultrasonic flaw detection vehicle; 2) Drawing B-mode images of damage to obtain cropped B-mode images of damage; 3) Labeling the cropped B-mode images of damage to establish a sample library of typical B-mode images of damage; 4) Training an image classification model based on the B-mode image samples of damage to construct a damage identification model; 5) Dividing the B-mode data of damage from step 1 into ultrasonic information combination data to obtain ultrasonic information combination data; 6) Dividing the ultrasonic information combination data of damage into ultrasonic information groups to achieve complete damage data extraction; 7) Redrawing the B-mode image of damage, with the redrawn B-mode image containing only one ultrasonic information group of damage; 8) Using the redrawn B-mode image as input to the damage identification model for intelligent damage identification; This method has the characteristics of improving damage assessment efficiency and reducing false alarm rate and false negative rate. However, turnouts are a special section of the rail. This application targets B-images drawn from raw data collected by a flaw detection vehicle, and trains a damage recognition model on cropped damaged B-images. This does not help in the identification of turnout areas.
[0006] Document 2 is a Chinese invention application filed by Beijing Aerospace Data Co., Ltd. on February 24, 2025, and published on June 24, 2025, with publication number CN120198714A. This application discloses a railway turnout identification method, device, equipment, and medium. The method according to this application includes: S1, constructing a classification network and obtaining training data; customizing the training data of the classification network to obtain a trained railway turnout classification model; S2, acquiring real-time three-dimensional visual point cloud data of the turnout track shape, and processing the three-dimensional visual point cloud data of the turnout track shape using the railway turnout classification model to obtain turnout track shape classification data; S3, adding the turnout track shape classification data to a preset sliding window queue, maintaining the preset sliding window queue at a preset length; S4, obtaining the railway turnout classification result through statistical analysis of the sliding window queue. The technical solution provided by this application can improve the accuracy of visual turnout identification in the railway industry by comprehensively considering the left and right rail states within a time window. However, the turnout data analyzed in this application is three-dimensional visual point cloud data collected by a three-dimensional visual point cloud acquisition device. At the same time, the scheme aims to classify the normal rail profile and the suspected turnout profile in order to determine the starting point of the turnout. Summary of the Invention
[0007] In view of this, the purpose of this application is to provide an automatic detection method for rail turnout areas, so as to solve the technical problems of low detection efficiency, high false detection rate and difficulty in feature extraction of existing rail flaw detection vehicles in turnout area detection.
[0008] To achieve the aforementioned objectives, this application specifically provides a technical implementation scheme for an automatic detection method for rail turnout areas, comprising the following steps: S1) The raw echo data collected by the rail flaw detection vehicle is divided into fixed-length window samples and labeled using an overlapping sliding window. S2) For each window sample, map the echo data within the window into a time-series feature matrix; S3) After inputting the time-series feature matrix into the branch line detection model, the model outputs time-step probabilities. During the training phase of the branch line detection model, window-level supervised loss and optimization strategies are used to train the model parameters. During the inference phase of the branch line detection model, threshold determination, overlap fusion, and interval merging are performed on the window-level results to output the branch center position range.
[0009] Furthermore, the window sample data input to the turnout line detection model is a time-series feature matrix of T×3C dimensions, where: T is the window length, i.e. the number of time steps, which is determined by the sliding window configuration; C is the number of channels of the ultrasonic probe; and 3 is the number of depth zones, which divides the longitudinal depth information of the rail into three sub-zones: top, middle and bottom. Each echo point is assigned to the corresponding sub-zone according to its depth and participates in the channel counting under that sub-zone, so that the model can distinguish the echo distribution of the rail head, rail web and rail bottom.
[0010] The channel dimension data for each time step includes: Position coordinates along the direction of rail travel, corresponding to the time dimension; Depth subband labels correspond to the top, middle, or bottom of the feature dimension; Channel type label, corresponding to the specific channel of the feature dimension; After normalization, the three types of information form a dense feature matrix.
[0011] Furthermore, the data output by the branch line detection model is the time step-level branch center probability in the B×T×1 dimension, where: B is the batch size; T is the number of time steps; the output value is a floating-point number between 0 and 1, representing the probability that a branch center exists at the corresponding position of each time step; after threshold judgment and overlap fusion, the final data output by the branch line detection model is: the start position, end position and confidence value of the branch center.
[0012] Furthermore, step S3) includes: S31) The preprocessing layer projects the input temporal feature matrix of B×T×3C dimensions into the internal representation space of the branch line detection model, providing a unified dimension input for subsequent feature extraction; S32) The MDTC backbone network extracts multi-scale feature representations from the temporal feature matrix; In step S32), multiple TCN blocks are organized into a TCN stack with increasing dilation rates. The dilation rate within each stack increases exponentially, forming a multi-scale receptive field. Each TCN block includes a depthwise separable dilatational convolutional layer, a batch normalization layer, a ReLU activation layer, and residual connections. The depthwise separable dilatational convolutional layer employs a depthwise convolution + pointwise convolution structure. The depthwise convolution performs dilatational convolution on each channel in the temporal dimension, expanding the receptive field temporally through the dilation rate. The pointwise convolution performs 1×1 convolution on the depthwise convolution output, fusing it in the channel dimension to learn the interaction relationships between channels. The batch normalization layer performs batch normalization on the convolution output. The first step is to achieve batch normalization, which stabilizes training, accelerates convergence, and improves the model's generalization ability. The ReLU activation layer applies non-linear activation after batch normalization. When the number of input and output channels is the same, the residual connection adds the block input to the output of the depthwise separable dilated convolution, the batch normalization layer, and the ReLU activation layer as the block output, which alleviates gradient vanishing in deep networks, accelerates training, and facilitates multi-scale stacking. The multi-scale feature fusion module extracts features from TCN stacks of different depths, aligns the outputs of all stacks to the same time length, and fuses multi-scale features through weighted summation, direct summation, or concatenation to provide a more comprehensive feature representation. The S33 classifier maps the features of each time step output by the MDTC backbone network to obtain the time-series-level cross-core probability.
[0013] Furthermore, the classifier adopts a two-layer fully connected structure, and step S34) includes the following process: A linear rectified activation layer (ReLU) and a random deactivation layer (Dropout) are set between the two fully connected layers. The last layer is activated by the sigmoid activation function to obtain the cross-center probability at each time step, and outputs a tensor of dimension B×T×1. During the model training phase, the temporal output is aggregated into a window-level supervision signal by max pooling loss. During the model inference phase, the window-level cross-center confidence is obtained by using an aggregation method that includes taking the maximum value along the time dimension.
[0014] Furthermore, step S3) includes: During the model training phase, the branch line detection model maps the B×T×3C dimension input feature matrix to a B×T×3D dimension continuous vector representation through an embedding layer, realizing continuous vector encoding of channel types and providing a unified dimension input for subsequent convolutions. Feature extraction is performed through the MDTC backbone network, and the multi-scale fusion features output by the MDTC backbone network are input into the classifier to output the branch center probability at each time step. Window-level supervised loss is used to update the model parameters through backpropagation and the Adam optimizer, while learning rate decay and gradient clipping strategies are used to complete model training.
[0015] Furthermore, step S3) includes: During the model inference phase, the branch line detection model constructs a time-series feature matrix of the same format for the segmented window samples using the same window parameters as in the training phase. The matrix passes through a preprocessing layer, the MDTC backbone network, and a classifier in sequence to obtain the branch center probability at each time step. The time step probability is compared with a preset threshold, and those exceeding the threshold are determined as branch center candidates. The detection results of overlapping windows are fused, and adjacent windows are merged into a continuous branch center position range. The final branch center start and end positions, confidence level, and branch information are then output.
[0016] Furthermore, step S1) includes: The position sequence along the rail travel direction is treated as a time series, with each position corresponding to a time step; depth information is mapped to the feature dimension through segmentation or binning to preserve structural information in the depth direction; different channel types are mapped to different feature channels to preserve multi-channel detection information.
[0017] Furthermore, step S1) includes: Create an initial T×3C dimension all-zero feature matrix; The depth range is divided into three sub-zones: top, middle, and bottom, with each sub-zone representing a different depth region; Iterate through each sampling point in the window and fill in the feature value at the corresponding position according to the sampling point's position, depth information, and channel type; The feature matrix is normalized to reduce the dimensional differences between different channels or depth ranges. For sparse sampling point distributions, a padding or default value strategy is used to ensure the effectiveness of the feature matrix.
[0018] Furthermore, step S2) includes: Continuous detection data is divided into fixed-length window samples using an overlapping sliding window; the window length and window step size are given by configuration, and the window step size is smaller than the window length to achieve overlapping sampling. Each window is assigned a category label (either a fork center or a non-fork center) based on the annotation information, and organized into positive and negative sample sets as needed for training. Each window stores its start and end position indices, which are used in subsequent inference stages to restore the window-level discrimination results to the actual position range in the rail.
[0019] By implementing the technical solution of the automatic detection method for rail turnout areas provided in this application, the following beneficial effects are achieved: (1) The automatic detection method for rail turnout area of this application represents the detection data as time-series features and uses time-series convolution for window-level discrimination. It can automatically learn the features of the turnout center and support continuous detection through streaming processing, thus solving the technical problems of low detection efficiency, high false detection rate and difficulty in feature extraction of existing rail turnout area detection methods. (2) The automatic detection method for rail turnout area of this application maps the multidimensional data (position, depth, channel) of track detection into a time-series feature matrix, and integrates depth information by using depth slicing or binning, and integrates the depth information into the feature representation, which can preserve the time sequence and multidimensional structural information. (3) The automatic detection method for rail turnout area of this application adopts MDTC backbone network (depth separable + dilated convolution), multi-scale stacking fusion, which significantly reduces the number of parameters and computation, and is suitable for edge deployment. At the same time, non-causal temporal convolution is used to utilize bidirectional context information to adapt to the temporal and multi-dimensional characteristics of the detection data. (4) The automatic detection method for rail turnout area of this application applies deep learning time sequence pattern recognition to turnout core detection. It adopts bidirectional sliding window, time / channel mask and other enhancements, as well as window-level loss aggregation strategy, which can improve robustness, generalization and detection stability, and adapt to different line and turnout area types. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the echo points of a typical fork in each channel; Figure 2 This is a comparative schematic diagram of the actual fork structure; Figure 3 This is a system structure block diagram of a specific embodiment of the automatic detection device for rail turnout areas on which the method of this application is based; Figure 4This is a flowchart of a specific embodiment of the automatic detection method for rail turnout areas in this application; Figure 5 This is a flowchart of the data mapping process in a specific embodiment of the automatic detection method for rail turnout areas of this application; Figure 6 This is a flowchart illustrating the feature matrix construction process in a specific embodiment of the automatic detection method for rail turnout areas in this application. Figure 7 This is a system architecture block diagram of the turnout section track detection model in a specific embodiment of the automatic track detection device for rail turnout sections on which the method of this application is based; Figure 8 This is a schematic diagram of the TCN block in a specific embodiment of the automatic detection device for rail turnout areas on which the method of this application is based; Figure 9 This is a flowchart of the multi-scale feature fusion process in a specific embodiment of the automatic detection method for rail turnout areas in this application; Figure 10 This is a block diagram of the classifier structure in a specific embodiment of the automatic detection device for rail turnout areas on which the method of this application is based; Figure 11 This is a flowchart of the training process for the turnout section track detection model in a specific embodiment of the automatic detection method for rail turnout sections of this application. Figure 12 This is a flowchart illustrating the reasoning process of the turnout section track detection model in a specific embodiment of the automatic detection method for rail turnout sections in this application. Figure 13 This is a flowchart illustrating the overall logical relationship of a specific embodiment of the automatic detection method for rail turnout areas in this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] As attached Figure 1 To be continued Figure 13 As shown, a specific embodiment of the automatic detection method for rail turnout areas of this application is given. The application will be further described below with reference to the accompanying drawings and specific embodiments.
[0024] Although clutter interference is strong in the B-type diagram of the fork area, its inherent internal structure (such as the fork center) still exhibits certain identifiable patterns. (See attached diagram.) Figure 1As shown, the echoes of a typical rail fork are mainly composed of echo points from the rail head channels (F_C70, R_C70, F_XF70, R_XF70), rail waist channels (F45, R45), and rail bottom channels (FLER, RLER, FLER0, RLER0). Spatially, the echo points of the F_XF70 channel are mostly concentrated in the upper right corner, the R_XF70 channel echoes are mostly concentrated in the upper left corner, the F45 and F45Base channel echoes are mostly concentrated in the lower left corner, and the R45 and R45Base channel echoes are mostly concentrated in the lower right corner, exhibiting an irregular and dense distribution. (See attached image.) Figure 2 As shown in the elliptical frame, the fork center region is often accompanied by echoes from joints and irregular screw holes, which differ significantly from the echo distribution of the basic rail section. This provides a structured basis for the automatic detection of the fork center. Analysis and comparison of typical fork center B-type diagrams show that this pattern can provide prior evidence for the deep learning-based automatic identification method of this application.
[0025] Based on the above theoretical foundation, this application designs an automatic detection method for rail turnout areas based on deep learning temporal pattern recognition with the goal of turningout point location and identification. The rail detection data is regarded as a time-series signal, and deep learning temporal pattern recognition is used to realize the location and identification of the turningout point.
[0026] Example 1 As attached Figure 3 As shown, an embodiment of an automatic track detection device for rail turnout areas based on the method of this application specifically includes: The data segmentation module uses an overlapping sliding window to segment the raw echo data collected by the rail flaw detection vehicle into fixed-length window samples and then labels them. The data preprocessing module maps the echo data within each window sample into a time-series feature matrix. The branch line detection model takes a time-series feature matrix as input and outputs time-step probabilities. During training, window-level supervised loss and optimization strategies are used to train the model parameters. During inference, thresholding, overlap fusion, and interval merging are performed on the window-level results to output the branch center position range.
[0027] The window sample data input to the turnout line detection model is a time-series feature matrix of T×3C dimensions, where: T is the window length, i.e. the number of time steps, which is determined by the sliding window configuration; C is the number of channels of the ultrasonic probe; and 3 is the number of depth zones, which divides the longitudinal depth information of the rail into three sub-zones: top, middle and bottom. Each echo point is assigned to the corresponding sub-zone according to its depth and participates in the channel counting under that sub-zone, so that the model can distinguish the echo distribution of the rail head, rail web and rail bottom.
[0028] The channel dimension data at each time step further includes: Position coordinates along the direction of rail travel, corresponding to the time dimension; Depth subband labels correspond to the top, middle, or bottom of the feature dimension; Channel type label, corresponding to the specific channel of the feature dimension; After normalization, the three types of information form a dense feature matrix.
[0029] The data output by the branch line detection model is the time step-level branch center probability in the B×T×1 dimension, where: B is the batch size; T is the number of time steps; the output value is a floating-point number between 0 and 1, representing the probability that a branch center exists at the corresponding position of each time step; after threshold judgment and overlap fusion, the final data output by the branch line detection model is: the start position, end position and confidence value of the branch center.
[0030] As attached Figure 7 As shown, the branch line detection model includes a preprocessing layer, an MDTC backbone network, and a classifier. The MDTC backbone network further includes TCN stacking and multi-scale feature fusion units.
[0031] The preprocessing layer projects the input temporal feature matrix of B×T×3C dimensions into the internal representation space of the branch line detection model, providing a unified dimension input for subsequent feature extraction; The MDTC backbone network first undergoes an initial feature transformation at the input end through a temporal convolutional block with an expansion rate of 1, and then enters one or an even number of TCN stacks to extract multi-scale feature representations from the temporal feature matrix; Multiple TCN blocks are organized into a TCN stack in an increasing expansion rate manner, with the expansion rate within each stack increasing exponentially to form a multi-scale receptive field; as shown in the attached figure. Figure 8 As shown, the TCN block further includes a depthwise separable dilatational convolutional layer, a batch normalization layer, a ReLU activation layer, and residual connections. The depthwise separable dilatational convolutional layer adopts a depthwise convolution + pointwise convolution structure. The depthwise convolution performs dilatational convolution on each channel in the temporal dimension, expanding the receptive field temporally through the dilatation rate. The pointwise convolution performs 1×1 convolution on the output of the depthwise convolution, fusing them in the channel dimension to learn the interaction relationship between channels. The batch normalization layer performs batch normalization on the convolution output, stabilizing training, accelerating convergence, and improving the model's generalization ability. The ReLU activation layer... The active layer applies non-linear activation after batch normalization. When the number of input and output channels is the same, the residual connection adds the block input to the output of the depthwise separable dilated convolution, batch normalization layer, and ReLU activation layer as the block output, which alleviates gradient vanishing in deep networks, accelerates training, and facilitates multi-scale stacking. The multi-scale feature fusion module extracts features from TCN stacks of different depths, aligns the outputs of all stacks to the same time length, and fuses multi-scale features through weighted summation, direct summation, or concatenation to provide a more comprehensive feature representation. The classifier maps the features at each time step of the MDTC backbone network output to obtain the time-series-level fork-center probabilities.
[0032] As attached Figure 10 As shown, the classifier further employs a two-layer fully connected structure, with a ReLU linear rectified activation layer and a Dropout random deactivation layer between the two layers. The final layer is activated by a sigmoid activation function to obtain the cross-center probability at each time step, outputting a B×T×1 dimensional tensor. During the model training phase, the temporal outputs are aggregated into window-level supervision signals using max pooling loss. During the model inference phase, window-level cross-center confidence scores are obtained by employing an aggregation method that includes taking the maximum value along the time dimension.
[0033] The branch line detection model can be functionally divided into two working modes: the model training stage and the model inference stage. During the model training phase, the branch line detection model maps the B×T×3C dimension input feature matrix to a B×T×3D dimension continuous vector representation through the embedding layer, realizing continuous vector encoding of channel types and providing a unified dimension input for subsequent convolutions. Feature extraction is performed through the MDTC backbone network, and the multi-scale fusion features output by the MDTC backbone network are input into the classifier to output the branch center probability at each time step. Window-level supervised loss is used to update the model parameters through backpropagation and the Adam optimizer, while learning rate decay and gradient clipping strategies are used to complete model training.
[0034] During the model inference phase, the branch line detection model constructs a time-series feature matrix of the same format for the segmented window samples using the same window parameters as in the training phase. The matrix then passes through a preprocessing layer, the MDTC backbone network, and a classifier to obtain the branch center probability at each time step. The time step probability is compared with a preset threshold, and those exceeding the threshold are identified as branch center candidates. The detection results of overlapping windows are fused, and adjacent windows are merged into a continuous branch center position range. The final branch center start and end positions, confidence level, and branch information are then output.
[0035] The data preprocessing module treats the position sequence along the rail running direction as a time series, with each position corresponding to a time step; it maps depth information to the feature dimension through striping or binning to preserve structural information in the depth direction; and it maps different channel types to different feature channels to preserve multi-channel detection information.
[0036] The data preprocessing module creates an initial T×3C dimension all-zero feature matrix; divides the depth range into three sub-bands: top, middle, and bottom, each representing a different depth region; iterates through each sampling point within the window, filling in feature values at the corresponding positions based on the sampling point's location, depth information, and channel type; normalizes the feature matrix to reduce the dimensional differences between different channels or depth intervals; and employs a filling or default value strategy to ensure the effectiveness of the feature matrix for sparse sampling point distributions.
[0037] The data segmentation module uses an overlapping sliding window to segment continuous detection data into fixed-length window samples. The window length and window step size are configured, with the window step size being smaller than the window length to achieve overlapping sampling. Each window is assigned a category label (either a cross center or a non-cross center) based on the annotation information and organized into positive and negative sample sets as needed for training. Each window saves its start and end position indexes, which are used in the subsequent inference stage to restore the window-level discrimination results to the actual position interval in the rail.
[0038] The automatic track inspection device for turnout areas described in Example 1, based on artificial intelligence technology, automatically learns track features from ultrasonic inspection data of the turnout area collected by a rail flaw detection vehicle. This avoids manual feature design and achieves automatic localization and identification of the inherent structure of the turnout area. It reduces the difficulty for playback analysts in identifying damage in the turnout area, improves the accuracy of turnout damage identification, and ensures train operation safety. Example 1 transforms the rail turnout area detection problem into a temporal pattern recognition problem and utilizes temporal dependencies; it employs multi-scale convolution and fusion, utilizing both local and long-range features; it supports end-to-end training and inference, automatically learning the mapping relationship from data to results; and it adopts a lightweight network structure to ensure the model can be deployed on resource-constrained devices.
[0039] Example 2 As attached Figure 4 As shown, an embodiment of the automatic detection method for rail turnout areas according to this application specifically includes the following steps: S1) Window segmentation and sample construction: The raw echo data collected by the rail flaw detection vehicle is segmented into fixed-length window samples and labeled using an overlapping sliding window. S2) Data preprocessing and feature representation: For each window sample, the echo data within the window is mapped into a time series feature matrix; S3) Model forward and temporal probability output: After inputting the temporal feature matrix into the branch line detection model consisting of a preprocessing layer, MDTC backbone network and classifier, the model outputs the time step level probability. S4) Model Training and Parameter Optimization: In the model training phase of (fork section line detection), window-level supervised loss and optimization strategies are used to train the model parameters; S5) Reasoning and post-processing of results: In the reasoning stage of the (fork zone line detection) model, threshold judgment, overlap fusion and interval merging are performed on the window-level results, and the range of fork center position is output.
[0040] S1) The window segmentation and sample modification process further includes the following steps: S1-1) Overlapping window sliding segmentation An overlapping sliding window method is used to divide continuous detection data into fixed-length window samples; wherein the window length and window step size are given by configuration, and the window step size is smaller than the window length to achieve overlapping sampling. Optionally, forward and reverse sliding can be used for the cross-center data to increase data diversity.
[0041] The sliding window mechanism is used to: convert continuous rail inspection data into samples of fixed length to meet the input requirements of deep learning models; reduce the impact of the fork center boundary being truncated by the window boundary through overlapping sampling; and retain the start and end position information of each window for subsequent position localization.
[0042] S1-2) Sample labeling and organization Each window is assigned a category label (e.g., fork center / non-fork center) based on the annotation information, and organized into positive and negative sample sets as needed for training.
[0043] The training set, validation set, and test set can be further divided to support training and evaluation.
[0044] S1-3) Window position information recording Each window stores its start and end position indices, which are used in subsequent inference stages to restore the window-level discrimination results to the actual position range in the rail.
[0045] The input data for the branch line detection model is a time-series feature matrix with dimensions T×3C, where: T is the window length (time steps), which is determined by the sliding window configuration; C represents the number of channels (i.e., the number of channels in the ultrasonic probe). 3 represents the number of depth zones (the longitudinal depth information of the rail is divided into three sub-zones: top, middle, and bottom. Each echo point is assigned to the corresponding sub-zone according to its depth and participates in the channel counting under that sub-zone, so that the model can distinguish the echo distribution of the rail head, rail web, and rail bottom).
[0046] The channel dimension data at each time step includes: position coordinates along the rail travel direction (corresponding to the time dimension), depth sub-band markers (corresponding to the top / middle / bottom of the feature dimension), and channel type markers (corresponding to the specific channel of the feature dimension). These three types of information are normalized to form a dense feature matrix.
[0047] The output data of the branch line detection model is the time-step branch center probability, with dimensions B×T×1, where: B represents the batch size; T is the number of time steps; The output value is a floating-point number between 0 and 1, representing the probability that a cross exists at the corresponding position at each time step.
[0048] After threshold judgment and overlap fusion, the final output is: the starting position, ending position and confidence value of the fork center in the branch area.
[0049] Functionally, the model can be divided into two working modes: the model training phase and the model inference phase. During the model training phase, the following functions should be implemented: Feature preprocessing: The branch line detection model maps the input feature matrix of dimension B×T×3C to a continuous vector representation of dimension B×T×3D through the embedding layer, realizing continuous vector encoding of channel type and providing a unified dimension input for subsequent convolution; Multi-scale temporal feature extraction: Feature extraction is performed through the MDTC backbone network (i.e., multi-scale depthwise separable temporal convolutional network), which specifically includes: depthwise convolution (independent dilation convolution is performed on each channel in the time dimension, and the receptive field expands exponentially with the number of layers), point convolution (1×1 convolution to fuse information between channels), batch normalization (for stable training), ReLU nonlinear activation and residual connection. Multiple TCN blocks are stacked in an increasing dilation rate to form a multi-scale receptive field, capturing local and long-term temporal dependencies. Temporal classification: Input the multi-scale fusion features output by the MDTC backbone network into the classifier (two fully connected layers) and output the cross-center probability at each time step; Loss aggregation and parameter optimization: Window-level supervised loss is adopted (one of three strategies can be selected: max pooling, average pooling, or time-step loss summation). The model parameters are updated through backpropagation and Adam optimizer, and the model training is completed in conjunction with learning rate decay and gradient pruning strategies.
[0050] During the model inference phase, the following functions are implemented: Data segmentation and feature representation: The turnout line detection model performs sliding segmentation on the real-time collected rail detection data according to the same window parameters as in the training phase, and constructs a time-series feature matrix with the same format for the segmented window samples; Model forward propagation: sequentially passes through the preprocessing layer (embedding mapping), MDTC backbone network (multi-scale feature extraction), and classifier (temporal probability output) to obtain the cross-center probability at each time step; Threshold determination: The probability of the time step is compared with a preset threshold, and those that are greater than the threshold are determined to be cross-center candidates; Overlap fusion and interval merging: The detection results of overlapping windows are fused (using non-maximum suppression, weighted average or voting mechanism), and adjacent windows are merged into a continuous cross center position range, outputting the final cross center start and end positions, confidence level and stock information.
[0051] S2) The data preprocessing and feature representation process further includes the following steps: S2-1) Data Mapping Logic In the raw detection data, each echo point contains three key dimensions: position dimension (absolute position coordinates along the direction of rail travel), depth dimension (depth value of the echo point along the longitudinal section of the rail), and channel dimension (the type of detection channel, such as different ultrasonic probe types).
[0052] As attached Figure 5 As shown, this embodiment maps these three dimensions to a temporal feature matrix: Location → Time Sequence: The sequence of positions along the direction of rail travel is regarded as a time sequence, with each position corresponding to a time step; 1) Depth → Feature: Depth information is mapped to the feature dimension through banding or binning to preserve structural information in the depth direction; 2) Channel → Feature: Different channel types are mapped to different feature channels, preserving multi-channel detection information. Let the window length (time steps) be T and the number of channels be C. Since the depth is divided into 3 sub-bands, each sub-band corresponds to C-dimensional channels. Therefore, the single-window feature matrix is T×3C, which is the time step length × feature dimension, and is used as the input representation of the model.
[0053] By adopting the above mapping method, the temporal relationship of the position sequence can be maintained, the depth and channel information can be integrated into the feature dimension, and the sparsity of the detection data can be adapted through sparse feature representation.
[0054] S2-2) Construction of Feature Matrix As attached Figure 6 As shown, the process of constructing the feature matrix further includes the following steps: 1) Initialization: Create an all-zero feature matrix with an initial dimension of T×3C.
[0055] 2) Depth Banding: The depth range is divided into three sub-bands: top, middle, and bottom, each representing a different depth region. The feature matrix dimension is [window length, 3 × number of channels], forming a two-dimensional feature matrix. Each sampling point is labeled in the feature matrix according to its location, depth sub-band, and channel type. Depth banding simplifies feature representation, reduces model complexity, and highlights the differences in importance between different depth regions.
[0056] 3) Data filling: Traverse each sampling point in the window and fill the corresponding position with feature values according to its position, depth information and channel type.
[0057] 4) Normalization: Normalize the feature matrix to reduce the dimensional differences between different channels or depth ranges.
[0058] 5) Sparsity handling: For sparse sampling point distribution, appropriate padding or default value strategies can be used to ensure the effectiveness of the feature matrix.
[0059] S3) The model forward and temporal probability output process further includes the following steps: As attached Figure 7 As shown, the overall model architecture adopts an end-to-end design and further includes the following components: S3-1) Pretreatment layer The preprocessing layer projects the input feature matrix (B×T×3C dimensions) onto the model's internal representation space, providing a uniform input dimension for subsequent feature extraction. Here, B represents the batch size.
[0060] This embodiment employs a serialization preprocessing method, using an embedding layer (input dimension C, output dimension D) for linear mapping (mapping channel types to dense vectors). Then, the top, middle, and bottom sub-bands are concatenated along the feature dimensions to obtain a B×T×3D tensor, which serves as the input to the backbone network. This design, while preserving the distinction between the top, middle, and bottom sub-bands, maps discrete channels to a three-dimensional continuous feature vector representation, adapting to two-dimensional or temporal convolutional modeling formats.
[0061] The purpose of the preprocessing layer is to achieve uniformity of input dimensions, continuous vector representation of channels, and provide a suitable data arrangement for subsequent convolutions.
[0062] S3-2) MDTC Backbone Network This embodiment uses a multi-scale depthably separable temporal convolutional (MDTC) network as the backbone network to extract multi-scale feature representations from the temporal feature matrix.
[0063] 1) MDTC consists of multiple Temporal Convolutional Network (TCN) blocks, each of which is implemented using depthwise separable dilated convolutions, as shown in the attached diagram. Figure 8 As shown, the TCN block consists of four parts in sequence: depthwise separable dilated convolution, batch normalized layer, ReLU activation layer, and residual connection. The meanings of each component are as follows: i) Depthwise separable dilated convolution: a two-step convolution structure of "depth convolution + point convolution". "Dilation" is reflected in the fact that depth convolution adopts dilated convolution in the time dimension, and the receptive field is expanded in time through the dilation rate; Depthwise convolution: Each channel is convolved independently in the temporal dimension (dilated convolution is used in this block), and channels are not mixed to maintain channel independence; the dilation rate increases with the stacked layers (e.g., 1, 2, 4, 8) to capture longer temporal dependencies without increasing the number of parameters. Point convolution: Perform a 1×1 convolution on the output of depthwise convolution, and fuse them in the channel dimension to learn the interaction relationship between channels; This embodiment uses depthwise separable dilatational convolution, which significantly reduces the number of parameters and computational cost compared to standard convolution, while maintaining feature extraction capabilities.
[0064] ii) Batch normalization layer: Batch normalizes the convolutional output to stabilize training, accelerate convergence, and improve the model's generalization ability.
[0065] iii) ReLU activation layer: Nonlinear activation is applied after batch normalization to enhance expressive power.
[0066] iv) Residual connection: When the number of input and output channels is the same, the block input is added to the output of (depth-separable dilated convolution → batch normalization → ReLU) and used as the block output. This alleviates the vanishing gradient problem in deep networks, accelerates training, and facilitates multi-scale stacking.
[0067] 2) A TCN stack is composed of multiple TCN blocks arranged in an increasing expansion rate; see attached. Figure 9 As shown, within each stack, the expansion rate increases exponentially (e.g., 1, 2, 4, 8), forming a multi-scale receptive field. Optionally, multiple stacks can be used to process the input features in parallel, and then the multiple outputs can be fused to simultaneously utilize temporal features at different scales.
[0068] 3) Multi-scale feature fusion i) Feature alignment: as shown in the appendix Figure 9 As shown, features are extracted from TCN stacks of different depths, and the outputs of all stacks are aligned to the same time length.
[0069] ii) Weighted fusion: Optionally, multi-scale features can be fused by weighted summation, direct summation or splicing to utilize both local and long-range temporal information.
[0070] S3-3) Classifier As attached Figure 10As shown, the classifier maps the features of each time step output by the MDTC (Multi-Dimensional Temporal Convolutional Module) to obtain the temporal-level fork-center probabilities. Specifically, it employs two fully connected layers, with ReLU (Rectified Linear Activation Function) activation and Dropout (Random Deactivation Layer) applied in the middle. The last layer is activated by Sigmoid (Sigmoid Activation Function) to obtain the fork-center probabilities at each time step, and the output tensor dimension is B×T×1. During the training phase, the temporal-level output is aggregated into a window-level supervision signal using MaxPooling loss; during the inference phase, the maximum value can be taken along the time dimension or other aggregation methods can be used to obtain the window-level fork-center confidence.
[0071] S4) The model training and parameter optimization process further includes the following steps: The overall training process includes four stages: data preparation, data augmentation, model training, and loss calculation, as shown in the appendix. Figure 11 As shown.
[0072] S4-1) Data Preparation Stage 1) Data segmentation: The rail inspection data is segmented into samples of fixed lengths using a sliding window; 2) Labeling: Based on the labeling information, label each window as a cross center (positive sample) or a non-cross center (negative sample); 3) Data balancing: Addressing the imbalance between positive and negative samples to ensure the model can learn effective discriminative features; 4) Data set partitioning: Divide the data into training set, validation set and test set for model training and evaluation.
[0073] S 4-2) Data Augmentation Stage 1) Temporal mask: Randomly masking consecutive time steps in the feature matrix to simulate data loss or noise. 2) Channel masking: Randomly masking the continuous channel dimensions in the feature matrix to enhance the model's robustness to different channel combinations; 3) Two-way window: A forward and reverse sliding window is used for the cross-core data to increase data diversity; 4) Data shuffling: Randomly shuffle the order of training data to prevent the model from learning pseudo-features related to the data order.
[0074] S4-3) Model Training Phase 1) Loss function: Use the cross-entropy loss function. For binary classification tasks, use the binary cross-entropy loss. 2) Optimizer: The Adam (Adaptive Moment Estimation) optimizer is used to adaptively adjust the learning rate and accelerate convergence; 3) Learning rate strategy: Employ a learning rate decay strategy to gradually reduce the learning rate during training; 4) Gradient clipping: Clipping the gradient to prevent gradient explosion and improve training stability; 5. Backpropagation: Update the model parameters and minimize the loss function through the backpropagation algorithm.
[0075] S 4-4) Loss Calculation Strategy (One of the following methods can be selected) 1) Max pooling strategy: Take the maximum value of the output of all time steps in each window, and use the maximum value to calculate the loss.
[0076] 2) Average pooling strategy: Take the average value of the output of all time steps for each window, and use the average value to calculate the loss.
[0077] 3) Temporal loss strategy: Calculate the loss for the output of each time step, and then sum or average them.
[0078] S5) The reasoning and post-processing of results further includes the following steps: The reasoning, judgment, and post-processing workflow includes four stages: data preprocessing, model reasoning, threshold judgment, and post-processing fusion, as shown in the appendix. Figure 12 As shown.
[0079] S5-1) Data Preprocessing Stage 1) Rail inspection data segmentation: The inspection data is segmented according to the rail section.
[0080] 2) Sliding window segmentation: Segment the data using the same window parameters (window length, window step size) as during training.
[0081] 3) Feature matrix construction: Convert the data of each window into a feature matrix, using the same feature representation scheme as during training.
[0082] 4) Batch organization: Organize multiple windows into batches to improve inference efficiency.
[0083] S5-2) Model Reasoning Stage 1) Forward propagation: For each window, forward propagation is performed, passing through the preprocessing layer, the MDTC backbone network, and the classifier.
[0084] 2) Probability output: The model outputs the probability value (between 0 and 1) of each window being the center of the cross.
[0085] 3) Batch processing: Improve computational efficiency through batch inference and make full use of the parallel computing capabilities of GPU (Graphics Processing Unit).
[0086] S5-3) Threshold Judgment Stage 1) Threshold setting: Select an appropriate probability threshold based on the performance on the validation set.
[0087] 2) Binarization judgment: Window with a probability greater than the threshold is judged as a cross center, otherwise it is judged as a non-cross center.
[0088] 3) Confidence assessment: The probability value can be used as the confidence level of the detection for subsequent result screening and sorting.
[0089] S5-4) Post-processing fusion stage The post-processing stage mainly includes the following steps: 1) Overlapping window fusion: Due to the use of overlapping sliding windows, the data of the same rail segment may be covered by multiple windows. Therefore, it is necessary to fuse the detection results of overlapping windows. The following strategies can be adopted: Non-Maximum Suppression (NMS): Preserves the window with the highest confidence and suppresses overlapping low-confidence windows.
[0090] Weighted average: A weighted average is calculated based on the confidence level and overlap of the windows.
[0091] Voting mechanism: Multiple windows vote to determine whether the data segment is a cross.
[0092] 2) Merging adjacent windows Adjacent detection windows are merged into a continuous region.
[0093] Determine the range of the merged fork center position based on the start and end positions of the window.
[0094] Handle boundary conditions, such as window boundaries and track boundaries.
[0095] 3) Result Output Output fork center position range: start position and end position.
[0096] Output detection confidence: The confidence value after fusion.
[0097] Output track information: identifies the stock where the fork is located.
[0098] As attached Figure 13 As shown, the core logical relationship of the automatic detection method for rail turnout areas described in this embodiment can be summarized into four levels: 1) Data mapping relationship Input: Multidimensional data (location, depth, channel) collected by the rail flaw detection vehicle.
[0099] Mapping process: Location dimension → Temporal dimension, Depth and channel dimensions → Feature dimension.
[0100] Output: Time series feature matrix (time, feature).
[0101] Function: To transform multidimensional sparse data into dense feature representations suitable for deep learning models.
[0102] 2) Feature extraction relationship Input: Time series feature matrix.
[0103] Processing flow: Sliding window segmentation to generate fixed-length samples → Preprocessing layer projection → MDTC multi-scale feature extraction.
[0104] Output: Multi-scale features extracted by MDTC.
[0105] Function: Extract discriminative multi-scale features from raw features to capture temporal patterns of fork centers.
[0106] 3) Pattern recognition relationship Input: Multi-scale features extracted by MDTC.
[0107] Processing flow: Classifier feature mapping → Probability calculation → Threshold determination.
[0108] Output: Results of the fork center / non-fork center judgment.
[0109] Function: To map feature representations to classification results, thereby enabling automatic identification of cross centers.
[0110] 4) Location and positioning relationship Input: Window-level detection results and location information.
[0111] Processing flow: Overlapping windows merge → Adjacent windows merge → Location range determination.
[0112] Output: Precise range of fork position.
[0113] Function: Converts window-level detection results into precise position information on the track.
[0114] 5) Interrelationships between different levels Data mapping provides standardized input for feature extraction; feature extraction provides discriminative features for classification; classification results provide window-level determination for location positioning; the whole process forms an end-to-end flow from raw data to fork location information.
[0115] The automatic track detection method for rail turnout areas described in this embodiment is based on deep learning temporal pattern recognition. It maps the detection data collected by the rail flaw detection vehicle into temporal features and uses a temporal convolutional network for pattern recognition to achieve intelligent identification and location of the track in the turnout area. Although the B-type image of the rail turnout area has a lot of clutter interference and damage information is mixed with the inherent structure, the turnout area track detection model of this embodiment, based on artificial intelligence algorithms, can mine subtle features, distinguish the inherent structure of the turnout area, and narrow down the identification range, thus providing the possibility for automatic identification of track damage in the turnout area. Temporal pattern recognition is a technique of deep learning for detecting specific patterns on continuous temporal data. It uses structures such as depthwise separable convolution and temporal convolutional networks, and has the characteristics of relatively small parameter quantity and ease of streaming processing. The automatic track detection method for rail turnout areas described in this embodiment is based on deep learning temporal detection, achieving efficient and accurate automatic identification of the turnout center through temporal feature extraction and pattern recognition. Meanwhile, this embodiment maps multidimensional data into a temporal feature matrix and uses the multi-scale temporal modeling capability of the MDTC network for pattern recognition. It has the advantages of lightweight model, high detection accuracy, and good real-time performance, providing a new technical solution for intelligent detection of turnout rails.
[0116] The automatic detection method for rail turnout areas described in this application adopts a lightweight structure. The depthwise separable convolutional structure helps reduce the number of model parameters and computational load, making it easy to deploy on edge or embedded devices. The automatic detection method automatically extracts turnout-related features through end-to-end learning and combines multi-scale fusion to capture turnout features at different scales. It also supports streaming processing, has a fast inference speed, and can meet the needs of high-speed detection. After being trained on diverse track and turnout data, the automatic detection method can adapt to detection tasks of different tracks and different turnout types. The automatic detection method meets the requirements of engineering applications in terms of detection accuracy, false detection rate, and processing speed, and the model size is very suitable for deployment on embedded devices.
[0117] In the description of this specification, the references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0118] In the description of this application, it should be noted that when an element is referred to as being "fixed to" or "set on" another element, it can be directly set on the other element or indirectly set on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element.
[0119] It should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0120] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" or "several" means two or more, unless otherwise explicitly specified.
[0121] It should be noted that the structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only used to complement the content disclosed in the specification for those skilled in the art to understand and read, and are not intended to limit the conditions under which this application can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and purposes that this application can produce, should still fall within the scope of the technical content disclosed in this application.
[0122] By implementing the technical solution of the automatic detection method for rail turnout areas described in the specific embodiments of this application, the following technical effects can be achieved: (1) The automatic detection method for rail turnout area described in the specific embodiments of this application represents the detection data as time-series features and uses time-series convolution for window-level discrimination. It can automatically learn the turnout features and support continuous detection through streaming processing, thus solving the technical problems of low detection efficiency, high false detection rate and difficulty in feature extraction in the existing rail turnout area detection methods. (2) The automatic detection method for rail turnout area described in the specific embodiments of this application maps the multidimensional data (position, depth, channel) of track detection into a time-series feature matrix, and integrates depth information by using depth slicing or binning, and integrates the depth information into the feature representation, which can preserve the time sequence and multidimensional structural information. (3) The automatic detection method for rail turnout area described in the specific embodiments of this application adopts the MDTC backbone network (depth separable + dilated convolution), multi-scale stacking fusion, which significantly reduces the number of parameters and computation, and is suitable for edge deployment. At the same time, non-causal temporal convolution is used to utilize bidirectional context information to adapt to the temporal and multi-dimensional characteristics of the detection data. (4) The automatic detection method for rail turnout area described in the specific embodiments of this application applies deep learning time sequence pattern recognition to turnout core detection. It adopts bidirectional sliding window, time / channel mask and other enhancements, as well as window-level loss aggregation strategy, which can improve robustness, generalization and detection stability, and adapt to different line and turnout area types.
[0123] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0124] The above description is merely a preferred embodiment of this application and is not intended to limit this application in any way. Although this application has been disclosed above with reference to preferred embodiments, it is not intended to limit this application. Any person skilled in the art can make many possible variations and modifications to the technical solutions of this application using the methods and techniques disclosed above, or modify them into equivalent embodiments with equivalent changes, without departing from the spirit and technical essence of this application. Therefore, any simple modifications, equivalent substitutions, equivalent changes, and modifications made to the above embodiments based on the technical essence of this application without departing from the content of the technical solutions of this application shall still fall within the protection scope of the technical solutions of this application.
Claims
1. An automatic detection method for rail turnout sections, characterized in that, Includes the following steps: S1) The raw echo data collected by the rail flaw detection vehicle is divided into fixed-length window samples and labeled using an overlapping sliding window. S2) For each window sample, map the echo data within the window into a time-series feature matrix; S3) After inputting the time-series feature matrix into the branch line detection model, the time step-level probability is output. During the training phase of the branch line detection model, window-level supervised loss and optimization strategies are used to train the model parameters. During the inference phase of the branch line detection model, threshold determination, overlap fusion and interval merging are performed on the window-level results, and the branch center position range is output.
2. The automatic detection method for rail turnout areas according to claim 1, characterized in that, The window sample data input to the turnout line detection model is a time-series feature matrix of T×3C dimensions, where: T is the window length, i.e. the number of time steps, which is determined by the sliding window configuration; C is the number of channels of the ultrasonic probe; and 3 is the number of depth zones, which divides the longitudinal depth information of the rail into three sub-zones: top, middle and bottom. Each echo point is assigned to the corresponding sub-zone according to its depth and participates in the channel counting under that sub-zone, so that the model can distinguish the echo distribution of the rail head, rail web and rail bottom. The channel dimension data for each time step includes: Position coordinates along the direction of rail travel, corresponding to the time dimension; Depth subband labels correspond to the top, middle, or bottom of the feature dimension; Channel type label, corresponding to the specific channel of the feature dimension; After normalization, the three types of information form a dense feature matrix.
3. The automatic detection method for rail turnout areas according to claim 2, characterized in that, The data output by the branch line detection model is the time step-level branch center probability in the B×T×1 dimension, where: B is the batch size; T is the number of time steps; the output value is a floating-point number between 0 and 1, representing the probability that a branch center exists at the corresponding position of each time step; after threshold judgment and overlap fusion, the final data output by the branch line detection model is: the start position, end position and confidence value of the branch center.
4. The automatic detection method for rail turnout areas according to claim 3, characterized in that, Step S3) further includes: S31) The preprocessing layer projects the input temporal feature matrix of B×T×3C dimensions into the internal representation space of the branch line detection model, providing a unified dimension input for subsequent feature extraction; S32) The MDTC backbone network extracts multi-scale feature representations from the temporal feature matrix; In step S32), multiple TCN blocks are organized into a TCN stack with increasing dilation rates. The dilation rate within each stack increases exponentially, forming a multi-scale receptive field. Each TCN block includes a depthwise separable dilatational convolutional layer, a batch normalization layer, a ReLU activation layer, and residual connections. The depthwise separable dilatational convolutional layer employs a depthwise convolution + pointwise convolution structure. The depthwise convolution performs dilatational convolution on each channel in the temporal dimension, expanding the receptive field temporally through the dilation rate. The pointwise convolution performs 1×1 convolution on the depthwise convolution output, fusing it in the channel dimension to learn the interaction relationships between channels. The batch normalization layer performs batch normalization on the convolution output. The first step is to achieve batch normalization, which stabilizes training, accelerates convergence, and improves the model's generalization ability. The ReLU activation layer applies non-linear activation after batch normalization. When the number of input and output channels is the same, the residual connection adds the block input to the output of the depthwise separable dilated convolution, the batch normalization layer, and the ReLU activation layer as the block output, which alleviates gradient vanishing in deep networks, accelerates training, and facilitates multi-scale stacking. The multi-scale feature fusion module extracts features from TCN stacks of different depths, aligns the outputs of all stacks to the same time length, and fuses multi-scale features through weighted summation, direct summation, or concatenation to provide a more comprehensive feature representation. The S33 classifier maps the features of each time step output by the MDTC backbone network to obtain the time-series-level cross-core probability.
5. The automatic detection method for rail turnout areas according to claim 4, characterized in that, The classifier adopts a two-layer fully connected structure, and step S34) further includes the following process: A linear rectified activation layer (ReLU) and a random deactivation layer (Dropout) are set between the two fully connected layers. The last layer is activated by the sigmoid activation function to obtain the cross-center probability at each time step, and the output is a tensor of dimension B×T×1. During the model training phase, the temporal output is aggregated into a window-level supervision signal by max pooling loss. During the model inference phase, the window-level cross-center confidence is obtained by using an aggregation method that includes taking the maximum value along the time dimension.
6. The automatic detection method for rail turnout areas according to claim 4 or 5, characterized in that, Step S3) further includes: During the model training phase, the branch line detection model maps the B×T×3C dimension input feature matrix to a B×T×3D dimension continuous vector representation through an embedding layer, realizing continuous vector encoding of channel types and providing a unified dimension input for subsequent convolutions. Feature extraction is performed through the MDTC backbone network, and the multi-scale fusion features output by the MDTC backbone network are input into the classifier to output the branch center probability at each time step. Window-level supervised loss is used to update the model parameters through backpropagation and the Adam optimizer, while learning rate decay and gradient clipping strategies are used to complete model training.
7. The automatic detection method for rail turnout areas according to claim 6, characterized in that, Step S3) further includes: During the model inference phase, the branch line detection model constructs a time-series feature matrix of the same format for the segmented window samples using the same window parameters as in the training phase. The matrix passes through a preprocessing layer, the MDTC backbone network, and a classifier in sequence to obtain the branch center probability at each time step. The time step probability is compared with a preset threshold, and those exceeding the threshold are determined as branch center candidates. The detection results of overlapping windows are fused, and adjacent windows are merged into a continuous branch center position range. The final branch center start and end positions, confidence level, and branch information are then output.
8. The automatic detection method for rail turnout areas according to claim 1, 2, 3, 4, 5 or 7, characterized in that, Step S1) further includes: The position sequence along the rail travel direction is treated as a time series, with each position corresponding to a time step; depth information is mapped to the feature dimension through segmentation or binning to preserve structural information in the depth direction; different channel types are mapped to different feature channels to preserve multi-channel detection information.
9. The automatic detection method for rail turnout areas according to claim 8, characterized in that, Step S1) further includes: Create an initial T×3C dimension all-zero feature matrix; The depth range is divided into three sub-zones: top, middle, and bottom, with each sub-zone representing a different depth region; Iterate through each sampling point in the window and fill in the feature value at the corresponding position according to the sampling point's position, depth information, and channel type; The feature matrix is normalized to reduce the dimensional differences between different channels or depth ranges. For sparse sampling point distributions, a padding or default value strategy is used to ensure the effectiveness of the feature matrix.
10. The automatic detection method for rail turnout areas according to claim 1, 2, 3, 4, 5, 7 or 9, characterized in that, Step S2) further includes: Continuous detection data is divided into fixed-length window samples using an overlapping sliding window; the window length and window step size are given by configuration, and the window step size is smaller than the window length to achieve overlapping sampling. Each window is assigned a category label (either a fork center or a non-fork center) based on the annotation information, and organized into positive and negative sample sets as needed for training. Each window stores its start and end position indices, which are used in subsequent inference stages to restore the window-level discrimination results to the actual position range in the rail.
Citation Information
Patent Citations
Steel rail damage identification method aiming at ultrasonic B display data
CN115082404A
Railway turnout identification method, device, equipment and medium
CN120198714A
