Train reconnection control method and system, train and storage medium

By setting up multiple reconnect ports on the train reconnection gateway, fast communication link switching is achieved, and the problem of long switching time in the prior art is solved, communication efficiency is improved and operational costs are reduced.

CN119629035APending Publication Date: 2025-03-14深圳市三旺通信股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411996096.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In the prior art, after the train reconnection link is disconnected, the switching time during the device switching process is long, resulting in low communication efficiency and increased operational costs.

Method used

By setting at least two reconnection ports on the reconnection gateway of each train group, fast switching of the communication link is achieved, avoiding re-examination of TTDP protocols, and multiplexing the IP address, NAT and routing configurations of the original communication link.

Benefits of technology

It shortens the time for resuming communications, improves the efficiency of communication recovery, reduces operational costs, and enhances the stability and security of communications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629035A_ABST
    Figure CN119629035A_ABST
Patent Text Reader

Abstract

The invention relates to a train reconnection technology, and discloses a train reconnection control method and system, a train and a storage medium. In the system, a reconnection gateway of each train group is connected with reconnection gateways of other train groups; the reconnection ports of the connected reconnection gateways are correspondingly connected; the reconnection ports are divided into different VLANs in advance, and the reconnection ports of the same reconnection gateway are connected to the same network bridge; the method is applied to a target gateway in a train control system, and comprises the following steps: starting a first target port in each reconnection port, forbidding a non-first target port, and forming a first communication link so as to realize reconnection communication among a plurality of train groups; and if it is monitored that the first communication link satisfies the link switching condition, enabling a second target port in each reconnection port, and disabling a non-second target port to form a second communication link. According to the invention, the switching of the communication link is realized by switching and starting different ports on the reconnection gateway, and the reconnection communication efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of train reconnection, and in particular to a train reconnection control method, system, train and storage medium. Background Art

[0002] In modern rail transit, train reconnection technology is very important. It allows multiple train sets to be connected through the network for unified control and communication. However, once the reconnection link is disconnected, the status of the disconnected carriages cannot be monitored, posing a safety hazard.

[0003] The current conventional solution is to solve the link disconnection problem by adding redundant equipment, so that after the reconnection link is disconnected, the current communication equipment is switched to the added redundant equipment to restore the reconnection communication. However, the switching time during the equipment switching process is long, which reduces communication efficiency and increases operating costs. Summary of the invention

[0004] In view of this, in order to solve the technical problem in the prior art that redundant equipment is added, resulting in a long switching time when switching redundant equipment to restore communication after the reconnection link is disconnected, resulting in low communication efficiency, the present application provides a train reconnection control method, system, train and storage medium.

[0005] In a first aspect, the present application provides a train reconnection control method, wherein the train control system includes a plurality of train groups, each train group includes at least one reconnection gateway, and a single reconnection gateway includes at least two reconnection ports; the reconnection gateway of each train group is connected to the reconnection gateways of other train groups; the reconnection ports of the connected reconnection gateways are correspondingly connected; the reconnection ports of each reconnection gateway are pre-divided into different VLANs, and the reconnection ports of the same reconnection gateway are connected to the same bridge;

[0006] The method is applied to a target gateway selected in the train control system, and the method comprises:

[0007] Activate the first target port in each of the reconnection ports, disable the non-first target ports, and form a first communication link to achieve reconnection communication between multiple train sets;

[0008] If it is monitored that the first communication link meets the preset link switching condition, the second target port in each of the reconnection ports is enabled, and non-second target ports are disabled to form a second communication link.

[0009] In an optional embodiment, it also includes:

[0010] If it is monitored that the second target port meets the link switching condition, a third target port in each of the reconnection ports that is different from the first target port and the second target port is enabled, and non-third target ports are disabled to form a third communication link until it is determined that all communication links of the current target gateway meet the link switching condition.

[0011] In an optional embodiment, it also includes:

[0012] If it is determined that all communication links of the current target gateway in any train group meet the link switching condition, gateway switching information is generated; the gateway switching information is used to instruct the train control system to select a new target gateway different from the current target gateway from each of the reconnection gateways in each of the train groups to enable any communication link in the new target gateway for reconnection communication.

[0013] In an optional implementation manner, the link switching condition includes:

[0014] Condition 1: If the line connection state of the currently enabled target port is line disconnected;

[0015] Condition 2: If the communication state of the currently enabled target port is a communication disconnected state.

[0016] In an optional implementation manner, before forming the first communication link, the method further includes:

[0017] Determining a reconnection IP address of the first target port;

[0018] According to the IP address, NAT forwarding rules and routing rules are configured so that the reconnection gateway can perform reconnection communication with the reconnection gateways of the other train groups based on the reconnection IP address, the NAT forwarding rules and the routing rules.

[0019] In an optional implementation manner, before determining that the first target port is assigned a reconnection IP address, the method further includes:

[0020] Determine its own Ethernet train backbone node number and backbone network number, the Ethernet train backbone node number and the backbone network number are used to generate a reconnection IP address.

[0021] In an optional embodiment, it also includes:

[0022] The current target port on each target gateway is used to realize reconnection communication, and the IP address, NAT rule and routing rule corresponding to the original target port are reused; the current target port is used to perform reconnection communication with other train groups based on the IP address, the NAT rule and the routing rule.

[0023] In a second aspect, the present application provides a train control system, including a plurality of train sets, each train set including at least one reconnection gateway, a single reconnection gateway including at least two reconnection ports; the reconnection gateway of each train set is connected to the reconnection gateways of other train sets; between the connected reconnection gateways, the reconnection ports are correspondingly connected; the reconnection ports of each reconnection gateway are pre-divided into different VLANs, and the reconnection ports of the same reconnection gateway are connected to the same bridge;

[0024] A target gateway is selected from each of the reconnection gateways in each train set, and each of the target gateways is used to execute the train reconnection control method as described above.

[0025] In a third aspect, the present application provides a train, comprising a train control system as described above.

[0026] In a fourth aspect, the present application provides a computer storage medium storing a computer program, which, when executed on a processor, implements the aforementioned train reconnection control method.

[0027] The embodiments of the present application have the following beneficial effects:

[0028] An embodiment of the present application provides a train reconnection control method, which implements the switching of communication links by switching and enabling different ports on the reconnection gateway. On the one hand, the communication link switching on the same reconnection gateway does not require re-TTDP protocol negotiation, and the previous IP address, NAT and routing configuration can be reused, greatly shortening the time to restore communication; on the other hand, no additional redundant equipment is added, reducing operating costs, and the solution can be implemented at the application layer, with strong portability. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. For ordinary technicians in this field, other related drawings can also be obtained based on these drawings without creative work.

[0030] Figure 1 A schematic diagram of the structure of a train control system in an embodiment of the present application is shown;

[0031] Figure 2 A schematic diagram showing the connection between the reconnection gateway A and the reconnection gateway B in an embodiment of the present application is shown;

[0032] Figure 3 A schematic diagram showing the effect of the reconnection function configuration of the reconnection gateway A in an embodiment of the present application is shown;

[0033] Figure 4 A schematic diagram showing the effect of the reconnection function configuration of the reconnection gateway B in an embodiment of the present application is shown;

[0034] Figure 5 A flow chart of a train reconnection control method in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0035] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0036] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0037] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.

[0038] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0039] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0040] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0041] Reconnection Gateway: A key device used for data transmission and network connection in railway communication systems.

[0042] The Train Topology Discovery Protocol (TTDP) allows network switches to automatically negotiate with other network devices after the network topology changes, and will assign an IP address to the network device according to the instructions of the new train car.

[0043] The Ethernet Train Backbone Node (ETBN) serves as a gateway between the real-time Ethernet train network and the train backbone, connecting the Ethernet train backbone and the train network.

[0044] In recent years, train reconnection networks have been widely used in subways, urban rail, high-speed rail and other fields. They are an important means of monitoring the running status of trains, greatly improving the management efficiency of train safety. Generally speaking, the train reconnection system consists of the following parts: reconnection gateway, monitors, cameras and other monitoring equipment, data cables, etc.; usually, different trains are connected to each other through the TTDP protocol of the reconnection gateway for communication. The reconnection protocol will generate a reconnection IP address on the reconnection port, configure NAT rules, and realize communication between train A and train B.

[0045] However, in the current reconnection scheme, one link is generally used for reconnection communication. When the reconnection link is disconnected, the operating status of the disconnected carriage cannot be monitored, causing serious safety hazards. Some train reconnections will have an additional redundant device. When one device is disconnected, another device will be started for reconnection. However, it takes a long time to switch the reconnection device, which will cause the train to be unable to communicate normally for a period of time. In addition, adding an additional gateway redundant device will also increase the operating cost of the reconnected train.

[0046] Based on this, an embodiment of the present application provides a train control system, which sets at least two reconnection ports on the reconnection gateway of each train group to build a communication link on each reconnection port of the reconnection gateway, so that when the main link is abnormal, it is possible to directly switch to the backup link on the reconnection gateway, that is, on the same reconnection gateway, different communication links can be switched by switching the reconnection ports for communication, thereby avoiding the hidden dangers caused by long-term communication disconnection. Since communication is still achieved on the original reconnection gateway, there is no need to re-negotiate the TTDP protocol after the reconnection is interrupted, and the IP address, NAT and routing configuration during the control of the main link can be reused, which greatly shortens the time to establish new reconnection communication, and there is no need to add additional redundant equipment, thereby reducing operating costs.

[0047] For example, Figure 1As shown, the train control system includes multiple train sets (such as train set 1, train set 2, ..., train set N, N is greater than 1), each train set includes a number of carriages, and each train set can be provided with at least one reconnection gateway (such as reconnection gateway 1, reconnection gateway 2, ..., reconnection gateway N, N is greater than 1); for example, every four carriages are used as a train set, and each train set is provided with multiple reconnection gateways, such as two, three or more. During the reconnection process of each train set, each train set communicates with each other through the reconnection gateway, that is, the reconnection gateway of each train set is connected to the reconnection gateway of other train sets.

[0048] For reference, one of the reconnection gateways in each train set is selected as the target gateway, so as to perform reconnection communication with the target gateways of other train sets through the target gateway; that is, each train set can establish a communication link with a target gateway of other train sets through an internal target gateway for reconnection communication.

[0049] Furthermore, a single reconnection gateway in each train set includes at least two reconnection ports, and for a single train set, each reconnection port on a reconnection gateway is connected one-to-one with a reconnection port on a reconnection gateway of another train set. That is, at the physical connection level, each reconnection port on the same reconnection gateway of each train set is connected to each reconnection port on the same reconnection gateway of another train set. In other words, each reconnection gateway in a single train set is connected to a reconnection gateway of another train set; that is, each reconnection port is connected to each other between connected reconnection gateways.

[0050] As a preferred embodiment, the number of reconnection ports on each reconnection gateway is equal.

[0051] In this embodiment, each target gateway may generate a corresponding communication link based on the connection relationship corresponding to each of its own reconnection ports, so as to communicate according to the communication link.

[0052] In other words, each target gateway is connected to a target port of another target gateway through its own target port, thereby forming a communication link. Then, each target gateway can build an equal number of communication links based on the number of its own target ports. Then, when one of the communication links on the target gateway is abnormal, it can switch to another communication link of its own, and reconnection can be quickly achieved without switching gateways, which effectively improves the efficiency of communication recovery. Since there is no need to switch gateways, there is no need to re-negotiate the TTDP protocol, and the IP address, NAT and routing configuration of the original communication link can be reused, shortening the time to establish a new reconnected communication.

[0053] The following is an example of the principle of the reconnection process of the above-mentioned train control system.

[0054] As a feasible implementation method, during the process of reconnection communication with the target gateways of other train groups, the target gateway of each train group enables the first target port among the reconnection ports of the target gateway and disables the non-first target ports to form a first communication link to achieve reconnection communication between multiple train groups; if it is monitored that the first communication link meets the preset link switching conditions, the second target port among the reconnection ports is enabled and the non-second target ports are disabled to form a second communication link.

[0055] In some examples, before the target gateway realizes reconnection communication through the target port, it is necessary to configure the reconnection function, and then subsequently enable the reconnection function to realize reconnection communication; wherein, configuring the reconnection function is to configure the reconnection IP address, NAT rules and routing rules of the target gateway. Specifically, each target gateway first generates a reconnection IP address according to its own Ethernet train backbone node number and backbone network number, and then configures the NAT forwarding rules and routing rules based on the reconnection IP address.

[0056] It can be understood that when the target gateway realizes reconnection communication with the first target port of other target gateways through the first target port, the reconnection IP address of the first target port of the target gateway is first determined; wherein, the Ethernet train backbone node number and the backbone network number of the target gateway itself can be determined first, and the Ethernet train backbone node number and the backbone network number are used to generate the reconnection IP address of the current target port; then according to the reconnection IP address, the NAT forwarding rules and the routing rules are configured, so that the first target port of the target gateway can realize reconnection communication with the target gateways of other train groups based on the reconnection IP address, NAT forwarding rules and routing rules.

[0057] In one example, when the current target gateway reconnects and communicates with other target gateways through the first target port, if it is determined that the communication link of the first target port meets the link switching condition, the communication link of the first target port can be switched to the switching link of the second target port, and the first target port is different from the second target port. The above-mentioned link switching conditions include: condition one, if the line connection state of the currently enabled target port is the line disconnection state; condition two, if the communication state of the currently enabled target port is the communication disconnection state.

[0058] It should be noted that the line connection state is the hardware line connection state of the port; the communication state is the network communication state, corresponding to the data transmission process in the network communication process.

[0059] It can be understood that if the line connection state of the first target port used to achieve reconnected communication in the current target gateway is a line disconnected state, or the communication state of the first target port is a communication disconnected state, then it is determined that the first target port is abnormal, that is, the communication link of the first target port is abnormal, and the communication link needs to be switched.

[0060] Furthermore, in one embodiment, if it is monitored that the second target port satisfies the link switching condition, a third target port different from the first target port and the second target port among the reconnection ports of the same target gateway is enabled, and non-third target ports are disabled to form a third communication link until it is determined that all communication links of the current target gateway satisfy the link switching condition.

[0061] It can be understood that if a target port currently used to achieve reconnection communication on the current target gateway meets the switching link switching conditions, then another target port among the remaining reconnection ports of the target gateway is enabled to switch the current communication link to the communication link corresponding to the other target port. In other words, each reconnection port can be switched and enabled on the target gateway, so that when an abnormality occurs in the current communication link, it can quickly switch to another communication link on the target gateway. Since the communication link is switched on the same target gateway, there is no need to add redundant equipment, avoiding the problem of low reconnection communication efficiency caused by long switching time caused by switching redundant equipment, which can significantly improve the stability of communication, avoid causing serious safety hazards, reduce the cost of using redundant equipment, and reduce the operating cost of the train.

[0062] In some examples, when switching the target port and its corresponding communication link, the target gateway can reuse the IP address, NAT rules, and routing rules of the original communication link on the target gateway; that is, for the current target port on each target gateway used to achieve reconnected communication, the IP address, NAT rules, and routing rules corresponding to the original target port are reused, so that the current target port is used for reconnected communication with other train groups based on the IP address, NAT rules, and routing rules.

[0063] In some embodiments, if it is determined that all communication links of the current target gateway in any train group meet the link switching conditions, gateway switching information is generated; wherein, the gateway switching information is used to instruct the train control system to select a new target gateway different from the current target gateway from the reconnection gateways in each train group to enable any communication link in the new target gateway for reconnection communication.

[0064] It can be understood that if all ports of the current target gateway for realizing reconnection communication in the train group are abnormal ports (that is, the communication links corresponding to each port are abnormal), then switch from the current target gateway to another reconnection gateway in the train group, and use the other reconnection gateway as the new target gateway for realizing reconnection communication, so as to restore the reconnection communication with other train groups through any port on the new target gateway and its communication link.

[0065] In other words, in this embodiment, when an abnormality occurs in the current communication link, other communication links on the same target gateway can be switched to enable priority, and then after all communication links of the target gateway are abnormal, switch to another reconnection gateway on the train set, thereby reducing the time to restore reconnection communication and improving the efficiency of reconnection communication.

[0066] The following only takes the connection and communication scenario of two reconnected gateways as an example for explanation.

[0067] For reference, this embodiment takes the example that the train includes two train sets, and a reconnection gateway is set in each train set. Before starting the reconnection of each train set, the reconnection function is first configured for the reconnection gateway of each train set.

[0068] For example, if there are two reconnection gateways (such as reconnection gateway A and reconnection gateway B) in each train set, and each reconnection gateway includes two reconnection ports (such as E14 port and E15 port), the reconnection ports of the two reconnection gateways are connected by a data line to realize the communication connection between the reconnection gateways of the two train sets.

[0069] Among them, the reconnection ports of the reconnection gateways located in different train groups are connected one-to-one through data lines, that is, the two reconnection ports of a reconnection gateway of a single train group are connected one-to-one with the two reconnection ports of a reconnection gateway of other train groups through data lines.

[0070] Furthermore, the reconnection ports of each reconnection gateway can be cross-connected or connected in parallel. Figure 2 As shown, the E14 port of the reconnection gateway A is connected to the E15 port of the reconnection gateway B through a data cable, and the E15 port of the reconnection gateway A is connected to the E14 port of the reconnection gateway B, so as to realize the cross connection of the reconnection ports of the two reconnection gateways.

[0071] Then, set different reconnection ports of the same reconnection gateway to different VLANs respectively. For example, the reconnection port E14 of each reconnection gateway (i.e., reconnection gateway A and reconnection gateway B) is divided into eth1.1, and the reconnection port E15 is divided into eth1.2; and, the different reconnection ports of the same reconnection gateway are connected to the same bridge (denoted as br-wan), that is, the reconnection port E14 and the reconnection port E15 are added to the same bridge.

[0072] In some examples, the reconnection port of each reconnection gateway can be configured, for example, one of the reconnection ports of each reconnection gateway is used as the main port, and the other reconnection ports of the reconnection gateway are used as standby ports. In the subsequent reconnection process, the main port is enabled first, so as to build a main communication link through the main port of each reconnection gateway, and then the main communication link is enabled first to realize the communication of each train group.

[0073] Furthermore, in order to avoid communication loops between the train sets and ensure normal communication, ports that do not need to be enabled on each reconnection gateway may be disabled.

[0074] For example, if a primary port is configured, the primary port of the reconnection gateway can be enabled first during the reconnection process, and then the backup port on the reconnection gateway can be disabled. If no primary port is configured, one of the reconnection ports in the reconnection gateway can be enabled (which can be recorded as the target reconnection port), and the other reconnection ports on the reconnection gateway can be disabled.

[0075] As a feasible implementation method, the present embodiment can also perform reconnection sorting according to the size of the train group number, so as to determine the target reconnection port enabled on each reconnection gateway according to the sorting result. Specifically, the train group numbers are sorted from small to large, and the reconnection gateways corresponding to the front-ranked train group numbers have their eth1.2 port disabled and their eth1.1 port enabled; the reconnection gateways corresponding to the back-ranked train group numbers have their eth1.1 port disabled and their eth1.2 port enabled. For example, if the number of the train group where reconnection gateway A is located is smaller than the number of the train group where reconnection gateway B is located, then the eth1.2 port of reconnection gateway A is disabled to enable the eth1.1 port of reconnection gateway A, and the eth1.1 port of reconnection gateway B is disabled to enable the eth1.2 port.

[0076] Furthermore, the reconnection function configuration effects corresponding to each reconnection gateway are as follows: Figure 3 and Figure 4 As shown; if the reconnection gateway needs to participate in the communication, the TTDP protocol will be negotiated between the reconnection gateways participating in the communication, and the bridge to which the reconnection gateway is connected will generate a reconnection IP address for the reconnection gateway, and automatically configure NAT forwarding rules and routing rules according to the reconnection IP address, so that the reconnection gateway can start normal reconnection communication based on the reconnection IP address, NAT forwarding rules and routing rules.

[0077] It should be noted that the communication network between multiple train sets is divided into two layers of network architecture, namely the train backbone network and the marshaling network; the communication between the marshaling networks should only be carried out through the train backbone network. The reconnection IP address of the reconnection gateway in each train set is related to the two parameters of the configured backbone network number (denoted as Backbone ID) and the Ethernet train backbone node number (denoted as ETBN ID) generated during the communication interaction between each reconnection gateway. Therefore, before generating the reconnection IP address of each reconnection gateway, the corresponding ETBN ID and Backbone ID are set for each reconnection gateway, and then the reconnection IP address is set for the reconnection gateway in combination with the ETBN ID and Backbone ID of the same reconnection gateway.

[0078] For example, you can first set a corresponding ETBN ID for each reconnection gateway according to the size of the train group number corresponding to each reconnection gateway; Figure 3 As shown in FIG. 1 , the train group number corresponding to the reconnection gateway A (function switch) is 0001, that is, the value of the train group number is small, and the ETBN ID of the reconnection gateway A can be set to 1; Figure 4 As shown, the train group number corresponding to the reconnection gateway B (function switch) is 0002. The value of the train group number is larger than the train group number corresponding to the reconnection gateway A, so the ETBN ID of the reconnection gateway B can be set to 2. For further example, if the Backbone ID of the reconnection gateway A is set to 0, and the ETBN ID of the reconnection gateway is 2, the reconnection IP address of the reconnection gateway A can be set to 10.128.0.2 / 24; the configuration of the parameters such as the IP address of the reconnection gateway B is the same as that of the reconnection gateway A, but the values ​​of the configured parameters are different, so they are not repeated here. In addition, when configuring the reconnection function of each reconnection gateway, the universal unique identification code (i.e., UUID), backbone network number (i.e., Backbone ID), virtual router number (i.e., VRRP ID), status, total number of reconnection devices and other parameters of the reconnection gateway A and the reconnection gateway B can also be configured accordingly. Among them, the specific parameter items that need to be configured and the values ​​of each parameter item can be set accordingly according to actual needs, and this embodiment does not limit this.

[0079] Monitor the line connection status or communication status of the main port or the target reconnection port in each reconnection gateway in real time to determine whether to switch the link based on the line connection status and communication status, that is, determine whether the preset link switching condition is met based on the line connection status and communication status of the main port or the target reconnection port.

[0080] Among them, the preset link switching conditions include: condition one, if the line connection state of the main port or the target reconnection port is a line disconnection state; condition two, if the communication state of the main port or the target reconnection port is a communication disconnection state.

[0081] It can be understood that if the line connection status (i.e., link status) of the main port or target port of any reconnection gateway is monitored to be a line disconnected state; or, the communication status of the main port or the target port is a communication disconnected state, it is determined that the current main communication link of the train is abnormal and the link needs to be switched to switch the current main communication link to the backup communication link so that each train group of the train can communicate via the backup communication link.

[0082] For reference, in this embodiment, the line connection status of the main port of each reconnected gateway can be detected through the swconfig command, for example, by inputting the command "swconfig dev switch0 port 3show".

[0083] Among them, if the line connection status of the main port is displayed as "down" (that is, after entering the swconfig command, the output is "down"), it means that the port is disconnected from the line or is not connected, that is, the port is currently in a line disconnected state; if the line connection status of the main port is displayed as "up" (that is, after entering the swconfig command, the output is "up"), it means that the port is connected, that is, the port is currently in a line connected state.

[0084] Furthermore, when it is determined that the line connection status of the main port is displayed as "down", it can be switched to the backup link to achieve reconnection of multiple train sets.

[0085] In one example, this embodiment can detect the communication status of the main port of each reconnection gateway through the ping command, wherein the IP address of the reconnection gateway involved in the ping command can be obtained through the SSH command or the serial port to check the background. For example, enter the command "ping <IP address of the reconnection gateway>".

[0086] Among them, if the ping command fails each time after being entered several times in succession, that is, no communication response can be received after multiple ping commands are entered, it means that the communication status of the port is abnormal, and you can switch to the backup link to achieve reconnection of multiple train groups.

[0087] Furthermore, if it is monitored that the primary communication link meets the preset first link switching condition, the backup port of each primary gateway is enabled, and the primary port of each primary gateway is disabled to switch to the backup communication link.

[0088] It can be understood that when it is determined that the main link corresponding to the main port of any reconnection gateway is currently in an abnormal state (that is, the line connection state of the main port is the line disconnection state, or the communication state is the communication disconnection state), the current link of the train will be switched to the backup link; subsequently, each train group communicates through the backup link.

[0089] It should be noted that when switching to the backup link (i.e. enabling the backup port of the reconnection gateway of each train group), the main port of the reconnection gateway of each train group is disabled to avoid communication loops between the reconnection gateways.

[0090] In this embodiment, switching to the backup link is essentially to achieve communication between multiple train groups by enabling the backup port of the same reconnection gateway in each train group, that is, the switching of the primary and backup links is essentially the switching and enabling of the port on the same reconnection gateway used to achieve communication.

[0091] It can be understood that since the communication link switching is achieved by only switching and enabling different ports on the reconnection gateway, on the one hand, there is no need to re-negotiate the TTDP protocol to achieve the primary and backup link switching on the same reconnection gateway, and the previous IP address, NAT and routing configuration can be reused, greatly shortening the time to restore communication; on the other hand, no additional redundant equipment is added, reducing operating costs, and this solution can be implemented at the application layer, with strong portability.

[0092] As an optional implementation, if there are multiple (more than two) reconnection ports on each reconnection gateway, similar to the example of a single reconnection gateway having two reconnection ports mentioned above, each reconnection port on each reconnection gateway is connected one-to-one via a data line, and different reconnection ports of the same reconnection gateway are located in different VLANs, and different reconnection ports of the same reconnection gateway are connected to the same bridge.

[0093] Furthermore, one reconnection port in each reconnection gateway is used as the main port, and the other reconnection ports are standby ports; each train set first enables the main port of the corresponding reconnection gateway to achieve communication between each train set through the main communication link corresponding to the main port. Among them, if it is determined that the communication state or connection state of the main port is abnormal, that is, the main communication link meets the first link switching condition, then one of the standby ports of the reconnection gateway is enabled, that is, switching from the main communication link to the standby communication link.

[0094] Subsequently, if it is determined that the backup communication link corresponding to the corresponding backup port on the reconnection gateway is abnormal, it can be switched to other backup ports on the reconnection gateway, that is, switch from the current backup communication link to another backup communication link; wherein, the execution process of switching between multiple backup links is the same as the execution process of switching between the primary and backup links, so this embodiment will not be repeated here.

[0095] Furthermore, this embodiment can realize dynamic switching of multiple communication links based on a reconnection gateway on each train set.

[0096] Moreover, since the communication link switching process does not involve the replacement of the reconnection gateway, there is no need to re-negotiate TTDP, so communication can be restored quickly, shortening the communication recovery time, ensuring that the train can communicate stably in the reconnection state, and improving the safety and reliability of train operation.

[0097] In one implementation, if there are multiple reconnection gateways in each train set, one reconnection gateway is first set as a main gateway, and the remaining reconnection gateways are backup gateways.

[0098] Furthermore, in actual applications, each train group first only enables the main gateway. If it is determined that the communication status or connection status of the two reconnection ports of the main gateway are both abnormal, that is, the main communication link meets the first link switching condition and the backup communication link meets the second link switching condition, then the backup gateway of each train group is enabled to build a new communication link.

[0099] It should be noted that, similar to the switching of the main and backup links of the single reconnection gateway mentioned above, when enabling the backup gateway to realize communication between multiple train sets, if the main communication link of the backup gateway is abnormal, switch to the backup communication link of the backup gateway.

[0100] Furthermore, if both the primary communication link and the backup communication link of the backup gateway are abnormal, other backup gateways are enabled.

[0101] The execution process of switching the primary and backup links of the standby gateway is the same as that of switching the primary and backup links of the active gateway, so this embodiment will not be described in detail here.

[0102] It can be understood that this embodiment first constructs two communication links through two reconnection ports in the same reconnection gateway, and then when one of the communication links has an abnormality, it can quickly switch to the other communication link. If both communication links of the current reconnection gateway have abnormalities, it can switch to another reconnection gateway to build two new communication links to realize the switching of the main and standby links during the communication process, ensuring that the train can communicate stably in the reconnection state, thereby improving the safety and reliability of the train operation.

[0103] like Figure 5 As shown, an embodiment of the present application provides a train reconnection control method, wherein the method can be applied to the target gateway in the aforementioned train control system. Exemplarily, the method can include the following steps:

[0104] S510, enabling the first target port in each reconnection port, disabling non-first target ports, and forming a first communication link to achieve reconnection communication between multiple train sets.

[0105] S520: If it is monitored that the first communication link meets a preset link switching condition, enable a second target port in each reconnection port and disable non-second target ports to form a second communication link.

[0106] In this embodiment, the target gateway of each train group enables a reconnection port and its corresponding communication link to perform reconnection communication with other train groups, and when there is an abnormality in the communication link corresponding to the currently enabled reconnection port, it switches to enable other reconnection ports and their communication links on the target gateway, so as to quickly restore the reconnection communication with other train groups and improve the efficiency of train reconnection communication.

[0107] It can be understood that the description of the embodiment of the train reconnection control method corresponds to the description of the aforementioned train control system embodiment. Therefore, for the content not described in detail, please refer to the system embodiment above. For the sake of brevity, it will not be repeated here.

[0108] The present application also provides a train. Exemplarily, the train includes the above-mentioned train control system, which includes multiple train groups, processors and memories, each train group contains at least one reconnection gateway, wherein the memory stores a computer program, and the processor runs the computer program to enable the train control system to realize the train reconnection control function.

[0109] Among them, the processor can be an integrated circuit chip with signal processing capabilities, and the processor can also be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0110] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0111] The present application also provides a computer storage medium for storing the computer program used in the above train. The computer storage medium may be a readable storage medium, or a non-volatile storage medium or a volatile storage medium. For example, the computer storage medium may include but is not limited to: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0112] In several embodiments provided in the present application, it should be understood that the disclosed system and method can also be implemented in other ways. The system embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0113] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0114] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.

[0115] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A train reconnection control method, characterized in that: The train control system includes a plurality of train sets, each train set includes at least one reconnection gateway, and a single reconnection gateway includes at least two reconnection ports; the reconnection gateway of each train set is connected to the reconnection gateways of other train sets; the reconnection ports of the connected reconnection gateways are correspondingly connected; the reconnection ports of each reconnection gateway are pre-divided into different VLANs, and the reconnection ports of the same reconnection gateway are connected to the same bridge; The method is applied to a target gateway selected in the train control system, and the method comprises: Activate the first target port in each of the reconnection ports, disable the non-first target ports, and form a first communication link to achieve reconnection communication between multiple train sets; If it is monitored that the first communication link meets the preset link switching condition, the second target port in each of the reconnection ports is enabled, and non-second target ports are disabled to form a second communication link.

2. The train reconnection control method according to claim 1, characterized in that: Also includes: If it is monitored that the second target port meets the link switching condition, a third target port in each of the reconnection ports that is different from the first target port and the second target port is enabled, and non-third target ports are disabled to form a third communication link until it is determined that all communication links of the current target gateway meet the link switching condition.

3. The train reconnection control method according to claim 1, characterized in that: Also includes: If it is determined that all communication links of the current target gateway in any train group meet the link switching condition, then generating gateway switching information; The gateway switching information is used to instruct the train control system to select a new target gateway different from the current target gateway from the reconnection gateways in each of the train sets to enable any communication link in the new target gateway for reconnection communication.

4. The train reconnection control method according to any one of claims 1 to 3, characterized in that: The link switching condition includes: Condition 1: If the line connection state of the currently enabled target port is line disconnected; Condition 2: If the communication state of the currently enabled target port is a communication disconnected state.

5. The train reconnection control method according to claim 1, characterized in that: Before forming the first communication link, the method further includes: Determining a reconnection IP address of the first target port; According to the reconnection IP address, NAT forwarding rules and routing rules are configured so that the reconnection gateway can perform reconnection communication with the reconnection gateways of the other train groups based on the reconnection IP address, the NAT forwarding rules and the routing rules.

6. The train reconnection control method according to claim 5, characterized in that: Before determining that the first target port is allocated a reconnection IP address, the method further includes: Determine its own Ethernet train backbone node number and backbone network number, the Ethernet train backbone node number and the backbone network number are used to generate a reconnection IP address.

7. The train reconnection control method according to claim 1 or 5, characterized in that: Also includes: The current target port on each target gateway is used to realize reconnection communication, and the IP address, NAT rule and routing rule corresponding to the original target port are reused; the current target port is used to perform reconnection communication with other train groups based on the IP address, the NAT rule and the routing rule.

8. A train control system, characterized in that: The invention comprises a plurality of train sets, each of which comprises at least one reconnection gateway, and a single reconnection gateway comprises at least two reconnection ports; the reconnection gateway of each train set is connected to the reconnection gateways of other train sets; the reconnection ports of the connected reconnection gateways are correspondingly connected; the reconnection ports of each reconnection gateway are pre-divided into different VLANs, and the reconnection ports of the same reconnection gateway are connected to the same bridge; A target gateway is selected from each of the reconnection gateways in each train set, and each of the target gateways is used to execute the train reconnection control method as described in any one of claims 1-7.

9. A train, characterized in that: Comprising the train control system as claimed in claim 8.

10. A computer storage medium, characterized in that: It stores a computer program, which, when executed on a processor, implements the train reconnection control method according to any one of claims 1-7.