A method for ensuring train operation safety
Through technologies such as multi-scale convolutional neural networks and graph convolutional networks, the accurate identification of the direction of turnout opening during train driving is achieved, and the problem of inaccurate identification in complex environments is solved in the existing technology, and the safety and reliability of train driving is improved.
Patent Information
- Application Number
- CN202411552227.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2044-11-01
AI Technical Summary
The existing train driving safety guarantee system is difficult to accurately identify the opening direction of the forward turnout in a complex and changeable environment, resulting in the risk of accidents such as derailment and collision.
Multi-scale convolutional neural network, SQUEEZE-AND-EXCITATION attention module and CBAM convolutional attention module are used for feature extraction, combined with the improved YOLO algorithm for obstacle detection, and the direction probability distribution is optimized through the graph convolution network to achieve accurate identification of the direction of the switch opening.
It improves the accuracy and robustness of identifying switch status during train driving, reduces manual intervention, and enhances the safety and reliability of train driving.
Smart Images

Figure CN119239697B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent control, and particularly relates to a train operation safety guarantee method. Background Art
[0002] With the development of modern railway transportation systems, train operation safety guarantee has become a crucial research field. Ensuring that a train can timely and accurately identify the opening direction of the turnout ahead during operation is of great significance for preventing accidents such as train derailment and collision. Traditional train operation safety guarantee systems mainly rely on fixed signal devices and drivers' visual observations. However, these methods have many limitations in practical applications. Especially in complex and changeable environments, signal devices may malfunction, and the reaction time of drivers is also difficult to ensure the safe operation of trains.
[0003] Traditional train operation safety guarantee methods mainly include ground signal systems and monitoring devices on trains. The ground signal system provides information about the status of the turnout ahead to the train by installing signal lights and sensors beside the track. The train driver judges whether to decelerate, stop or change the driving direction based on these signals. This method relies on the normal operation of ground equipment. Once the equipment fails, it may lead to serious safety accidents. In addition, the maintenance cost of the ground signal system is high, and it is prone to malfunction under bad weather conditions. Another common technology is the train operation safety guarantee system based on video monitoring. By installing a camera at the front of the train, images of the track ahead are collected in real time, and image processing technology is used to identify the status of the turnout ahead. This method improves the train operation safety to a certain extent, but there are still some problems. First, the quality of the images collected by the camera is greatly affected by environmental light and weather conditions. In low light or high contrast situations, the accuracy of the image processing algorithm will be significantly reduced. Second, traditional image processing algorithms have limited ability to identify turnouts in complex scenarios, especially in multi-switch sections and high-density track networks, where misjudgments are likely to occur. Summary of the Invention
[0004] In view of this, the main object of the present invention is to provide a train operation safety guarantee method. The present invention can accurately identify the opening direction of the turnout ahead, make corresponding safety decisions in a timely manner, and avoid the risk of accidents such as derailment and collision caused by incorrect turnouts. This efficient, accurate and reliable train operation safety guarantee method provides strong technical support for modern railway transportation systems and greatly improves the safety and reliability of train operation.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A train operation safety guarantee method, the method comprising:
[0007] Step 1: Real-time collect the front image when the train is moving; judge whether there is an intrusion into the obstacle area according to the front image. If so, issue an obstacle intrusion alarm or apply emergency braking to the train;
[0008] Step 2: Screen out the road image when the train is moving from the front image, and analyze the opening direction of the switch ahead according to the road image;
[0009] Step 3: According to the current predetermined driving route of the train, judge whether the opening direction of the switch ahead meets the preset passing requirements. If not, issue a switch abnormality alarm to prevent the occurrence of switch rail damage or derailment accidents caused by switch abnormalities.
[0010] Further, Step 1 specifically includes: using a Gaussian filter to denoise the collected front image, then applying adaptive histogram equalization to enhance the contrast to obtain a preprocessed image; adjusting the preprocessed image to a preset fixed size and performing normalization processing, and then using the ResNeXt backbone network to extract basic features. Suppose the ResNeXt backbone network has a total of L layers, and the output of each layer is represented as X l , where, l ∈ {1,..., L}; adaptively fuse the output representations of different layers to obtain a fused output, upsample and splice the fused output to obtain a multi-scale feature map; use an improved YOLO algorithm to detect obstacles in the multi-scale feature map to obtain a set of obstacle candidate boxes; calculate the risk score of each candidate box in the set of obstacle candidate boxes to obtain the overall risk degree; when the overall risk degree exceeds the preset risk degree threshold, trigger an obstacle intrusion alarm. At the same time, calculate the emergency braking decision index; when the emergency braking decision index exceeds the set braking threshold, trigger emergency braking.
[0011] Further, through the following formula, adaptively fuse the output representations of different layers to obtain a fused output:
[0012] F l = α l ·X l + β l ·Up(X l+1 ) + γ l ·Down(X l-1 );
[0013] Where: F l is the fused output of the l-th layer; X l , X l+1 and X l-1 are the outputs of the l-th layer, the (l + 1)-th layer and the (l - 1)-th layer respectively; Up and Down are upsampling and downsampling operations respectively; α l , β l and γ lThey are all adaptive weights, calculated through the following formula:
[0014]
[0015] Among them, W f and b f are the preset weight matrix and bias matrix respectively; GAP is the global average pooling operation; the multi-scale feature map F is generated through the following formula:
[0016] F = Concat(F1, Up2(F2),..., Up L (F L )) · W c ;
[0017] Among them, W c is the 1×1 convolution weight, used to adjust the number of channels; Concat is the concatenation operation; Up i is the operation of upsampling the output after fusion of the i-th layer to the same size as F1, where i is an integer index, and here i ∈ {2,..., L}.
[0018] Furthermore, use the improved YOLO algorithm to detect obstacles in the multi-scale feature map F. Let the obtained set of obstacle candidate boxes be B = {b1, b2,..., b n}; for each candidate box b i , calculate its risk score S(b i ) through the following formula:
[0019]
[0020] Among them, Area(b i ) is the area of the candidate box b i ; Area(1mage) is the total area of the preprocessed image; d(b i ) is the estimated distance from the candidate box b i to the train; d0 is the safety threshold distance; λ is the first distance attenuation coefficient; α is the first weight coefficient, with a value range of 0.3 to 0.5; β is the second weight coefficient, with a value range of 0.5 to 0.7; n is the total number of candidate boxes; then calculate the overall risk degree R through the following formula:
[0021]
[0022] Among them, θ is the preset risk threshold; μ is the risk sensitivity adjustment parameter; when R exceeds the set risk degree threshold R t , trigger the obstacle intrusion alarm; o is the subscript index.
[0023] Furthermore, calculate the emergency braking decision index through the following formula:
[0024]
[0025] Among them, v is the current speed of the train; a max is the maximum deceleration of the train; d min is the minimum safety distance; φ is the braking sensitivity adjustment parameter; when E exceeds the set braking threshold E t , emergency braking is triggered.
[0026] Furthermore, step 2 specifically includes: using a semantic segmentation network to extract the road image from the front image to obtain the road mask M; based on the road mask M, applying a region proposal network to locate potential turnout areas on the road image to obtain a set of candidate regions R = {r1, r2,... r m}; where m is the number of candidate regions; for each candidate region r j , use a multi-scale attention mechanism to extract the feature vector f j , j is an integer index, here, j ∈ {1,..., m}; according to the feature vectors of each candidate region, use an ensemble classifier to classify each candidate region to obtain the direction probability distribution; consider the spatial relationship between multiple candidate regions, and globally optimize the direction probability distribution to obtain the final probability distribution of the turnout opening direction; take the turnout opening direction with the highest probability as the opening direction of the turnout ahead.
[0027] Furthermore, through the following formula, the feature vector f j is extracted:
[0028]
[0029] Among them, K is the number of scales; CNN k is the convolutional neural network at the kth scale; SE is the SQUEEZE-AND-EXCITATION attention module; CBAM is the convolutional attention module; α k is the scale weight, calculated by the following formula:
[0030]
[0031] Among them, MLP is the multi-layer perceptron, and GAP is the global average pooling.
[0032] Furthermore, the formula for using an ensemble classifier to classify each candidate region to obtain the direction probability distribution is as follows:
[0033]
[0034] Among them, P(d i |r j ) is the candidate region rj Probability belonging to direction d i ; C is the number of classifiers in the integrated classifier; wc is the weight of the c-th classifier; p c (d i |f j ) is the probability predicted by the c-th classifier; H(p c (d|f j )) is the entropy of the probability distribution predicted by the c-th classifier; λ is the regularization coefficient; Z is the normalization constant; d is the set of directions.
[0035] Furthermore, considering the spatial relationship between multiple candidate regions, the specific process of globally optimizing the direction probability distribution to obtain the final probability distribution of the turnout opening direction includes: constructing a spatial relationship graph G=(V, ES) between candidate regions, where V is the set of candidate regions and ES is the set of edges; the edge w between the i-th candidate region and the j-th candidate region ij The weight calculation formula is as follows:
[0036]
[0037] where c i and c j are the central coordinates of the i-th candidate region and the j-th candidate region respectively; σ is the second distance decay coefficient; θ ij is the included angle between the main directions of the i-th candidate region and the j-th candidate region; Area(r i ) and Area(r j ) are the areas of the i-th candidate region and the j-th candidate region respectively; using a graph convolutional network to globally optimize the direction probability distribution, the formula is as follows:
[0038]
[0039] where P (t) (d|R) is the global direction probability distribution after the t-th iteration; A is the adjacency matrix, D is the degree matrix; W1 and W2 are the first weight and the second weight of the graph convolutional network respectively; B1 and B2 are the first bias and the second bias of the graph convolutional network respectively; P (t+1) (d|R) is the global direction probability distribution after the t+1-th iteration.
[0040] Furthermore, the optimal direction d * is calculated by the following formula:
[0041]
[0042] where T is the total number of iterations of the graph convolutional network.
[0043] Adopting the above technical solutions, the present invention has the following beneficial effects: By using a multi-scale convolutional neural network (CNN), SQUEEZE-AND-EXCITATION attention module, and CBAM convolutional attention module, the present invention extracts features of candidate regions at different scales. This multi-scale feature extraction method can capture subtle information and overall structure in the image, enabling the system to maintain a high-precision feature representation when dealing with complex scenarios. The SE module enhances the weights of important features through a channel attention mechanism, and the CBAM module combines channel and spatial attention mechanisms to further optimize the feature expression. This method not only improves the accuracy of feature extraction but also enhances the robustness of the features, enabling the system to work stably under various environmental conditions. The present invention constructs a spatial relationship graph between candidate regions and uses a graph convolutional network (GCN) to globally optimize the direction probability distribution, fully considering the spatial relationships between candidate regions. Through iterative updates, GCN fuses the feature information of each node with the information of its neighbor nodes, enabling the final direction probability distribution to reflect global information. Through this global optimization method, the system can comprehensively consider the relationships of all candidate regions, avoiding the local optimum problem that may be caused by a single feature extraction method, thereby improving the accuracy and robustness of recognition. The present invention uses an ensemble classifier to classify each candidate region to obtain a direction probability distribution. The ensemble classifier combines the prediction results of multiple base classifiers and generates a comprehensive direction probability distribution through the adjustment of weighted sums and regularization terms. The weights of each classifier are adjusted according to their performance to ensure that classifiers with better performance in the comprehensive prediction have a greater influence. The regularization term further optimizes the final probability distribution by considering the uncertainty of the classifier prediction results. This method not only improves the accuracy of classification but also enhances the robustness of the system, effectively coping with complex and changeable environmental conditions. Description of the Drawings
[0044] Figure 1 Schematic flowchart of a train driving safety guarantee method provided by an embodiment of the present invention;
[0045] Figure 2 Schematic diagram of an obstacle candidate box determined in the forward image during the train's travel collected in real time by a train driving safety guarantee method provided by an embodiment of the present invention;
[0046] Figure 3 Forward image during the train's travel collected in real time by a train driving safety guarantee method provided by an embodiment of the present invention;
[0047] Figure 4 Preprocessed image obtained by processing the forward image during the train's travel collected in real time by a train driving safety guarantee method provided by an embodiment of the present invention;
[0048] Figure 5 It is a schematic process diagram of a train operation safety guarantee method provided by an embodiment of the present invention to identify complex geometric shapes and patterns in the forward image during the train's travel collected in real time, so as to accurately judge the opening direction of the turnout. Detailed implementation manners
[0049] All features disclosed in this specification, or all steps in the disclosed methods or processes, except for mutually exclusive features and / or steps, can be combined in any way.
[0050] Any feature disclosed in this specification (including any additional claims, abstract) can be replaced by other equivalent or similar-purpose alternative features unless specifically stated. That is, unless specifically stated, each feature is only an example of a series of equivalent or similar features.
[0051] Example 1: Refer to Figure 1 , Figure 2 , Figure 3 , Figure 4 and Figure 5 , a train operation safety guarantee method, the method includes:
[0052] Step 1: Collect the forward image during the train's travel in real time; judge whether there is an obstacle area intrusion according to the forward image. If so, issue an obstacle intrusion alarm or perform an emergency brake on the train;
[0053] In practical applications, the camera is installed at the front of the train. By continuously capturing real-time images of the track ahead and the surrounding environment, it provides continuous visual information. To ensure the clarity and accuracy of the images, the camera adopts advanced image sensor technology. These sensors can work under various lighting conditions, including daytime, night, and various adverse weather conditions. The high-resolution characteristics of the image sensors make the captured images have richer details, providing a reliable data basis for subsequent image analysis. During the train's operation, the images captured by the camera are transmitted to the image processing module in real time. This module uses advanced image processing algorithms to preprocess and analyze the captured images. First, through image denoising algorithms such as Gaussian filtering and median filtering, the noise and impurities in the images are removed to improve the image quality. Next, through image enhancement techniques such as histogram equalization and contrast enhancement, the clarity of the images is further improved, making the details in the images more prominent. The preprocessed images are input into deep learning algorithms for obstacle detection. Usually, a convolutional neural network (CNN) is used as the core algorithm. Through a large amount of training data, the CNN can learn and identify different objects and features in the images. In the train operation safety guarantee method, the CNN is trained to identify obstacles on the track, such as falling rocks, animals, vehicles, and other objects that may pose a threat to the train's operation. Through multiple layers of convolution and pooling operations, the CNN can extract high-level features of the images layer by layer and finally output the category and location of the obstacles through the fully connected layer and classifier. When the image processing module detects an obstacle ahead, the system will immediately trigger the alarm system. The alarm system includes audible and visual alarms and an emergency braking mechanism. When the detected position information of the obstacle exceeds the preset safe distance, the system will issue an audible and visual alarm to notify the train driver. At the same time, the alarm information is transmitted to the train control center through the wireless communication module. If the detected obstacle is close to the train and may cause a collision, the system will automatically activate the emergency braking mechanism to immediately decelerate or stop the train to avoid accidents. This method of real-time acquisition and processing of the front images has a higher degree of automation and reaction speed compared to the traditional method that relies on the ground signal system and the driver's visual observation. In the traditional method, the layout and maintenance cost of the ground signal system are high, and it is greatly affected by the environment, prone to signal misjudgment or failure problems. By capturing images in real time with a camera and combining deep learning algorithms for processing, it can comprehensively and accurately analyze the front environment in a short time, greatly improving the safety of train operation.
[0054] Step 2: Screen out the road image during the train's travel from the front image, and analyze the opening direction of the turnout ahead according to the road image;
[0055] During the train's operation, the camera captures the images in front in real time. These images contain not only information about the track and the surrounding environment but also possible turnouts. When the image processing module receives the images in front, it first needs to preprocess the images. This includes image denoising and enhancement to improve the clarity and quality of the images and ensure the accuracy of subsequent analysis. After the preprocessing is completed, the system will use image segmentation technology to separate different regions in the image, especially to separate the turnout image. Image segmentation technology often uses deep learning networks such as U-Net. This network structure can accurately segment the regions of interest in the image. In the present invention, through a well-trained U-Net network, the track region in the image can be segmented from other backgrounds to generate the turnout image. After obtaining the turnout image, further analysis is needed to identify the opening direction of the turnout in front. The turnout is an important part of the track system, and its opening direction determines the train's running route. In this step, the system will use an image recognition algorithm to analyze the turnout image. First, through a feature extraction algorithm, key feature points in the turnout image are extracted, such as the bifurcation points of the turnout and the direction of the track. Then, combined with deep learning algorithms, by analyzing these feature points, the specific state of the turnout is identified, that is, whether the turnout is open to the left, to the right, or straight ahead. Usually, a convolutional neural network (CNN) performs well in such tasks and can identify complex geometric shapes and patterns in the image to accurately judge the opening direction of the turnout. After identifying the opening direction of the turnout, the system also needs to compare it with the train's predetermined running route to determine whether it meets the passing requirements. The train's predetermined running route is set in advance by the train dispatching system, including the train's destination and the path it needs to pass along the way. When the system obtains the opening direction of the turnout, it will compare it with the predetermined running route to determine whether the current opening direction of the turnout is consistent with the predetermined route. If they are consistent, the train can pass safely; if not, it indicates that the turnout in front is not opened in the predetermined direction, posing a potential safety risk. In this case, the system will immediately issue an alarm to alert the train driver and notify the train control center for handling. This method has significant advantages compared with the traditional methods that rely on manual observation or fixed beacons. In traditional methods, manual observation is easily affected by environmental and human factors, while fixed beacons require a large amount of maintenance and management costs, and when the turnout state changes, the beacon information may not be updated in time. Through real-time image analysis technology, the system can dynamically and accurately identify the state of the turnout in front during the train's operation and respond in a timely manner to ensure the safety and reliability of the train's operation.
[0056] Step 3: According to the current predetermined driving route of the train, determine whether the opening direction of the turnout ahead meets the preset passing requirements. If not, issue a turnout abnormality alarm to prevent the occurrence of switch rail damage or derailment accidents caused by turnout abnormalities.
[0057] The predetermined driving route of the train is set in advance by the train dispatching system and stored in the train control system. The predetermined driving route includes the destination of the train, the stations it passes through, as well as the paths and turnout direction information it needs to pass along the way. This information is set before the train departs and can be called at any time during the train's journey. The train control system continuously obtains the current driving position and guides the train forward according to the predetermined driving route. When the train approaches the turnout area, the system will focus on monitoring the turnout status to ensure that it meets the requirements of the predetermined route. During the train's journey, image data in front is collected in real time by a camera installed at the front of the train and transmitted to the image processing module for analysis. The image processing module uses advanced image processing algorithms and deep learning techniques to preprocess, segment, and recognize the images, and extract the specific status information of the turnout. In particular, through the feature extraction algorithm, the system can identify the opening direction of the turnout, including whether the turnout is opened to the left, to the right, or straight ahead. This process relies on the efficient training and accurate recognition ability of the deep learning model to ensure accurate judgment of the turnout status in complex environments. After the turnout status information is recognized, the system compares the currently obtained turnout opening direction with the turnout direction information in the predetermined driving route. This step is achieved through the comparison algorithm in the control system. The comparison algorithm first obtains the current position of the train and the next section of path information in the current predetermined driving route, including the turnout position and direction. When the train approaches the turnout, the system will call the turnout information in the predetermined driving route in real time and compare it with the currently recognized turnout status. If the recognized turnout opening direction is consistent with the turnout direction in the predetermined driving route, it means the turnout status is normal and the train can pass safely; if not, it means the turnout status is abnormal and there may be potential safety risks.
[0058] During the comparison process, the system not only focuses on the consistency of the switch direction but also detects whether the opening state of the switch is stable. For example, if there are frequent on-off switching phenomena during the identification of the switch, the system will also determine it as an abnormal state. This is because the frequent switching of the switch may lead to mechanical failures or control malfunctions, thus increasing the accident risk. Therefore, the comparison algorithm also includes a detection module for the stability of the switch state to ensure that the switch is in a stable open state during the approach and passage of the train. When the system detects an abnormal switch state, it will immediately trigger the alarm system. The alarm system includes an audible and visual alarm and an information notification mechanism. The audible and visual alarm will emit an obvious warning signal in the train cab to remind the train driver to pay attention to the abnormal situation of the switch ahead. At the same time, through the wireless communication module, the system will transmit the abnormal information to the train control center and the dispatching system to request timely manual intervention and handling. If the abnormal situation of the switch is serious, the system will also automatically take measures, such as decelerating or stopping, to ensure the safety of the train and passengers. This step of the present invention effectively improves the accuracy and real-time performance of switch state monitoring through an automated detection and comparison process, reducing the errors and delays of manual monitoring. Traditional switch monitoring mostly relies on ground signals and manual inspections. This method not only has high costs and low efficiency but is also easily interfered by environmental and human factors, resulting in untimely or inaccurate monitoring. By using the method of the present invention, which utilizes real-time image analysis and deep learning techniques, the system can dynamically detect the switch state during the train's operation and react quickly to ensure the safety and reliability of the train's operation. In addition, based on the detection of switch abnormalities, this method further provides a complete alarm and emergency handling mechanism. When an abnormal switch is detected, the system not only issues an alarm but also can promptly notify the relevant control center for handling and automatically take emergency measures if necessary. This comprehensive safety guarantee mechanism greatly improves the safety during the train's operation, avoids the occurrence of switch rail damage and derailment accidents caused by abnormal switches, and ensures the smooth operation of the train.
[0059] Embodiment 2: Step 1 specifically includes: using a Gaussian filter to denoise the collected front image, then applying adaptive histogram equalization to enhance the contrast to obtain a preprocessed image; adjusting the preprocessed image to a preset fixed size, performing normalization processing, and then using a ResNeXt backbone network to extract basic features. Assume that the ResNeXt backbone network has a total of L layers, and the output of each layer is represented as X l, where \(l\in\{1,\ldots,L\}\); adaptively fuse the output representations of different layers to obtain the fused output, upsample and concatenate the fused output to obtain a multi-scale feature map; use an improved YOLO algorithm to perform obstacle detection on the multi-scale feature map to obtain a set of obstacle candidate boxes; calculate the risk score of each candidate box in the set of obstacle candidate boxes to obtain the overall risk degree; when the overall risk degree exceeds the preset risk degree threshold, trigger an obstacle intrusion alarm, and at the same time, calculate the emergency braking decision index; when the emergency braking decision index exceeds the set braking threshold, trigger emergency braking.
[0060] Specifically, after image acquisition, the system uses a Gaussian filter to denoise the front image. The Gaussian filter can smooth out the high-frequency noise in the image through convolution operations while retaining the main structural information of the image. The purpose of denoising is to weaken the noise interference in the image so that subsequent processing steps can be carried out on a clearer image basis, thereby improving the processing accuracy. This step is very crucial because during the high-speed running of the train, the image acquisition device may be affected by vibrations and changes in ambient light, generating noise, and the Gaussian filter can effectively filter out this noise. Then, the system applies adaptive histogram equalization to enhance the contrast of the image. Adaptive histogram equalization can dynamically adjust the contrast according to the local region histogram of the image, making the details of the dark and bright parts of the image more prominent. This step significantly improves the visibility and detail representation ability of the image. Especially in the case of poor lighting conditions, it can significantly improve the image quality. This is particularly important for ensuring the accurate detection of obstacles during the train's travel because a high-contrast image can more clearly present the details of potential obstacles, facilitating subsequent feature extraction and detection. After image denoising and contrast enhancement, the preprocessed image is adjusted to a preset fixed size and normalized. Adjusting the image to a fixed size is to meet the input requirements of the subsequent feature extraction network and ensure the consistency and standardization of the input image. Normalization processing standardizes the pixel values to a smaller range by subtracting the mean of the image and dividing by the standard deviation, eliminating the brightness and contrast differences between different images, and ensuring the consistency of feature extraction. This step ensures that the data input into the deep learning network has the same scale and range, improving the effect of feature extraction and model training.
[0061] Then, the preprocessed image is input into the ResNeXt backbone network for basic feature extraction. ResNeXt is an improved convolutional neural network that significantly enhances the network's representation ability and training efficiency by introducing grouped convolution and residual connections. In the ResNeXt network, each layer extracts feature representations at different levels, thereby capturing multi-scale information in the image. These feature representations are passed through the network layer by layer, forming multi-level feature representations from low-level to high-level, which helps to describe the image content more comprehensively. In the ResNeXt backbone network, the output representations of different layers are adaptively fused. Adaptive feature fusion combines the feature representations of different layers through weighted averaging or attention mechanisms to form a more representative feature representation. The purpose of this step is to combine feature information at different levels, enhance the robustness and discriminability of the feature representation, and provide richer and more accurate feature data for subsequent obstacle detection. The fused feature representation is upsampled and concatenated to generate a multi-scale feature map. The multi-scale feature map can analyze the image at different scales by combining feature information at different resolutions, thereby improving the detection ability for obstacles of different sizes. Next, an improved YOLO algorithm is used to detect obstacles in the multi-scale feature map. The YOLO (You Only Look Once) algorithm is an efficient object detection method that can simultaneously predict the positions and categories of multiple objects in a single forward pass. The improved YOLO algorithm is optimized on the original basis to improve the detection accuracy and speed. By analyzing the multi-scale feature map, the YOLO algorithm can identify obstacles in the image and generate a set of obstacle candidate boxes. Each candidate box contains the position, size, and category information of the obstacle, representing the area where an obstacle may exist. After obtaining the set of obstacle candidate boxes, the system calculates the risk score for each candidate box. The risk score is comprehensively evaluated based on factors such as the position, size, and movement speed of the obstacle, reflecting the potential threat level of the obstacle to the train's operation. The overall risk degree is the weighted sum of the risk scores of all candidate boxes. When the overall risk degree exceeds the preset risk degree threshold, the system will trigger an obstacle intrusion alarm to remind the train driver to pay attention to the possible danger ahead. At the same time, the system calculates an emergency braking decision index and determines whether emergency braking is required based on the risk assessment result of the obstacle and parameters such as the train's current speed and distance. When the emergency braking decision index exceeds the set braking threshold, the system will automatically trigger emergency braking to ensure the safety of the train and passengers.
[0062] Example 3: The output representations of different layers are adaptively fused through the following formula to obtain the fused output:
[0063] F l = α l ·X l + β l·Up(X l+1 ) + γ l ·Down(X l-1 );
[0064] Where: F l is the output after fusion of the l-th layer; X l , X l+1 and X l-1 are the outputs of the l-th layer, the (l + 1)-th layer, and the (l - 1)-th layer respectively; Up and Down are upsampling and downsampling operations respectively; α l , β l and γ l are all adaptive weights, calculated by the following formula:
[0065]
[0066] Where, W f and b f are the preset weight matrix and bias matrix respectively; GAP is the global average pooling operation; the multi-scale feature map F is generated by the following formula:
[0067] F = Concat(F1, Up2(F2),..., Up L (F L )) · W c ;
[0068] Where, W c is the 1x1 convolution weight for adjusting the number of channels; Concat is the concatenation operation; Up i is the operation of upsampling the output after fusion of the i-th layer to the same size as F1, where i is an integer index, and here i ∈ {2,..., L}.
[0069] Specifically, the system uses a deep convolutional neural network to extract multi-level feature representations of the input image. These feature representations contain detailed information from the low levels to semantic information from the high levels, and can comprehensively reflect the image content. However, using the features of each layer alone may lead to one-sidedness and insufficiency of information. Therefore, it is necessary to comprehensively process these features. For this purpose, an adaptive feature fusion formula is adopted, which combines the output of the features of each layer and the features of its adjacent layers, and obtains a richer and more accurate feature representation through weighted fusion.
[0070] Specifically, the adaptive feature fusion formula includes the current layer feature X l , the upsampling result Up(X l+1 ) of the previous layer feature, and the downsampling result Down(X l-1 ) of the next layer feature. These features are weighted by the adaptive weights α l , β l and γl Perform weighted summation to generate the fused feature F l . These adaptive weights are obtained through neural network learning. The global average pooling (GAP) operation is used to extract the global information of the features at each layer, and the weights are calculated through a fully connected layer. The GAP operation can compress the spatial information of the feature map into a global feature vector, thus reflecting the overall content of the feature map. These global feature vectors are used to calculate their respective weights through the fully connected layer and are normalized by the softmax function to ensure that the sum of the weights is 1, thereby achieving effective weighting of the features at different layers. After the fused feature is generated, it needs to be upsampled and concatenated to form a multi-scale feature map. By combining the feature information at different resolutions, the multi-scale feature map can analyze the image at different scales, thereby improving the detection ability for obstacles of different sizes. In this process, the fused feature of each layer is adjusted to the same size as the fused feature of the first layer through the upsampling operation, and then the fused features of each layer are combined through the concatenation operation to finally generate a feature map containing rich multi-scale information. In this way, the system can simultaneously utilize the low-level detail and high-level semantic information to comprehensively analyze and accurately detect the possible obstacles in the image. The improved YOLO algorithm is used to detect obstacles in the generated multi-scale feature map. The YOLO algorithm can simultaneously predict the positions and categories of multiple targets in a single forward propagation. Through its efficient detection mechanism, it can perform well in applications with high real-time requirements. Combining the rich information of the multi-scale feature map, the improved YOLO algorithm can more accurately identify the obstacles in the image and generate a set of obstacle candidate boxes. Each candidate box contains the position, size, and category information of the obstacle, representing the area where the obstacle may exist. After obtaining the set of obstacle candidate boxes, the system calculates the risk score for each candidate box. The risk score is comprehensively evaluated based on factors such as the position, size, and moving speed of the obstacle, reflecting the potential threat degree of the obstacle to the train operation. The overall risk degree is the weighted sum of the risk scores of all candidate boxes. When the overall risk degree exceeds the preset risk degree threshold, the system will trigger an obstacle intrusion alarm to remind the train driver to pay attention to the possible danger ahead. At the same time, the system calculates the emergency braking decision index and determines whether to perform emergency braking based on the risk assessment result of the obstacle and parameters such as the current speed and distance of the train. When the emergency braking decision index exceeds the set braking threshold, the system will automatically trigger emergency braking to ensure the safety of the train and passengers.
[0071] Example 4: Use the improved YOLO algorithm to detect obstacles in the multi-scale feature map F. Let the obtained set of obstacle candidate boxes be B = {b1, b2,..., b n}; for each candidate box b i , calculate its risk score S(b i ) through the following formula:
[0072]
[0073] Among them, Area(b i ) is the area of the candidate bounding box b i , and Area(Image) is the total area of the preprocessed image; d(b i ) is the estimated distance from the candidate bounding box b i to the train; d0 is the safety threshold distance; λ is the first distance attenuation coefficient; α is the first weight coefficient, and its value range is from 0.3 to 0.5; β is the second weight coefficient, and its value range is from 0.5 to 0.7; n is the total number of candidate bounding boxes; then, through the following formula, the overall risk degree R is calculated:
[0074]
[0075] Among them, θ is the preset risk threshold; μ is the risk sensitivity adjustment parameter; when R exceeds the set risk degree threshold R t , the obstacle intrusion alarm is triggered; o is the subscript index.
[0076] Specifically, the improved YOLO algorithm simultaneously predicts the positions and categories of multiple targets in a single forward propagation. By analyzing the multi-scale feature maps, a set of obstacle candidate bounding boxes B = b1, b2,..., b n is generated. Each candidate bounding box b i represents the area in the image where an obstacle may exist, including its position, size, and category information. The YOLO algorithm is particularly suitable for the real-time monitoring requirements during train operation due to its high efficiency and real-time performance. After obtaining the set of obstacle candidate bounding boxes, the system calculates the risk score S(b i ) for each candidate bounding box b i . The calculation of the risk score takes into account two key factors: the area and distance of the candidate bounding box. In the formula, S(b i ) consists of two main parts: one part is the ratio of the area of the candidate bounding box to the total area of the image, and the other part is the relationship between the estimated distance from the candidate bounding box to the train and the safety threshold distance. The influence weights of the area and distance in the risk assessment are adjusted by the two weight parameters α and β, so that the risk score can more accurately reflect the potential threat degree of the obstacle to train operation. Specifically, a larger area of the candidate bounding box means that the obstacle may be larger and the potential risk is higher. Therefore, the area ratio part is weighted by α. The distance part is processed by an exponential function to reflect the non-linear influence of distance on risk. The closer the distance, the higher the risk, which is adjusted by the two parameters β and λ to ensure that the influence of distance is reasonably amplified or reduced to reflect the actual threat degree.
[0077] Next, the system calculates the overall risk degree R to comprehensively evaluate the overall threat of all candidate bounding boxes to the train's operation. The calculation of the overall risk degree not only considers the risk scores of each candidate bounding box but also evaluates the combined impact of all candidate bounding boxes through an accumulation effect formula. In the accumulation effect part of the overall risk degree formula, the risk scores of each candidate bounding box are multiplied, making the contribution of higher-risk candidate bounding boxes to the overall risk degree greater. This design ensures that the system can respond sensitively to high-risk obstacles without ignoring the overall threat due to the presence of a few low-risk obstacles. The overall risk degree is further adjusted by an exponential function with a threshold and a sensitivity adjustment parameter, making the final calculation result smoother and more stable. The design of this exponential function makes the change in the risk degree more sensitive when the total risk score approaches the preset risk threshold, enabling an earlier trigger of the alarm and providing timely early warning and response. When the overall risk degree R exceeds the set risk degree threshold R t When this happens, the system will immediately trigger an obstacle intrusion alarm, alerting the train driver to the possible danger ahead and transmitting the alarm information to the train control center through the wireless communication module. At this time, the system not only issues an alarm but also calculates an emergency braking decision index. Based on the risk assessment results of the obstacles and parameters such as the current speed and distance of the train, it determines whether emergency braking is required. When the emergency braking decision index exceeds the set braking threshold, the system will automatically trigger emergency braking to ensure the safety of the train and passengers.
[0078] Example 5: Calculate the emergency braking decision index through the following formula:
[0079]
[0080] where v is the current speed of the train; a max is the maximum deceleration of the train; d min is the minimum safety distance; φ is the braking sensitivity adjustment parameter; when E exceeds the set braking threshold E t emergency braking is triggered.
[0081] Specifically, the first part included in the formula is the ratio of the square of the overall risk degree R to the sum of it and 1, that is This part increases the influence weight of the risk degree through the square, making the exponential value increase rapidly in high-risk situations, thus more sensitively reflecting high-risk scenarios. This design ensures that when the overall risk degree of the obstacle is high, the basic value of the emergency braking decision index is significantly increased, and the system can respond more promptly to potential dangerous situations. The second part considers the relationship between the current speed b of the train, the maximum deceleration a max and the minimum safety distance d min The specific expression is This part reflects the impact of train speed on emergency braking through an exponential function. The higher the speed, the greater the braking distance required, so the value of this item also increases accordingly. In this way, the system can increase the value of the emergency braking decision index when the train speed is high to ensure that the train can make a braking decision in a timely manner when traveling at high speed and avoid dangerous situations caused by excessive speed. The third part reflects the relationship between the average risk score of the candidate box and the braking sensitivity adjustment parameter φ through . Here, represents the sum of the risk scores of all candidate boxes, divided by the total number of candidate boxes n to obtain the average risk score, and then subtract the adjustment parameter φ. A non-linear transformation is performed on it through the hyperbolic tangent function (tanh) to ensure that when the average risk score is high, the value of this part increases significantly, thereby increasing the emergency braking decision index. This design enables the system to dynamically adjust according to the overall risk level of the detected obstacles and improve the sensitivity to high-risk situations. Combining the above three parts, the overall formula of the emergency braking decision index E comprehensively considers factors such as the overall risk degree, train speed, deceleration, safety distance, and average risk score. Through the comprehensive evaluation of these factors, the system can comprehensively understand the current driving environment and potential risks to make the optimal braking decision. When the emergency braking decision index E exceeds the set braking threshold E t , the system will automatically trigger emergency braking to ensure the safety of the train and passengers. The advantage of this method lies in its comprehensiveness and dynamic adjustment ability. Compared with traditional simple decision-making mechanisms, the method of the present invention can consider a variety of influencing factors more comprehensively and ensure accurate decisions in different scenarios through complex formula calculations. Whether it is the overall risk degree of the obstacle, the current train speed, or the average risk score, the system can ensure the accuracy and timeliness of the braking decision by adaptively adjusting the influence weights of each part.
[0082] Embodiment 6: Step 2 specifically includes: using a semantic segmentation network to extract the road image from the front image to obtain the road mask M; based on the road mask M, applying a region proposal network to locate potential turnout areas on the road image to obtain a set of candidate areas R = {r1, r2,..., r m}; where m is the number of candidate areas; for each candidate area r j , use a multi-scale attention mechanism to extract the feature vector f j , j is an integer index, here, j ∈ {1,..., m}; according to the feature vector of each candidate area, use an ensemble classifier to classify each candidate area to obtain the direction probability distribution; consider the spatial relationship between multiple candidate areas and perform global optimization on the direction probability distribution to obtain the final probability distribution of the turnout opening direction; take the turnout opening direction with the highest probability as the turnout opening direction in front.
[0083] Specifically, first, the lane image is extracted from the front image through a semantic segmentation network to obtain the lane mask M. The semantic segmentation network is a deep learning model that can classify images at the pixel level, assigning each pixel in the image to different categories. In the present invention, the semantic segmentation network is trained to identify and extract the lane area, separating the lane pixels from the background to form the lane mask M. This segmentation technique ensures that the system can clearly identify the lane part on the train travel path, providing a basis for subsequent area positioning. Based on the lane mask M, the system applies a Region Proposal Network (RPN) to locate potential turnout areas on the lane image, obtaining a set of candidate areas R = {r1, r2,..., r m . The Region Proposal Network is a neural network model for object detection that can generate a series of candidate areas that may contain the object. In the present invention, the RPN is used to detect and locate the turnout area on the lane image. By analyzing the lane mask, the RPN can identify the areas where turnouts may exist and generate a set of candidate areas R, which will be used as the input for subsequent feature extraction and classification. For each candidate area r j , the system uses a multi-scale attention mechanism to extract the feature vector f j . The multi-scale attention mechanism is a method to enhance the feature representation ability. By weighted summing the image features at different scales, the important features are given higher weights. This method can extract features from candidate areas at different resolutions and combine these multi-scale features to obtain a richer feature representation. In this way, the system can capture the subtle features and overall structure in the turnout area, enhancing the ability to identify the turnout state. After obtaining the feature vector f of each candidate area jAfter that, the system uses an integrated classifier to classify each candidate region, obtaining a direction probability distribution. The integrated classifier combines the advantages of multiple basic classifiers and improves the accuracy and stability of classification through the method of ensemble learning. For each candidate region, the integrated classifier predicts the possible turnout opening direction of the region according to its feature vector and outputs the corresponding probability distribution. These probability distributions represent the possibilities of each candidate region in different opening directions and provide the basic data for subsequent global optimization. Considering the spatial relationship between multiple candidate regions, the system performs global optimization on the direction probability distribution to obtain the final probability distribution of the turnout opening direction. In practical applications, there may be certain correlations and constraint conditions between multiple candidate regions, and these relationships may not be fully considered during individual classification. Through global optimization, the system can comprehensively consider the prediction results of all candidate regions and, combined with their spatial relationships, adjust and optimize the direction probability distribution. This process is achieved through an optimization algorithm to ensure that the final probability distribution is more accurate and consistent. Finally, the system selects the turnout opening direction with the highest probability as the opening direction of the turnout ahead. This method ensures the accurate identification of the turnout opening direction through multi-level and multi-step processing. Compared with traditional manual observation or single-algorithm identification, the method of the present invention has a higher degree of automation and accuracy, can provide stable and reliable turnout state information in a complex environment, and provides strong technical support for train operation safety.
[0084] Embodiment 7: Extract the feature vector f through the following formula j :
[0085]
[0086] where K is the number of scales; CNN k is the convolutional neural network at the k-th scale; SE is the SQUEEZE-AND-EXCITATION attention module; CBAM is the convolutional attention module; α k is the scale weight, calculated through the following formula:
[0087]
[0088] where MLP is the multi-layer perceptron and GAP is the global average pooling.
[0089] Specifically, the extraction formula of the feature vector f j shows that the features of each candidate region r j are obtained by weighted summation of the outputs of convolutional neural networks at multiple scales. Specifically, convolutional neural networks (CNN k ) at multiple scales are used to process the candidate region r jFeature extraction is performed. The convolutional neural network at each scale can capture information at different levels, from low-level edges and textures to high-level shapes and semantics, ensuring that the feature vector f j contains comprehensive image information. Through this multi-scale approach, the system can better adapt to various complex scenarios and environmental changes, improving the robustness and accuracy of feature extraction. In addition, the SQUEEZE-AND-EXCITATION attention module and the CBAM convolutional attention module further enhance the feature representation ability. The SQUEEZE-AND-EXCITATION attention module models the relationship between channels through global information, can automatically assign weights to different channels, highlight important features, and suppress irrelevant or redundant information. Specifically, the SE module first compresses the spatial information of the feature map into a global feature vector through a global average pooling (GAP) operation, then calculates the weight of each channel through a multi-layer perceptron (MLP), and finally weights the feature map. This process makes important features occupy a higher weight in the final feature representation, improving the model's attention to key features. At the same time, the CBAM convolutional attention module combines two mechanisms of channel attention and spatial attention, and weights each position and each channel of the feature map. The channel attention mechanism captures global information through global average pooling and global max pooling operations, and then calculates the weight of each channel through a shared multi-layer perceptron. The spatial attention mechanism generates a spatial attention map through convolution operation on the feature map and weights each position of the feature map. In this way, the CBAM module can refine features at different scales and positions, further improving the quality of feature representation.
[0090] When extracting the feature vector f j different scales of features are weighted by α k α k As the scale weight, it is calculated through a multi-layer perceptron (MLP). Specifically, first perform global average pooling (GAP) on the output of the convolutional neural network at each scale, then calculate the weight of each scale through the MLP, and then normalize these weights through the softmax function to ensure that the sum of the weights is 1. In this way, α k reflects the importance of each scale in the final feature vector, enabling effective fusion of multi-scale features and forming a comprehensive feature representation. These fused feature vectors f jBy performing weighted summation on the outputs of convolutional neural networks at multiple scales and enhancing them with the SE and CBAM attention modules, a feature representation rich in information is finally generated. This feature vector not only contains low-level visual information (such as edges, textures, etc.) of the candidate regions, but also contains high-level semantic information (such as shapes, object categories, etc.), and through the weighting process of the attention mechanism, important features are highlighted and redundant information is suppressed. In this way, the system can accurately extract the features of the candidate regions, ensuring efficient and accurate turnout state recognition even in complex environments. Feature vector f j The high-quality representation provides a solid foundation for subsequent classification and recognition, enabling the system to maintain stable performance in different scenarios. In the train operation safety guarantee method, accurately identifying the opening direction of the turnout ahead is crucial. Through the feature vector extracted by the above method, the system can more accurately analyze and judge the state of the turnout ahead, make timely responses, and ensure the safety of train operation. The implementation of this method not only improves the accuracy and efficiency of recognition, but also reduces the need for manual intervention, laying a solid foundation for the full automation and intelligence of train operation.
[0091] Example 8: Use an ensemble classifier to classify each candidate region, and the formula for obtaining the direction probability distribution is as follows:
[0092]
[0093] where P(d i |r j ) is the probability that the candidate region r j belongs to the direction d i ; C is the number of classifiers in the ensemble classifier; w c is the weight of the c-th classifier; p c (d i |f j ) is the probability predicted by the c-th classifier; H(p c (d|f j )) is the entropy of the probability distribution predicted by the c-th classifier; λ is the regularization coefficient; Z is the normalization constant; d is the set of directions.
[0094] Specifically, the ensemble classifier consists of multiple base classifiers. These classifiers classify the feature vector f j of each candidate region and each gives a prediction result. The prediction result of each classifier is expressed as p c (d i |f j ), that is, the probability that the c-th classifier predicts that the candidate region r j belongs to the direction d i . To synthesize these prediction results, the weight w is introduced in the formulac and the regularization term H(p c (d|f j ))。The weight w c reflects the importance of each classifier in the overall prediction and is usually determined by the performance during the training process, such that classifiers with better performance have a greater influence in the combined prediction. When calculating the directional probability distribution, an exponential function and a normalization constant Z are used in the formula. Specifically, the calculation of the directional probability distribution P(d i |r j ) involves applying an exponential transformation to the weighted prediction results of each classifier and the regularization term, and then normalizing them with the normalization constant Z to ensure that the sum of all directional probabilities is 1. This process ensures that the final probability distribution has the properties of probabilities, facilitating subsequent decision-making and analysis. The regularization term H(p c (d|f j)) is the entropy of the predicted probability distribution of the c-th classifier, representing the uncertainty of the prediction result. The larger the entropy, the more uncertain the prediction of the classifier. By introducing a regularization term, the system can suppress the parts with greater uncertainty in the prediction result during the calculation process, improving the reliability of the overall prediction. The regularization coefficient λ controls the influence of the regularization term in the overall calculation, ensuring that while guaranteeing the prediction accuracy, it does not overly rely on a classifier with greater uncertainty. Through this calculation method combining weights and regularization terms, the system can effectively integrate the prediction results of multiple classifiers to generate a comprehensive directional probability distribution. The advantage of this method lies in its comprehensiveness and dynamic adjustment ability. Compared with a single classifier, the ensemble classifier can more comprehensively integrate multiple information sources, reducing the errors and uncertainties of individual classifiers. By introducing the regularization term, the system enhances the ability to handle the uncertainty of the prediction result while ensuring accuracy, avoiding the risks brought by the uncertainty of individual classifiers. In the train operation safety guarantee method, accurately predicting the opening direction of the turnout is crucial for ensuring the safety of train operation. By using the ensemble classifier, the system can more comprehensively consider the prediction results of different classifiers and, through the adjustment of weights and regularization terms, ensure that the final prediction result has high precision and high reliability. This method not only improves the prediction accuracy but also enhances the robustness of the system, enabling it to provide stable performance in complex environments. In practical applications, the ensemble classifier continuously adjusts and optimizes the weights of each classifier, enabling the system to adapt to different environments and scenarios. For example, in some cases, certain classifiers may perform better, and the system will automatically assign higher weights to these classifiers to enhance their influence in the comprehensive prediction. On the contrary, for classifiers with poor performance or greater uncertainty, the system will reduce their weights through the regularization term, thereby reducing their negative impact on the final prediction result. In this way, the ensemble classifier can not only provide high-precision prediction results but also dynamically adjust to adapt to different application scenarios, ensuring stable performance under various complex conditions. The implementation of this method provides strong technical support for train operation safety, ensuring that the train can accurately identify the opening direction of the turnout ahead during operation and make correct responses in a timely manner, avoiding the accident risks caused by turnout abnormalities.
[0095] Embodiment 9: Considering the spatial relationship between multiple candidate regions, the specific process of globally optimizing the directional probability distribution to obtain the probability distribution of the final turnout opening direction includes: constructing a spatial relationship graph G=(V, ES) between candidate regions, where V is the set of candidate regions and ES is the set of edges; the edge w between the i-th candidate region and the j-th candidate region ij The weight calculation formula is as follows:
[0096]
[0097] Among them, c i and c j are the central coordinates of the i-th candidate region and the j-th candidate region respectively; σ is the second distance attenuation coefficient; θ ij is the included angle between the main directions of the i-th candidate region and the j-th candidate region; Area(r i ) and Area(r j ) are the areas of the i-th candidate region and the j-th candidate region respectively; The direction probability distribution is globally optimized using a graph convolutional network, and the formula is as follows:
[0098]
[0099] Among them, P (t) (d|R) is the global direction probability distribution after the t-th iteration; A is the adjacency matrix, D is the degree matrix; W1 and W2 are the first weight and the second weight of the graph convolutional network respectively; B1 and B2 are the first bias and the second bias of the graph convolutional network respectively; P (t+1) (d|R) is the global direction probability distribution after the t+1-th iteration.
[0100] Specifically, a spatial relationship graph G=(V, E) between candidate regions is constructed, where V represents the set of candidate regions and E represents the set of edges. The nodes in the graph correspond to each candidate region, and the edges reflect the relationships between candidate regions. To quantify this relationship, the weight w ij of the edge is calculated by a formula that combines three factors: Euclidean distance, direction included angle, and area ratio to measure the similarity between candidate regions. The Euclidean distance term is implemented by a Gaussian kernel function, making regions closer to each other have a greater impact on each other; the direction included angle term is implemented by a cosine function, making regions with more similar directions have a greater impact on each other; the area ratio term ensures that the mutual influence between larger and smaller regions is balanced. Specifically, when the central distance between two candidate regions is close, their directions are similar, and their area ratios are close, their weight w ij is larger, indicating that the relationship between these two regions is closer. Next, a graph convolutional network (GCN) is used to globally optimize the direction probability distribution. A graph convolutional network is a neural network for processing graph-structured data that performs convolutional operations with the help of the adjacency matrix and degree matrix of the graph, thereby aggregating the feature information of nodes and their neighbors. The core of GCN is to fuse the feature information of nodes with the information of their neighbor nodes through graph convolutional operations to update the representation of nodes.
[0101] In the specific implementation process, first calculate the adjacency matrix A and the degree matrix D. The adjacency matrix A represents the connection relationship between nodes in the graph. If there is an edge between node i and node j, then A ij =1, otherwise Aij = 0. The degree matrix D is a diagonal matrix whose diagonal elements are the degrees of the nodes, i.e., the number of edges connecting the nodes. Through the normalization of D and A, that is to ensure that the information propagation process in the graph convolution operation is more stable and effective. In each iteration, the direction probability distribution P (t) (d|R) is updated through the graph convolution operation, which is the direction probability distribution of the current iteration. First, multiply the current direction probability distribution by the normalized form of the adjacency matrix for information propagation. Next, through the weights W1 and biases B1 of the first-layer graph convolution, and the activation function ReLU, the representation of the nodes is updated. The purpose of this step is to fuse the features of each node with the features of its neighbors to capture more graph structure information. Subsequently, through the weights W2 and biases b2 of the second-layer graph convolution, and applying the ReLU activation function again, the representation of the nodes is further optimized. Finally, the updated direction probability distribution is normalized through the softmax function to ensure that the sum of the output probability distributions is 1. This multi-layer graph convolution process, through continuous iteration and optimization, makes the direction probability distribution of each candidate region not only depend on its own features, but also comprehensively incorporates the relationship information with its neighboring nodes, thereby obtaining a more accurate and globally optimized direction probability distribution. After the final iteration is completed, the obtained global direction probability distribution P (t+1) (d∣R) can reflect the complex relationships between all candidate regions and provide higher prediction accuracy. This global optimization method based on the graph convolution network is of great significance in the train operation safety guarantee method. Traditional methods may only consider the independent features of each candidate region and ignore the spatial relationships between them, which is likely to lead to local optima or ignore some important global information. By constructing a spatial relationship graph and using the graph convolution network for global optimization, the system can comprehensively consider the relationships between candidate regions, thereby improving the accuracy and robustness of turnout state recognition. In addition, this method also has strong adaptability and scalability. By adjusting the number of layers and parameter settings of the graph convolution network, it can adapt to graph structure data of different scales and complexities and handle various complex train operation environments. This flexibility enables this method to be widely applied to different train operation scenarios to provide reliable safety guarantees.
[0102] Embodiment 10: Optimal direction d * is calculated by the following formula:
[0103]
[0104] where T is the total number of iterations of the graph convolution network.
[0105] Specifically, in Embodiment 10 of the train operation safety guarantee method, the optimal direction d *The calculation is achieved by maximizing the global direction probability distribution after the final iteration. This process utilizes the optimization results of the Graph Convolutional Network (GCN) in multiple iterations, selects the direction with the highest probability as the turnout opening direction, thereby ensuring the safety and accuracy of train operation.
[0106] First, in the previous steps, by constructing a spatial relationship graph between candidate regions and using the graph convolutional network to globally optimize the direction probability distribution. In each iteration, the graph convolutional network fuses the features of a node with the features of its neighbor nodes through a normalized adjacency matrix and degree matrix, thereby updating the direction probability distribution of each node. After multiple iterations, the direction probability distribution gradually stabilizes and can more accurately reflect the global relationship between candidate regions and their respective direction tendencies. After the final iteration number T, the global direction probability distribution P (T) (d|R) is obtained, which represents the probability distribution of each possible direction d based on the set of candidate regions R. To determine the optimal turnout opening direction d * , it is necessary to select the direction with the highest probability from these directions. This process ensures that the selected turnout opening direction is based on the results of global optimization, fully considering the spatial relationship and respective feature information between all candidate regions. This method not only improves the prediction accuracy but also can effectively cope with complex train operation environments and changing turnout states. In practical applications, determining the optimal direction d * is of great significance for train operation safety. Through this global optimization method based on the graph convolutional network, the system can provide stable and reliable prediction results in complex environments, ensure that the train can accurately identify the turnout opening direction ahead, and adjust the driving route according to the optimal direction to avoid potential accident risks. In addition, this method also has strong robustness and adaptability. Through multiple iterations and global optimization, the graph convolutional network can effectively process graph structure data of different scales and complexities and adapt to various train operation scenarios. Whether it is a simple single-section or a complex multi-turnout section, this method can provide reliable prediction results and provide effective technical support for train operation safety.
[0107] Although the specific implementation manners of the present invention are described above, those skilled in the art should understand that these specific implementation manners are only examples. Without departing from the principle and essence of the present invention, those skilled in the art can make various omissions, substitutions, and changes to the details of the above methods and systems. For example, combining the above method steps, thus performing substantially the same function according to a substantially same method to achieve substantially the same result, belongs to the scope of the present invention. Therefore, the scope of the present invention is only defined by the appended claims.
Claims
1. A train driving safety guarantee method, characterized in that: The method comprises: Step 1: Real-time acquisition of the front image of the train when it is moving; judging whether there is an obstacle zone invasion according to the front image, if so, an obstacle invasion alarm is issued or the train is emergency braked, specifically including: using a Gaussian filter to reduce the noise of the collected front image, and then applying adaptive histogram equalization to enhance the contrast to obtain a preprocessed image; adjusting the preprocessed image to a preset fixed size, normalizing it, and then using the ResNeXt backbone network to extract basic features; adaptively fusing the output representations of different layers of the ResNeXt backbone network to obtain a fused output, upsampling and splicing the fused output to obtain a multi-scale feature map; using the improved YOLO algorithm to detect obstacles on the multi-scale feature map to obtain a set of obstacle candidate frames; calculating the risk score of each candidate frame in the obstacle candidate frame set to obtain the overall risk; when the overall risk exceeds the preset risk threshold, an obstacle intrusion alarm is triggered, and at the same time, an emergency braking decision index is calculated; when the emergency braking decision index exceeds the set braking threshold, emergency braking is triggered; Step 2: Filter out the roadway image when the train is moving from the front image, and analyze the opening direction of the front turnout according to the roadway image, specifically including: using the semantic segmentation network to extract the roadway image from the front image to obtain the roadway mask; based on the roadway mask, apply the region proposal network to locate the potential turnout area on the roadway image to obtain a candidate area set; according to the feature vector of each candidate area in the candidate area set, use the integrated classifier to classify each candidate area to obtain the direction probability distribution; considering the spatial relationship between multiple candidate areas, the direction probability distribution is globally optimized to obtain the final probability distribution of the turnout opening direction; take the turnout opening direction with the highest probability as the opening direction of the front turnout; Step 3: According to the train's current scheduled route, determine whether the opening direction of the forward turnout meets the preset traffic requirements. If not, issue a turnout abnormality alarm to prevent the occurrence of point rail damage or derailment accidents caused by turnout abnormalities. Use the improved YOLO algorithm to multi-scale feature maps Perform obstacle detection and set the obstacle candidate frame set to be ; For each candidate box , the risk score is calculated by the following formula : ; in, Candidate box The area of is the total area of the preprocessed image; Candidate box Estimated distance to the train; is the safety threshold distance; is the first distance attenuation coefficient; is the first weight coefficient, ranging from 0.3 to 0.5; is the second weight coefficient, ranging from 0.5 to 0.7; is the total number of candidate boxes; the overall risk is calculated by the following formula : ; in, is the preset risk threshold; is the risk sensitivity adjustment parameter; when Exceeding the set risk threshold When the obstacle intrusion alarm is triggered; is the subscript index.
2. The train driving safety guarantee method according to claim 1, characterized in that: Step 1 specifically includes: Assume that the ResNeXt backbone network has a total of layer, the output of each layer is expressed as ,in, ; Adaptively fuse the output representations of different layers to obtain the fused output, upsample and concatenate the fused output to obtain a multi-scale feature map; Adaptively fuse the output representations of different layers to obtain the fused output through the following formula: ; in: For the Output after layer fusion; , and They are Layer output, Layer output and Output; and They are upsampling and downsampling operations respectively; , and are all adaptive weights, calculated using the following formula: ; in, and They are the preset weight matrix and bias matrix respectively; is the global average pooling operation.
3. The train driving safety guarantee method according to claim 2, characterized in that: Multi-scale feature maps is generated by the following formula: ; in, is the 1x1 convolution weight, used to adjust the number of channels; For splicing operation; To be the first After layer fusion, the output is upsampled to Operations of the same size, is an integer index, here .
4. The train driving safety guarantee method according to claim 3, characterized in that: The emergency braking decision index is calculated using the following formula: ; in, is the current speed of the train; is the maximum deceleration of the train; is the minimum safe distance; is the brake sensitivity adjustment parameter; when Exceeding the set braking threshold The emergency brake is triggered.
5. The train driving safety guarantee method according to claim 4, characterized in that: Step 2 specifically includes: setting the lane mask to ; Based on the lane mask , apply the region proposal network to locate the potential turnout area on the road image and obtain the candidate region set ;in, is the number of candidate regions; for each candidate region , using a multi-scale attention mechanism to extract feature vectors , is an integer index, here, ; Extract the feature vector using the following formula : ; in, is the scale quantity; For the Convolutional neural networks of different scales; for Attention module; It is the convolutional attention module; is the scale weight, calculated by the following formula: ; in, is a multi-layer perceptron, is global average pooling.
6. The train driving safety guarantee method according to claim 5, characterized in that: Use the integrated classifier to classify each candidate area, and the formula for the direction probability distribution is as follows: ; in, Candidate area Belong to the direction probability; is the number of classifiers in the ensemble classifier; For the The weight of each classifier; For the The probability predicted by a classifier; For the The entropy of the probability distribution predicted by each classifier; is the regularization coefficient; is the normalization constant; A collection of directions.
7. The train driving safety guarantee method according to claim 6, characterized in that: Considering the spatial relationship between multiple candidate areas, the direction probability distribution is globally optimized to obtain the final probability distribution of the turnout opening direction. The specific process includes: constructing a spatial relationship diagram between candidate areas ,in is the candidate region set, is the edge set; candidate regions and The edges between the candidate regions The weight calculation formula is as follows: ; in, and Respectively candidate regions and The center coordinates of the candidate regions; is the second distance attenuation coefficient; For the candidate regions and The angle between the main directions of the candidate regions; and Respectively candidate regions and The area of the candidate region; the graph convolutional network is used to globally optimize the direction probability distribution, the formula is as follows: ; in, For the The global direction probability distribution after iterations; is the adjacency matrix, is the degree matrix; and They are the first weight and the second weight of the graph convolutional network respectively; and They are the first bias and second bias of the graph convolutional network respectively; For the Global direction probability distribution after iterations.
8. The train driving safety guarantee method according to claim 7, characterized in that: Optimal direction Calculated by the following formula: ; in, is the total number of iterations of the graph convolutional network.
Citation Information
Patent Citations
On-road train actual operation area detection method based on geometric feature mining
CN116994048A