Communication recovery method, system and electronic equipment between interlocking system and RBC system
By separating control rights between the main and standby interlocking systems and re-establishing the secure connection of the RBC system, the problem of frequent dual-machine switching of interlocking equipment in the railway signal system is solved, the safety and efficiency of railway operations are improved, and communication recovery is ensured. stability.
Patent Information
- Application Number
- CN202211021241.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-24
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-08-24
AI Technical Summary
The communication disconnection or failure of the interlocking and RBC system in the railway signal system causes frequent dual-machine switching of interlocking equipment, affecting operational planning and operational safety, and reducing railway operation efficiency.
By separating control rights between the interlocking main and standby systems, a secure connection with the RBC system is re-established according to preset conditions, avoiding constant dual-machine switching, ensuring that the secure connection is determined and then dual-machine switching is performed, improving communication recovery efficiency.
It effectively avoids frequent dual-machine switching caused by RBC equipment failure or network failure in interlocking equipment, improves the safety and efficiency of railway operations, and shortens communication recovery time.
Smart Images

Figure CN115865638B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of railway signal systems, and in particular to a communication recovery method, system and electronic equipment between an interlocking system and an RBC system. Background Art
[0002] In the railway signal system, there is only one safety link between the interlocking and RBC (radio block center) system interfaces. When there is a fault in the RBC of the other device or the Ethernet network of the interlocking main system fails or the network fails and the safety link cannot be established smoothly, the interlocking device on this end may not be able to establish communication with the RBC or the interlocking device may experience multiple dual-machine switching when establishing communication with the RBC.
[0003] In the related technology, when the RBC application device is restarted, the communication front-end can interact with TCP (Transmission Control Protocol). After the client interlock initiates the request, the TCP link is successfully established, but the security link cannot be established successfully because the RBC application device fails to work properly. At this time, the client interlock will determine that the data reception has timed out and disconnect the TCP link with RBC.
[0004] However, since the timing when the neighboring system (backup system) and the main system establish TCP with the RBC may not be exactly the same or the link status of the neighboring system (backup system) and the main system is different, the backup system may be superior to the main system for a period of time. In this scenario, the interlocking execution switches the system. If this status continues, it will cause multiple dual-machine switching problems, affecting the railway operation plan and operation safety, and reducing the railway operation and transportation efficiency. Summary of the invention
[0005] The present application provides a communication recovery method, system and electronic equipment between an interlocking system and an RBC system, so as to solve the problem in the related art that due to the failure of the RBC equipment on the other end or the Ethernet network failure of the interlocking main system or the network failure, the interlocking equipment on this end cannot establish communication with the RBC or the interlocking equipment switches between two machines multiple times when establishing communication with the RBC, which affects the operation plan and operation safety and reduces the efficiency of railway operation and transportation.
[0006] A first aspect of the present application provides a method for restoring communication between an interlocking system and an RBC system, wherein the interlocking machine in the interlocking system includes an interlocking main system and an interlocking backup system, and the interlocking main system has the control right to establish a preset safety connection with the wireless block center RBC system, wherein the method is applied to the interlocking main system, and includes the following steps: detecting whether the preset safety connection established between the interlocking main system and the RBC system is disconnected; when detecting that the preset safety connection is disconnected, determining whether the current state of the interlocking main system and the current state of the interlocking backup system meet the separation condition of the control right; if the separation condition of the control right is met, separating the control right of the interlocking main system, and authorizing the control right to the interlocking backup system, so that the interlocking backup system uses the control right to re-establish the preset safety connection with the RBC system, and when the interlocking backup system fails to establish the preset safety connection, reclaiming the control right of the interlocking backup system; if the interlocking backup system has the control right to establish communication successfully, executing the preset dual-machine switching action.
[0007] Optionally, the authorizing the control right to the interlocking backup system includes: dividing the data of the control right into first to fifth byte segments; filling in the communication data frame header in the first byte segment, filling in the current main status information, master control status information, and abandonment of master control status information in the second byte segment, filling in the preset CRC value in the third byte segment, filling in the data length in the fourth byte segment, and filling in the communication data frame tail in the fifth byte segment; packing the data of the first to fifth byte segments to realize the packing of the control right data, and sending it to the interlocking backup system to authorize the control right to the interlocking backup system.
[0008] Optionally, the determination of whether the current state of the interlocking main system and the current state of the interlocking backup system satisfy the condition for separation of the control right includes: utilizing the control right to re-establish the preset security connection with the RBC system, and determining whether the interlocking main system fails to establish the preset security connection; if the interlocking main system fails to establish the preset security connection, detecting whether the transmission control protocol TCP connection of the interlocking main system is in a preset normal state and whether the interlocking backup system is in a preset hot standby state; upon detecting that the TCP connection of the interlocking main system is in a preset normal state and the security link has not been established, and that the interlocking backup system is in a preset hot standby state, determining that the condition for separation of the control right is satisfied; otherwise, determining that the condition for separation of the control right is not satisfied, and the interlocking main system still has the control right.
[0009] Optionally, the determining whether the interlocking main system fails to establish the preset safety connection includes: when it is detected that the interlocking main system cannot establish the preset safety connection with the RBC system for a period longer than a first preset period, determining that the interlocking main system fails to establish the preset safety connection.
[0010] Optionally, after taking back the control right of the interlocking backup system, it also includes: after an interval of a second preset time, re-establishing the preset safety connection with the RBC system according to the control right, until the interlocking main system successfully establishes the preset safety connection, wherein before the interlocking main system successfully establishes the preset safety connection, it is prohibited to authorize the control right to the interlocking backup system.
[0011] Optionally, the interlocking machine includes an interlocking machine host and an interlocking machine standby machine. When it is detected that the preset safety connection status established between the interlocking machine main system and the RBC system is good, it also includes: using the interlocking machine host to send a safety protocol data packet to the RBC system through the railway signal safety communication protocol, and sending the safety protocol data packet to the interlocking machine standby machine, wherein the interlocking machine standby machine is used to synchronize the safety protocol data packet and application data sent by the interlocking machine host.
[0012] A second aspect of the present application provides a method for restoring communication between an interlocking system and an RBC system, wherein the interlocking machine in the interlocking system includes an interlocking main system and an interlocking backup system, wherein the interlocking main system has the control right to establish a preset safety connection with the wireless block center RBC system, wherein the method is applied to the interlocking backup system, and includes the following steps: obtaining the control right authorized by the interlocking main system; using the control right to re-establish the preset safety connection with the RBC system, and detecting whether the interlocking backup system fails to establish the preset safety connection; when the interlocking backup system fails to establish the preset safety connection, the interlocking main system takes back the control right of the interlocking backup system, and if the interlocking backup system has the control right to establish communication successfully, a preset dual-machine switching action is executed.
[0013] Optionally, obtaining the control right authorized by the interlocking main system includes: receiving control right data sent by the interlocking main system and initializing CRC16; when it is detected that the length of the control right data is a preset length and the preset security connection is not established, using the CRC16 to verify the data, and performing data parsing after the data verification passes; during data parsing, checking the master-slave status, working status of the own system and whether the neighboring system is in the master control state and the master use state, and when the master-slave status and working status of the own system meet the authorization conditions and the neighboring system is in the master control state and the master use state, determining that the control right data parsing is successful, authorizing the control right of the interlocking standby system, and sending the control right status of the interlocking standby system to the neighboring system.
[0014] A third aspect of the present application provides an interlocking system, comprising an interlocking machine, wherein the interlocking machine comprises: an interlocking main system, wherein the interlocking main system has control rights to establish a preset safety connection with a wireless block center (RBC) system, and upon detecting that the preset safety connection established between the interlocking main system and the RBC system is disconnected, the interlocking main system uses the control rights to re-establish the preset safety connection with the RBC system, and upon failure of the interlocking main system to establish the preset safety connection, the interlocking main system's control rights are separated, and the control rights are authorized to the interlocking standby system; an interlocking standby system, wherein the interlocking standby system uses the control rights to re-establish the preset safety connection with the RBC system, and upon failure of the interlocking standby system to establish the preset safety connection, the interlocking main system takes back the control rights of the interlocking standby system, and if the interlocking standby system has control rights to establish communication successfully, a preset dual-machine switching action is executed.
[0015] The fourth aspect of the present application provides an electronic device, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the communication recovery method between the interlocking system and the RBC system as described in the above embodiment.
[0016] Therefore, this application has at least the following beneficial effects:
[0017] (1) Since the interlocking master-standby system will only separate the master control of the master-standby system status from the RBC when the security connection with the RBC is disconnected and conditionally rebuilt, it is possible to exchange between the interlocking master-standby system at fixed time intervals, try to reestablish the connection with the RBC respectively, and perform the interlocking dual-machine switching after the security connection is confirmed to have been successfully established, thus avoiding the problem of constant switching between the interlocking dual systems, not affecting operations and improving work efficiency.
[0018] (2) Avoid multiple dual-machine switching of interlocking equipment due to failure of the other end RBC equipment. When the main system interlocking stops due to a failure, the interlocking standby system may not be in hot standby state. When it is promoted to main use under this multiple failure scenario, the station will be locked, which may affect the operation.
[0019] (3) Provide a reference solution and a method to separate the control authority (master control authority) for the frequent switching between two signal devices in the railway signal system using a secure connection.
[0020] (4) Improve the interlocking system's ability to communicate with multiple external interface devices, shorten the time it takes to restore communication between the two systems after the interlocking system and RBC are interrupted for some reason, and improve operational efficiency and safety.
[0021] (5) Avoid the problem that the server returns the response of the interlocking master system to the interlocking standby system and the interlocking standby system returns the response to the interlocking master system due to the client's main and standby systems initiating requests at the same time, causing server data congestion and connection confusion, resulting in communication anomalies that cannot be restored.
[0022] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0024] Figure 1 This is a flow chart of the communication recovery method between the interlocking system and the RBC system of the embodiment of the present application applied to the interlocking main system;
[0025] Figure 2 A schematic diagram of a secure connection established between the interlocking system and the RBC system according to an embodiment of the present application;
[0026] Figure 3 This is a schematic diagram of synchronization information of the interlocking master system and the interlocking backup system in an embodiment of the present application;
[0027] Figure 4 A specific flow chart of packaging the control right data of the interlocking master system and sending it to the interlocking standby system in an embodiment of the present application;
[0028] Figure 5 This is a flowchart of the master system control right collection and release right processing in an embodiment of the present application;
[0029] Figure 6 This is a schematic diagram of the interlocking dual-system control authority command transmission embodiment of the present application;
[0030] Figure 7 A flow chart of the communication recovery method between the interlocking system and the RBC system according to an embodiment of the present application applied to the interlocking backup system;
[0031] Figure 8 This is a flow chart of receiving and processing the interlocking system control right information according to an embodiment of the present application;
[0032] Fig. 9 This is a flow chart of the interlocking system control right processing according to an embodiment of the present application;
[0033] Fig.10 A schematic diagram of interlocking dual machines in an interlocking system of an embodiment of the present application;
[0034] Fig.11 This is a schematic diagram of the connection between the interlocking machine and the RBC physical channel of an embodiment of the present application;
[0035] Fig.12 This is a schematic diagram of the connection between the interlocking machine and the RBC logic channel of an embodiment of the present application;
[0036] Fig.13 This is a schematic diagram of data interaction between the interlocking system and the RBC system in the railway signal system of an embodiment of the present application;
[0037] Fig.14 This is a diagram of the control right interaction between the interlocking dual systems of the embodiment of the present application;
[0038] Fig.15 This is a schematic diagram of a link establishment request initiated by the system where the control right resides in an embodiment of the present application;
[0039] Fig.16 This is a diagram of the process of establishing a safe connection with the interlocking master and standby system having control rights according to an embodiment of the present application;
[0040] Fig.17 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0042] The following describes the communication recovery method, system and electronic device of the interlocking system and RBC system of the embodiment of the present application with reference to the accompanying drawings. In view of the problem mentioned in the above background technology that the interlocking device on the local end cannot establish communication with the RBC or the interlocking device switches between two machines multiple times when establishing communication with the RBC due to the failure of the RBC device on the other end or the Ethernet network failure of the interlocking main system or the network failure, the present application provides a communication recovery method of the interlocking system and the RBC system, when the interlocking main and standby systems are disconnected from the secure connection with the RBC and conditionally rebuilt (TCP connection is normal), the master status of the master and standby systems and the master right to establish a secure connection with the RBC are separated, and exchanged between the interlocking main and standby systems at fixed time intervals, and the connection with the RBC is rebuilt respectively. After the secure connection is determined to have been successfully established, the interlocking double machine switching is performed, thereby avoiding the problem of continuous switching between the interlocking double systems. Thereby, the problem in the related technology that the interlocking device on this end cannot establish communication with the RBC or the interlocking device switches between two machines multiple times when establishing communication with the RBC due to failure of the RBC device on the other end or failure of the interlocking main system Ethernet network or network failure is solved, which affects the railway operation plan and operation safety and reduces the railway operation and transportation work efficiency.
[0043] It should be noted that in the following embodiments, the master-standby state of the interlocking machine and the master control right for establishing a secure connection with the RBC are separated, and the separated state is during the period when the security link is disconnected and conditionally rebuilt. The master state of the interlocking machine and the master control right for establishing a secure connection with the RBC in other stages are unified in the interlocking master system; at the same time, the master control right for establishing a secure connection with the RBC always exists and appears in a certain system, that is, it cannot be lost, and the situation where both systems have master control cannot occur.
[0044] Specifically, Figure 1 A flow chart of a communication recovery method between an interlocking system and an RBC system provided in an embodiment of the present application applied to an interlocking main system.
[0045] like Figure 1 As shown, the communication recovery method between the interlocking system and the RBC system, the interlocking machine in the interlocking system includes an interlocking main system and an interlocking backup system, and the interlocking main system has the control right to establish a preset safety connection with the radio block center RBC system, including the following steps:
[0046] In step S101, it is detected whether the preset safety connection established between the interlocking main system and the RBC system is disconnected.
[0047] Among them, the preset safety connection refers to the safety connection channel established between the interlocking main system and the RBC system.
[0048] It can be understood that the embodiment of the present application prepares for the subsequent determination of whether it is necessary to exchange the connection with the RBC system between the interlocking main system and the standby system by detecting whether the safety connection established between the interlocking main system and the RBC system is disconnected.
[0049] In an embodiment of the present application, the interlocking machine includes an interlocking machine host and an interlocking machine standby machine. When it is detected that the preset safety connection state established between the interlocking machine main system and the RBC system is in a preset good state, it also includes: using the interlocking machine host to send a safety protocol data packet to the RBC system through the railway signal safety communication protocol, and sending a safety protocol data packet to the interlocking machine standby machine, wherein the interlocking machine standby machine is used to synchronize the safety protocol data packet and application data sent by the interlocking machine host.
[0050] Among them, the preset good state refers to the state corresponding to when the preset safety connection state established between the interlocking main system and the RBC system is in a good state, which can be specifically set or calibrated without specific limitation; the safety protocol data packet mainly refers to the AU1 data unit, AU2 data unit, AU3 data unit, AR data unit, and the subsequent received ECSTART data unit, sent ECSTART data unit and DATA data unit, which are not specifically limited here.
[0051] It can be understood that when the embodiment of the present application detects that the safety connection established between the interlocking main system and the RBC system is in good condition, the interlocking machine host sends a safety protocol data packet to the RBC system through the railway signal safety communication protocol, and sends a safety protocol data packet to the interlocking machine standby machine, so that the relevant parameters are synchronized between the interlocking machine standby machine and the interlocking machine host, which is convenient for timely switching to the interlocking machine standby machine when the interlocking main system fails or the RBC main system fails or the network is interrupted, and when the safety connection is successful, it can be used immediately, thereby improving work efficiency.
[0052] Specifically, Figure 2 As shown, the interlocking system and the RBC system can establish a safe connection and communication interaction using RSSP-II (Railway Signal Safety Protocol) for safe communication. The interlocking system is the client (A end) and the RBC is the server (B end). The specific establishment process is as follows:
[0053] The connection is initiated by A and is finally established through the sequential interaction of the underlying messages of both parties. Under the premise that the data in the connection establishment process is correct, the data interaction process between the two parties is as follows: A first sends a request frame AU1 data packet to B. After B receives the AU1 data packet sent by A, B replies to A with an AU2 response data packet. After A receives the AU2 data packet sent by B, A sends an AU3 data packet to B. After B receives the AU3 data packet sent by A, B sends an AR data packet to A. After A receives the AR data packet sent by B, it sends an ECSTART data packet to B. After B receives the ECSTART data packet, it sends an ECSTART data packet to A. After the communication is established, B sends a DATA data packet to A. After A receives the data packet sent by B, it also sends a DATA data packet to A. The two parties periodically exchange DATA data packets. In this process, if Figure 3 As shown, the interlocking machine host also sends the safety data to the interlocking machine standby machine for synchronization information.
[0054] In step S102, when it is detected that the preset safety connection is disconnected, it is determined whether the current state of the interlocking main system and the current state of the interlocking standby system meet the separation condition of the control right.
[0055] It can be understood that when the embodiment of the present application detects that the safety connection established between the interlocking main system and the RBC system is disconnected, it continues to determine whether the current state of the interlocking main system and the current state of the interlocking backup system meet the conditions for separation of control rights, and then prepares for the subsequent decision to switch the interlocking dual machines according to the specific situation.
[0056] In an embodiment of the present application, determining whether the current state of the interlocking main system and the current state of the interlocking standby system satisfy the separation condition of control rights includes: utilizing the control rights to re-establish a preset security connection with the RBC system, and determining whether the interlocking main system fails to establish the preset security connection; if the interlocking main system fails to establish the preset security connection, detecting whether the transmission control protocol TCP connection of the interlocking main system is in a preset normal state and whether the interlocking standby system is in a preset hot standby state; when it is detected that the TCP connection of the interlocking main system is in a preset normal state and the security link has not been established, and the interlocking standby system is in a preset hot standby state, determining that the separation condition of control rights is satisfied, otherwise determining that the separation condition of control rights is not satisfied, and the interlocking main system still has control rights.
[0057] The preset normal state may be that the device has met the working state, which is a normal operating state and is not specifically limited here.
[0058] The preset hot standby state may be that the device has met the operating conditions and can be switched to the main operating state at any time, which is not specifically limited here.
[0059] It can be understood that the condition for separation of control rights in the embodiment of the present application is that the interlocking main system fails to establish a secure connection with the RBC, and at this time the TCP connection of the interlocking main system is in a normal state, and the interlocking standby system is in a hot standby state. If the condition for separation of control rights is not met, the interlocking main system still has control rights, and the control rights can only be separated under specific circumstances, avoiding the problem of constant switching between the interlocking dual systems and ensuring normal operation.
[0060] In an embodiment of the present application, determining whether the interlocking main system has failed to establish a preset safety connection includes: when it is detected that the interlocking main system cannot establish a preset safety connection with the RBC system for a period greater than a first preset period, determining that the interlocking main system has failed to establish a preset safety connection.
[0061] The first preset time length may be a time length set in advance by the user, such as 15s or 20s, etc., without specific limitation. Taking the first preset time length of 20s as an example, when the interlocking main system cannot establish a secure connection with the RBC system for a period of more than 20s, it can be determined that the interlocking main system has failed to establish a preset secure connection.
[0062] It can be understood that the embodiment of the present application can determine that the interlocking main system has failed to establish a secure connection with the RBC system when it detects that the time length of time that the interlocking main system cannot establish a secure connection with the RBC system is greater than a certain time length, thereby preparing for the subsequent decision whether to re-establish the connection or replace the interlocking backup system to establish a secure connection with the RBC system.
[0063] In step S103, if the separation condition of control rights is met, the control rights of the interlocking main system are separated, and the control rights are authorized to the interlocking backup system, so that the interlocking backup system can use the control rights to re-establish the preset security connection with the RBC system, and when the interlocking backup system fails to establish the preset security connection, the control rights of the interlocking backup system are taken back. If the interlocking backup system has the control rights and successfully establishes communication, the preset dual-machine switching action is executed.
[0064] The preset dual-machine switching action means that if the standby system has control and fails to establish communication, the control will be taken back. During this period, the interlocking master-slave status remains unchanged. If it is successfully established, the interlocking executes dual-machine switching, and the interlocking switches from the master system to the standby system. The standby system is promoted to the master system and outputs to the outside. The original master system is downgraded to the standby or in synchronization. After the dual-machine synchronization is successfully completed, the original master system will operate as the standby system.
[0065] It can be understood that when the current status of the interlocking main system and the interlocking backup system meets the separation condition of control rights, the embodiment of the present application separates the control rights of the interlocking main system from the interlocking backup system, so that the interlocking backup system can re-establish a secure connection with the RBC system. If the establishment fails, the control rights of the interlocking backup system are taken back. During this process, the interlocking main and backup states remain unchanged. If the establishment is successful, the interlocking dual-machine switching action is executed, avoiding the problem of constant switching between the interlocking dual systems.
[0066] It should be noted that during the separation of control rights, the interlocking master-slave status will maintain the current state unchanged. For example, system I is the main system and system II is the backup system. This state remains unchanged. Only after the backup machine is successfully established will the dual machines switch, and the master-slave status will change at this time.
[0067] In an embodiment of the present application, the control right is authorized to the interlocking standby system, including: dividing the control right data into first to fifth byte segments; filling in the communication data frame header in the first byte segment, filling in the current main status information, master control status information, and abandonment of master control status information in the second byte segment, filling in the preset CRC value in the third byte segment, filling in the data length in the fourth byte segment, and filling in the communication data frame tail in the fifth byte segment; packing the data of the first to fifth byte segments to realize the packing of the control right data, and sending it to the interlocking standby system to authorize the control right to the interlocking standby system.
[0068] It can be understood that the embodiment of the present application divides the control right data into the first to fifth byte segments, fills in different data in different fields, and finally packages the data of the byte segments and sends them to the interlocking backup system so that the control right can be authorized to the interlocking backup system. The data filled in different fields is used to detect and determine whether there are errors in the transmission process, so as to check later or ensure that the control right can be authorized to the interlocking backup system.
[0069] Specifically, Figure 4As shown, the interlocking master system packages the control right information, fills in the communication data frame header in the 1st to 4th bytes, fills in the current master status information, master control status information, and abandonment of master control status information in the 5th to 8th bytes, obtains the CRC code of the specified data, performs data protection through CRC16, and fills in the CRC value in the 9th and 10th bytes, fills in the data length in the 11th and 12th bytes, and fills in the communication data frame tail in the 13th to 16th bytes. Finally, the package is completed and sent through Ethernet, sending the control right frame data value to the interlocking standby system. Among them, the control right information exchange frame format between the interlocking two systems is shown in Table 1 below:
[0070] Table 1
[0071]
[0072] As shown in Table 1, the 1st to 4th bytes are the communication data frame header, the 5th byte is the main system master flag, the 6th byte is the main system master flag, the 7th byte is the neighbor system master flag, the 8th byte is the main system delegation flag, the 9th and 10th bytes are CRC, the 11th and 12th bytes are data length, and the 13th to 16th bytes are the communication data frame tail.
[0073] The interlocking master-standby system control status representation format is shown in Table 2 below:
[0074] Table 2
[0075]
[0076] Among them, the 1st and 0th bits are the master system delegation flag, 01 means the master system delegates, 00 means the master system does not delegate, and the others are invalid; the 3rd and 2nd bits are the neighbor system master flag, 01 means the neighbor system is the master, 00 means the neighbor system is not the master, and the others are invalid; the 5th and 4th bits are the own system master flag, 01 means the own system is the master, 00 means the own system is not the master, and the others are invalid; the 7th and 6th bits are the own system master flag, 01 means the own system is the master, 10 means the own system is not the master, and the others are invalid.
[0077] In an embodiment of the present application, after the control right of the interlocking backup system is taken back, it also includes: after a second preset time interval, re-establishing a preset safety connection with the RBC system based on the control right, until the interlocking main system successfully establishes the preset safety connection, wherein before the interlocking main system successfully establishes the preset safety connection, it is prohibited to authorize the control right to the interlocking backup system.
[0078] Among them, the second preset time length can be the time length set in advance by the user, for example: the time length for the interlocking main system to re-establish a safe connection with the RBC system is 20s or 25s, which is not specifically limited here.
[0079] It is understandable that when this system is in the master system state and the backup system cannot be connected for a certain period of time, this system will take back the control and always hold the control.
[0080] According to the communication recovery method between the interlocking system and the RBC system proposed in the embodiment of the present application, it is applied to the interlocking main system. When it is detected that the safety connection established between the interlocking main system and the RBC system is disconnected, the control right is used to re-establish a safety connection with the RBC system, and it is determined whether the re-establishment is successful. If the establishment fails, the control right of the interlocking main system is separated from the interlocking standby system under the condition of satisfying the separation of the control right, and the interlocking standby system and the RBC system are established with a safety connection. If the establishment fails, the control right of the interlocking standby system is taken back. During this process, the interlocking main and standby states remain unchanged; if the establishment is successful, the dual-machine switching action is executed. Thus, the problem in the related art that the interlocking device on the local side cannot establish communication with the RBC or the interlocking device switches between the two machines multiple times when establishing communication with the RBC is solved due to the failure of the RBC device on the other side or the Ethernet network failure of the interlocking main system or the network failure, which affects the railway operation plan and operation safety, and reduces the efficiency of railway operation and transportation.
[0081] The following will be combined Figure 5 The communication recovery method between the interlocking system and the RBC system is described in detail when applied to the interlocking main system. The specific process is as follows:
[0082] The control right is controlled by the interlocking master system, and it is judged whether the local machine is the main machine. If so, it will continue to judge whether the neighboring machine has no master right, whether the local machine has master right and whether it has given up the master right, etc. If not, the interlocking standby machine control right processing flow is executed; if it is found that the neighboring machine has no master right, the local machine has master right and has not given up the master right, then it is set that the neighboring machine has no master right, the local machine has master right and has not given up the master right, and there is no need to update the master right;
[0083] If it is found that the neighboring machine has the master right, but the local machine has no master right and has given up the master right, it is necessary to determine whether the local machine has the master right at this time. If it has the master right, set the neighboring machine to have no master right. If it does not have the master right, determine whether the local machine has a connection with the Transmission Control Protocol TCP. If so, check whether the connection with the Transmission Control Protocol TCP is normal and update the connection time with TCP. If it cannot be connected or the TCP connection time exceeds 20s, the connection status between the local machine and the Transmission Control Protocol TCP is disconnected at this time, and query the neighboring system working status;
[0084] When checking whether the transmission control protocol TCP connection of the interlocking master system is in a normal state, whether the interlocking standby system is in a hot standby state, and whether the interlocking master system fails to establish a secure connection; if the transmission control protocol TCP connection of the interlocking master system is not established, the interlocking standby system is in a hot standby state, and the interlocking master system fails to establish a secure connection, then the control right can be delegated or authorized. At this time, it is determined whether the neighboring machine has the master control right. If it does not have the master control right, the interlocking master system is set to have no control right and delegate the right to the interlocking standby system;
[0085] At this time, it is determined whether the transmission control protocol TCP connection of the interlocking main system is established normally, and the delegation command is sent for the first time, the first delegation flag is updated and the delegation time is recorded. If the first delegation time is less than the delegation duration, a control right command is sent to the interlocking main system. If the first delegation time is greater than the delegation duration, the first delegation flag is set to receive the right, the interlocking standby system is set to have no master control right, the interlocking host has the master control right, the delegation master is set to receive the right and the authorization time is updated; it is determined whether the local machine is in working state, if not in working state, it is continued to determine whether the transmission control protocol TCP connection of the interlocking main system is in normal state, if the connection is good, the local machine continues to control the control right;
[0086] If the neighboring machine has the master control, set the first delegation flag to receive the right, set the interlocking standby system to have no master control, set the interlocking host to master control, delegate the master control to not delegate the right, update the authorization time, and send the control command, such as Figure 6 As shown, it is determined whether the machine is in working state. If it is not in working state, it continues to determine whether the transmission control protocol TCP connection of the interlocking main system is in normal state. If the connection is good, the machine continues to control the control right;
[0087] If the transmission control protocol TCP connection of the interlocking main system is established, the interlocking standby system is not in hot standby state and the interlocking main system successfully establishes a secure connection, the interlocking main system continues to maintain the original control right, the interlocking standby system has no master control right, the interlocking main system does not give up power and does not need to update authorization, and sends corresponding control commands to the standby machine to determine whether the local machine is in working state. If it is not in working state, it continues to determine whether the transmission control protocol TCP connection of the interlocking main system is in normal state. If the connection is good, the local machine continues to control the control right.
[0088] To summarize, the master-slave status of the interlocking machine and the master control right for establishing a secure connection with RBC are separated, and this separation state is limited to the period when the security link is disconnected and conditionally rebuilt (TCP connection is normal). In other stages, the master status of the interlocking machine and the master control right for establishing a secure connection with RBC are strictly unified in the interlocking main system.
[0089] Next, a communication recovery method between an interlocking system and an RBC system proposed in an embodiment of the present application will be described with reference to the accompanying drawings.
[0090] Figure 7 is a flow chart of a communication recovery method between an interlocking system and an RBC system according to an embodiment of the present application, wherein the communication recovery method between an interlocking system and an RBC system is applied to an interlocking backup system, such as Figure 7 As shown, the following steps are included:
[0091] In step S201, the control right authorized by the interlocking master system is obtained.
[0092] It can be understood that the embodiment of the present application obtains control of the interlocking main system to prepare for the subsequent establishment of a connection between the interlocking backup system and the RBC system.
[0093] In step S202, the control right is used to re-establish the preset safety connection with the RBC system, and the interlocking system is detected to see whether the preset safety connection fails to be established.
[0094] It can be understood that the interlocking system of the embodiment of the present application re-establishes a secure connection with the RBC system and detects whether the establishment is successful, in preparation for the subsequent determination of whether the interlocking system can operate normally.
[0095] In step S203, when the interlocking standby system fails to establish the preset safety connection, the interlocking master system takes back the control right of the interlocking standby system. If the interlocking standby system has the control right and successfully establishes the communication, the preset dual-machine switching action is executed.
[0096] It can be understood that when the embodiment of the present application determines that the interlocking backup system fails to establish a secure connection, the interlocking main system takes back the control of the interlocking backup system. If the interlocking backup system has control and successfully establishes communication, the preset dual-machine switching action is executed to avoid the problem of constant switching between the interlocking dual systems and ensure normal operation.
[0097] In an embodiment of the present application, obtaining the control right authorized by the interlocking main system includes: receiving the control right data sent by the interlocking main system and initializing CRC16; when it is detected that the length of the control right data is a preset length and the preset security connection is not established, using CRC16 to verify the data, and performing data parsing after the data verification passes; during data parsing, checking the master-slave status, working status of the system and whether the neighboring system is in the master control state and the master use state, and when the master-slave status and working status of the system meet the authorization conditions and the neighboring system is in the master control state and the master use state, determining that the control right data parsing is successful, authorizing the control right to the interlocking standby system, and sending the control right status of the interlocking standby system to the neighboring system.
[0098] The preset length may be a length set in advance by a user, for example, the length is 16 bytes, which is not specifically limited here.
[0099] Among them, the master control state can be the state where the neighboring system has control; the master state can be the state where the neighboring system is in the master working state; the master-slave state can be the state of the master system or the backup system, which is not specifically limited here.
[0100] It can be understood that the interlocking backup system of the embodiment of the present application receives the control data from the interlocking master system and initializes CRC16. When it is detected that the length of the control data is 0 and the security connection is not established, the CRC16 checksum is used to verify the data and parse the data. At the same time, the status of the system and the neighboring system is checked. If all conditions are met, the parsing is successful, and the control is authorized to the interlocking backup system. The backup system temporarily takes control of the control, and the interlocking backup system initiates a request to establish a secure connection to ensure normal operation.
[0101] Specifically, Figure 8 As shown, the control right information reception and processing: after receiving the control right information, first check whether the data length is normal, check the local security connection status, after the check passes, verify the data through CRC16, and parse the data after the data verification passes. During data parsing, check the local master-slave status, check the local working status, check whether the neighboring machine is the master control or the master status. After the above status information is checked, the control right data is parsed successfully, set the local control right status and send the control right status of this system to the neighboring system. According to whether this system holds the control right at this time, determine whether a secure connection request can be initiated. The specific process is as follows:
[0102] First, initialize u16CRC to 0, then determine whether the communication connection is established and whether the length of the received data is 16 bytes. If the communication connection is established and the length of the received data is 16 bytes, obtain the CRC code of the specified data, obtain the data CRC value, check whether the local machine is the host, and check whether the local machine works normally. If the CRC values are the same, it means continuing to determine whether the local machine is the host. If it is the host, determine whether the host works normally. If it is not the host, set the neighboring machine as the master, and set the temporary count to the application running cycle count; if it can work normally, determine whether the neighboring machine is the master, whether it is a non-master, and whether the neighboring machine delegates power. If all are true, the local machine is not the master. If none of them are true, set the local machine as the non-master and the neighboring machine as the master; when the local machine is a non-master, set the local machine as the master, and set the temporary count to the application running cycle count; send control right interaction information.
[0103] According to the communication recovery method between the interlocking system and the RBC system proposed in the embodiment of the present application, the interlocking standby system obtains the control right of the interlocking main system and re-establishes a safe connection with the RBC system. When it is detected that the interlocking standby system fails to establish a safe connection, the interlocking main system takes back the control right of the interlocking standby system. Thus, the problem in the related art that the interlocking device on the local side cannot establish communication with the RBC or the interlocking device switches between two machines multiple times when establishing communication with the RBC is solved due to the failure of the RBC device on the other side or the Ethernet network failure of the interlocking main system or the network failure, which affects the railway operation plan and operation safety, and reduces the efficiency of railway operation and transportation.
[0104] The following will be combined Fig. 9 The communication recovery method between the interlocking system and the RBC system is applied to the interlocking backup system. The specific process is as follows:
[0105] First, determine whether this machine is a backup machine. If so, continue to determine whether the interlocking backup system and the RBC system have established a secure connection. If a secure connection is established, determine whether the authorization time exceeds 20s. If it exceeds 20s, continue to determine whether this machine has master control. If this machine has master control, set the neighboring machine as master control, set this machine to have no master control, update the authorization time, and continue to determine whether there is a connection between the current interlocking backup system and TCP. If there is a connection, it means that the connection between this machine and TCP is good. At this time, determine whether this machine is in working condition. If not in working condition, set the neighboring machine to have no master control, set this machine to have no master control, set the delegated master control to delegated update authorization time, and determine again whether there is a TCP connection at present. If it is connected, it means that the connection between this machine and TCP is good.
[0106] Next, an interlocking system proposed according to an embodiment of the present application is described with reference to the accompanying drawings.
[0107] Fig.10 It is a schematic diagram of two interlocking machines in the interlocking system of an embodiment of the present application.
[0108] The interlocking system includes an interlocking machine such as Fig.10 The interlocking machine includes: interlocking main system and interlocking backup system.
[0109] Among them, the interlocking main system has the control right to establish a preset safety connection with the wireless block center RBC system, and when it is detected that the preset safety connection established between the interlocking main system and the RBC system is disconnected, it uses the control right to re-establish the preset safety connection with the RBC system, and when the interlocking main system fails to establish the preset safety connection, the control right of the interlocking main system is separated, and the control right is authorized to the interlocking backup system; the interlocking backup system uses the control right to re-establish the preset safety connection with the RBC system, and when the interlocking backup system fails to establish the preset safety connection, the interlocking main system takes back the control right of the interlocking backup system, and if the interlocking backup system has the control right to establish communication successfully, the preset dual-machine switching action is executed.
[0110] It should be noted that the aforementioned explanation of the embodiment of the communication recovery method between the interlocking system and the RBC system is also applicable to the interlocking system of this embodiment and will not be repeated here.
[0111] The following will be combined Fig.11 , Fig.12 , Fig.13 , Fig.14 , Fig.15 and Fig.16 A comprehensive description of the interlocking system is as follows:
[0112] First, the interlocking machine establishes a connection with the RBC system, such as Fig.11 , Fig.12 and Fig.13 As shown, there are 8 logical connections between the radio block center RBC and the interlocking machine, namely A1, A2, A3, A4, B1, B2, B3, B4 in the figure; the 8 logical connections A1, A2, A3, A4, B1, B2, B3, B4 in the figure respectively represent the following meanings:
[0113] A1: Communication channel between the logical connection of the first interlocking machine A network and the logical connection of the RBC-A machine A network;
[0114] A2: Communication channel between the logical connection of the first interlocking machine B network and the logical connection of the RBC-A machine B network;
[0115] B1: Communication channel between the logical connection of the first interlocking machine A network and the logical connection of the RBC-B machine A network;
[0116] B2: Communication channel between the logical connection of the first interlocking machine B network and the logical connection of the RBC-B machine B network;
[0117] A3: Communication channel between the logical connection of the second interlocking machine A network and the logical connection of the RBC-A machine A network;
[0118] A4: Communication channel between the logical connection of the second interlocking machine B network and the logical connection of the RBC-A machine B network;
[0119] B3: Communication channel between the logical connection of the second interlocking machine A network and the logical connection of the RBC-B machine A network;
[0120] B4: Communication channel between the logical connection of the second interlocking machine B network and the logical connection of the RBC-B machine B network;
[0121] When all these channels are securely connected to the interlocking machine, they are in a normal state, indicating that the connection is successful.
[0122] Then, check the control right between the interlocking two systems, such as Fig.14 As shown, a safety connection can be established with the RBC only when a certain interlocking system has control. There is only one safety connection between the interlocking system and the RBC system, and the interlocking backup system only synchronizes related parameters.
[0123] When this system is in the master system state, the backup system is not in the hot standby state, or the master system cannot connect to the RBC for less than 20 seconds, or a secure connection has been established, or the master system has delegated control for more than 20 seconds and the backup system has not responded, or the TCP connection of this system has not been established, this system always holds control.
[0124] When the system is in the master system state, the standby system has been hot-standbyed and the master system cannot be connected for more than 20 seconds, the master system gives power to the standby system, and the standby system temporarily takes control. The interlocked standby system initiates a request to establish a secure connection.
[0125] When this system is in the master system state and the backup system cannot connect for more than 20 seconds, this system takes back the control and always holds the control.
[0126] When the system is in the master system state, after the master system releases the authority, if the backup system cannot establish a connection but within 20 seconds, the master control is released to the backup system, and the backup system temporarily takes control, and the interlocked backup system initiates the request to establish a secure connection.
[0127] Then, only those with control rights can initiate connection requests, such as Fig.15 As shown in the middle left figure, when the interlocking machine I system master system has the master control, it can establish a connection with the RBC system, such as Fig.15 As shown in the middle right figure, when the interlocking machine II system has master control, it can establish a connection with the RBC system.
[0128] Finally, combined Fig.16 The schematic diagram of the interlocking master and standby system having control right and starting to establish a safety connection is shown. The control right status of the interlocking machine at this time is determined as follows:
[0129] Determine whether this system is the main system or the backup system, and then determine whether this system has the master control right. If it has the master control right, determine whether AU1 is allowed to be sent when the TCP connection is normal. If it is allowed, send the AU1 establishment request; after AU1 is sent, determine whether AU2 is parsed successfully. If it is parsed successfully, send AU3 response packet; after AU3 is sent, determine whether AR is parsed successfully. If it is parsed successfully, send ECStart. After ECStart is sent, determine whether ECStart is parsed successfully. If it is parsed successfully, it indicates that the secure connection has been established, and send DATA application data to the server and neighboring system.
[0130] In the overall process, the control right interaction and the current status of the local machine and the host master are mainly determined through function work. Some functions are as follows:
[0131] (1) Function: Control right interaction main call
[0132] Function definition: void rsp2_CheckMainCtrlStat(RSP2_CONTROL_s*pstrRsp2Ctrl);
[0133] Parameter description: pstrRsp2Ctrl[in]: RSP2 protocol control variable.
[0134] (2) Function: receiving control information processing
[0135] Function definition: static void PrecessCtrlInfo(RSP2_CONTROL_s*pstrRsp2Ctrl,
[0136] uint8_td pu8InputBuf[],
[0137] uint16_td u16RcvLen);
[0138] Parameter description: pstrRsp2Ctrl[in]: RSP2 protocol control variable; pu8InputBuf[][in]: received data first address; u16RcvLen[in]: received data length.
[0139] (3) Function: Sending control right interaction information
[0140] Function definition: static void SendCtrlinfo(RSP2_CONTROL_s*pstrRsp2Ctrl);
[0141] Parameter description: pstrRsp2Ctrl[in]: RSP2 protocol control variable.
[0142] (4) Function: Get the current master control status of the local machine
[0143] Function definition: uint8_td rsp2_GetMainCtrl(void).
[0144] (5) Function: Get the current neighboring machine master control status
[0145] Function definition: uint8_td rsp2_GetNearCtrl(void).
[0146] Fig.17 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0147] A memory 1701 , a processor 1702 , and a computer program stored in the memory 1701 and executable on the processor 1702 .
[0148] When the processor 1702 executes the program, the communication recovery method between the interlocking system and the RBC system provided in the above embodiment is implemented.
[0149] Furthermore, the electronic device further comprises:
[0150] The communication interface 1703 is used for communication between the memory 1701 and the processor 1702 .
[0151] The memory 1701 is used to store computer programs that can be executed on the processor 1702 .
[0152] The memory 1701 may include a high-speed RAM (Random Access Memory) memory, and may also include a non-volatile memory, such as at least one disk memory.
[0153] If the memory 1701, the processor 1702 and the communication interface 1703 are implemented independently, the communication interface 1703, the memory 1701 and the processor 1702 can be connected to each other through a bus and communicate with each other. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.17 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0154] Optionally, in a specific implementation, if the memory 1701, the processor 1702 and the communication interface 1703 are integrated on a chip, the memory 1701, the processor 1702 and the communication interface 1703 can communicate with each other through an internal interface.
[0155] The processor 1702 may be a CPU (Central Processing Unit), or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.
[0156] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0157] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0158] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0159] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.
[0160] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0161] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A communication recovery method between an interlocking system and an RBC system, characterized in that: The interlocking machine in the interlocking system includes an interlocking main system and an interlocking backup system. The interlocking main system has the control right to establish a preset safety connection with the radio block center RBC system. The master and backup states of the interlocking machine are separated from the master control right to establish a safety connection with the RBC system. During the period when the safety connection is disconnected and the TCP connection is normal, the master state of the interlocking machine and the master control right to establish a safety connection with the RBC are unified in the interlocking main system. At the same time, the master control right to establish a safety connection with the RBC system is switched between the interlocking main system and the interlocking backup system. The method is applied to the interlocking main system and includes the following steps: Detecting whether the preset safety connection established between the interlocking main system and the RBC system is disconnected; When it is detected that the preset safety connection is disconnected, it is determined whether the current state of the interlocking main system and the current state of the interlocking standby system meet the separation condition of the control right, wherein the determination of whether the current state of the interlocking main system and the current state of the interlocking standby system meet the separation condition of the control right includes: using the control right to re-establish the preset safety connection with the RBC system, and determining whether the interlocking main system fails to establish the preset safety connection; if the interlocking main system fails to establish the preset safety connection, detecting whether the transmission control protocol TCP connection of the interlocking main system is in a preset normal state and whether the interlocking standby system is in a preset hot standby state; when it is detected that the TCP connection of the interlocking main system is in a preset normal state and the safety link is not established, and the interlocking standby system is in a preset hot standby state, it is determined that the separation condition of the control right is met, otherwise it is determined that the separation condition of the control right is not met, and the interlocking main system still has the control right; If the separation condition of the control right is met, the control right of the interlocking main system is separated, and the control right is authorized to the interlocking standby system, so that the interlocking standby system uses the control right to re-establish the preset safety connection with the RBC system, and when the interlocking standby system fails to establish the preset safety connection, the control right of the interlocking standby system is taken back, and if the interlocking standby system has the control right to establish communication successfully, the preset dual-machine switching action is performed, wherein the judgment whether the interlocking main system fails to establish the preset safety connection includes: when it is detected that the interlocking main system cannot establish the preset safety connection with the RBC system for a period longer than a first preset period, it is determined that the interlocking main system fails to establish the preset safety connection; Among them, the interlocking main system and the interlocking standby system establish a secure connection with the RBC system after having control. If the TCP connection status is good, AU1 has been sent, AU2 parsing is successful, AU3 has been sent, AR parsing is successful, ECstart is sent successfully and ECstart parsing is successful, then the secure connection is successfully established. Among them, after identifying that the TCP connection status of the interlocking system is good, the interlocking system sends an AU1 establishment request data packet to the RBC system. After the RBC system receives the AU1 establishment request data packet sent by the interlocking system, the RBC system replies with an AU2 response data packet to the interlocking system. The interlocking system receives the AU2 parsing data packet sent by the RBC system and A If U2 parsing is successful, the interlocking system sends an AU3 response data packet to the RBC system. After the RBC system receives the AU3 response data packet sent by the interlocking system, the RBC system sends an AR parsing data packet to the interlocking system. After the interlocking system receives the AR parsing data packet sent by the RBC system and the AR parsing is successful, the interlocking system sends an ECstart parsing data packet to the RBC system. After the RBC system receives the ECstart parsing data packet sent by the interlocking system, it sends an ECstart parsing data packet to the interlocking system. After the interlocking system receives the ECstart parsing data packet sent by the RBC system and the ECstart parsing is successful, the security connection is successfully established.
2. The method according to claim 1, characterized in that: The step of authorizing the control right to the interlocking system comprises: Dividing the data of the control right into first to fifth byte segments; Fill in the communication data frame header in the first byte segment, fill in the current master status information, master control status information, and abandonment of master control status information in the second byte segment, fill in the preset CRC value in the third byte segment, fill in the data length in the fourth byte segment, and fill in the communication data frame tail in the fifth byte segment; The data of the first to fifth byte segments are packaged to realize the packaging of the control right data, and sent to the interlocking standby system to authorize the control right to the interlocking standby system.
3. The method according to claim 1, characterized in that After taking back the control of the interlocking system, the method further includes: After an interval of a second preset time, the preset safety connection is re-established with the RBC system according to the control right until the interlocking main system successfully establishes the preset safety connection, wherein before the interlocking main system successfully establishes the preset safety connection, it is prohibited to authorize the control right to the interlocking backup system.
4. The method according to any one of claims 1 to 3, characterized in that: The interlocking machine includes an interlocking machine host and an interlocking machine standby machine, and when it is detected that the preset safety connection state established between the interlocking master system and the RBC system is in a preset good state, it also includes: The interlocking machine host sends a safety protocol data packet to the RBC system through the railway signal safety communication protocol, and at the same time sends the safety protocol data packet to the interlocking machine standby machine, wherein the interlocking machine standby machine is used to synchronize the safety protocol data packet and application data sent by the interlocking machine host.
5. A communication recovery method between an interlocking system and an RBC system, characterized in that: The interlocking machine in the interlocking system includes an interlocking main system and an interlocking backup system. The interlocking main system has the control right to establish a preset safety connection with the radio block center RBC system. The master and backup states of the interlocking machine are separated from the master control right to establish a safety connection with the RBC system. During the period when the safety connection is disconnected and the TCP connection is normal, the master state of the interlocking machine and the master control right to establish a safety connection with the RBC are unified in the interlocking main system. At the same time, the master control right to establish a safety connection with the RBC system is switched between the interlocking main system and the interlocking backup system. The method is applied to the interlocking backup system and includes the following steps: Obtain the control right authorized by the interlocking main system; use the control right to re-establish the preset safety connection with the RBC system, and detect whether the interlocking backup system fails to establish the preset safety connection; wherein, when it is detected that the preset safety connection of the interlocking main system is disconnected, determine whether the current state of the interlocking main system and the current state of the interlocking backup system meet the separation condition of the control right, wherein the determination of whether the current state of the interlocking main system and the current state of the interlocking backup system meet the separation condition of the control right includes: using the control right to re-establish the preset safety connection with the RBC system, and determining whether the interlocking main system establishes the preset safety connection The preset security connection fails; if the interlocking main system fails to establish the preset security connection, detect whether the transmission control protocol TCP connection of the interlocking main system is in a preset normal state and whether the interlocking standby system is in a preset hot standby state; when it is detected that the TCP connection of the interlocking main system is in a preset normal state and the security link is not established, and the interlocking standby system is in a preset hot standby state, determine that the separation condition of the control right is met, otherwise determine that the separation condition of the control right is not met, and the interlocking main system still has the control right, if the separation condition of the control right is met, separate the control right of the interlocking main system, and authorize the control right to the interlocking standby system; When the interlocking standby system fails to establish the preset safety connection, the interlocking master system takes back the control right of the interlocking standby system. If the interlocking standby system has the control right and successfully establishes communication, a preset dual-machine switching action is performed, wherein the judging whether the interlocking standby system fails to establish the preset safety connection includes: when it is detected that the interlocking standby system cannot establish the preset safety connection with the RBC system for a period longer than a first preset period, judging that the interlocking standby system fails to establish the preset safety connection; Among them, the interlocking main system and the interlocking standby system establish a secure connection with the RBC system after having control. If the TCP connection status is good, AU1 has been sent, AU2 parsing is successful, AU3 has been sent, AR parsing is successful, ECstart is sent successfully and ECstart parsing is successful, then the secure connection is successfully established. Among them, after identifying that the TCP connection status of the interlocking system is good, the interlocking system sends an AU1 establishment request data packet to the RBC system. After the RBC system receives the AU1 establishment request data packet sent by the interlocking system, the RBC system replies with an AU2 response data packet to the interlocking system. The interlocking system receives the AU2 parsing data packet sent by the RBC system and A If U2 parsing is successful, the interlocking system sends an AU3 response data packet to the RBC system. After the RBC system receives the AU3 response data packet sent by the interlocking system, the RBC system sends an AR parsing data packet to the interlocking system. After the interlocking system receives the AR parsing data packet sent by the RBC system and the AR parsing is successful, the interlocking system sends an ECstart parsing data packet to the RBC system. After the RBC system receives the ECstart parsing data packet sent by the interlocking system, it sends an ECstart parsing data packet to the interlocking system. After the interlocking system receives the ECstart parsing data packet sent by the RBC system and the ECstart parsing is successful, the security connection is successfully established.
6. The method according to claim 5, characterized in that The obtaining of the control right authorized by the interlocking master system includes: Receive the control right data sent by the interlocking master system and initialize CRC16; When it is detected that the length of the control right data is a preset length and the preset security connection is not established, the data is verified using the CRC16, and data parsing is performed after the data verification passes; During data analysis, check whether the master-slave status, working status and neighboring system are in the master control status and master use status of the system. When the master-slave status and working status of the system meet the authorization conditions and the neighboring system is in the master control status and master use status, determine that the control right data analysis is successful, authorize the control right of the interlocking standby system, and send the control right status of the interlocking standby system to the neighboring system.
7. An interlocking system, characterized in that: The interlocking system comprises an interlocking machine, wherein the interlocking machine comprises: An interlocking main system, wherein the interlocking main system has the control right to establish a preset safety connection with the wireless block center RBC system, and the master-standby state of the interlocking machine is separated from the master control right to establish a safety connection with the RBC system, and is used for a period when the safety connection is disconnected and the TCP connection is normal. In other stages, the master state of the interlocking machine and the master control right to establish a safety connection with the RBC are unified in the interlocking main system. At the same time, the master control right to establish a safety connection with the RBC system is switched between the interlocking main system and the interlocking standby system; and when it is detected that the preset safety connection established between the interlocking main system and the RBC system is disconnected, it is determined whether the current state of the interlocking main system and the current state of the interlocking standby system meet the separation condition for separating the control right, wherein the determination of whether the current state of the interlocking main system and the current state of the interlocking standby system meet the separation condition for the control right includes: using the control right to re-establish the preset safety connection with the RBC system, and determining whether the interlocking main system has established the preset safety connection with the RBC system. The preset security connection fails; if the interlocking main system fails to establish the preset security connection, detect whether the transmission control protocol TCP connection of the interlocking main system is in a preset normal state and whether the interlocking standby system is in a preset hot standby state; when it is detected that the TCP connection of the interlocking main system is in a preset normal state and the security link is not established, and the interlocking standby system is in a preset hot standby state, determine that the separation condition of the control right is met, otherwise determine that the separation condition of the control right is not met, and the interlocking main system still has the control right; if the separation condition of the control right is met, separate the control right of the interlocking main system, and authorize the control right to the interlocking standby system, wherein the judgment of whether the interlocking main system fails to establish the preset security connection includes: when it is detected that the time length for which the interlocking main system cannot establish the preset security connection with the RBC system is greater than a first preset time length, determine that the interlocking main system fails to establish the preset security connection; The interlocking standby system uses the control right to re-establish the preset safety connection with the RBC system, and when the interlocking standby system fails to establish the preset safety connection, the interlocking master system takes back the control right of the interlocking standby system, and if the interlocking standby system has the control right to establish communication successfully, a preset dual-machine switching action is performed, wherein the judging whether the interlocking standby system fails to establish the preset safety connection includes: when it is detected that the interlocking standby system cannot establish the preset safety connection with the RBC system for a period longer than a first preset period, judging that the interlocking standby system fails to establish the preset safety connection; Among them, the interlocking main system and the interlocking standby system establish a secure connection with the RBC system after having control. If the TCP connection status is good, AU1 has been sent, AU2 parsing is successful, AU3 has been sent, AR parsing is successful, ECstart is sent successfully and ECstart parsing is successful, then the secure connection is successfully established. Among them, after identifying that the TCP connection status of the interlocking system is good, the interlocking system sends an AU1 establishment request data packet to the RBC system. After the RBC system receives the AU1 establishment request data packet sent by the interlocking system, the RBC system replies with an AU2 response data packet to the interlocking system. The interlocking system receives the AU2 parsing data packet sent by the RBC system and A If U2 parsing is successful, the interlocking system sends an AU3 response data packet to the RBC system. After the RBC system receives the AU3 response data packet sent by the interlocking system, the RBC system sends an AR parsing data packet to the interlocking system. After the interlocking system receives the AR parsing data packet sent by the RBC system and the AR parsing is successful, the interlocking system sends an ECstart parsing data packet to the RBC system. After the RBC system receives the ECstart parsing data packet sent by the interlocking system, it sends an ECstart parsing data packet to the interlocking system. After the interlocking system receives the ECstart parsing data packet sent by the RBC system and the ECstart parsing is successful, the security connection is successfully established.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the communication recovery method between the interlocking system and the RBC system as described in any one of claims 1 to 6.
