An SNTP time synchronization method for rail transit safety communication platform

By adopting the red and blue network redundant structure and self-increase time mechanism in the rail transit safety communication platform, the time synchronization problem caused by frequent clock source switching and network instability is solved, ensuring the accuracy and stability of time synchronization.

CN116318497BActive Publication Date: 2025-08-29CASCO SIGNAL LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211097670.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-08
Publication Date
2025-08-29
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

There are frequent clock source switching, unstable network connections and packet loss in the rail transit safety communication platform, resulting in inaccurate time synchronization.

Method used

The red and blue network redundant structure is adopted to determine the cycle of the communication module and the CPU module, and give priority to the use of the last synchronized clock source. Through redundant data transmission, the CPU can receive multi-packet data and maintain the self-increase time when the server cannot be received.

Benefits of technology

It avoids time inaccuracy caused by frequent clock source switching and unstable network connection, ensures that the CPU receives multi-packet data, reduces packet loss, and improves the accuracy of time synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116318497B_ABST
    Figure CN116318497B_ABST
Patent Text Reader

Abstract

The present invention discloses an SNTP time synchronization method for a rail transit safety communication platform. The method is implemented based on the rail transit safety communication platform and includes: obtaining the time synchronization information sent by the communication module according to each CPU module of each MPU in the rail transit safety communication platform, and the synchronization status of the communication module in the rail transit safety communication platform and the SNTP server in the rail transit safety communication platform, and performing UTC time selection processing to separately determine the synchronization status of each CPU module with the SNTP server. The present invention effectively avoids frequent switching of clock sources. At the same time, the CPU itself will maintain the self-incrementing time, avoiding the problem of a large difference with the actual time when no response from the SNTP server is received.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of rail transit technology, and in particular to an SNTP time synchronization method for a rail transit safety communication platform. Background Art

[0002] In certain scenarios within the rail transit safety communication platform, computers across the entire network must maintain time synchronization. The platform's main components include a main computing module and a communication module. The main computing module consists of two systems and four modules, with two CPU modules forming a subsystem, forming a two-by-two-two structure. Each system is equipped with at least one communication board. The network utilizes a redundant red and blue network structure, with both networks operating and transmitting data simultaneously. Given the specific architecture of the rail transit safety communication platform and the need to synchronize time with an external SNTP (Simple Network Time Protocol) server, the following challenges arise:

[0003] Inconsistency in external red and blue network clock sources: When the external clock source time is inconsistent, adopting the received synchronized time will lead to frequent switching of clock sources and frequent clock jumps.

[0004] Unstable network connection: When the connection between the SNTP server and the SNTP client is unstable, the client may not receive messages from the server. If the client continues to use the last synchronized time, it will differ significantly from the actual time.

[0005] Packet loss problem: When the bus message volume is large, packet loss may occur. At this time, the time synchronization information received by the communication board will not be transmitted to the CPU. Summary of the Invention

[0006] The purpose of the present invention is to provide an SNTP time synchronization method for a rail transit safety communication platform, aiming to solve the problems in the prior art of frequent clock source switching and large discrepancies between the actual time and the time when the SNTP server response cannot be received.

[0007] To achieve the above object, the present invention is implemented through the following technical solutions:

[0008] The present invention provides an SNTP time synchronization method for a rail transit safety communication platform, which is implemented based on the rail transit safety communication platform and includes:

[0009] According to the synchronization period of the SNTP client in the rail transit safety communication platform and the SNTP server in the rail transit safety communication platform, determine the period of the communication module in the rail transit safety communication platform to each CPU module in the rail transit safety communication platform and the processing period of each CPU module, so as to ensure that each CPU module receives multiple sets of time synchronization information transmitted by the communication module within the processing period;

[0010] According to the time synchronization information sent by the communication module obtained by each CPU module and the synchronization status between the communication module and the SNTP server, UTC (Coordinated Universal Time, Universal Time Coordinated) time selection processing is performed to respectively determine the synchronization status of each CPU module and the SNTP server.

[0011] Preferably, each of the CPU modules maintains a self-incrementing time outside of its processing cycle, that is, the time synchronization information received most recently is updated according to the periodic update of each of the CPU modules itself.

[0012] Preferably, each of the CPU modules calculates the UTC time when the CPU module is processing based on the received time synchronization information and the main operating cycle of the system in the rail transit safety communication platform.

[0013] Preferably, each of the CPU modules is arranged in an MPU (Microprocessor Unit) module, and the MPU module is any one of all the MPU modules provided on the rail transit safety communication platform.

[0014] Preferably, the communication module adopts a redundant structure of a red network and a blue network, and the red network and the blue network work simultaneously and transmit data simultaneously.

[0015] Preferably, the time synchronization information is UTC time information sent by the red network and the blue network to each of the CPU modules.

[0016] Preferably, the period of synchronization between the SNTP client and the SNTP server is defined as T1.

[0017] The period for the communication module to send data to each of the CPU modules is set to T2=T1 / 2, and the processing period of each of the CPU modules is set to 3*T2, so as to ensure that each of the CPU modules receives multiple sets of data transmitted by the red network and the blue network within its processing period.

[0018] Preferably, the step of performing the UTC time selection process includes determining the synchronization status of each CPU module and the SNTP server according to the order in which the UTC time information and the synchronization status are acquired by each CPU module.

[0019] Preferably, if the UTC time information obtained by the CPU module is before the synchronization state,

[0020] The synchronization status of the CPU module and the SNTP server is determined based on whether the UTC time information sent by the red network and the blue network is received by the CPU module and the synchronization status of the red network and the blue network with the SNTP server respectively.

[0021] Preferably, the step of determining the synchronization status of the CPU module with the SNTP server according to the UTC time information respectively sent by the red network and the blue network being received by the CPU module and the synchronization status of the red network and the blue network with the SNTP server respectively includes:

[0022] If the UTC time information of the Red Network and the Blue Network are both received by the CPU module, and the Red Network and the Blue Network are synchronized with the SNTP server, the UTC time information of the Red Network is used, and the CPU module is synchronized with the SNTP server;

[0023] If the UTC time information of both the red network and the blue network is received by the CPU module, and only one of the red network and the blue network is synchronized with the SNTP server, the UTC time information of the synchronized network between the red network and the blue network is used, and the CPU module is synchronized with the SNTP server;

[0024] If the UTC time information of both the red network and the blue network is received by the CPU module, and both the red network and the blue network are not synchronized with the SNTP server, the UTC time information of the red network among the red network and the blue network is used, and the CPU module is not synchronized with the SNTP server;

[0025] If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the network receiving the UTC time information is synchronized with the SNTP server, the UTC time information of the received network is adopted, and the CPU module is synchronized with the SNTP server;

[0026] If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the network receiving the UTC time information is not synchronized with the SNTP server, the UTC time information of the received network is used, and the CPU module is not synchronized with the SNTP server;

[0027] If the UTC time information of the red network and the blue network is not received by the CPU module, the initial value of the UTC time of the CPU module is kept at 0, and the CPU module is not synchronized with the SNTP server.

[0028] Preferably, if the UTC time information obtained by the CPU module is after the synchronization state,

[0029] The synchronization status of the CPU module and the SNTP server is determined based on whether the UTC time information sent by the red network and the blue network is received by the CPU module and the synchronization status of the red network and the blue network with the SNTP server respectively.

[0030] Preferably, the step of determining the synchronization status of the CPU module with the SNTP server according to the UTC time information respectively sent by the red network and the blue network being received by the CPU module and the synchronization status of the red network and the blue network with the SNTP server respectively includes:

[0031] If the UTC time information of the red network and the blue network are both received by the CPU module, and the red network and the blue network are synchronized with the SNTP server, the UTC time information of the previous synchronization is used, and the CPU module is synchronized with the SNTP server;

[0032] If the UTC time information of both the red network and the blue network is received by the CPU module, and only one of the red network and the blue network is synchronized with the SNTP server, the UTC time information of the synchronized network between the red network and the blue network is used, and the CPU module is synchronized with the SNTP server;

[0033] If the UTC time information of the Red Network and the Blue Network are both received by the CPU module, and the Red Network and the Blue Network are not synchronized with the SNTP server, the self-increment time is adopted, and the CPU module is not synchronized with the SNTP server;

[0034] If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the network receiving the UTC time information is synchronized with the SNTP server, the UTC time information of the received network is used, and the CPU module is synchronized with the SNTP server;

[0035] If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the network receiving the UTC time information is not synchronized with the SNTP server, the self-increment time is used, and the CPU module is not synchronized with the SNTP server;

[0036] If the UTC time information of the red network and the blue network is not received by the CPU module, the self-incrementing time is adopted, and the CPU module is not synchronized with the SNTP server.

[0037] Compared with the prior art, the present invention has the following beneficial effects:

[0038] 1. The present invention gives priority to using the last synchronized clock source in the CPU processing principle part, thereby avoiding frequent switching of clock sources and avoiding frequent clock jumps caused by inconsistent time between the Red and Blue Network SNTP servers;

[0039] 2. The present invention determines the period at which the communication board sends messages to the CPU and the CPU processing period based on the synchronization period of the SNTP client and server, ensuring that the CPU can receive multiple packets of data from the Red and Blue networks during processing. Redundancy is used to avoid packet loss caused by unstable network connections, resulting in no data reaching the CPU. At the same time, the CPU mainly processes the situation where UTC time information from both the Red and Blue networks has been received, giving priority to using the clock source of the last synchronization, avoiding frequent switching of clock sources.

[0040] 3. The present invention maintains the self-incrementing time in the unprocessed cycle, that is, updates the last received synchronization time according to the update of its own cycle, thereby avoiding the problem of a large difference between the actual time and the SNTP server when no response is received. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for the description. Obviously, the drawings described below are one embodiment of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort:

[0042] Figure 1 A schematic diagram of the structure of a rail transit safety communication platform provided by one embodiment of the present invention;

[0043] Figure 2 A flow chart of a method for SNTP time synchronization for a rail transit safety communication platform when the time acquired by the CPU module is before the time when the CPU module is first synchronized with the SNTP server provided in one embodiment of the present invention;

[0044] Figure 3 A flowchart of a method for SNTP time synchronization for a rail transit safety communication platform is provided in which the time obtained by the CPU module is after the time when the CPU module is first synchronized with the SNTP server. DETAILED DESCRIPTION

[0045] The following is combined with Figures 1 to 3 The SNTP time synchronization method for rail transit safety communication platform proposed by the present invention is further described in detail with specific implementation methods. According to the following description, the advantages and features of the present invention will be clearer. It should be noted that the drawings are in a very simplified form and use non-precise proportions, which are only used to conveniently and clearly assist in explaining the purpose of the implementation methods of the present invention. In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, please refer to the drawings. It should be noted that the structure, proportion, size, etc. illustrated in the drawings of this specification are only used to match the content disclosed in the specification, so that people familiar with this technology can understand and read them, and are not used to limit the implementation conditions of the present invention, so they have no technical significance. Any modification of the structure, change of the proportional relationship or adjustment of the size should still fall within the scope of the technical content disclosed by the present invention without affecting the efficacy and purpose that can be achieved by the present invention.

[0046] In view of the problem in the prior art that the clock source is frequently switched and the actual time is greatly different when the SNTP server reply cannot be received, in order to ensure the time synchronization with the external server clock, the frequent switching of the clock source is effectively avoided.

[0047] This embodiment provides an SNTP time synchronization method for a rail transit safety communication platform, which is implemented based on the rail transit safety communication platform. Figure 1As shown, this embodiment provides a rail transit safety communication platform, including: a main operation module, a communication module, a power module and an SNTP server (SNTP-Server), the main operation module, the communication module and the SNTP server are connected in sequence, the main operation module and the communication module are connected to the power module (PSU, Powersupply), the main operation module includes a CPU module, MPU1 and MPU2 are two CPUs in a subsystem, and the communication module includes an SNTP client (SNTP-Client). The main operation module responsible for the safety operation logic consists of two systems (Series A and Series B), and the two MPUs in the system work simultaneously. If one MPU in the system goes down, the other MPU will also go down. However, if any system goes down, the other system can still operate normally. Each system is divided into MPU1 and MPU2. MPU1 and MPU2 are responsible for performing the same safety-related functions and can continue to operate only when the output is consistent. Each system can operate independently. If MPU-A fails, it should not cause MPU-B to fail. If MPU-B fails, it should not cause MPU-A to fail. The safety requirements of independence are met through the 2x2oo2 redundant architecture.

[0048] The communication module sends a time synchronization request to the SNTP server, the SNTP server receives the time synchronization request and replies the clock synchronization response to the communication module, the communication module sends the time synchronization information to the main operation module, the main operation module processes the time synchronization information, and the power supply module is connected to the main operation module and the communication module to provide power to the main operation module and the communication module. The SNTP server and the SNTP client.

[0049] According to the synchronization period of the SNTP client in the rail transit safety communication platform and the SNTP server in the rail transit safety communication platform, the period of the communication module in the rail transit safety communication platform sending to the CPU module in the rail transit safety communication platform and the processing period of the CPU module are determined to ensure that multiple sets of time synchronization information transmitted by the communication module are received within the processing period of the CPU module.

[0050] Each CPU module maintains a self-incrementing time outside of its processing cycle, that is, updates the time synchronization information received most recently according to the update of each CPU module's own cycle.

[0051] Each CPU module calculates the UTC time when the CPU module is processing based on the received time synchronization information and the main operating cycle of the system in the rail transit safety communication platform, that is, the UTC time when the CPU module is processing = the UTC time when received + the main cycle length * (the number of main cycles during processing - the number of main cycles received).

[0052] According to the time synchronization information sent by the communication module obtained by each CPU module and the synchronization status between the communication module and the SNTP server, UTC time selection processing is performed to determine the synchronization status of each CPU module and the SNTP server respectively.

[0053] The communication module adopts a red and blue network redundant structure, and the red network and the blue network work simultaneously and transmit data simultaneously.

[0054] The time synchronization information is the UTC time information sent by the red network and the blue network to the CPU module. Multi-point low voltage differential signal bus (M-LVDSBUS), the red network (MNCU-Red) in the master communication unit (MNCU), and the blue network (MNCU-Blue) in the master communication unit (MNCU).

[0055] The synchronization period between the SNTP client and the SNTP server is defined as T1, and the period for the communication module to send data to the CPU module is set to T2=T1 / 2, and the processing period of the CPU module is set to 3*T2 to ensure that 2-3 groups of data transmitted by the red network and the blue network are received within the processing period of the CPU module.

[0056] After the SNTP client is started, it periodically sends the clock synchronization request to the SNTP server with a period of T1, and sends the received clock synchronization response to the CPU module with a period of T2. The CPU module processes the time synchronization information from the communication module at intervals of 3T2 periods. The time obtained by the CPU module is the UTC time sent by the Red and Blue Network, but at the same time, the Red and Blue Network will also send the status of whether the communication module and the external SNTP server are synchronized to the CPU module. Therefore, if the Red and Blue Network sends the UTC time to the CPU module, but the synchronization status is not synchronized, it is considered to be out of sync, so it is before the first synchronization with the SNTP server. If the synchronization status is received, but the synchronization status is not synchronized, the system time will be set according to the out-of-sync time, and the system synchronization status will also be set to out of sync.

[0057] Determine the sequence of the time synchronization information (UTC time information) acquired by the CPU module and the synchronization status between the communication module and the SNTP server.

[0058] refer to Figure 2 As shown, if the UTC time information obtained by the CPU module is before the synchronization state, the following steps are performed.

[0059] Step S1: Determine whether the CPU module has received the UTC time information of the red network and the blue network.

[0060] If the UTC time information of the red network and the blue network are both received by the CPU module, the following step S2 is executed.

[0061] If the CPU module receives the UTC time information of only one of the red network and the blue network, the following step S3 is executed.

[0062] If the UTC time information of the red network and the blue network is not received by the CPU module, the following step S4 is executed.

[0063] Step S2: Determine the synchronization status of the red network, the blue network and the SNTP server.

[0064] If both the red network and the blue network are synchronized with the SNTP server, the UTC time information of the red network in the red network and the blue network is used, and the CPU module is considered to be synchronized with the SNTP server, and the UTC time information of the blue network in the red network and the blue network is discarded.

[0065] If the UTC time information of the red network is synchronized with the SNTP server, and the UTC time information of the blue network is not synchronized with the SNTP server, the UTC time information of the red network is used, and it is considered that the CPU module is synchronized with the SNTP server, and the UTC time information of the blue network is discarded.

[0066] If the UTC time information of the red network is not synchronized with the SNTP server, and the UTC time information of the blue network is synchronized with the SNTP server, the UTC time information of the blue network is adopted, and it is considered that the CPU module is synchronized with the SNTP server, and the UTC time information of the red network is discarded.

[0067] If both the red network and the blue network are not synchronized with the SNTP server, the UTC time information of the red network is used, and it is considered that the CPU module is not synchronized with the SNTP server, and the UTC time information of the blue network is discarded.

[0068] Step S3: Determine the synchronization status of the network receiving the UTC time information and the SNTP server.

[0069] If the CPU module does not receive the UTC time information of the red network but receives the UTC time information of the blue network, and the blue network is synchronized with the SNTP server, the UTC time information of the blue network is used, and it is considered that the CPU module is synchronized with the SNTP server.

[0070] If the CPU module does not receive the UTC time information of the red network but receives the UTC time information of the blue network, and the blue network is not synchronized with the SNTP server, the UTC time information of the blue network is used, and it is considered that the CPU module is not synchronized with the SNTP server.

[0071] If the CPU module receives the UTC time information of the red network but does not receive the UTC time information of the blue network, and the red network is synchronized with the SNTP server, the UTC time information of the red network is adopted, and the CPU module is considered to be synchronized with the SNTP server.

[0072] If the CPU module receives the UTC time information of the red network but does not receive the UTC time information of the blue network, and the red network is not synchronized with the SNTP server, the UTC time information of the red network is used, and it is considered that the CPU module is not synchronized with the SNTP server.

[0073] Step S4: If the UTC time information of the red network and the blue network is not received by the CPU module, the initial value of the UTC time of the CPU module is kept at 0, and the CPU module is not synchronized with the SNTP server.

[0074] refer to Figure 3 As shown, if the UTC time information obtained by the CPU module is after the synchronization state, the following steps are executed.

[0075] Step M1: Determine whether the CPU module has received the UTC time information of the red network and the blue network.

[0076] If the UTC time information of the red network and the blue network are both received by the CPU module, the following step M2 is executed.

[0077] If the CPU module receives the UTC time information of only one of the red network and the blue network, the following step M3 is executed.

[0078] If the UTC time information of the red network and the blue network is not received by the CPU module, the following step M4 is executed.

[0079] Step M2: Determine the synchronization status of the red network and the blue network with the SNTP server.

[0080] If the red network and the blue network are both synchronized with the SNTP server, if the red network time was synchronized last time, the time in the UTC time information sent by the red network will continue to be used; if the blue network time was synchronized last time, the time in the UTC time information sent by the blue network will continue to be used, and it is considered that the CPU module is synchronized with the SNTP server.

[0081] If the red network is synchronized with the SNTP server and the blue network is not synchronized with the SNTP server, if the red network is the last clock source, the UTC time information of the red network is used and the UTC time information of the blue network is discarded; if the blue network is the last clock source, the red network is switched as the clock source, and it is considered that the CPU module is synchronized with the SNTP server.

[0082] If the red network is not synchronized with the SNTP server, the blue network is synchronized with the SNTP server. If the blue network is the last clock source, the UTC time information of the blue network is used, and it is considered that the CPU module is synchronized with the SNTP server. The UTC time information of the red network is discarded. If the red network is the last clock source, the blue network is switched as the clock source, and it is considered that the CPU module is synchronized with the SNTP server.

[0083] If both the red network and the blue network are not synchronized with the SNTP server, the UTC time information of the red network and the UTC time information of the blue network are discarded, the CPU module performs self-increment maintenance on the time based on historical time, and it is considered that the CPU module is not synchronized with the SNTP server.

[0084] Step M3: Determine whether the network receiving the UTC time information is synchronized with the SNTP server.

[0085] If the CPU module does not receive the UTC time information of the red network and receives the UTC time information of the blue network, if the blue network is the last clock source, the UTC time information of the blue network is used, and it is considered that the CPU module is synchronized with the SNTP server, and the UTC time information of the red network is discarded; if the red network is the last clock source, the blue network is switched as the clock source, and it is considered that the CPU module is synchronized with the SNTP server.

[0086] If the CPU module does not receive the UTC time information of the red network and receives the UTC time information of the blue network, and the blue network is not synchronized with the SNTP server, the UTC time information of the blue network is discarded, and the CPU module performs self-increment maintenance on the time based on historical time, and considers that the CPU module is not synchronized with the SNTP server.

[0087] If the CPU module receives the UTC time information of the red network but does not receive the UTC time information of the blue network, if the red network is the last clock source, the UTC time information of the red network is used, and it is considered that the CPU module is synchronized with the SNTP server, and the UTC time information of the blue network is discarded; if the blue network is the last clock source, the red network is switched as the clock source, and it is considered that the CPU module is synchronized with the SNTP server.

[0088] If the CPU module receives the UTC time information of the red network but does not receive the UTC time information of the blue network, and the red network is not synchronized with the SNTP server, the UTC time information of the red network is discarded, and the CPU module performs self-increment maintenance on the time based on historical time, and considers that the CPU module is not synchronized with the SNTP server.

[0089] Step M4: The UTC time information of the red network and the blue network is not received by the CPU module, and the self-incrementing time is adopted, and the CPU module is not synchronized with the SNTP server.

[0090] To sum up, this embodiment gives priority to the last synchronized clock source in the CPU processing principle part, thereby avoiding frequent switching of the clock source and avoiding frequent clock jumps caused by inconsistent time of the Red and Blue Network SNTP servers; this embodiment determines the period for the communication board to send messages to the CPU and the CPU processing period based on the synchronization period of the SNTP client and the server, ensuring that the CPU can receive multiple packets of data from the Red and Blue Network during processing, and avoids the situation where unstable network connection causes packet loss and no data reaches the CPU through redundancy, while making the CPU mainly process the situation where the UTC time information of the Red and Blue Network is received, thereby giving priority to the last synchronized clock source and avoiding frequent switching of the clock source; this embodiment maintains the self-increment time in the unprocessed period, that is, updates the last received synchronization time according to the update of its own period, thereby avoiding the problem of a large difference with the actual time when the SNTP server reply cannot be received. Because the CPU processing cycle is set at 3*T2, it ensures that it has received 2-3 packets from both the Red and Blue networks by the time it processes data, thus preventing packet loss. Furthermore, based on this set cycle, when the CPU obtains time after first synchronizing with the SNTP server, it will most likely have received both the Red and Blue network's UTC time information. In this case, the last synchronized clock source will be prioritized, effectively preventing frequent clock source switching. Furthermore, the CPU maintains its own auto-incrementing time, preventing significant discrepancies between the actual time and the actual time when no SNTP server response is received.

[0091] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0092] It should be noted that the devices and methods disclosed in the embodiments of this document may also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of the devices, methods, and computer program products according to the various embodiments of this document. In this regard, each box in the flowchart or block diagram may represent a module, program, or portion of code, wherein the module, program segment, or portion of code contains one or more executable instructions for implementing a specified logical function, and the module, program segment, or portion of code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes may actually be executed substantially in parallel, or they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.

[0093] In addition, the functional modules in the various embodiments of this document may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.

[0094] Although the present invention has been described in detail through the above preferred embodiments, it should be understood that the above description is not intended to limit the present invention. After reading the above description, various modifications and substitutions of the present invention will become apparent to those skilled in the art. Therefore, the scope of protection of the present invention should be defined by the appended claims.

Claims

1. A SNTP time synchronization method for a rail transit safety communication platform, which is implemented based on the rail transit safety communication platform, characterized in that: include: According to the synchronization period of the SNTP client in the rail transit safety communication platform and the SNTP server in the rail transit safety communication platform, the period of the communication module in the rail transit safety communication platform to each CPU module in the rail transit safety communication platform and the processing period of each CPU module are determined. The communication module adopts a redundant structure of a red network and a blue network. The red network and the blue network work simultaneously and transmit data simultaneously to ensure that each CPU module receives multiple sets of time synchronization information transmitted by the communication module within its processing period. The time synchronization information is the UTC time information sent by the red network and the blue network to each CPU module; According to the time synchronization information sent by the communication module obtained by each CPU module and the synchronization status of the communication module and the SNTP server, UTC time selection processing is performed to determine the synchronization status of each CPU module and the SNTP server respectively. The determination of the synchronization status of each CPU module and the SNTP server specifically includes: each CPU module calculates the UTC time when the CPU module processes according to the received time synchronization information and the main operation cycle of the system in the rail transit safety communication platform, that is, the UTC time when the CPU module processes = the UTC time when received + the main cycle length * (the number of main cycles during processing - the number of main cycles received); according to the situation that the UTC time information sent by the red network and the blue network respectively is received by the CPU module and the synchronization status of the red network and the blue network respectively with the SNTP server, the synchronization status of the CPU module and the SNTP server is determined.

2. The SNTP time synchronization method for a rail transit safety communication platform according to claim 1, characterized in that: Each of the CPU modules maintains a self-incrementing time outside of its processing cycle, that is, updates the time synchronization information received most recently according to the update of each CPU module's own cycle.

3. The SNTP time synchronization method for a rail transit safety communication platform according to claim 2, characterized in that: Each of the CPU modules calculates the UTC time when the CPU module is processing based on the received time synchronization information and the main operating cycle of the system in the rail transit safety communication platform.

4. The SNTP time synchronization method for a rail transit safety communication platform according to claim 3, characterized in that: Each of the CPU modules is arranged in an MPU module, and the MPU module is any one of all the MPU modules provided on the rail transit safety communication platform.

5. The SNTP time synchronization method for a rail transit safety communication platform according to claim 4, characterized in that: Define the synchronization period between the SNTP client and the SNTP server as T1, The period for the communication module to send data to each of the CPU modules is set to T2=T1 / 2, and the processing period of each of the CPU modules is set to 3*T2, so as to ensure that each of the CPU modules receives multiple sets of data transmitted by the red network and the blue network within its processing period.

6. The SNTP time synchronization method for a rail transit safety communication platform according to claim 5, characterized in that: The step of performing the UTC time selection process includes determining the synchronization status of each CPU module and the SNTP server according to the order in which the UTC time information and the synchronization status are acquired by each CPU module.

7. The SNTP time synchronization method for a rail transit safety communication platform according to claim 6, characterized in that: If the UTC time information obtained by the CPU module is before the synchronization state, The step of determining the synchronization status of the CPU module with the SNTP server according to the UTC time information respectively sent by the red network and the blue network being received by the CPU module and the synchronization status of the red network and the blue network with the SNTP server respectively includes: If the UTC time information of the Red Network and the Blue Network are both received by the CPU module, and the Red Network and the Blue Network are synchronized with the SNTP server, the UTC time information of the Red Network is used, and the CPU module is synchronized with the SNTP server; If the UTC time information of both the red network and the blue network is received by the CPU module, and only one of the red network and the blue network is synchronized with the SNTP server, the UTC time information of the synchronized network between the red network and the blue network is used, and the CPU module is synchronized with the SNTP server; If the UTC time information of the Red Network and the Blue Network are both received by the CPU module, and the Red Network and the Blue Network are not synchronized with the SNTP server, the UTC time information of the Red Network is used, and the CPU module is not synchronized with the SNTP server; If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the network receiving the UTC time information is synchronized with the SNTP server, the UTC time information of the network receiving the UTC time information is used, and the CPU module is synchronized with the SNTP server; If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the network receiving the UTC time information is not synchronized with the SNTP server, the UTC time information of the network receiving the UTC time information is used, and the CPU module is not synchronized with the SNTP server; If the UTC time information of the red network and the blue network is not received by the CPU module, the initial value of the UTC time of the CPU module is kept at 0, and the CPU module is not synchronized with the SNTP server.

8. The SNTP time synchronization method for a rail transit safety communication platform according to claim 6, characterized in that: If the UTC time information obtained by the CPU module is after the synchronization state, The step of determining the synchronization status of the CPU module with the SNTP server according to the UTC time information respectively sent by the red network and the blue network being received by the CPU module and the synchronization status of the red network and the blue network with the SNTP server respectively includes: If the UTC time information of the red network and the blue network are both received by the CPU module, and the red network and the blue network are synchronized with the SNTP server, the UTC time information of the previous synchronization is used, and the CPU module is synchronized with the SNTP server; If the UTC time information of both the red network and the blue network is received by the CPU module, and only one of the red network and the blue network is synchronized with the SNTP server, the UTC time information of the synchronized network between the red network and the blue network is used, and the CPU module is synchronized with the SNTP server; If the UTC time information of the Red Network and the Blue Network are both received by the CPU module, and the Red Network and the Blue Network are not synchronized with the SNTP server, the self-increment time is adopted, and the CPU module is not synchronized with the SNTP server; If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the network receiving the UTC time information is synchronized with the SNTP server, the UTC time information of the network receiving the UTC time information is adopted, and the CPU module is synchronized with the SNTP server; If the UTC time information of only one of the red network and the blue network is received by the CPU module, and the UTC time information of the network receiving the UTC time information is not synchronized with the SNTP server, the self-incrementing time is adopted, and the CPU module is not synchronized with the SNTP server; If the UTC time information of the red network and the blue network is not received by the CPU module, the self-incrementing time is adopted, and the CPU module is not synchronized with the SNTP server.

Citation Information

Patent Citations

  • Communication control device and communication system

    JP2014183386A

  • Real-time synchronous method and synchronous network based on the standard ethernet

    WO2008101394A1