Vehicle-mounted clock synchronization seamless redundancy system and method
By statically configuring the dual time domain redundant system, seamless switching and synchronization after the master clock fails in the vehicle network is achieved, which solves the problem of network synchronization fluctuations caused by dynamic negotiation in the existing technology, improves stability and reliability, and meets the needs of Real-time requirements of in-vehicle networks.
Patent Information
- Application Number
- CN202411133151.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-09-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the vehicle network, the failure of the master clock may lead to data inconsistency. The existing technology implements failover through BMCA, but the dynamic negotiation process is time-consuming and cannot meet the real-time requirements.
Static configuration of two GPTP domains, master GM and hot standby GM nodes, switches and slave nodes, and dual time domain redundant synchronization message dual sending technology are used to achieve seamless switching and synchronization after the master clock fails, simplifying network management.
Significantly improves system stability and reliability, reduces configuration complexity and error possibilities, achieves fast switching and predictability of clock synchronization, and ensures real-time performance and data consistency of the in-vehicle network.
Smart Images

Figure CN118646508A
Abstract
Description
Technical Field
[0001] The invention relates to a vehicle-mounted clock synchronization technology, and in particular to a vehicle-mounted clock synchronization seamless redundancy system and method. Background Art
[0002] In vehicle network applications, safety-critical functions such as autonomous driving rely on GPTP (Generalized Precision Time Protocol) to ensure the real-time and deterministic data transmission, while the failure of GM (Grand Master) in the clock synchronization network may lead to inconsistent data. In order to alleviate the impact of the failure of the master clock, the clock synchronization network introduces a redundant clock design and implements the master clock switching in the event of a failure through BMCA (Best Master Clock Algorithm), that is, through dynamic negotiation, a new master clock is elected in all GPTP network nodes. However, this BMCA process is time-consuming and may cause network synchronization fluctuations, which cannot meet the strict real-time requirements of vehicle networks. Summary of the invention
[0003] In order to solve the deficiencies in the prior art, the object of the present invention is to provide a vehicle-mounted clock synchronization seamless redundancy system and method.
[0004] To achieve the purpose of the present invention, the technical solution adopted by the present invention is: A vehicle-mounted clock synchronization seamless redundancy system includes a master GM node, a hot standby GM node, a switch, and a slave node; the master GM node serves as a master reference time source, the hot standby GM node immediately takes over as a backup clock node when the master GM node fails, the switch is responsible for forwarding synchronization information, and the slave node is synchronized according to the time information of the GM clock node; Two GPTP domains are configured in the clock synchronization network, domain 0 and domain 127. The clock source in domain 0 is the master GM, and all devices in domain 0 are synchronized with the master GM clock; the clock source in domain 127 is the hot standby GM, and all devices in domain 127 are synchronized with the hot standby GM clock; the hot standby GM node synchronizes the master GM node, and all slave nodes receive synchronization information from domain 0 and domain 127 at the same time.
[0005] Furthermore, GPTP interfaces are set on the master GM node, the hot standby GM node, the switch, and the slave node; the GPTP interface configures different GPTP interface states based on different GPTP domains; the interface state includes a master interface and a slave interface, wherein the master interface represents the GPTP interface for publishing synchronization time, and the slave interface represents the GPTP interface for receiving synchronization time.
[0006] Furthermore, 0:M / 0:S indicates that the interface status in domain 0 is master interface / slave interface, and 127:M / 127:S indicates that the interface status in domain 127 is master interface / slave interface.
[0007] A vehicle-mounted clock synchronization seamless redundancy method, in a normal state, the master GM node publishes the GPTP synchronization message of domain 0 to the network, the switch forwards the synchronization message received by the slave interface in domain 0 to all the master interfaces in domain 0, the hot standby GM node and all the slave node clocks adjust their own clocks according to the synchronization information of domain 0, that is, the switch forwards the synchronization message received by the master interface in domain 0 to the hot standby GM node and the slave interfaces of all the slave nodes in domain 0; When the hot standby GM node is synchronized with the master GM node, the hot standby GM node starts to publish the GPTP synchronization message of domain 127 to the network. The switch forwards the synchronization message received from the slave interface in domain 127 to all the master interfaces in domain 127. At this time, all the slave node clocks adjust their own clocks according to the synchronization information of domain 0 and domain 127. That is, the switch forwards the synchronization message received from the master interface in domain 127 to the slave interface of the master GM node and all the slave nodes in domain 127.
[0008] Furthermore, when the master GM node fails, the hot standby GM node continues to publish GPTP synchronization messages of domain 127 to the network. The switch forwards the synchronization messages received from the slave interface in domain 127 to all master interfaces in domain 127. The slave node clock continues to adjust its own clock according to the synchronization information of domain 127, that is, the switch forwards the synchronization messages received from the master interface in domain 127 to the slave interfaces of all slave nodes in domain 127.
[0009] Further, the master GM node recovers, adjusts its own clock according to the synchronization information of domain 127 , and the switch forwards the synchronization message received by the master interface in domain 127 to the slave interface of the master GM node in domain 127 .
[0010] Furthermore, after the master GM node is initialized, it waits for the GPTP synchronization message from domain 127. After receiving the GPTP synchronization message from domain 127, it adjusts the clock of the GM node according to the time information carried in the GPTP synchronization message of domain 127, completes synchronization with the hot standby GM clock, and publishes its own clock information to the network through the GPTP synchronization message of domain 0.
[0011] Furthermore, after the hot standby GM node is initialized, it waits for the GPTP synchronization message from domain 0. After receiving the GPTP synchronization message from domain 0, it adjusts the clock of the hot standby GM node according to the time information carried in the GPTP synchronization message of domain 0, completes synchronization with the main GM clock, and publishes its own clock information to the network through the GPTP synchronization message of domain 127.
[0012] Furthermore, after the slave node is initialized, it waits for a GPTP synchronization message from domain 0 or domain 127, and after receiving the GPTP synchronization message from domain 0 or domain 127, adjusts the clock of the slave node according to the time information carried in the GPTP synchronization message.
[0013] The beneficial effect of the present invention is that, compared with the prior art, the present invention avoids the instability caused by dynamic negotiation by statically configuring the main GM and the hot standby GM, greatly improving the stability and reliability of the system. This is especially important for vehicle network applications, because these applications usually have extremely high requirements for clock accuracy and network stability. By adopting the static designation method, the network management and configuration process is simplified. This not only reduces the complexity of configuration and management, but also reduces the possibility of errors.
[0014] When the main GM fails, the dual-time domain redundant synchronization message double-transmission technology can quickly switch to the backup clock, and this process is imperceptible to the slave node. This seamless switching mechanism significantly reduces the system recovery time and improves the real-time performance of the network. Even if the main GM fails and recovers, the main GM can still maintain time continuity, which is crucial to ensure the consistency and accuracy of the vehicle network data.
[0015] In the traditional BMCA mechanism, dynamic negotiation may cause network synchronization fluctuations. The technical solution of the present invention greatly improves the predictability of the clock synchronization mechanism through static configuration and dual time domain redundancy, which is crucial for safety-critical applications that rely on precise clock synchronization.
[0016] In general, the technical solution of the present invention provides significant improvements over the prior art, with significant improvements in stability, reliability, response speed, predictability of clock synchronization, and system management, which is of great significance for solving technical problems in vehicle networks. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the vehicle-mounted clock synchronization seamless redundancy system of the present invention; Figure 2 This is a schematic diagram of different GPTP domain networking configurations; Figure 3 This is a schematic diagram of the synchronization path of the main GM in normal state; Figure 4 This is a schematic diagram of the synchronization path of the hot standby GM in normal state; Figure 5 It is a schematic diagram of the synchronization path of the hot standby GM in the event of a master GM node failure; Figure 6 It is a schematic diagram of the synchronization path of the master GM node to restore the state of the master GM; Figure 7 It is the detailed workflow diagram of the synchronization of the main GM node; Figure 8 It is a detailed workflow diagram of synchronization of hot standby GM nodes; Fig. 9 This is a detailed workflow diagram for synchronization of slave node clocks. DETAILED DESCRIPTION
[0018] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of this application.
[0019] like Figure 1 As shown, the vehicle-mounted clock synchronization seamless redundant system described in the present invention includes a master GM node 1, a hot standby GM node 2, a switch 3, and slave nodes 4 and 5; GPTP interfaces 6, 7, 8, 9, 10, 11, 12, and 13 are all set on the master GM node, the hot standby GM node, the switch, and the slave node.
[0020] The master GM node is the clock node that serves as the main reference time source in the network. The hot standby GM node is the backup clock node that immediately takes over the role of the master GM node when it fails. The switch supports the GPTP protocol and is responsible for forwarding synchronization information. The slave node is synchronized according to the time information of the GM clock node, and the GPTP interface can process GPTP protocol messages.
[0021] The present invention needs to configure two GPTP domains in the clock synchronization network, domain 0 and domain 127. The clock source in domain 0 is the master GM, and all devices in domain 0 are synchronized with the master GM clock; the clock source in domain 127 is the hot standby GM, and all devices in domain 127 are synchronized with the hot standby GM clock. The hot standby GM needs to synchronize the master GM, and all slave nodes receive synchronization information from domain 0 and domain 127 at the same time.
[0022] The GPTP interfaces on the master GM node, hot standby GM node, slave node, and switch need to be configured with different GPTP interface states based on different GPTP domains. The interface states include master interface (M) and slave interface (S). The master interface refers to the GPTP interface that publishes the synchronized time, and the slave interface refers to the GPTP interface that receives the synchronized time.
[0023] Network configuration such as Figure 2 As shown, 0:M / 0:S indicates that the interface status in domain 0 is master interface / slave interface, and 127:M / 127:S indicates that the interface status in domain 127 is master interface / slave interface.
[0024] The vehicle-mounted clock synchronization seamless redundancy method of the present invention, in a normal state, the master GM node publishes the GPTP synchronization message of domain 0 to the network, the switch forwards the synchronization message received by the slave interface (0:S) in domain 0 to all the master interfaces (0:M) in domain 0, the hot standby GM node and all the slave node clocks adjust their own clocks according to the synchronization information of domain 0, that is, the switch forwards the synchronization message received by the master interface (0:M) in domain 0 to the hot standby GM node and the slave interface (0:S) of all the slave nodes in domain 0, the synchronization path of the master GM is as follows: Figure 3 As shown in 14, 15, 16, and 17.
[0025] When the hot standby GM node is synchronized with the master GM node, the hot standby GM node starts to publish the GPTP synchronization message of domain 127 to the network. The switch forwards the synchronization message received by the slave interface (127:S) in domain 127 to all the master interfaces (127:M) in domain 127. At this time, all the slave node clocks adjust their own clocks according to the synchronization information of domain 0 and domain 127. That is, the switch forwards the synchronization message received by the master interface (127:M) in domain 127 to the slave interface (127:S) of the master GM node and all the slave nodes in domain 127. The synchronization path of the hot standby GM is as follows: Figure 4 As shown in 18, 19, 20, and 21.
[0026] When the master GM node fails, the hot standby GM node continues to publish the GPTP synchronization message of domain 127 to the network. The switch forwards the synchronization message received by the slave interface (127:S) in domain 127 to all the master interfaces (127:M) in domain 127. The slave node clock continues to adjust its own clock according to the synchronization information of domain 127. That is, the switch forwards the synchronization message received by the master interface (127:M) in domain 127 to the slave interfaces (127:S) of all slave nodes in domain 127. At this time, the synchronization path of the hot standby GM is as follows: Figure 5 As shown in 19, 20, and 21.
[0027] The master GM node recovers and adjusts its own clock according to the synchronization information of domain 127. The switch forwards the synchronization message received by the master interface (127:M) in domain 127 to the slave interface (127:S) of the master GM node in domain 127. The synchronization path of the master GM is as follows: Figure 6 As shown in 18, 19, 20, and 21.
[0028] When the synchronization between the active GM node and the hot standby GM node is completed, the active GM node starts to publish the GPTP synchronization message of domain 0 to the network, and the entire GPTP synchronization network is restored to normal.
[0029] The detailed synchronization workflow of the master GM node is as follows Figure 7As shown, after initialization, wait for the GPTP synchronization message from domain 127. After receiving the GPTP synchronization message from domain 127, adjust the clock of the GM node according to the time information carried in the GPTP synchronization message of domain 127, complete the synchronization with the hot standby GM clock, and publish its own clock information to the network through the GPTP synchronization message of domain 0.
[0030] The detailed synchronization workflow of the hot standby GM node is as follows Figure 8 As shown, after initialization, it waits for the GPTP synchronization message from domain 0. After receiving the GPTP synchronization message from domain 0, it adjusts the clock of the hot standby GM node according to the time information carried in the GPTP synchronization message of domain 0, completes synchronization with the main GM clock, and publishes its own clock information to the network through the GPTP synchronization message of domain 127.
[0031] The detailed workflow of slave node clock synchronization is as follows Fig. 9 As shown, after initialization, wait for the GPTP synchronization message from domain 0 or domain 127, and after receiving the GPTP synchronization message from domain 0 or domain 127, adjust the clock of the slave node according to the time information carried in the GPTP synchronization message.
[0032] The beneficial effect of the present invention is that, compared with the prior art, the present invention effectively eliminates the instability caused by dynamic negotiation by statically specifying the working master clock and the hot standby clock, and simplifies the network management and configuration process. In addition, the present invention introduces the dual-time domain redundant synchronization message double-transmission technology to achieve seamless switching of the slave clock synchronization process after the master clock fails. This design significantly reduces the response time required for the master clock switching and improves the predictability of the clock synchronization mechanism, thereby ensuring the efficient operation of the vehicle network under strict real-time requirements.
[0033] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.
Claims
1. A vehicle-mounted clock synchronization seamless redundancy system, characterized in that: It includes the main GM node, hot standby GM node, switch, and slave node; the main GM node serves as the main reference time source, and the hot standby GM node immediately takes over as the backup clock node when the main GM node fails. The switch is responsible for forwarding synchronization information, and the slave node is synchronized according to the time information of the GM clock node; Two GPTP domains are configured in the clock synchronization network, domain 0 and domain 127. The clock source in domain 0 is the master GM, and all devices in domain 0 are synchronized with the master GM clock; the clock source in domain 127 is the hot standby GM, and all devices in domain 127 are synchronized with the hot standby GM clock; the hot standby GM node synchronizes the master GM node, and all slave nodes receive synchronization information from domain 0 and domain 127 at the same time.
2. The vehicle-mounted clock synchronization seamless redundancy system according to claim 1, characterized in that: GPTP interfaces are set on the master GM node, hot standby GM node, switch, and slave node; The GPTP interface configures different GPTP interface states based on different GPTP domains; the interface states include a master interface and a slave interface, wherein the master interface represents a GPTP interface that publishes synchronization time, and the slave interface represents a GPTP interface that receives synchronization time.
3. The vehicle-mounted clock synchronization seamless redundancy system according to claim 1, characterized in that: 0:M / 0:S indicates that the interface status in domain 0 is master interface / slave interface, and 127:M / 127:S indicates that the interface status in domain 127 is master interface / slave interface.
4. A vehicle-mounted clock synchronization seamless redundancy method, based on the vehicle-mounted clock synchronization seamless redundancy system according to any one of claims 1 to 3, characterized in that: In the normal state, the master GM node publishes the GPTP synchronization message of domain 0 to the network, and the switch forwards the synchronization message received by the slave interface in domain 0 to all the master interfaces in domain 0. The hot standby GM node and all the slave nodes adjust their own clocks according to the synchronization information of domain 0, that is, the switch forwards the synchronization message received by the master interface in domain 0 to the slave interface of the hot standby GM node and all the slave nodes in domain 0; When the hot standby GM node is synchronized with the master GM node, the hot standby GM node starts to publish the GPTP synchronization message of domain 127 to the network. The switch forwards the synchronization message received from the slave interface in domain 127 to all the master interfaces in domain 127. At this time, all the slave node clocks adjust their own clocks according to the synchronization information of domain 0 and domain 127. That is, the switch forwards the synchronization message received from the master interface in domain 127 to the slave interface of the master GM node and all the slave nodes in domain 127.
5. The vehicle-mounted clock synchronization seamless redundancy method according to claim 4, characterized in that: When the master GM node fails, the hot standby GM node continues to publish GPTP synchronization messages of domain 127 to the network. The switch forwards the synchronization messages received from the slave interface in domain 127 to all master interfaces in domain 127. The slave node clock continues to adjust its own clock according to the synchronization information of domain 127, that is, the switch forwards the synchronization messages received from the master interface in domain 127 to the slave interfaces of all slave nodes in domain 127.
6. The vehicle-mounted clock synchronization seamless redundancy method according to claim 4, characterized in that: The master GM node recovers and adjusts its own clock according to the synchronization information of domain 127 . The switch forwards the synchronization message received by the master interface in domain 127 to the slave interface of the master GM node in domain 127 .
7. The vehicle-mounted clock synchronization seamless redundancy method according to claim 4, characterized in that: After the master GM node is initialized, it waits for the GPTP synchronization message from domain 127. After receiving the GPTP synchronization message from domain 127, it adjusts the clock of the GM node according to the time information carried in the GPTP synchronization message of domain 127, completes synchronization with the hot standby GM clock, and publishes its own clock information to the network through the GPTP synchronization message of domain 0.
8. The vehicle-mounted clock synchronization seamless redundancy method according to claim 4, characterized in that: After the hot standby GM node is initialized, it waits for the GPTP synchronization message from domain 0. After receiving the GPTP synchronization message from domain 0, it adjusts the clock of the hot standby GM node according to the time information carried in the GPTP synchronization message of domain 0, completes synchronization with the main GM clock, and publishes its own clock information to the network through the GPTP synchronization message of domain 127.
9. The vehicle-mounted clock synchronization seamless redundancy method according to claim 4, characterized in that: After the slave node is initialized, it waits for the GPTP synchronization message from domain 0 or domain 127. After receiving the GPTP synchronization message from domain 0 or domain 127, it adjusts the clock of the slave node according to the time information carried in the GPTP synchronization message.
Citation Information
Patent Citations
Hot standby redundancy network system and redundancy realization method
CN102082695A
Clock synchronization network energy saving method and device and storage medium
CN112769606A
Clock redundancy system based on multiple clock domains and implementation method of clock redundancy
CN116865898A
Method for improving time synchronization reliability of airborne time-sensitive network
CN117240391A
