Train driving safety guarantee method
Through technologies such as multi-scale convolutional neural network and graph convolutional network, a spatial relationship diagram between candidate areas is constructed, which solves the problem of insufficient accuracy in identifying the direction of switch opening in complex environments in traditional systems, and realizes efficient and reliable trains Driving safety guarantee.
Patent Information
- Application Number
- CN202411552227.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-11-01
AI Technical Summary
In complex environments, traditional train driving safety guarantee systems have problems such as signal equipment failure, reduced image processing accuracy, and high misjudgment rate. It is difficult to accurately identify the direction of the forward turnout opening, resulting in an increase in the risk of derailment and collision accidents.
The multi-scale convolutional neural network, SQUEEZE-AND-EXCITATION attention module and CBAM convolutional attention module are used to extract image features. Combined with the graph convolution network and the integrated classifier, a spatial relationship diagram between candidate areas is constructed and a global Optimize to improve the accuracy and robustness of the direction of opening the switch.
Maintaining high-precision feature representation in complex environments improves the accuracy and robustness of turntable identification, reduces the rate of misjudgment, enhances the automation and real-time nature of the system, and ensures the safety and reliability of train driving.
Smart Images

Figure CN119239697A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of intelligent control, and in particular relates to a method for ensuring train driving safety. Background Art
[0002] With the development of modern railway transportation systems, train driving safety has become a crucial research field. Ensuring that the train can timely and accurately identify the direction of the switch ahead is of great significance for preventing accidents such as train derailment and collision. Traditional train driving safety assurance systems mainly rely on fixed signal equipment and the driver's visual observation. However, these methods have many limitations in practical applications, especially in complex and changing environments, signal equipment may fail, and the driver's reaction time is difficult to ensure the safe operation of the train.
[0003] Traditional methods for ensuring train driving safety mainly include ground signal systems and monitoring equipment on trains. The ground signal system provides information about the status of the turnout ahead to the train by installing signal lights and sensors next to the track. Train drivers use these signals to determine whether they need to slow down, stop, or change the direction of travel. This method relies on the normal operation of ground equipment, and 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 easy to fail in bad weather conditions. Another common technology is a train driving safety assurance system based on video monitoring. By installing a camera at the front of the train, the image of the track ahead is collected in real time, and the state of the turnout ahead is identified using image processing technology. This method improves train driving safety to a certain extent, but there are still some problems. First, the quality of the image collected by the camera is greatly affected by the ambient light and weather conditions. In low light or strong contrast conditions, the accuracy of the image processing algorithm will be greatly reduced. Second, the traditional image processing algorithm has limited ability to identify turnouts in complex scenes, especially in multi-turn sections and high-density track networks, which are prone to misjudgment. Summary of the invention
[0004] In view of this, the main purpose of the present invention is to provide a train driving safety guarantee method, which can accurately identify the opening direction of the forward turnout, make corresponding safety decisions in time, and avoid the risk of accidents such as derailment and collision caused by turnout errors. This efficient, accurate and reliable driving safety guarantee method provides strong technical support for the modern railway transportation system and greatly improves the safety and reliability of train driving.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A train driving safety assurance method, the method comprising:
[0007] Step 1: Real-time acquisition of the front image of the train as it moves; judging whether there is an obstacle zone intrusion based on the front image, and if so, issuing an obstacle intrusion alarm or applying emergency braking to the train;
[0008] Step 2: Filter the track image when the train is moving from the front image, and analyze the opening direction of the front turnout according to the track image;
[0009] Step 3: According to the train's current scheduled route, determine whether the opening direction of the switch ahead meets the preset traffic requirements. If not, issue a switch abnormality alarm to prevent point rail damage or derailment accidents caused by switch abnormalities.
[0010] Furthermore, step 1 specifically includes: using a Gaussian filter to reduce noise on the collected front image, and then applying adaptive histogram equalization to enhance contrast to obtain a preprocessed image; adjusting the preprocessed image to a preset fixed size, and normalizing it, and then using the 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 by X l , where l∈{1, ..., 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 the improved YOLO algorithm to detect obstacles on the multi-scale feature map to obtain a set of obstacle candidate frames; calculate 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, 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.
[0011] Furthermore, the output representations of different layers are adaptively fused using the following formula to obtain the fused output:
[0012] F l =α l ·X l +β l ·Up(X l+1 )+γ l ·Down(X l-1 );
[0013] Among them: F l is the output after fusion of the lth layer; X l , X l+1 and X l-1 are the output of layer l, layer l+1 and layer l-1 respectively; Up and Down are upsampling and downsampling operations respectively; α l , β l and γ lare all adaptive weights, calculated using 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 by the following formula:
[0016] F=Concat(F1,Up2(F2),...,Up L (F L ))·W c ;
[0017] Among them, W c is a 1×1 convolution weight, used to adjust the number of channels; Concat is a concatenation operation; Up i To upsample the fused output of the i-th layer to the same size as F1, i is an integer index, where i∈{2,...,L}.
[0018] Furthermore, the improved YOLO algorithm is used to detect obstacles on the multi-scale feature map F. The obstacle candidate box set is assumed to be B = {b1, b2, ..., b n}; For each candidate box b i , the risk score S(b i ):
[0019]
[0020] Among them, Area(b i ) is the candidate box b i Area(1mage) is the total area of the preprocessed image; d(b i ) is the candidate box b i The estimated distance to the train; d0 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; n is the total number of candidate boxes; and the overall risk R is calculated using the following formula:
[0021]
[0022] Among them, θ is the preset risk threshold; μ is the risk sensitivity adjustment parameter; when R exceeds the set risk threshold R t When , the obstacle intrusion alarm is triggered; o is the subscript index.
[0023] Furthermore, the emergency braking decision index is calculated by the following formula:
[0024]
[0025] 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 brake sensitivity adjustment parameter; when E exceeds the set brake threshold E t The emergency brake is triggered.
[0026] Furthermore, step 2 specifically includes: using a semantic segmentation network to extract a road image from the front image to obtain a 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 candidate region set R = {r1, r2, ..., r m}; where m is the number of candidate regions; for each candidate region r j , use the multi-scale attention mechanism to extract the feature vector f j , j is an integer index, where j∈{1, ..., m}; according to the feature vector of each candidate area, each candidate area is classified using an integrated classifier to obtain a 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; the turnout opening direction with the highest probability is taken as the opening direction of the forward turnout.
[0027] Furthermore, the feature vector f is extracted by the following formula: j :
[0028]
[0029] Among them, K is the number of scales; CNN k is the k-th scale convolutional neural network; 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 a multi-layer perceptron and GAP is a global average pooling.
[0032] Furthermore, an integrated classifier is used to classify each candidate region, and the formula for the direction probability distribution is as follows:
[0033]
[0034] Among them, P(d i |r j ) is the candidate region rj Belongs to direction d i The probability of; C is the number of classifiers in the integrated classifier; wc is the weight of the cth classifier; p c (d i |f j ) is the probability predicted by the cth classifier; H(p c (d|f j )) is the entropy of the predicted probability distribution of the cth classifier; λ is the regularization coefficient; Z is the normalization constant; d is the direction set.
[0035] Furthermore, 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 graph G = (V, ES) between the candidate areas, where V is the candidate area set and ES is the edge set; the edge w between the i-th candidate area and the j-th candidate area ij The weight calculation formula is as follows:
[0036]
[0037] Among them, c i and c j are the center coordinates of the i-th candidate area and the j-th candidate area respectively; σ is the second distance attenuation coefficient; θ ij is the angle between the main directions of the i-th candidate area and the j-th candidate area; Area(r i ) and Area(r j ) are the areas of the i-th candidate region and the j-th candidate region respectively; the graph convolutional network is used to globally optimize the direction probability distribution, and the formula is as follows:
[0038]
[0039] Among them, P (t) (d|R) is the global direction probability distribution after the tth iteration; A is the adjacency matrix, D is the degree matrix; W1 and W2 are the first weight and second weight of the graph convolutional network, respectively; B1 and B2 are the first bias and second bias of the graph convolutional network, respectively; P (t+1) (d|R) is the global direction probability distribution after the t+1th iteration.
[0040] Furthermore, the optimal direction d * Calculated by the following formula:
[0041]
[0042] Where T is the total number of iterations of the graph convolutional network.
[0043] By adopting the above technical scheme, the present invention produces the following beneficial effects: the present invention extracts the features of the candidate regions at different scales by using a multi-scale convolutional neural network (CNN), a SQUEEZE-AND-EXCITATION attention module and a CBAM convolutional attention module. This multi-scale feature extraction method can capture the subtle information and overall structure in the image, so that the system can still maintain high-precision feature representation when processing complex scenes. The SE module enhances the weight of important features through the channel attention mechanism, and the CBAM module combines the channel and spatial attention mechanisms to further optimize the expression of features. This method not only improves the accuracy of feature extraction, but also enhances the robustness of the features, so that the system can 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 directional probability distribution, fully considering the spatial relationship between the candidate regions. GCN merges the feature information of each node with the information of its neighboring nodes through iterative updates, so that the final directional probability distribution can reflect global information. Through this global optimization method, the system can comprehensively consider the relationship between all candidate areas, avoid the local optimal problem that may be caused by a single feature extraction method, and thus improve the accuracy and robustness of recognition. The present invention uses an integrated classifier to classify each candidate area to obtain a directional probability distribution. The integrated classifier combines the prediction results of multiple basic classifiers and generates a comprehensive directional probability distribution through the adjustment of weighted and regularized terms. The weight of each classifier is adjusted according to its performance to ensure that the classifier that performs better in the comprehensive prediction has a greater influence. The regularization term further optimizes the final probability distribution by considering the uncertainty of the classifier's prediction results. This method not only improves the accuracy of classification, but also enhances the robustness of the system, and can effectively cope with complex and changeable environmental conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of a method flow of a train driving safety assurance method provided by an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of an obstacle candidate frame determined in a front image of a moving train acquired in real time by a train driving safety assurance method provided by an embodiment of the present invention;
[0046] Figure 3 A front image of a train traveling collected in real time by a train driving safety guarantee method provided by an embodiment of the present invention;
[0047] Figure 4 A train driving safety guarantee method provided in an embodiment of the present invention processes a front image of a train traveling in real time to obtain a pre-processed image;
[0048] Figure 5 A train driving safety assurance method provided by an embodiment of the present invention is a schematic diagram of the process of identifying complex geometric shapes and patterns in a front image of a moving train acquired in real time, thereby accurately determining the opening direction of a turnout. DETAILED DESCRIPTION
[0049] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.
[0050] Any feature disclosed in this specification (including any additional claims and abstract), unless otherwise stated, may be replaced by other equivalent or alternative features having similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.
[0051] Example 1: Reference Figure 1 , Figure 2 , Figure 3 , Figure 4 and Figure 5 , a train driving safety guarantee method, the method comprising:
[0052] Step 1: Real-time acquisition of the front image of the train as it moves; judging whether there is an obstacle zone intrusion based on the front image, and if so, issuing an obstacle intrusion alarm or applying emergency braking to the train;
[0053] In actual applications, the camera is installed at the front of the train, providing continuous visual information by continuously capturing real-time images of the track ahead and the surrounding environment. To ensure the clarity and accuracy of the image, the camera uses advanced image sensor technology, which can work under various lighting conditions, including daytime, nighttime and various adverse weather conditions. The high-resolution characteristics of the image sensor make the captured image more detailed, providing a reliable data basis for subsequent image analysis. During the train's travel, the images collected by the camera are transmitted to the image processing module in real time. This module uses advanced image processing algorithms to pre-process and analyze the collected images. First, through image denoising algorithms such as Gaussian filtering and median filtering, noise and impurities in the image are removed to improve the image quality. Next, through image enhancement techniques such as histogram equalization and contrast enhancement, the clarity of the image is further improved, making the details in the image more prominent. The pre-processed image is then input into the deep learning algorithm for obstacle detection. Convolutional neural network (CNN) is usually used as the core algorithm. Through a large amount of training data, CNN can learn and recognize different objects and features in the image. In the train driving safety guarantee method, 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. Through multi-layer convolution and pooling operations, CNN can extract high-level features of the image layer by layer, and finally output the category and location of the obstacle through the fully connected layer and classifier. When the image processing module detects that there is an obstacle ahead, the system will immediately trigger the alarm system. The alarm system includes sound and light alarms and emergency braking mechanisms. When the obstacle detects that the position information exceeds the preset safety distance, the system will issue an sound and light alarm to alert the train driver, and at the same time, the alarm information will be 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 and immediately slow down or stop the train to avoid accidents. This method of real-time acquisition and processing of the front image has a higher degree of automation and response speed than 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 is high, and it is greatly affected by the environment, and it is easy to have signal misjudgment or failure. By collecting images in real time through cameras and processing them with deep learning algorithms, a comprehensive and accurate analysis of the environment ahead can be carried out in a short period of time, greatly improving the safety of train operation.
[0054] Step 2: Filter the track image when the train is moving from the front image, and analyze the opening direction of the front turnout according to the track image;
[0055] During the train's running, the camera captures the images in front in real time. These images not only contain information about the track and the surrounding environment, but also include possible turnouts. When the image processing module receives the image in front, it first needs to preprocess the image. This includes image denoising and enhancement to improve the clarity and quality of the image and ensure the accuracy of subsequent analysis. After the preprocessing is completed, the system will use image segmentation technology to separate different areas in the image, especially to separate the lane image. Image segmentation technology often uses deep learning networks such as U-Net, and this network structure can accurately segment the area of interest in the image. In the present invention, through a well-trained U-Net network, the track area in the image can be segmented from other backgrounds to generate a lane image. After obtaining the lane image, it is necessary to further analyze it to identify the opening direction of the turnout in front. The turnout is an important component of the track system, and its opening direction determines the travel route of the train. In this step, the system will use an image recognition algorithm to parse the lane image. First, through a feature extraction algorithm, key feature points in the lane image are extracted, such as the bifurcation point of the turnout, the direction of the track, etc. Then, combined with the deep learning algorithm, the specific state of the turnout is identified by analyzing these feature points, that is, whether the turnout is open to the left, right or straight. Generally, convolutional neural networks (CNNs) perform well in this task and can recognize complex geometric shapes and patterns in images to accurately determine the direction of the turnout. After identifying the direction of the turnout, the system also needs to compare it with the scheduled route of the train to determine whether it meets the traffic requirements. The scheduled route of the train is set in advance by the train dispatching system, including the train's destination and the path to be passed along the way. When the system obtains the direction of the turnout, it will compare it with the scheduled route to determine whether the current direction of the turnout is consistent with the scheduled route. If it is consistent, the train can pass safely; if it is inconsistent, it means that the turnout ahead is not opened in the scheduled direction, and there is a potential safety risk. In this case, the system will immediately issue an alarm to prompt the train driver to pay attention and notify the train control center to handle it. This method has significant advantages over the traditional method of relying on manual observation or fixed beacons. In traditional methods, manual observation is easily affected by environmental and human factors, while fixed beacons require a lot of maintenance and management costs, and when the turnout status changes, the beacon information may not be updated in time. Through real-time image analysis technology, the system can dynamically and accurately identify the status of the turnout ahead during the train's travel and respond in time to ensure the safety and reliability of the train's travel.
[0056] Step 3: According to the train's current scheduled route, determine whether the opening direction of the switch ahead meets the preset traffic requirements. If not, issue a switch abnormality alarm to prevent point rail damage or derailment accidents caused by switch abnormalities.
[0057] The train's scheduled route is set in advance by the train dispatching system and stored in the train control system. The scheduled route includes the train's destination, the stations it passes through, and the paths and turnout direction information along the way. This information has been set before the train departs and can be called at any time during the train's travel. The train control system continuously obtains the current travel position and guides the train forward according to the scheduled 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 scheduled route. During the train's travel, the camera installed at the front of the train collects the image data in real time and transmits it to the image processing module for analysis. The image processing module uses advanced image processing algorithms and deep learning technologies to pre-process, segment and identify the image and extract the specific status information of the turnout. In particular, through the feature extraction algorithm, the system can identify the direction of the turnout, including whether the turnout is opened to the left, right or straight. This process relies on the efficient training and accurate recognition capabilities of the deep learning model to ensure that the turnout status can still be accurately judged in complex environments. When the turnout status information is identified, the system compares the turnout opening direction obtained in real time with the turnout direction information in the scheduled 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 the path information in the current scheduled route, including the turnout position and direction. When the train approaches the turnout, the system will call the turnout information in the scheduled route in real time and compare it with the currently identified turnout status. If the identified turnout opening direction is consistent with the turnout direction in the scheduled route, it means that the turnout status is normal and the train can pass safely; if it is inconsistent, it means that the turnout status is abnormal and there may be potential safety risks.
[0058] During the comparison process, the system not only pays attention to the consistency of the turnout direction, but also detects whether the open state of the turnout is stable. For example, if the turnout has frequent switching during the identification process, the system will also judge it as an abnormal state. This is because the frequent switching of the turnout may cause mechanical failure or control failure, thereby increasing the risk of accidents. Therefore, the comparison algorithm also includes a detection module for the stability of the turnout state to ensure that the turnout is in a stable open state during the approach and passing of the train. When the system detects that the turnout state is abnormal, 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 send an obvious warning signal in the train cab to remind the train driver to pay attention to the abnormal situation of the turnout 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, requesting timely manual intervention and processing. If the turnout abnormality is serious, the system will automatically take measures, such as slowing down 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 turnout state monitoring through automated detection and comparison processes, and reduces the errors and delays of manual monitoring. Traditional turnout monitoring mostly relies on ground signals and manual inspections. This method is not only costly and inefficient, but also easily interfered by environmental and human factors, resulting in untimely or inaccurate monitoring. However, through the method of the present invention, using real-time image analysis and deep learning technology, the system can dynamically detect the turnout state during train travel and respond quickly to ensure the safety and reliability of train travel. In addition, the method further provides a complete alarm and emergency handling mechanism based on turnout abnormality detection. When a turnout abnormality is detected, the system not only issues an alarm, but also promptly notifies the relevant control center for processing, and automatically takes emergency measures when necessary. This all-round safety guarantee mechanism greatly improves the safety of the train during travel, avoids the occurrence of point rail damage and derailment accidents caused by turnout abnormalities, and ensures the smooth operation of the train.
[0059] Embodiment 2: Step 1 specifically includes: using a Gaussian filter to reduce noise on the collected front image, and then applying adaptive histogram equalization to enhance contrast to obtain a preprocessed image; adjusting the preprocessed image to a preset fixed size, and normalizing it, 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 by X l, where l∈{1,...,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 the improved YOLO algorithm to detect obstacles on the multi-scale feature map to obtain a set of obstacle candidate frames; calculate 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, 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 reduce noise on the image in front. The Gaussian filter can smooth out high-frequency noise in the image while retaining the main structural information of the image by performing convolution operations on the image. The purpose of noise reduction is to reduce noise interference in the image so that subsequent processing steps can be performed on the basis of a clearer image, thereby improving processing accuracy. This step is very critical because during the high-speed running of the train, the image acquisition device may be affected by vibration and changes in ambient light, generating noise, and the Gaussian filter can effectively filter out these noises. Next, 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 area histogram of the image, making the dark and bright details of the image more prominent. This step significantly improves the visibility and detail expression of the image, especially in poor lighting conditions, and can significantly improve the image quality. This is particularly important for ensuring accurate detection of obstacles during train travel, because high-contrast images can more clearly present the details of possible obstacles, facilitating subsequent feature extraction and detection. After image denoising and contrast enhancement, the preprocessed image is resized to a preset fixed size and normalized. The image is resized to a fixed size to meet the input requirements of the subsequent feature extraction network and to ensure the consistency and standardization of the input image. Normalization 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. By introducing grouped convolution and residual connection, the representation ability and training efficiency of the network are significantly improved. In the ResNeXt network, each layer extracts feature representations of different levels to capture the multi-scale information in the image. These feature representations are transmitted layer by layer through the network to form a multi-level feature representation from low 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 fuses the feature representations of different layers together through weighted averaging or attention mechanism to form a more representative feature representation. The purpose of this step is to combine feature information at different levels, enhance the robustness and recognition of feature representation, and provide richer and more accurate feature data for subsequent obstacle detection. The fused feature representation is upsampled and spliced to generate a multi-scale feature map. By combining feature information of different resolutions, the multi-scale feature map can analyze images at different scales, thereby improving the detection ability of obstacles of different sizes. Next, the improved YOLO algorithm is used to detect obstacles on the multi-scale feature map. The YOLO (You Only Look Once) algorithm is an efficient target detection method that can simultaneously predict the position and category of multiple targets in a single forward propagation. The improved YOLO algorithm is optimized on the original basis to improve the accuracy and speed of detection. By analyzing the multi-scale feature map, the YOLO algorithm can identify obstacles in the image and generate a set of obstacle candidate frames. Each candidate frame contains the position, size and category information of the obstacle, indicating the area where the obstacle may exist. After obtaining the set of obstacle candidate frames, the system calculates the risk score of each candidate frame. 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. The overall risk is the weighted sum of the risk scores of all candidate frames. When the overall risk exceeds the preset risk 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 will calculate the emergency braking decision index and determine whether emergency braking is required based on the risk assessment results of the obstacle and the current speed, distance and other parameters 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.
[0062] Embodiment 3: The output representations of different layers are adaptively fused by 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] Among them: F l is the output after fusion of the lth layer; X l , X l+1 and X l-1 are respectively the output of layer l, the output of layer l+1 and the output of layer l-1; Up and Down are respectively the upsampling and downsampling operations; α l , β l and γ l are all adaptive weights, calculated using the following formula:
[0065]
[0066] 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 by the following formula:
[0067] F=Concat(F1,Up2(F2),...,Up L (F L ))·W c ;
[0068] Among them, W c is the 1x1 convolution weight, used to adjust the number of channels; Concat is the concatenation operation; Up i To upsample the fused output of the i-th layer to the same size as F1, i is an integer index, where 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 low levels to semantic information from high levels, and can fully reflect the image content. However, using each layer of features alone may lead to one-sidedness and insufficiency of information, so these features need to be processed comprehensively. To this end, an adaptive feature fusion formula is used to combine the output of each layer of features and the features of its adjacent layers, and a richer and more accurate feature representation is obtained through weighted fusion.
[0070] Specifically, the adaptive feature fusion formula includes the current layer feature X l , the upsampling result of the previous layer feature Up(X l+1 ) and the downsampling result of the next layer of features Down(X l-1 ), these features are passed through the adaptive weight α l , β l and γl After weighting, add them to generate the fusion feature F l These adaptive weights are learned through neural network, and the global information of each layer of features is extracted by global average pooling (GAP) operation, which is calculated by a fully connected layer. The GAP operation can compress the spatial information of the feature map into a global feature vector, thereby reflecting the overall content of the feature map. These global feature vectors are calculated by the fully connected layer to obtain their respective weights, which are normalized by the softmax function to ensure that the sum of each weight is 1, thereby achieving effective weighting of features at different layers. After the fusion features are generated, they need to be upsampled and spliced to form a multi-scale feature map. The multi-scale feature map can analyze images at different scales by combining feature information of different resolutions, thereby improving the detection ability of obstacles of different sizes. In this process, the fusion features of each layer are adjusted to the same size as the fusion features of the first layer through upsampling operation, and then the fusion features of each layer are merged through splicing operation, and finally a feature map containing rich multi-scale information is generated. In this way, the system can use both low-level details and high-level semantic information to comprehensively analyze and accurately detect obstacles that may exist in the image. The improved YOLO algorithm is used to detect obstacles on the generated multi-scale feature map. The YOLO algorithm predicts the location and category of multiple targets simultaneously in a single forward propagation. With its efficient detection mechanism, it can perform well in applications with high real-time requirements. Combined with the rich information of multi-scale feature maps, the improved YOLO algorithm can more accurately identify obstacles in the image and generate a set of obstacle candidate frames. Each candidate frame contains the location, size and category information of the obstacle, indicating the area where the obstacle may exist. After obtaining the set of obstacle candidate frames, the system calculates the risk score of each candidate frame. The risk score is comprehensively evaluated based on factors such as the location, size, and movement speed of the obstacle, reflecting the potential threat level of the obstacle to the train. The overall risk is the weighted sum of the risk scores of all candidate frames. When the overall risk exceeds the preset risk threshold, the system triggers 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 emergency braking is required based on the risk assessment results of the obstacle and the current speed, distance and other parameters of the train. When the emergency braking decision index exceeds the set braking threshold, the system automatically triggers emergency braking to ensure the safety of the train and passengers.
[0071] Example 4: Using the improved YOLO algorithm to detect obstacles on the multi-scale feature map F, the obstacle candidate box set is assumed to be B = {b1, b2, ..., b n}; For each candidate box b i , the risk score S(b i ):
[0072]
[0073] Among them, Area(b i ) is the candidate box b i Area(lmage) is the total area of the preprocessed image; d(b i ) is the candidate box b i The estimated distance to the train; d0 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; n is the total number of candidate boxes; and the overall risk R is calculated using the following formula:
[0074]
[0075] Among them, θ is the preset risk threshold; μ is the risk sensitivity adjustment parameter; when R exceeds the set risk threshold R t When , the obstacle intrusion alarm is triggered; o is the subscript index.
[0076] Specifically, the improved YOLO algorithm predicts the positions and categories of multiple targets simultaneously in a single forward propagation, and generates a set of obstacle candidate boxes B = b1, b2, ..., b n Each candidate box b i Indicates the area in the image where obstacles may exist, including its location, size and category information. The YOLO algorithm is particularly suitable for real-time monitoring needs during train travel due to its high efficiency and real-time performance. After obtaining the obstacle candidate box set, the system performs a i Calculate its risk score S(b i ). The calculation of risk score takes into account two key factors: the area and distance of the candidate box. In the formula, S(b i ) contains two main parts: one is the ratio of the candidate box area to the total area of the image, and the other is the relationship between the estimated distance from the candidate box to the train and the safety threshold distance. The two weight parameters α and β are used to adjust the weights of the area and distance in risk assessment, so that the risk score can more accurately reflect the potential threat level of obstacles to train travel. Specifically, a larger area of the candidate box means that the obstacle may be larger and the potential risk is higher, so the area ratio is weighted by α. The distance part is processed by an exponential function to reflect the nonlinear effect of distance on risk. The closer the distance, the higher the risk, and the two parameters β and λ are used to adjust to ensure that the impact of the distance is reasonably amplified or reduced to reflect the actual threat level.
[0077] Next, the system calculates the overall risk R to comprehensively evaluate the overall threat of all candidate boxes to train operation. The calculation of the overall risk not only takes into account the risk score of each candidate box, but also evaluates the comprehensive impact of all candidate boxes through a cumulative effect formula. The cumulative effect part of the overall risk formula multiplies the risk score of each candidate box so that the candidate boxes with higher risks contribute more to the overall risk. This design ensures that the system can respond sensitively to high-risk obstacles and will not ignore the overall threat due to the presence of a few low-risk obstacles. The overall risk is further adjusted by an exponential function with threshold and sensitivity adjustment parameters to make the final calculation result smoother and more stable. The design of this exponential function makes the risk change more sensitive when the total risk score approaches the preset risk threshold, so that the alarm can be triggered earlier and timely warning and response can be provided. When the overall risk R exceeds the set risk threshold R t When an obstacle is detected, the system will immediately trigger an obstacle intrusion alarm to alert the train driver to possible dangers ahead and transmit the alarm information to the train control center through the wireless communication module. At this time, the system will not only issue an alarm, but also calculate the emergency braking decision index to determine whether emergency braking is required based on the risk assessment results of the obstacle and the current speed, distance and other parameters 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.
[0078] Embodiment 5: The emergency braking decision index is calculated by 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 brake sensitivity adjustment parameter; when E exceeds the set brake threshold E t The emergency brake is triggered.
[0081] Specifically, the first part of the formula is the ratio of the square of the overall risk R to its plus 1, that is, This part increases the risk impact weight by quadratically, so that in high-risk situations, the index value increases rapidly, thus more sensitively reflecting high-risk scenarios. This design ensures that when the overall risk of the obstacle is high, the basic value of the emergency braking decision index is significantly improved, and the system can respond to potential dangerous situations more promptly. The second part takes into account the current speed b of the train, the maximum deceleration a max and 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 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 braking decisions in time when traveling at high speeds to avoid dangerous situations caused by excessive speed. The third part is through To reflect the relationship between the average risk score of the candidate box and the brake sensitivity adjustment parameter φ. 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 subtracted from the adjustment parameter φ. It is nonlinearly transformed through the hyperbolic tangent function (tanh) to ensure that when the average risk score is high, this part of the value increases significantly, thereby improving 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 its sensitivity to high-risk situations. Combining the above three parts, the overall formula of the emergency braking decision index E integrates factors such as overall risk, train speed, deceleration, safety distance and average risk score. Through the comprehensive evaluation of these factors, the system can fully understand the current driving environment and potential risks in order to make the best 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 capabilities. Compared with the traditional simple decision-making mechanism, the method of the present invention can more comprehensively consider multiple influencing factors and ensure accurate decisions in different scenarios through complex formula calculations. Whether it is the overall risk of the obstacle, the current speed of the train, 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 a road image from the front image to obtain a road mask M; based on the road mask M, applying a region proposal network to locate potential turnout regions on the road image to obtain a candidate region set R = {r1, r2, ..., r m}; where m is the number of candidate regions; for each candidate region r j , use the multi-scale attention mechanism to extract the feature vector f j , j is an integer index, where j∈{1, ..., m}; according to the feature vector of each candidate area, each candidate area is classified using an integrated classifier to obtain a 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; the turnout opening direction with the highest probability is taken as the opening direction of the forward turnout.
[0083] Specifically, first, the road image is extracted from the front image through the semantic segmentation network to obtain the road mask M. The semantic segmentation network is a deep learning model that can classify images at the pixel level and assign each pixel in the image to a different category. In the present invention, the semantic segmentation network is trained to identify and extract the road area, separate the road pixels from the background, and form a road mask M. This segmentation technology ensures that the system can clearly identify the road portion on the train's path, providing a basis for subsequent area positioning. Based on the road mask M, the system applies the region proposal network (RPN) to locate potential turnout areas on the road image, and obtains a set of candidate regions R = r1, r2, ..., r m The region proposal network is a neural network model for target detection, which can generate a series of candidate regions that may contain targets. In the present invention, RPN is used to detect and locate the turnout region on the road image. By analyzing the road mask, RPN can identify the area where the turnout may exist and generate a set of candidate regions R, which will be used as input for subsequent feature extraction and classification. For each candidate region 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 capability. It weights the important features by performing weighted summation of image features at different scales. This method can extract features from candidate regions at different resolutions and combine these multi-scale features to obtain richer feature representation. In this way, the system can capture the subtle features and overall structure in the turnout area and enhance the recognition of the turnout state. After obtaining the feature vector f of each candidate region, jFinally, the system uses an integrated classifier to classify each candidate area and obtain the 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 integrated learning. For each candidate area, the integrated classifier predicts the possible turnout opening direction of the area based on its feature vector and outputs the corresponding probability distribution. These probability distributions represent the possibility of each candidate area in different opening directions and provide basic data for subsequent global optimization. Considering the spatial relationship between multiple candidate areas, 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 constraints between multiple candidate areas, which may not be fully considered when they are classified separately. Through global optimization, the system can comprehensively consider the prediction results of all candidate areas and adjust and optimize the direction probability distribution in combination with the spatial relationship between them. This process is achieved through an optimization algorithm to ensure that the final probability distribution is more accurate and consistent. Finally, the system takes the turnout opening direction with the highest probability as the opening direction of the turnout ahead. This method ensures 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 status information in complex environments, and provides strong technical support for train driving safety.
[0084] Example 7: Extract the feature vector f using the following formula: j :
[0085]
[0086] Among them, K is the number of scales; CNN k is the k-th scale convolutional neural network; SE is the SQUEEZE-AND-EXCITATION attention module; CBAM is the convolutional attention module; α k is the scale weight, calculated by the following formula:
[0087]
[0088] Among them, MLP is a multi-layer perceptron and GAP is a global average pooling.
[0089] Specifically, the eigenvector f j The extraction formula shows that each candidate region r j The features of are obtained by weighted summing the outputs of convolutional neural networks at multiple scales. Specifically, convolutional neural networks (CNNs) at multiple scales k ) is used to select candidate regions r at different resolutions jPerform feature extraction. Each scale of the convolutional neural network can capture different levels of information, 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 scenes and environmental changes, and improve the robustness and accuracy of feature extraction. In addition, the SQUEEZE-AND-EXCITATION attention module and the CBAM convolutional attention module further enhance the ability of feature representation. The SQUEEZE-AND-EXCITATION attention module models the relationship between channels through global information, and 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, and improves the model's attention to key features. At the same time, the CBAM convolutional attention module combines the two mechanisms of channel attention and spatial attention to weight each position and each channel of the feature map. The channel attention mechanism captures global information through global average pooling and global maximum 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 by performing convolution operations on the feature map and weighting each position of the feature map. In this way, the CBAM module can refine the features at different scales and positions, further improving the quality of feature representation.
[0090] In extracting the feature vector f j When the features of different scales are k Weighted. k As the scale weight, it is calculated by a multi-layer perceptron (MLP). Specifically, firstly, the output of the convolutional neural network of each scale is subjected to global average pooling (GAP), then the weight of each scale is calculated by MLP, and then these weights are normalized by the softmax function to ensure that the sum of the weights is 1. In this way, α k It reflects the importance of each scale in the final feature vector, so that multi-scale features can be effectively fused to form a comprehensive feature representation. These fused feature vectors f jBy weighted summing the outputs of convolutional neural networks at multiple scales and combining them with the enhancement of SE and CBAM attention modules, a feature representation containing rich information is finally generated. This feature vector not only contains the low-level visual information of the candidate area (such as edges, textures, etc.), but also contains high-level semantic information (such as shape, object category, etc.), and is weighted by the attention mechanism to ensure that important features are highlighted and redundant information is suppressed. In this way, the system can accurately extract the features of the candidate area and ensure efficient and accurate turnout state recognition in complex environments. The feature vector f j The high-quality representation provides a solid foundation for subsequent classification and recognition, allowing the system to maintain stable performance in different scenarios. In the train driving safety assurance method, it is crucial to accurately identify the opening direction of the forward turnout. Through the feature vector extracted by the above method, the system can more accurately analyze and judge the state of the forward turnout, respond in time, and ensure the safety of train driving. 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 realizing the full automation and intelligence of train driving.
[0091] Embodiment 8: Each candidate region is classified using an integrated classifier, and the formula for obtaining the direction probability distribution is as follows:
[0092]
[0093] Among them, P(d i |r j ) is the candidate region r j Belongs to direction d i The probability of; C is the number of classifiers in the ensemble classifier; w c is the weight of the cth classifier; p c (d i |f j ) is the probability predicted by the cth classifier; H(p c (d|f j )) is the entropy of the predicted probability distribution of the cth classifier; λ is the regularization coefficient; Z is the normalization constant; d is the direction set.
[0094] Specifically, the ensemble classifier is composed of multiple basic classifiers, which classify the feature vector f of each candidate region j Classify and give prediction results respectively. The prediction result of each classifier is expressed as p c (d i |f j ), that is, the c-th classifier is used for the candidate region r j Belongs to direction d i In order to combine these prediction results, the weight w is introduced into the formulac and the regularization term H(p c (d|f j )). Weight w c It reflects the importance of each classifier in the overall prediction, which is usually determined by the performance during the training process, so that the classifier with better performance has a greater influence in the comprehensive prediction. When calculating the directional probability distribution, an exponential function and a normalization constant Z are used in the formula. Specifically, the directional probability distribution P(d i |r j ) involves exponentially transforming the weighted predictions of each classifier and the regularization term, and then normalizing them by the normalization constant Z to ensure that the sum of all directional probabilities is 1. This process ensures that the final probability distribution has probabilistic properties, which facilitates subsequent decision-making and analysis. The regularization term H(p c (d|f j)) is the entropy of the probability distribution predicted by the cth classifier, which indicates the uncertainty of the prediction result. The larger the entropy, the more uncertain the prediction of the classifier. By introducing the regularization term, the system can suppress the part of the prediction result with greater uncertainty during the calculation process and improve the reliability of the overall prediction. The regularization coefficient λ controls the influence of the regularization term in the overall calculation, ensuring that while ensuring the accuracy of the prediction, it will not rely too much on a classifier with greater uncertainty. Through this calculation method of 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 capabilities. Compared with a single classifier, the integrated classifier can more comprehensively integrate multiple information sources and reduce the errors and uncertainties of individual classifiers. Through the introduction of the regularization term, the system enhances the ability to handle the uncertainty of the prediction results while ensuring accuracy, avoiding the risks caused by the uncertainty of individual classifiers. In the train driving safety assurance method, accurately predicting the opening direction of the turnout is crucial to ensuring the safety of train driving. By using an integrated classifier, the system can more comprehensively consider the prediction results of different classifiers, and ensure that the final prediction results are highly accurate and reliable by adjusting the weights and regularization terms. This method not only improves the accuracy of the prediction, but also enhances the robustness of the system, and can provide stable performance in complex environments. In practical applications, the integrated classifier enables the system to adapt to different environments and scenarios by continuously adjusting and optimizing the weights of each classifier. For example, in some cases, some classifiers may perform better, and the system will automatically give these classifiers higher weights 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 regularization terms to reduce their negative impact on the final prediction results. In this way, the integrated 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 driving safety, ensuring that the train can accurately identify the opening direction of the turnout ahead during driving, and make correct responses in time to avoid accident risks caused by turnout abnormalities.
[0095] Embodiment 9: 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 graph G = (V, ES) between the candidate areas, where V is the candidate area set and ES is the edge set; the edge w between the i-th candidate area and the j-th candidate area ij The weight calculation formula is as follows:
[0096]
[0097] Among them, c i and c j are the center coordinates of the i-th candidate area and the j-th candidate area respectively; σ is the second distance attenuation coefficient; θ ij is the angle between the main directions of the i-th candidate area and the j-th candidate area; Area(r i ) and Area(r j ) are the areas of the i-th candidate region and the j-th candidate region respectively; the graph convolutional network is used to globally optimize the direction probability distribution, and the formula is as follows:
[0098]
[0099] Among them, P (t) (d|R) is the global direction probability distribution after the tth iteration; A is the adjacency matrix, D is the degree matrix; W1 and W2 are the first weight and second weight of the graph convolutional network, respectively; B1 and B2 are the first bias and second bias of the graph convolutional network, respectively; P (t+1) (d|R) is the global direction probability distribution after the t+1th 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, while the edges reflect the relationship between candidate regions. In order to quantify this relationship, the weight of the edge w ij The formula combines three factors, namely, Euclidean distance, direction angle, and area ratio, to measure the similarity between candidate regions. The Euclidean distance term is implemented by the Gaussian kernel function, so that regions with closer distances have a greater influence on each other; the direction angle term is implemented by the cosine function, so that regions with similar directions have a greater influence on each other; and the area ratio term ensures that the mutual influence between larger and smaller regions is balanced. Specifically, when the center distance of two candidate regions is close, their directions are similar, and their area ratios are close, their weights w ij The larger the value, the closer the relationship between the two regions. Next, the graph convolutional network (GCN) is used to globally optimize the directional probability distribution. The graph convolutional network is a neural network used to process graph structured data. It aggregates the feature information of a node and its neighbors by performing convolution operations with the help of the adjacency matrix and degree matrix of the graph. The core of GCN is to fuse the feature information of a node with the information of its neighboring nodes through graph convolution operations to update the representation of the node.
[0101] In the specific implementation process, we 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, that is, the number of edges connecting the nodes. Through the normalization of D and A, that is, Ensure that the information propagation process in the graph convolution operation is more stable and effective. In each iteration, the direction probability distribution P is updated through the graph convolution operation. (t) (d|R), which is the directional probability distribution of the current iteration. First, the current directional probability distribution is multiplied by the standardized form of the adjacency matrix for information propagation. Next, the representation of the node is updated through the weights W1 and bias B1 of the first layer of graph convolution, and the activation function ReLU. 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, the representation of the node is further optimized after the weights W2 and bias b2 of the second layer of graph convolution, and the ReLU activation function is applied again. Finally, the updated directional probability distribution is normalized by the softmax function to ensure that the sum of the output probability distribution is 1. This multi-layer graph convolution process, through continuous iteration and optimization, makes the directional probability distribution of each candidate area not only rely on its own characteristics, but also integrates the relationship information with its neighboring nodes, so as to obtain a more accurate and globally optimized directional probability distribution. After the final iteration is completed, the global directional probability distribution P is obtained. (t+1) (d|R) can reflect the complex relationship between all candidate regions and provide higher prediction accuracy. This global optimization method based on graph convolutional networks is of great significance in train driving safety assurance methods. Traditional methods may only consider the independent features of each candidate region and ignore the spatial relationship between them, which can easily lead to local optimality or ignore some important global information. By constructing a spatial relationship graph and using a graph convolutional network for global optimization, the system can comprehensively consider the relationship between candidate regions, thereby improving the accuracy and robustness of turnout state recognition. In addition, this method is also highly adaptable and scalable. By adjusting the number of layers and parameter settings of the graph convolutional network, it can adapt to graph structure data of different scales and complexities and handle various complex train driving environments. This flexibility enables this method to be widely used in different train driving scenarios and provide reliable safety assurance.
[0102] Example 10: Optimal direction d * Calculated by the following formula:
[0103]
[0104] Where T is the total number of iterations of the graph convolutional network.
[0105] Specifically, in Embodiment 10 of the train driving safety guarantee method, the optimal direction d *The calculation of is achieved by maximizing the global direction probability distribution after the final iteration. This process uses the optimization results of the graph convolutional network (GCN) in multiple iterations to select the direction with the highest probability as the opening direction of the turnout, thereby ensuring the safety and accuracy of train travel.
[0106] First, in the previous step, the spatial relationship graph between the candidate regions was constructed and the directional probability distribution was globally optimized using a graph convolutional network. In each iteration, the graph convolutional network fuses the features of the node with the features of its neighboring nodes through a standardized adjacency matrix and degree matrix, thereby updating the directional probability distribution of each node. After multiple iterations, the directional probability distribution gradually stabilizes and can more accurately reflect the global relationship between the candidate regions and their respective directional tendencies. After the final number of iterations T, the global directional probability distribution P is obtained. (T) (d|R), which represents the probability distribution of each possible direction d based on the candidate area set R. In order 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 result of global optimization, taking into account the spatial relationship between all candidate areas and their respective feature information. This method not only improves the accuracy of prediction, but also can effectively cope with complex driving environments and changeable turnout states. In practical applications, the optimal direction d * The determination of is of great significance to the safety of train operation. Through this global optimization method based on graph convolutional networks, the system can provide stable and reliable prediction results in complex environments, ensuring that the train can accurately identify the opening direction of the switch ahead and adjust the route according to the optimal direction to avoid potential accident risks. In addition, this method is also highly robust and adaptable. 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 driving scenarios. Whether it is a simple single section or a complex multi-branch section, this method can provide reliable prediction results and provide effective technical support for train driving safety.
[0107] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that these specific embodiments are only illustrative, and those skilled in the art may omit, replace, and change the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, merging the above method steps so as to perform substantially the same functions in substantially the same manner to achieve substantially the same results is within the scope of the present invention. Therefore, the scope of the present invention is limited only 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 based on 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 set of candidate areas; 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, 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 front turnout. Step 3: According to the train's current scheduled route, determine whether the opening direction of the switch ahead meets the preset traffic requirements. If not, issue a switch abnormality alarm to prevent point rail damage or derailment accidents caused by switch abnormalities.
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 L layers, and the output of each layer is represented by X l , where l∈{1,...,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; adaptively fuse the output representations of different layers to obtain the fused output through the following formula: F l =a l ·X l +b l ·Up(X l+1 )+c l ·Down(X l-1 ); Among them: F l is the output after fusion of the lth layer; X l ,X l+1 and X l-1 are the output of layer l, layer l+1 and layer l-1 respectively; Up and Down are upsampling and downsampling operations respectively; α l ,β l and γ l are all adaptive weights, calculated using the following formula: Among them, W f and b f are the preset weight matrix and bias matrix respectively; GAP is the global average pooling operation.
3. The train driving safety guarantee method according to claim 2, characterized in that: The multi-scale feature map F is generated by the following formula: F=Concat(F1,Up2(F2),...,Up L (F L ))·W c ; Among them, W c is the 1x1 convolution weight, used to adjust the number of channels; Concat is the concatenation operation; Up i To upsample the fused output of the i-th layer to the same size as F1, i is an integer index, where i∈{2,...,L}.
4. The train driving safety guarantee method according to claim 3, characterized in that: The improved YOLO algorithm is used to detect obstacles on the multi-scale feature map F. The obstacle candidate box set is assumed to be B = {b1, b2, ..., b n }; For each candidate box b i , the risk score S(b i ): Among them, Area(b i ) is the candidate box b i Area(Image) is the total area of the preprocessed image; d(b i ) is the candidate box b i The estimated distance to the train; d0 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; n is the total number of candidate boxes; and the overall risk R is calculated using the following formula: Among them, θ is the preset risk threshold; μ is the risk sensitivity adjustment parameter; when R exceeds the set risk threshold R t When , the obstacle intrusion alarm is triggered; o is the subscript index.
5. The train driving safety guarantee method according to claim 4, characterized in that: The emergency braking decision index is calculated using the following formula: 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 brake sensitivity adjustment parameter; when E exceeds the set brake threshold E t The emergency brake is triggered.
6. The train driving safety guarantee method according to claim 5, characterized in that: Step 2 specifically includes: assuming that the road mask is M; based on the road mask M, applying the region proposal network to locate the potential turnout area on the road image, and obtaining the candidate region set R = {r1, r2, ..., r m }; where m is the number of candidate regions; for each candidate region r j , use the multi-scale attention mechanism to extract the feature vector f j , j is an integer index, where j∈{1,...,m}; extract the feature vector f by the following formula j : Among them, K is the number of scales; CNN k is the k-th scale convolutional neural network; SE is the SQUEEZE-AND-EXCITATION attention module; CBAM is the convolutional attention module; α k is the scale weight, calculated by the following formula: Among them, MLP is a multi-layer perceptron and GAP is a global average pooling.
7. The train driving safety guarantee method according to claim 6, characterized in that: Use the integrated classifier to classify each candidate area, and the formula for the direction probability distribution is as follows: Among them, P(d i |r j ) is the candidate region r j Belongs to direction d i The probability of; C is the number of classifiers in the ensemble classifier; w c is the weight of the cth classifier; p c (d i |f j ) is the probability predicted by the cth classifier; H(p c (d|f j )) is the entropy of the predicted probability distribution of the cth classifier; λ is the regularization coefficient; Z is the normalization constant; d is the direction set.
8. The train driving safety guarantee method according to claim 7, 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 graph G = (V, ES) between candidate areas, where V is the candidate area set and ES is the edge set; the edge w between the i-th candidate area and the j-th candidate area ij The weight calculation formula is as follows: Among them, c i and c j are the center coordinates of the i-th candidate area and the j-th candidate area respectively; σ is the second distance attenuation coefficient; θ ij is the angle between the main directions of the i-th candidate area and the j-th candidate area; Area(r i ) and Area(r j ) are the areas of the i-th candidate region and the j-th candidate region respectively; the graph convolutional network is used to globally optimize the direction probability distribution, and the formula is as follows: Among them, P (t) (d|R) is the global direction probability distribution after the tth iteration; A is the adjacency matrix, D is the degree matrix; W1 and W2 are the first weight and second weight of the graph convolutional network, respectively; B1 and B2 are the first bias and second bias of the graph convolutional network, respectively; P (t+1) (d|R) is the global direction probability distribution after the t+1th iteration.
9. The train driving safety guarantee method according to claim 8, characterized in that: Optimal direction d * Calculated by the following formula: Where T is the total number of iterations of the graph convolutional network.
Citation Information
Patent Citations
Automatic train protection system and method based on image identification and multi- perception fusion
CN104386092A
Processor and early warning system for train assisted tracking and early warning
CN108583620A
Method, system, medium and equipment for identifying obstacles in railway shunting operation
CN110550072A
Method and device for detecting obstacles on route
CN115690721A
On-road train actual operation area detection method based on geometric feature mining
CN116994048A
