Data output system and control method of trackside safety platform, electronic equipment and storage medium
By setting the lock and lock values in the main and backup center system of the rail-side safety platform, the problem of data output uniqueness is solved, and the data output control and backup center takeover functions are realized in emergency situations.
Patent Information
- Application Number
- CN202411759678.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-12-03
AI Technical Summary
The prior art cannot effectively ensure the uniqueness of the data output of the main and standby center of the rail-side security platform, resulting in a possible conflict of control in an emergency.
Through the mechanism of setting lock and lock values, it is ensured that only the central module holding the lock is the main central module, and the increase or decrease of the lock value is controlled through the arbitration module, ensuring that only one central module can output data to the outside.
It realizes that only one main center is allowed to output data to the outside in the main and standby center system, avoiding control rights conflicts, and allowing the backup center to take over data output in a timely manner when the main center fails.
Smart Images

Figure CN119389277A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data output control, and in particular to a data output system and control method, electronic equipment, and storage medium for a trackside safety platform. Background Art
[0002] The primary and backup centers are each equipped with a two-by-two safety platform system. If the primary center fails, the backup center can quickly take over and maintain normal system operation. Both the primary and backup centers are responsible for processing the input and output of various protocol messages. The primary center can output data to external systems, while the backup center serves as a redundant system, maintaining synchronization with the primary center and ready to take over in an emergency. The primary and backup centers are transparent to external systems communicating with the trackside safety platform, making it crucial to ensure that only one primary center is outputting data.
[0003] The invention patent with publication number CN112172879A discloses a method for switching between a primary and a backup control center and a rail transit integrated monitoring system. In the present invention, the operating mode is determined by a unique arbitration node in the network, and the determined operating mode is issued to the primary control center, the backup control center and the station node, ensuring that the operating mode is consistent and does not cause a conflict of control rights; the patent receives the operating data uploaded by the primary control center and the backup control center through the arbitration node side and switches the operating mode, but the patent does not solve the uniqueness of the data output of the primary and backup centers.
[0004] Therefore, providing a control method with only one external data output is an issue that is urgently needed to be solved. Summary of the Invention
[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a data output system and control method, electronic equipment and storage medium for a trackside safety platform.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] According to a first aspect of the present invention, a data output system for a trackside safety platform is provided, comprising a main center module, multiple backup center modules, and an arbitration module, wherein the main center module and the backup center modules are respectively in communication with the arbitration module, and each of the main center module and the backup center module comprises an MPU unit, wherein the main center module sends a main center heartbeat, and the backup center module sends a normal heartbeat, and the arbitration module controls system output by sending lock or updating lock value information;
[0008] Among them, if the MPU unit of the backup center module does not receive the heartbeat of the main center, the backup center module sends a normal heartbeat and applies for a lock from the arbitration module. If the lock is received and the lock value is greater than 0, the data is output to the outside, and the lock value is reduced by one after each output; or the arbitration module sends an updated lock value information to the main center module. If the MPU unit of the main center module receives the updated lock value information, the lock value is updated; when the lock value is 0, the output is stopped.
[0009] As a preferred technical solution, the main center module and the backup center module communicate using a high-precision clock synchronization protocol.
[0010] According to a second aspect of the present invention, there is provided a method for controlling a data output system of any of the above-mentioned trackside safety platforms, the method comprising the following steps:
[0011] S1, when the MPU unit of the standby center module enters the first cycle, it determines whether the main center heartbeat sent by the main center module is received;
[0012] S11. If the MPU unit does not receive the heartbeat of the main center, the backup center module to which the MPU unit belongs broadcasts a normal heartbeat and applies for a lock from the arbitration module;
[0013] S12, the arbitration module sends a lock;
[0014] S13. If the MPU unit receives the lock, it determines whether the lock value is greater than 0;
[0015] S14. If the lock value is greater than 0, the main center heartbeat is sent and data is output to the outside. The lock value is reduced by one after each output.
[0016] S2. If the arbitration module receives the heartbeat of the main center, the arbitration module sends the update lock value information to the main center module, and the MPU unit of the main center module receives the update lock value information and updates the lock value.
[0017] As a preferred technical solution, if the MPU unit receives the lock, the backup center module to which the MPU unit belongs becomes the main center module.
[0018] As a preferred technical solution, step S11 further specifically includes:
[0019] S111. If the main center heartbeat is received, the center module to which the MPU unit belongs acts as a backup center module and broadcasts a normal heartbeat.
[0020] As a preferred technical solution, step S13 further specifically includes:
[0021] S131. If the lock is not received, determine whether the master center heartbeat is received.
[0022] As a preferred technical solution, step S14 further specifically includes:
[0023] S141. If the lock value is 0, determine whether the main center heartbeat is received.
[0024] As a preferred technical solution, the process of the arbitration module sending the lock further specifically includes:
[0025] S121, the arbitration module initializes the lock value and assigns the lock value to 0. If the lock value is 0, the lock is allocated;
[0026] S122: After receiving the lock request, the arbitration module determines whether there is a heartbeat from the master center. If the lock value is greater than 0 and the heartbeat from the master center is received, the lock is not allocated.
[0027] As a preferred technical solution, the process of the arbitration module updating the lock value further specifically includes:
[0028] S21. If the arbitration module does not receive the heartbeat from the master center, it subtracts the period m of the lock application from the period n of the last lock value update to obtain a first difference and determines whether the difference is greater than the last updated lock value.
[0029] S211. If the first difference is greater than the last updated lock value, a new lock is allocated.
[0030] S22, the arbitration module periodically detects whether the heartbeat of the master center is received;
[0031] S221. If the heartbeat of the main center is received periodically, the lock value is updated periodically.
[0032] As a preferred technical solution, if the arbitration module does not receive a normal heartbeat sent by the backup center module, an alarm is issued for a communication failure.
[0033] According to a third aspect of the present invention, there is provided an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements any of the above methods when executing the program.
[0034] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program implements any of the above methods when executed by a processor.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] 1. The present invention ensures that only the central module holding the lock is the main central module by setting the lock and lock value. At the same time, data can be output only when the lock value is greater than 0. The lock value minus one is output once every cycle. The lock value of 0 indicates that the lock is reclaimed and data cannot be output. The increase or decrease of the lock value is controlled to control the output.
[0037] 2. In the present invention, when no main central module outputs data externally, the arbitration module can automatically select a central module as the main central module and output data externally.
[0038] 3. When the present invention fails to receive the heartbeat of a central module, it can generate an alarm signal to remind maintenance personnel to restore communication with the center.
[0039] 4. The present invention uses a high-precision time synchronization protocol to keep the backup center module and the main center module in cyclic synchronization; the backup center module synchronously learns the main center data. When the main center module is powered off, the backup center module can take over the main center in time and continue the system's data output. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of the overall structure of the present invention;
[0041] Figure 2 This is a data processing flow chart of the MPU unit of the present invention;
[0042] Figure 3 This is the MPU unit workflow diagram of the central module of the present invention;
[0043] Figure 4 This is a workflow diagram of the arbitration module of the present invention. DETAILED DESCRIPTION
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0045] The primary and backup centers are each equipped with a two-by-two security platform system. If the primary center fails, the backup center can quickly take over and maintain normal system operation. Both the primary and backup centers are responsible for processing the input and output of various protocol messages. The primary center can output data to external systems, while the backup center serves as a redundant system, maintaining synchronization with the primary center and ready to take over in an emergency.
[0046] For external systems communicating with the trackside safety platform, the platform's primary and backup centers are transparent. Ensuring that only one primary center is outputting data is crucial. This paper proposes a method for controlling data output from both primary and backup centers, ensuring that only one primary center is outputting data. In the event of a power outage at the primary center, the backup center can promptly take over data output from the primary center.
[0047] The present invention provides a data output system and control method for a trackside safety platform. The present invention ensures that only the central module holding the lock is the main central module by setting a lock and a lock value. At the same time, data can be output only when the lock value is greater than 0. The lock value minus one is output once per cycle. A lock value of 0 indicates that the lock is retracted and data cannot be output. The lock and the increase or decrease of the lock value are controlled to control the output. When the main central module does not output data to the outside, the arbitration module of the present invention can automatically select a central module as the main central module and output data to the outside. When the heartbeat of a central module is not received, the present invention can generate an alarm signal to remind maintenance personnel to restore communication with the center. The present invention uses a high-precision time synchronization protocol to keep the backup central module and the main central module in cyclic synchronization. The backup central module synchronously learns the main central data. When the main central module is powered off, the backup central module can take over the main center in time and continue the system's data output.
[0048] Example 1
[0049] like Figure 1 and Figure 2 As shown, a data output system for a trackside safety platform includes a main center module, multiple backup center modules, and an arbitration module. The main center module and the backup center modules are respectively connected to the arbitration module for communication. The main center module and the backup center modules each include an MPU unit. The main center module sends a main center heartbeat, and the backup center module sends a normal heartbeat. The arbitration module controls the system output by sending lock or updating lock value information.
[0050] Among them, if the MPU unit of the backup center module does not receive the heartbeat of the main center, the backup center module sends a normal heartbeat and applies for a lock from the arbitration module. If the lock is received and the lock value is greater than 0, the data is output to the outside, and the lock value is reduced by one after each output; or the arbitration module sends an updated lock value information to the main center module. If the MPU unit of the main center module receives the updated lock value information, the lock value is updated; when the lock value is 0, the output is stopped.
[0051] The main center module and the backup center module communicate using a high-precision clock synchronization protocol.
[0052] In this embodiment, it includes a main center module, multiple backup center modules and an arbitration module. The arbitration module adopts a distributed arbitration module. The backup center module with a lock is the main center module. There is only one main center module in the system. Only the main center module can send the main center heartbeat, and the backup center module sends a normal heartbeat. The main center module, the backup center module and the arbitration module are connected by an internal high-performance network.
[0053] The main center module and the backup center module each have a two-by-two system, including dual-system computing board MPU units and communication units. The two-by-two system is connected by a high-speed bus, and the two systems maintain tick-level clock synchronization. When the data of the two systems is out of sync, the main system sends synchronization data to the backup system, and the backup system maintains data synchronization with the main system. The main center module and the backup center module communicate using a high-precision clock synchronization protocol to maintain periodic clock synchronization. The main center module periodically sends synchronization data to the backup center, and the backup center module periodically educates the synchronization data. The arbitration module is used to determine the main center module and the backup center module, and through a locking mechanism, controls that only one center module can output data to the external system.
[0054] Both the primary and backup modules are connected to external systems and periodically process input and output data. However, only the primary module can output data to external systems. Furthermore, the primary module periodically sends synchronization data to the backup module, which then periodically synchronizes data. The backup module maintains periodic clock synchronization with the primary module, allowing both systems to perform normal input and output processing while maintaining synchronized data. In the event of a primary module failure, the backup module can be activated, upgraded to the primary module, and output data promptly.
[0055] Example 2
[0056] like Figure 3 and Figure 4 As shown, a control method for a data output system of a trackside safety platform comprises the following steps:
[0057] S1, when the MPU unit of the standby center module enters the first cycle, it determines whether the main center heartbeat sent by the main center module is received;
[0058] S11. If the MPU unit does not receive the heartbeat of the main center, the backup center module to which the MPU unit belongs broadcasts a normal heartbeat and applies for a lock from the arbitration module;
[0059] S12, the arbitration module sends a lock;
[0060] S13. If the MPU unit receives the lock, it determines whether the lock value is greater than 0;
[0061] S14. If the lock value is greater than 0, the main center heartbeat is sent and data is output to the outside. The lock value is reduced by one after each output.
[0062] S2. If the arbitration module receives the heartbeat of the main center, the arbitration module sends the update lock value information to the main center module, and the MPU unit of the main center module receives the update lock value information and updates the lock value.
[0063] If the MPU unit receives the lock, the backup center module to which the MPU unit belongs becomes the main center module.
[0064] The step S11 further specifically includes:
[0065] S111. If the main center heartbeat is received, the center module to which the MPU unit belongs acts as a backup center module and broadcasts a normal heartbeat.
[0066] The step S13 further specifically includes:
[0067] S131. If the lock is not received, determine whether the master center heartbeat is received.
[0068] The step S14 further specifically includes:
[0069] S141. If the lock value is 0, determine whether the main center heartbeat is received.
[0070] The process of the arbitration module sending the lock further specifically includes:
[0071] S121, the arbitration module initializes the lock value and assigns the lock value to 0. If the lock value is 0, the lock is allocated;
[0072] S122: After receiving the lock request, the arbitration module determines whether there is a heartbeat from the master center. If the lock value is greater than 0 and the heartbeat from the master center is received, the lock is not allocated.
[0073] The process of the arbitration module updating the lock value further specifically includes:
[0074] S21. If the arbitration module does not receive the heartbeat from the master center, it subtracts the period m of the lock application from the period n of the last lock value update to obtain a first difference and determines whether the difference is greater than the last updated lock value.
[0075] S211. If the first difference is greater than the last updated lock value, a new lock is allocated.
[0076] S22, the arbitration module periodically detects whether the heartbeat of the master center is received;
[0077] S221. If the heartbeat of the main center is received periodically, the lock value is updated periodically.
[0078] If the arbitration module does not receive the normal heartbeat sent by the backup center module, it will alarm the communication failure.
[0079] In this embodiment, the workflow of the MPU unit is as follows:
[0080] After each core module is initialized and started, the MPU should determine whether it has received the heartbeat of the main core when entering the first main cycle;
[0081] If received, the central module acts as a backup central module and broadcasts a common heartbeat HB_Common(n,current_ticks) with the current cycle n and the current tick count value, maintaining communication connections with the distributed arbitration points and other centers;
[0082] If the heartbeat of the master center is not received, it means that there may be no master center in the system. The normal heartbeat is broadcast and the lock ReqLock (n, current_ticks) is applied to the distributed arbitration point.
[0083] If the lock is not received, continue to determine whether the main center heartbeat is received.
[0084] If the lock is received, check whether the lock value is greater than 0 (the lock value is greater than 0 when the lock is allocated for the first time). If it is 0, it means the lock has been reclaimed. Continue to check whether the heartbeat of the main center is received and return to step 2.
[0085] If the lock value is greater than 0, the main center heartbeat HB_Active(n,current_ticks) is issued. When the lock value is greater than 0, data can be output to the external system. The lock value should be reduced by one after each cycle of output. After the lock value is reduced to 0, it will no longer be reduced.
[0086] If a lock value update UpdateLock(p, lockValue) is received from a distributed arbitration point, the lock value should be updated. Starting from period p, the lock can be held for lockValue periods.
[0087] The workflow of the arbitration module includes the following steps:
[0088] The process of sending and allocating locks: The distributed arbitration point initializes the lock value to 0; after receiving the lock request, it should determine whether the system has a master center; if the arbitration point lock value is 0, it means that the system has just started and there is no master center, so the lock can be allocated; if the lock value is greater than 0, it is determined whether the master center heartbeat is received periodically; if so, the lock is not allocated.
[0089] The process of updating the lock value: If the heartbeat of the main center is not received, determine whether the difference between the period m of the lock application and the period n of the last lock value update is greater than the last updated lock value. If it is, it means that the last updated lock value is 0 in period m, and the old lock can be reclaimed. A new lock AllocateLock(p,lockValue) is allocated, and the allocation period p and the corresponding lock value lockValue (lockValue, the number of periods for holding the lock, determined by the system communication tolerance time, the main center can hold the lock for lockValue periods starting from period p); the distributed arbitration point should periodically check whether the heartbeat HB_Active(n,current_ticks) of the main center is received. If it is received, the lock value UpdateLock(p,lockValue) is periodically updated, and the allocation period p and the corresponding lockValue are brought in and sent to the main center for update.
[0090] If a heartbeat is not received from a certain center, a communication failure alarm should be issued to remind maintenance personnel to restore communication with the center. The allocation period p is generally assigned to the application lock period m. The current_ticks in the heartbeat or application can be used to assist in adjusting the allocation lock value period p (one period has k ticks).
[0091] Example 3
[0092] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the above methods when executing the program.
[0093] A computer-readable storage medium stores a computer program, wherein the program, when executed by a processor, implements any of the above methods.
[0094] In this embodiment, those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0095] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0096] Multiple components in the device are connected to the I / O interface, including: input units, such as a keyboard, mouse, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as magnetic disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices via computer networks such as the Internet and / or various telecommunications networks. The processing unit performs the various methods and processes described above, such as the method of the present invention. For example, in some embodiments, the method of the present invention can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program can be loaded and / or installed onto the device via ROM and / or the communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of the method of the present invention described above can be performed. Alternatively, in other embodiments, the CPU can be configured to perform the method of the present invention by any other suitable means (e.g., by means of firmware).
[0097] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0098] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0099] In the context of the present invention, machine-readable medium can be a tangible medium that can contain or store a program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0100] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A data output system for a trackside safety platform, comprising a main center module, a plurality of backup center modules and an arbitration module, wherein the main center module and the backup center module are respectively connected to the arbitration module for communication, and the main center module and the backup center module both comprise an MPU unit, the main center module sends a main center heartbeat, and the backup center module sends a common heartbeat, characterized in that: The arbitration module controls the system output by sending lock or updating lock value information; Among them, if the MPU unit of the backup center module does not receive the heartbeat of the main center, the backup center module sends a normal heartbeat and applies for a lock from the arbitration module. If the lock is received and the lock value is greater than 0, the data is output to the outside, and the lock value is reduced by one after each output; or the arbitration module sends an update lock value information to the main center module. If the MPU unit of the main center module receives the update lock value information, the lock value is updated; when the lock value is 0, the output is stopped.
2. A data output system for a trackside safety platform according to claim 1, characterized in that: The main central module and the backup central module communicate with each other using a high-precision clock synchronization protocol.
3. A control method for a data output system of a trackside safety platform according to any one of claims 1-2, characterized in that: The method comprises the following steps: S1, when the MPU unit of the standby center module enters the first cycle, it determines whether the main center heartbeat sent by the main center module is received; S11, if the MPU unit does not receive the heartbeat of the main center, the standby center module to which the MPU unit belongs broadcasts a normal heartbeat and applies for a lock from the arbitration module; S12, the arbitration module sends a lock; S13. If the MPU unit receives the lock, it determines whether the lock value is greater than 0; S14. If the lock value is greater than 0, the main center heartbeat is sent out and data is output to the outside. The lock value is reduced by one after each output. S2. If the arbitration module receives the heartbeat of the main center, the arbitration module sends the update lock value information to the main center module, and the MPU unit of the main center module receives the update lock value information and updates the lock value.
4. The control method according to claim 3, characterized in that: If the MPU unit receives the lock, the backup center module to which the MPU unit belongs becomes the main center module.
5. The control method according to claim 3, characterized in that: The step S11 further specifically includes: S111. If the main center heartbeat is received, the center module to which the MPU unit belongs acts as a backup center module and broadcasts a normal heartbeat.
6. The control method according to claim 3, characterized in that: The step S13 further specifically includes: S131. If the lock is not received, determine whether the main center heartbeat is received.
7. The control method according to claim 3, characterized in that: The step S14 further specifically includes: S141. If the lock value is 0, determine whether the main center heartbeat is received.
8. The control method according to claim 3, characterized in that: The process of the arbitration module sending the lock further specifically includes: S121, the arbitration module initializes the lock value and assigns the lock value to 0. If the lock value is 0, the lock is allocated; S122: After receiving the lock application, the arbitration module determines whether there is a heartbeat of the main center. If the lock value is greater than 0 and the heartbeat of the main center is received, the lock is not allocated.
9. The control method according to claim 3, characterized in that: The process of updating the lock value by the arbitration module further specifically includes: S21, if the arbitration module does not receive the heartbeat of the main center, it subtracts the period m of the lock application from the period n of the last lock value update to obtain a first difference and determines whether it is greater than the last updated lock value; S211. If the first difference is greater than the last updated lock value, a new lock is allocated; S22, the arbitration module periodically detects whether the heartbeat of the main center is received; S221. If the heartbeat of the main center is received periodically, the lock value is updated periodically.
10. The control method according to claim 3, characterized in that: If the arbitration module does not receive the normal heartbeat sent by the backup center module, an alarm communication failure will be generated.
11. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 3 to 10 is implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 3 to 10 is implemented.
Citation Information
Patent Citations
Main and standby control center switching method and rail transit comprehensive monitoring system
CN112172879A
Methods to maintain network NAT binding
CN102281335A
Server dual hot backup system
CN106656589A
Vehicle-mounted comprehensive control system of ground equipment vehicle
CN107054255A
Arbitration mode-based dual-redundancy hot backup system
CN107065830A
Cited By
City-wide active-active trackside safety platform system, main / standby arbitration method and equipment
CN121493062A