Master-slave switching control method and device for central control unit of rail vehicle
By acquiring the location number, master-slave status, and communication status of the central control unit of the rail vehicle, and switching according to a preset strategy, the problem of functional loss of control when the central control unit fails in the prior art is solved, realizing fast and accurate master-slave switching and ensuring the stability of the train control system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CRRC QINGDAO SIFANG CO LTD
- Filing Date
- 2023-12-29
- Publication Date
- 2026-06-26
Smart Images

Figure CN117565928B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rail vehicle control technology, and in particular to a master-slave switching control method and device for a central control unit of a rail vehicle. Background Technology
[0002] The Train Control and Management System (TCMS) of rail vehicles typically adopts a hot standby redundancy configuration, which usually uses two redundant Central Control Units (CCUs). One of them is selected as the logic control host through a competition mechanism, which is responsible for controlling the relevant functions of the vehicle (communication, control, diagnosis, display, etc.), while the other CCU serves as a backup host.
[0003] In the event of a failure of one of the CCUs, in order to ensure the normal operation of the rail vehicle, one CCU is always required to act as the logic control host to control the vehicle. In related technologies, there is a lack of accurate and timely solutions for master-slave judgment and switching between the two CCUs. If the CCU acting as the logic control host fails, and the logic control host cannot be switched in a timely and accurate manner, it will have an adverse impact on the vehicle's communication, control, diagnosis, display and other functions. Summary of the Invention
[0004] This invention provides a master-slave switching control method and device for a central control unit (CCU) of a rail vehicle, which solves the deficiency in the prior art of lacking an accurate and timely scheme for master-slave judgment and switching between two CCUs. It enables the rapid and accurate activation of another CCU as the logic control master when the CCU acting as the logic control master fails, thereby preventing the loss of control of related functions of the rail vehicle.
[0005] This invention provides a master-slave switching control method for a central control unit of a rail vehicle, comprising:
[0006] Obtain the location numbers of the local central control unit and the remote central control unit in the rail vehicle;
[0007] Obtain the master-slave status of the local central control unit, and obtain the master-slave status and communication status of the remote central control unit;
[0008] Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status and location number of the remote central control unit, the master-slave status of the local central control unit and the remote central control unit are switched according to a preset master-slave switching strategy.
[0009] According to the present invention, a master-slave switching control method for a central control unit of a rail vehicle further includes, before switching the master-slave state of the local central control unit and the remote central control unit according to a preset master-slave switching strategy:
[0010] Acquire first service data of a preset type sent by an external monitoring system, and acquire second service data of a preset type sent by the remote central control unit.
[0011] According to the present invention, a master-slave switching control method for a central control unit of a rail vehicle includes a preset master-slave switching strategy comprising branch strategies for the following scenarios:
[0012] Scenario 1: When the local central control unit is not set to master-slave status, determine the communication status of the remote central control unit;
[0013] In the event of an abnormal communication status at the remote central control unit, the local central control unit will be designated as the master logic control unit.
[0014] If the communication status of the remote central control unit is normal and the remote central control unit is not set to master-slave status, the one with the larger position number between the local central control unit and the remote central control unit shall be set as the master logic control unit and the other as the slave logic control unit.
[0015] If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit has been set to master logic control unit, then the local central control unit is set to slave logic control unit.
[0016] If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit has been set to slave logic control unit, then the local central control unit is set as master logic control unit.
[0017] Scenario 2: When the master-slave status of the local central control unit has been set to slave logical control unit, determine the communication status of the remote central control unit and the status of the second service data;
[0018] In the event of an abnormal communication status and / or an abnormal second service data in the remote central control unit, the local central control unit shall be set as the main logic control unit.
[0019] If the communication status and the second service data of the remote central control unit are normal, and the remote central control unit is not set to master-slave status or is set to slave logic control unit, then the local central control unit is set to master logic control unit.
[0020] If the communication status and the second service data of the remote central control unit are normal, and the master-slave status of the remote central control unit is set to the master logic control unit, the master-slave status of the local central control unit remains unchanged.
[0021] Scenario 3: When the master-slave status of the local central control unit has been set to master logic control unit, determine the communication status of the remote central control unit;
[0022] When the communication status is normal, the one with the larger position number between the local central control unit and the remote central control unit is set as the master logic control unit, and the other is set as the slave logic control unit.
[0023] In the event of an abnormal communication status, the master-slave status of the local central control unit remains unchanged.
[0024] According to the present invention, a master-slave switching control method for a central control unit of a rail vehicle is provided, wherein the communication status is represented by a life signal, and when the remote central control unit is in the start state, the life signal changes at a preset first time period.
[0025] According to a master-slave switching control method for a central control unit of a rail vehicle provided by the present invention, determining the communication status of the remote central control unit includes:
[0026] If the life signal is not obtained, or if the obtained life signal does not change within a preset second time period, the communication status is determined to be abnormal; the second time period is longer than the first time period.
[0027] If the life signal is obtained and the life signal changes within a predetermined number of consecutive first time periods, the communication status is determined to be normal.
[0028] According to the present invention, a master-slave switching control method for a central control unit of a rail vehicle determines the status of the second service data, including:
[0029] If the first business data changes within a preset third time period, and the second business data does not change within the preset third time period, the second business data is determined to be abnormal.
[0030] If the changes in the first business data and the second business data are consistent within a preset third time period, the second business data is determined to be normal.
[0031] According to the present invention, a master-slave switching control method for a central control unit of a rail vehicle further includes, before acquiring the master-slave status and communication status of the remote central control unit:
[0032] Initialize the communication module to establish a communication connection with the remote central control unit.
[0033] According to the present invention, a master-slave switching control method for a central control unit of a rail vehicle is provided, wherein the location numbers of the local central control unit and the remote central control unit correspond to the carriage number where the local central control unit is located and the carriage number where the remote central control unit is located, respectively.
[0034] The present invention also provides a master-slave switching control device for a central control unit of a rail vehicle, comprising:
[0035] The location information acquisition module is used to acquire the location numbers of the local central control unit and the remote central control unit in the rail vehicle;
[0036] The communication transmission module is used to obtain the master-slave status of the local central control unit, and to obtain the master-slave status and communication status of the remote central control unit.
[0037] The master-slave switching module is used to switch the master-slave status of the local central control unit and the remote central control unit according to a preset master-slave switching strategy, based on the master-slave status and the location number of the local central control unit, and based on the master-slave status, the communication status and the location number of the remote central control unit.
[0038] The present invention also provides an electronic device, including 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 steps of the master-slave switching control method of the central control unit for rail vehicles as described above.
[0039] The present invention provides a method and apparatus for master-slave switching control of a central control unit in a rail vehicle. This method acquires the location numbers of the local central control unit and the remote central control unit in the rail vehicle, obtains the master-slave status of the local central control unit, and obtains the master-slave status and communication status of the remote central control unit. Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status, and location number of the remote central control unit, the method switches the master-slave status of the local and remote central control units according to a preset master-slave switching strategy. This enables rapid and accurate master-slave switching of the other central control unit in the event of a failure of a single central control unit, based on the location numbers, master-slave status, and communication status of the two central control units. This ensures that at least one logical control host in the train control and management system is always functioning normally, preventing the loss of control over the vehicle's communication, control, diagnostic, and display functions. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0041] Figure 1 This is one of the flowcharts of the master-slave switching control method for the central control unit of a rail vehicle provided by the present invention;
[0042] Figure 2 This is the second flowchart of the master-slave switching control method for the central control unit of a rail vehicle provided by the present invention;
[0043] Figure 3 This is a schematic diagram of the master-slave switching control device for the central control unit of a rail vehicle provided by the present invention;
[0044] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention.
[0045] Figure label:
[0046] 1. Location information acquisition module; 2. Communication transmission module; 3. Master-slave switching module. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0048] The following is combined with Figure 1 and Figure 2 This invention describes the master-slave switching control method for the central control unit of a rail vehicle.
[0049] like Figure 1 As shown, the master-slave switching control method for the central control unit of a rail vehicle provided by the present invention includes:
[0050] S1. Obtain the location numbers of the local central control unit and the remote central control unit in the rail vehicle.
[0051] Specifically, the local central control unit is the central control unit that executes the master-slave switching control method of the rail vehicle central control unit. For either of the two central control units in the train control and management system, it is the local central control unit, while the other is the remote central control unit.
[0052] In one optional embodiment of this application, the location numbers of the local central control unit and the remote central control unit correspond to the carriage numbers of the local central control unit and the remote central control unit, respectively. Assuming the rail vehicle comprises 8 carriages, numbered 1 to 8, one central control unit is located in carriage 1 (location number 1), and the other central control unit is located in carriage 8 (location number 8). For the central control unit with location number 1, it is itself the local central control unit, and the central control unit with location number 8 is the remote central control unit; conversely, for the central control unit with location number 8, it is itself the local central control unit, and the central control unit with location number 1 is the remote central control unit.
[0053] S2. Obtain the master-slave status of the local central control unit, and obtain the master-slave status and communication status of the remote central control unit.
[0054] Specifically, the master-slave status includes three situations: no master-slave status, master logic control unit, and slave logic control unit. The master logic control unit corresponds to the aforementioned logic control host, and the slave logic control unit corresponds to the aforementioned backup host.
[0055] In this step, it is necessary to obtain the master-slave status of the two CCUs in the train control and management system. At the same time, the CCU, which is the local central control unit, also needs to obtain the communication status of the other CCU for subsequent master-slave switching judgment.
[0056] In an optional embodiment of the present invention, before obtaining the master-slave status and communication status of the remote central control unit, it is necessary to initialize the communication module in the CCU and establish a communication connection between the local central control unit and the remote central control unit. Preferably, a multifunction vehicle bus (MVB) or Ethernet can be used for communication.
[0057] In an optional embodiment of the present invention, the communication status of the remote central control unit is indicated by a life signal. When the remote central control unit is in an active state, the life signal can change at a preset first time period, for example, at a period of 200 milliseconds. Under normal communication conditions, the local central control unit can obtain the life signal sent by the remote central control unit.
[0058] S3. Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status and location number of the remote central control unit, switch the master-slave status of the local central control unit and the remote central control unit according to the preset master-slave switching strategy.
[0059] In an optional embodiment of the present invention, before switching the master-slave status of the local central control unit and the remote central control unit according to a preset master-slave switching strategy in step S3, the method further includes: acquiring first service data of a preset type sent by an external monitoring system, and acquiring second service data of a preset type sent by the remote central control unit. The first and second service data are both similar data related to the operation of the rail vehicle. For example, the first and second service data could be vehicle speed data sent by the rail vehicle's traction and braking system, and both the master logic control unit and the slave logic control unit can obtain the vehicle speed data from the traction and braking system.
[0060] Specifically, such as Figure 2 As shown, Figure 2 CCUL represents the local central control unit, CCUR represents the remote central control unit, master setting means setting it as the master logic control unit, slave setting means setting it as the slave logic control unit, and not setting means not setting the master-slave status.
[0061] The preset master-slave switching strategies include branching strategies for the following three scenarios:
[0062] Scenario 1: Determine the communication status of the remote central control unit when the local central control unit is not configured with a master-slave status:
[0063] In the event of an abnormal communication status at the remote central control unit, the local central control unit will be set as the master logic control unit.
[0064] If the communication status of the remote central control unit is normal and the remote central control unit is not set to master-slave status, set the one with the larger position number between the local central control unit and the remote central control unit as the master logic control unit and the other as the slave logic control unit (for example, if the position number of the local central control unit is 8 and the position number of the remote central control unit is 1, then set the local central control unit as the master logic control unit and the remote central control unit as the slave logic control unit).
[0065] If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit is set to master logic control unit, then set the local central control unit to slave logic control unit.
[0066] If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit has been set to slave logic control unit, then set the local central control unit as master logic control unit.
[0067] Scenario 2: When the master-slave status of the local central control unit has been set to slave logical control unit, determine the communication status of the remote central control unit and the status of the second service data.
[0068] In the event of abnormal communication status and / or abnormal second service data of the remote central control unit, the local central control unit will be set as the main logic control unit.
[0069] If the communication status and second service data of the remote central control unit are normal, and the remote central control unit is not set to master-slave status or is set to slave logic control unit, then the local central control unit will be set to master logic control unit.
[0070] If the communication status and second service data of the remote central control unit are normal, and the master-slave status of the remote central control unit is set to master logic control unit, the master-slave status of the local central control unit remains unchanged.
[0071] Scenario 3: When the master-slave status of the local central control unit is set to master logic control unit, determine the communication status of the remote central control unit:
[0072] Under normal communication conditions, the one with the larger position number between the local central control unit and the remote central control unit is designated as the master logic control unit, and the other is designated as the slave logic control unit.
[0073] In the event of an abnormal communication status, the master-slave status of the local central control unit remains unchanged.
[0074] In the master-slave switching strategy described above, the communication status of the remote central control unit is determined as follows:
[0075] (1) If the local central control unit does not acquire a life signal, or if the acquired life signal does not change within a preset second time period, the communication status is determined to be abnormal. The second time period is longer than the first time period. For example, the duration of the second time period can be set to eight times the duration of the first time period. That is, if the acquired life signal does not change within eight consecutive first periods, the communication status can be determined to be abnormal.
[0076] (2) If a life signal is received and the life signal changes within a predetermined number of consecutive first time periods, the communication status is determined to be normal. For example, if the life signal changes within three consecutive first time periods, the communication status can be determined to be normal.
[0077] In the master-slave switching strategy described above, the status of the second business data is determined as follows:
[0078] (1) If the first business data changes within a preset third time period, and the second business data does not change within the preset third time period, the second business data is determined to be abnormal. Taking vehicle speed data as the second business data as an example, assuming that the vehicle speed data obtained by the local central control unit from the traction braking system changes within 5 seconds, while the vehicle speed data obtained by the local central control unit from the remote central control unit does not change within 5 seconds, the second business data is determined to be abnormal. It should be understood that the present invention does not limit the specific type of the second business data or the length of the third time period, and can be set according to the actual situation.
[0079] (2) If the changes in the first business data and the second business data are consistent within the preset third time period, the second business data is determined to be normal.
[0080] In summary, the master-slave switching control method for the central control unit of a rail vehicle provided by this invention obtains the location numbers of the local central control unit and the remote central control unit in the rail vehicle, obtains the master-slave status of the local central control unit, and obtains the master-slave status and communication status of the remote central control unit. Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status, and location number of the remote central control unit, the master-slave status of the local central control unit and the remote central control unit are switched according to a preset master-slave switching strategy. This enables rapid and accurate master-slave switching of the other central control unit in the event of a failure of a single central control unit, based on the location numbers, master-slave status, and communication status of the two central control units. This ensures that there is always a logical control host working normally in the train control and management system, and avoids the loss of control over the vehicle's communication, control, diagnostic, display, and other related functions.
[0081] Based on the same inventive concept, the present invention also provides a master-slave switching control device for a central control unit of a rail vehicle. The master-slave switching control device for a central control unit of a rail vehicle provided by the present invention is described below. The master-slave switching control device for a central control unit of a rail vehicle described below can be referred to in correspondence with the master-slave switching control method for a central control unit of a rail vehicle described above.
[0082] like Figure 3 As shown, the master-slave switching control device for the central control unit of a rail vehicle provided by the present invention includes a position information acquisition module 31, a communication transmission module 32, and a master-slave switching module 33.
[0083] The location information acquisition module 31 is used to acquire the location numbers of the local central control unit and the remote central control unit in the rail vehicle.
[0084] The communication transmission module 32 is used to obtain the master-slave status of the local central control unit, and to obtain the master-slave status and communication status of the remote central control unit.
[0085] The master-slave switching module 33 is used to switch the master-slave status of the local central control unit and the remote central control unit according to a preset master-slave switching strategy, based on the master-slave status and the location number of the local central control unit, and based on the master-slave status, the communication status and the location number of the remote central control unit.
[0086] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute any of the above-mentioned master-slave switching control methods for the central control unit of a rail vehicle, the method including:
[0087] Obtain the location numbers of the local central control unit and the remote central control unit in the rail vehicle.
[0088] Obtain the master-slave status of the local central control unit, and obtain the master-slave status and communication status of the remote central control unit.
[0089] Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status and location number of the remote central control unit, the master-slave status of the local central control unit and the remote central control unit are switched according to a preset master-slave switching strategy.
[0090] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0091] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, wherein when the program instructions are executed by a computer, the computer is capable of executing any of the above-described master-slave switching control methods for a central control unit of a rail vehicle, the method comprising:
[0092] Obtain the location numbers of the local central control unit and the remote central control unit in the rail vehicle.
[0093] Obtain the master-slave status of the local central control unit, and obtain the master-slave status and communication status of the remote central control unit.
[0094] Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status and location number of the remote central control unit, the master-slave status of the local central control unit and the remote central control unit are switched according to a preset master-slave switching strategy.
[0095] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-described master-slave switching control methods for a central control unit of a rail vehicle, the method comprising:
[0096] Obtain the location numbers of the local central control unit and the remote central control unit in the rail vehicle.
[0097] Obtain the master-slave status of the local central control unit, and obtain the master-slave status and communication status of the remote central control unit.
[0098] Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status and location number of the remote central control unit, the master-slave status of the local central control unit and the remote central control unit are switched according to a preset master-slave switching strategy.
[0099] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0100] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A master-slave switching control method for a central control unit of a rail vehicle, characterized in that, include: Obtain the location numbers of the local central control unit and the remote central control unit in the rail vehicle; Obtain the master-slave status of the local central control unit, and obtain the master-slave status and communication status of the remote central control unit; Based on the master-slave status and location number of the local central control unit, and based on the master-slave status, communication status and location number of the remote central control unit, the master-slave status of the local central control unit and the remote central control unit are switched according to a preset master-slave switching strategy. The preset master-slave switching strategy includes branching strategies for the following scenarios: Scenario 1: When the local central control unit is not set to master-slave status, determine the communication status of the remote central control unit; In the event of an abnormal communication status at the remote central control unit, the local central control unit will be designated as the master logic control unit. If the communication status of the remote central control unit is normal and the remote central control unit is not set to master-slave status, the one with the larger position number between the local central control unit and the remote central control unit shall be set as the master logic control unit and the other as the slave logic control unit. If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit has been set to master logic control unit, then the local central control unit is set to slave logic control unit. If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit has been set to slave logic control unit, then the local central control unit is set as master logic control unit. Scenario 2: When the master-slave status of the local central control unit has been set to slave logical control unit, determine the communication status of the remote central control unit and the status of the second service data sent by the remote central control unit. In the event of an abnormal communication status and / or an abnormal second service data in the remote central control unit, the local central control unit shall be set as the main logic control unit. If the communication status and the second service data of the remote central control unit are normal, and the remote central control unit is not set to master-slave status or is set to slave logic control unit, then the local central control unit is set to master logic control unit. If the communication status and the second service data of the remote central control unit are normal, and the master-slave status of the remote central control unit is set to the master logic control unit, the master-slave status of the local central control unit remains unchanged. Scenario 3: When the master-slave status of the local central control unit has been set to master logic control unit, determine the communication status of the remote central control unit; When the communication status is normal, the one with the larger position number between the local central control unit and the remote central control unit is set as the master logic control unit, and the other is set as the slave logic control unit. In the event of an abnormal communication status, the master-slave status of the local central control unit remains unchanged.
2. The master-slave switching control method for the central control unit of a rail vehicle according to claim 1, characterized in that, Before switching the master-slave status of the local central control unit and the remote central control unit according to the preset master-slave switching strategy, the method further includes: Acquire first service data of a preset type sent by an external monitoring system, and acquire second service data of a preset type sent by the remote central control unit.
3. The master-slave switching control method for the central control unit of a rail vehicle according to claim 1, characterized in that, The communication status is represented by a life signal, which changes at a preset first time period when the remote central control unit is in the activated state.
4. The master-slave switching control method for the central control unit of a rail vehicle according to claim 3, characterized in that, Determining the communication status of the remote central control unit includes: If the life signal is not obtained, or if the obtained life signal does not change within a preset second time period, the communication status is determined to be abnormal; the second time period is longer than the first time period. If the life signal is obtained and the life signal changes within a predetermined number of consecutive first time periods, the communication status is determined to be normal.
5. The master-slave switching control method for the central control unit of a rail vehicle according to claim 2, characterized in that, Determining the status of the second business data includes: If the first business data changes within a preset third time period, and the second business data does not change within the preset third time period, the second business data is determined to be abnormal. If the changes in the first business data and the second business data are consistent within a preset third time period, the second business data is determined to be normal.
6. The master-slave switching control method for the central control unit of a rail vehicle according to any one of claims 1-4, characterized in that, Before obtaining the master-slave status and communication status of the remote central control unit, the following steps are also included: Initialize the communication module to establish a communication connection with the remote central control unit.
7. The master-slave switching control method for the central control unit of a rail vehicle according to any one of claims 1-4, characterized in that, The location numbers of the local central control unit and the remote central control unit correspond to the carriage number where the local central control unit is located and the carriage number where the remote central control unit is located, respectively.
8. A master-slave switching control device for a central control unit of a rail vehicle, characterized in that, include: The location information acquisition module is used to acquire the location numbers of the local central control unit and the remote central control unit in the rail vehicle; The communication transmission module is used to obtain the master-slave status of the local central control unit, and to obtain the master-slave status and communication status of the remote central control unit. The master-slave switching module is used to switch the master-slave status of the local central control unit and the remote central control unit according to a preset master-slave switching strategy, based on the master-slave status and the location number of the local central control unit and the master-slave status, the communication status and the location number of the remote central control unit. The preset master-slave switching strategy includes branching strategies for the following scenarios: Scenario 1: When the local central control unit is not set to master-slave status, determine the communication status of the remote central control unit; In the event of an abnormal communication status at the remote central control unit, the local central control unit will be designated as the master logic control unit. If the communication status of the remote central control unit is normal and the remote central control unit is not set to master-slave status, the one with the larger position number between the local central control unit and the remote central control unit shall be set as the master logic control unit and the other as the slave logic control unit. If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit has been set to master logic control unit, then the local central control unit is set to slave logic control unit. If the communication status of the remote central control unit is normal and the master-slave status of the remote central control unit has been set to slave logic control unit, then the local central control unit is set as master logic control unit. Scenario 2: When the master-slave status of the local central control unit has been set to slave logical control unit, determine the communication status of the remote central control unit and the status of the second service data sent by the remote central control unit. In the event of an abnormal communication status and / or an abnormal second service data in the remote central control unit, the local central control unit shall be set as the main logic control unit. If the communication status and the second service data of the remote central control unit are normal, and the remote central control unit is not set to master-slave status or is set to slave logic control unit, then the local central control unit is set to master logic control unit. If the communication status and the second service data of the remote central control unit are normal, and the master-slave status of the remote central control unit is set to the master logic control unit, the master-slave status of the local central control unit remains unchanged. Scenario 3: When the master-slave status of the local central control unit has been set to master logic control unit, determine the communication status of the remote central control unit; When the communication status is normal, the one with the larger position number between the local central control unit and the remote central control unit is set as the master logic control unit, and the other is set as the slave logic control unit. In the event of an abnormal communication status, the master-slave status of the local central control unit remains unchanged.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the master-slave switching control method for the central control unit of a rail vehicle as described in any one of claims 1 to 7.