Multi-source multi-precision operating system time synchronization method

By adopting the multi-source and multi-precision operating system time synchronization method in special vehicle electronic information systems, combining high-precision PTP time synchronization and Bully election algorithm, the problems of insufficient time synchronization accuracy and single strategy in traditional systems are solved, and high-precision and flexible time synchronization are achieved, meeting the needs of multi-vehicle collaboration and unmanned vehicle collaborative operations in complex environments.

CN119906514AActive Publication Date: 2025-04-29COMP APPL TECH INST OF CHINA NORTH IND GRP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510064641.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-04-29
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

Traditional special vehicle electronic information systems based on domestic software and hardware environments have problems of insufficient accuracy and single strategy in terms of time synchronization, which cannot meet the complex environmental needs of the new special vehicle electronic system networking architecture.

Method used

The multi-source and multi-precision operating system time synchronization method is adopted, and the in-vehicle embedded information platform for special vehicle fleets is built, and a variety of time synchronization modes and high-precision PTP time synchronization protocols are used, combined with the Bully election algorithm and the 5G cellular network of 5G-CPE, high-precision time synchronization between the on-vehicle computer and the on-vehicle terminal is achieved.

Benefits of technology

It improves the time synchronization accuracy, realizes high-precision time synchronization in sub-microseconds, meets the higher requirements for time synchronization accuracy of new special vehicle electronic systems, and enhances the adaptability and robustness of the system through multi-source time synchronization strategies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119906514A_ABST
    Figure CN119906514A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-source multi-precision operating system time synchronization method, which comprises the following steps of: constructing an embedded information platform of a motorcade and each vehicle based on domestic software and hardware, wherein the embedded information platform comprises a vehicle-mounted computer, 5G-CPE, time keeping and service equipment, Beidou equipment and a plurality of vehicle-mounted terminals, and the vehicle-mounted computer comprises a plurality of calculation processing modules; each vehicle sets a time synchronization priority of each node, and each node multicasts an IP address, a CPU dominant frequency, the time synchronization priority and an MAC address into a node resource pool; the vehicle-mounted node comprises a plurality of vehicle-mounted terminals and a plurality of calculation processing modules; each vehicle elects a monitoring node based on the CPU dominant frequency and the MAC address, the monitoring node communicates with the time keeping and time service equipment, and the working state of the time keeping and time service equipment and the calendar information state are judged; and the monitoring node of each vehicle determines a time synchronization mode based on the working state of the time keeping and service equipment and the effective state of the calendar information, and performs time synchronization on each vehicle-mounted node based on the time synchronization mode and the time synchronization priority.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of time synchronization of electronic information systems of special vehicles, and in particular to a time synchronization method of a multi-source and multi-precision operating system. Background Art

[0002] With the development of new civilian intelligent cars and special vehicles, the vehicle electronic information system has developed into a networked architecture with on-board computers and on-board terminals as the core, realizing information sharing, large bandwidth, low latency, high reliability of in-vehicle transmission network, and service-oriented software architecture. With the increasing degree of vehicle informatization and intelligence and the rapid development of unmanned special operations, the transmission of various data in the process of vehicle operation and multi-workshop data interaction cannot be separated from time information. Therefore, time synchronization is an important guarantee for the coordination and correct information transmission of various devices in the electronic system of special vehicles. It is also a prerequisite for special vehicles to perform firefighting, rescue and other operations. As an important equipment for performing firefighting, rescue and other tasks, special vehicles have the development goal of achieving independence, safety and reliability.

[0003] The traditional special vehicle electronic information system based on domestic software and hardware environment has poor time synchronization capability and the following major defects:

[0004] In the traditional domestic special vehicle electronic information system, Beidou equipment only performs high-precision time synchronization with the in-vehicle communication equipment for TOD (Time of Day), while Beidou equipment uses low-precision time synchronization to send Beidou astronomical time data to electronic devices such as on-board computers and on-board terminals through in-vehicle buses such as CAN (Controller Area Network) or Gigabit Ethernet. Electronic devices set the received Beidou astronomical time as local time, and the time synchronization accuracy is at the millisecond or even second level. This method can no longer meet the time synchronization requirements under the networked architecture of new special vehicle electronic systems, and cannot meet the requirements of firefighting and rescue operations involving multi-vehicle collaboration and unmanned vehicle collaboration under complex environmental conditions.

[0005] The time synchronization strategy is single. Although the traditional special vehicle electronic information system based on domestic software and hardware environment has replaced the US GPS technology (Global Positioning Ststem, Global Positioning System) with the domestic Beidou satellite navigation system technology to complete the domestic substitution, it only uses a single clock source (Beidou astronomical time). Local time synchronization relies on Beidou satellite astronomical time information. When the vehicle is in a state of poor Beidou satellite signal and the on-board timekeeping and timing equipment is not working normally, the time synchronization of each device in the system cannot be completed, which affects the vehicle system information transmission and fusion, and cannot meet the actual operational needs such as vehicle movement, multi-vehicle collaboration, and unmanned vehicle control.

[0006] The time synchronization accuracy is poor. In the traditional special vehicle electronic information system based on domestic software and hardware environment, Beidou equipment can only perform TOD high-precision time synchronization with the in-vehicle communication equipment (such as: vehicle radio, etc.), while Beidou equipment uses low-precision time synchronization to send Beidou astronomical time data to electronic devices such as vehicle computers and vehicle terminals through in-vehicle buses such as CAN (Controller Area Network) or Gigabit Ethernet. Electronic devices set the received Beidou astronomical time as local time, and the time synchronization accuracy is only in milliseconds or even seconds. This method can no longer meet the time synchronization requirements under the networked architecture of new special vehicle electronic systems, and cannot meet the requirements of firefighting and rescue operations involving multi-vehicle collaboration and unmanned vehicle collaboration under complex environmental conditions. Summary of the invention

[0007] In view of the above analysis, an embodiment of the present invention aims to provide a multi-source and multi-precision operating system time synchronization method to solve the technical problem of how to synchronize the time of on-board computers and on-board terminal nodes in special vehicles based on domestic software and hardware platforms, improve the time synchronization accuracy, and provide multiple time synchronization strategies to meet the time requirements in different scenarios.

[0008] The purpose of the present invention is mainly achieved through the following technical solutions:

[0009] The present invention provides a multi-source multi-precision operating system time synchronization method, comprising the following steps:

[0010] Step S1, constructing a special vehicle fleet, and building an on-board embedded information platform for each special vehicle in the fleet, wherein the platform includes an on-board computer, 5G-CPE, a timekeeping timing device, a Beidou device, and multiple on-board terminals, and the on-board computer includes multiple computing and processing modules;

[0011] Step S2, each special vehicle sets the time synchronization priority of each on-board node, and each of the on-board nodes performs UDP multicast of its own IP address, CPU main frequency, time synchronization priority and MAC address ID into the node resource pool; the on-board node includes a plurality of the on-board terminals and a plurality of the computing and processing modules;

[0012] Step S3, each special vehicle elects each on-board node to obtain a monitoring node based on the CPU main frequency and MAC address ID in the node resource pool, and the monitoring node establishes communication with the timekeeping and timing device to determine the working status of the timekeeping and timing device and the validity status of the current calendar information;

[0013] Step S4: the monitoring node of each special vehicle determines a time synchronization mode based on the working status of the timekeeping and timing device and the validity status of the current calendar information, and performs time synchronization on each of the on-board nodes based on the time synchronization mode and the time synchronization priority.

[0014] Furthermore, each special vehicle elects the CPU main frequency and MAC address ID based on the Bully election algorithm to obtain a monitoring node, including:

[0015] Select the vehicle-mounted node with the highest CPU main frequency as a candidate monitoring node. If the number of candidate monitoring nodes is 1, the vehicle-mounted node is a monitoring node.

[0016] Otherwise, an election is performed based on the MAC address ID, and the vehicle-mounted node with the largest MAC address ID is elected as the monitoring node, and the other vehicle-mounted nodes are elected as non-monitoring nodes;

[0017] If the monitoring node stops publishing the election factor within a predetermined time period, a new monitoring node is selected.

[0018] Furthermore, the monitoring node establishes communication with the timekeeping and timing device, including:

[0019] The first step is that the monitoring node sends a first UDP heartbeat message to the fixed IP address and port number of the timekeeping and timing device;

[0020] Step 2: After receiving the first UDP heartbeat message, the time-keeping and timing device sends a second UDP heartbeat message and a UDP data message to the monitoring node in response; if the time-keeping and timing device does not receive the first UDP heartbeat message within a continuous preset time period, return to the first step;

[0021] Step 3: The monitoring node parses the received second UDP heartbeat message to determine the working status of the timekeeping and timing device and whether the current calendar information is valid;

[0022] Wherein, the UDP data message includes a sending timestamp.

[0023] Furthermore, the step S4 comprises:

[0024] If the working status of the timekeeping and timing devices of all vehicles in the fleet are synchronized or the working status of the timekeeping and timing devices of some vehicles are synchronized, and the current calendar information is valid, the high-precision PTP time synchronization mode is used to perform high-precision time synchronization on each vehicle-mounted node based on the clock source of the timekeeping and timing device;

[0025] If the working state of the timekeeping and timing device is being synchronized, timekeeping or RTC timing, and the current calendar information is valid, the vehicle election is performed based on the workshop 5G cellular network of the 5G-CPE to obtain a reference vehicle, and the low-precision PTP time synchronization mode is used to perform low-precision time synchronization on the vehicle-mounted nodes in the fleet based on the clock source of the timekeeping and timing device of the reference vehicle;

[0026] If the working status of the timekeeping and timing devices of all vehicles in the fleet are asynchronous, the monitoring node of the lead vehicle performs UDP multicast in a local autonomous time synchronization mode, and the on-board node of each vehicle in the fleet uses the calendar information of the monitoring node of the lead vehicle as the clock source, and uses the workshop 5G cellular network of the 5G-CPE to perform low-precision time synchronization on the on-board nodes of all vehicles in the fleet based on the time synchronization priority of the on-board nodes;

[0027] When the high-precision or low-precision PTP time synchronization mode, or the local autonomous time synchronization mode is not received within a certain time period, each on-board node adopts the local manual time synchronization mode, and performs low-precision time synchronization on the system time of the monitoring node of the lead vehicle based on the manually set system time of the lead vehicle's other on-board nodes and the on-board nodes of other vehicles in the fleet.

[0028] Furthermore, if the working status of the timekeeping and timing devices of all vehicles in the fleet are synchronized, and the current calendar information is valid, each vehicle uses the clock source of the timekeeping and timing device of the vehicle as a reference to perform high-precision PTP time synchronization on other on-board nodes of the vehicle;

[0029] If the working status of the timekeeping and timing devices of some vehicles is synchronized, and the current calendar information is valid, the vehicles whose timekeeping and timing devices are synchronized will use the clock source of their own timekeeping and timing devices as a reference to perform high-precision PTP time synchronization on other on-board nodes of the vehicle; at the same time, for vehicles whose timekeeping and timing devices are not synchronized, use the system time of the monitoring node of the vehicle with the largest vehicle ID of the vehicles whose timekeeping and timing devices are synchronized as a reference to perform high-precision PTP time synchronization on all on-board nodes of the vehicle based on the 5G cellular network.

[0030] Furthermore, the high-precision PTP time synchronization mode based on delay-request measurement is used to synchronize the system time of the vehicle-mounted node with high precision, as follows:

[0031] The time keeping and timing device acts as a PTP server, and the monitoring node acts as a PTP client;

[0032] The PTP server sends a Sync message to the PTP client and records the message sending time t1;

[0033] The PTP client receives the Sync synchronization message and records the message receiving time t2;

[0034] The PTP server puts t1 in the Follow_Up follow-up delay message and sends it to the PTP client. After receiving the message, the PTP client parses out the time t1;

[0035] The PTP client sends a Delay_Req delay request message to the PTP server, and synchronously records the time t3 when the Delay_Req delay request message is sent. The PTP server receives the message and records the time t4 when it is received.

[0036] The PTP server puts the t4 time in the Delay_Resp delayed response message and sends it to the PTP client. The PTP client receives the message and parses out t4; the PTP client obtains the time values ​​t1, t2, t3 and t4;

[0037] The time offset value Offset and the network link delay Delay between the PTP server and the client are calculated as follows:

[0038] t2-t1-Offset=Delay

[0039] t4-(t3-Offset)=Delay

[0040] The calculation results are:

[0041] Offset=[(t2-t1)+(t3-t4)] / 2

[0042] Delay=[(t2-t1)+(t4-t3)] / 2

[0043] Based on the time deviation value Offset, the PTP client subtracts the Offset value from the local system time value to obtain the synchronization time with the high-precision clock source of the PTP server, and synchronously updates the local system time of the monitoring node.

[0044] Furthermore, in the low-precision PTP time synchronization mode, each vehicle performs low-precision time synchronization on the system time of the vehicle-mounted node as follows:

[0045] The vehicle election includes:

[0046] Find out the special vehicles whose working status of the punctual timing device is punctual. If the number of vehicles in the punctual status is greater than 1, select the vehicle with the smallest vehicle ID value in the punctual status in the fleet as the benchmark vehicle;

[0047] Otherwise, find out the special vehicle whose working state of the timekeeping and timing device is being synchronized. If the number of vehicles in the synchronization state is greater than 1, select the vehicle with the smallest ID value in the synchronization state in the fleet as the reference vehicle;

[0048] Otherwise, find out the special vehicle whose working state of the timekeeping timing device is RTC timing. If the number of vehicles in the RTC timing state is greater than 1, select the vehicle with the smallest vehicle ID value in the RTC timing state in the fleet as the reference vehicle;

[0049] Based on the clock source of the timekeeping and timing equipment of the reference vehicle, time synchronization is performed on other onboard nodes in the reference vehicle;

[0050] At the same time, the workshop 5G cellular network of 5G-CPE is used to perform low-precision time synchronization on the on-board nodes of other vehicles in the fleet.

[0051] Furthermore, based on the local autonomous time synchronization mode, the system time of the vehicle-mounted node of each vehicle in the fleet is synchronized with low precision, including:

[0052] Each on-board node in the lead vehicle selects the system time and time synchronization priority information of the on-board node periodically multicasted by UDP in the node resource pool; selects the system time of the on-board node with the highest time synchronization priority, and determines the validity of the selected system time based on a preset valid time threshold; if valid, updates the system time of the on-board node to the selected system time;

[0053] The system time of the monitoring node of the lead vehicle is used as the highest priority clock source, and the workshop 5G cellular network of 5G-CPE is used to synchronously update the on-board nodes of other vehicles in the fleet to the system time of the monitoring node of the lead vehicle.

[0054] Further, based on the system time of the monitoring node of the lead vehicle manually set in the local manual time synchronization mode, the system time of the onboard node of the lead vehicle and the onboard nodes of other vehicles in the fleet are synchronized with low precision, including:

[0055] Use the time modification interface of the operation command vehicle terminal of the lead vehicle to set the system time of the monitoring node of the lead vehicle;

[0056] The validity of the system time of the monitoring node of the set head vehicle is determined based on the preset effective time threshold;

[0057] If valid, the system time of other onboard nodes of the lead vehicle and onboard nodes of other vehicles in the fleet will be synchronized with the system time of the monitoring node of the lead vehicle.

[0058] Furthermore, the step S1 comprises:

[0059] Assign a unique vehicle ID to each special vehicle in the fleet for indexing, and determine the leading vehicle and the following vehicles, wherein the leading vehicle has the smallest vehicle ID, and the following vehicles have increasing vehicle IDs;

[0060] Each vehicle-mounted node and device in the vehicle-mounted embedded information platform of each special vehicle is connected via Ethernet;

[0061] The Beidou device transfers the high-precision time TOD obtained by receiving Beidou satellite signals to the timekeeping and timing device;

[0062] Each special vehicle in the fleet is connected to the 5G cellular network based on the 5G-CPE;

[0063] The vehicle-mounted terminal and the computing and processing module both use the domestic openEuler operating system; the vehicle-mounted terminal uses the Rockchip RK3588 CPU processor; the computing and processing module uses the Feiteng FD-2000 / 8-core CPU processor.

[0064] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0065] 1. The operating system time synchronization method in the present invention is an autonomous and controllable customized research and development based on the domestic openEuler operating system and domestic chips; the method of the present invention not only improves the performance and reliability of the special vehicle on-board embedded information platform, but also ensures the autonomous controllability and security of the platform, and meets the needs of multi-vehicle collaboration and unmanned vehicle collaborative operations of special vehicles in complex environments;

[0066] 2. The present invention adopts a high-precision PTP time synchronization mode, based on the high-precision clock source of the timekeeping and timing equipment, and can achieve sub-microsecond high-precision time synchronization through precise timestamp exchange and deviation calculation. Compared with the traditional method that can only achieve millisecond or second accuracy, the time synchronization accuracy is greatly improved, meeting the higher requirements for time synchronization accuracy under the networked architecture of the new special vehicle electronic system, and providing reliable time guarantee for complex operation tasks involving multiple vehicles;

[0067] 3. The present invention adopts a multi-source time synchronization strategy, breaking through the limitations of a traditional single time source and integrating multiple time sources. The multi-source time synchronization strategy adopts four modes: high-precision PTP time synchronization mode, low-precision PTP time synchronization mode, local autonomous time synchronization mode, and local manual time synchronization mode. The multi-source time synchronization strategy enhances the adaptability and robustness of the system, ensuring effective time synchronization in different environments and device states;

[0068] 4. The present invention is based on the Bully election algorithm, which comprehensively considers the CPU main frequency and MAC address to elect monitoring nodes. First, the node with the highest CPU main frequency is selected as the candidate monitoring node. If the number of candidate nodes is greater than 1, the node with the largest MAC address value is selected as the monitoring node based on the MAC address ID. This election mechanism can select monitoring nodes with better performance and stronger uniqueness, thereby improving the rationality and accuracy of monitoring node election. At the same time, when the monitoring node stops publishing the election factor within a predetermined time period, the monitoring node can be reselected in time to ensure the stable operation of the platform in the event of node failure or abnormality;

[0069] 5. The present invention uses 5G-CPE to connect the workshop to the 5G cellular network, realizing high-speed, low-latency, and highly reliable communication for special vehicle fleets. The high bandwidth and low-latency characteristics of the 5G network support the rapid transmission and real-time response of large amounts of data, ensuring the real-time and reliability of collaborative control between vehicles; mobility management and anti-interference technology ensure the communication stability of vehicles under high-speed movement and complex electromagnetic environments. Through seamless integration with the on-board embedded information platform, 5G-CPE supports multi-vehicle collaboration and time synchronization, improving the operational efficiency and safety of the fleet. At the same time, the encrypted communication and identity authentication mechanisms of the 5G network enhance the security of the system and ensure the confidentiality and integrity of data transmission;

[0070] 6. The present invention can flexibly adjust the time synchronization mode according to the working state of the timekeeping and timing equipment and the effective state of the current calendar information. When the working state of the timekeeping and timing equipment changes, the monitoring node can timely judge and switch to the corresponding time synchronization mode, such as switching from high-precision PTP mode to low-precision PTP mode or local autonomous time synchronization mode. This flexible response mechanism enables the vehicle-mounted embedded information platform to quickly adapt to changes in equipment status, ensure the continuity and stability of time synchronization, avoid time synchronization interruptions caused by equipment failure or signal instability, and ensure the efficient coordination of special vehicles in various operating tasks and the accuracy of information transmission.

[0071] In the present invention, the above-mentioned technical solutions can also be combined with each other to achieve more preferred combination solutions. Other features and advantages of the present invention will be described in the subsequent description, and some advantages can become obvious from the description, or can be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] The drawings are only for the purpose of illustrating particular embodiments and are not to be considered limiting of the present invention. Like reference symbols denote like components throughout the drawings.

[0073] Figure 1This is a flow chart of a multi-source and multi-precision operating system time synchronization method in an embodiment of the present invention;

[0074] Figure 2 This is a diagram showing the deployment structure of an embedded information platform for a special vehicle in multi-vehicle collaboration in an embodiment of the present invention;

[0075] Figure 3 This is a flow chart of the monitoring node election algorithm in an embodiment of the present invention;

[0076] Figure 4 A flowchart of the time synchronization mode determination process in an embodiment of the present invention;

[0077] Figure 5 A schematic diagram of high-precision PTP time synchronization in an embodiment of the present invention;

[0078] Figure 6 Schematic diagram of a high-precision PTP time synchronization mechanism based on delay-request measurement in an embodiment of the present invention;

[0079] Figure 7 This is a schematic diagram of local autonomous time synchronization in an embodiment of the present invention;

[0080] Figure 8 Schematic diagram of local manual time synchronization in an embodiment of the present invention. DETAILED DESCRIPTION

[0081] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.

[0082] A specific embodiment of the present invention, as Figure 1 As shown, a multi-source multi-precision operating system time synchronization method is disclosed, comprising the following steps:

[0083] Step S1, constructing a special vehicle fleet, and building an on-board embedded information platform for each special vehicle in the fleet, wherein the platform includes an on-board computer, 5G-CPE, a timekeeping timing device, a Beidou device, and multiple on-board terminals, and the on-board computer includes multiple computing and processing modules;

[0084] Step S2, each special vehicle sets the time synchronization priority of each on-board node, and each of the on-board nodes performs UDP multicast of its own IP address, CPU main frequency, time synchronization priority and MAC address ID into the node resource pool; the on-board node includes a plurality of the on-board terminals and a plurality of the computing and processing modules;

[0085] Step S3, each special vehicle elects each on-board node to obtain a monitoring node based on the CPU main frequency and MAC address ID in the node resource pool, and the monitoring node establishes communication with the timekeeping and timing device to determine the working status of the timekeeping and timing device and the validity status of the current calendar information;

[0086] Step S4: the monitoring node of each special vehicle determines a time synchronization mode based on the working status of the timekeeping and timing device and the validity status of the current calendar information, and performs time synchronization on each of the on-board nodes based on the time synchronization mode and the time synchronization priority.

[0087] The step S1 comprises:

[0088] Assign a unique vehicle ID to each special vehicle in the fleet for indexing, and determine the leading vehicle and the following vehicles, wherein the leading vehicle has the smallest vehicle ID, and the following vehicles have increasing vehicle IDs;

[0089] Each vehicle-mounted node and device in the vehicle-mounted embedded information platform of each special vehicle is connected via Ethernet;

[0090] The Beidou device transfers the high-precision time TOD obtained by receiving Beidou satellite signals to the timekeeping and timing device;

[0091] Each special vehicle in the fleet is connected to the 5G cellular network based on the 5G-CPE;

[0092] The vehicle-mounted terminal and the computing and processing module both use the domestic openEuler operating system; the vehicle-mounted terminal uses the Rockchip RK3588 CPU processor; the computing and processing module uses the Feiteng FD-2000 / 8-core CPU processor.

[0093] For example, the special vehicle in the present invention is a forest fire truck or a rescue vehicle. A fleet includes multiple special vehicles. Figure 2 As shown in the figure, it is a deployment structure diagram of the embedded information platform of a special vehicle in multi-vehicle collaboration. For example, the hardware environment of a special vehicle includes: 1 vehicle-mounted computer, 3 vehicle-mounted terminals, 1 time-keeping and timing equipment and 1 Beidou equipment. The nodes in the vehicle are connected through Ethernet; and 5G-CPE router, which is connected to the switch inside the vehicle to provide workshop network access for special vehicles; the vehicle-mounted computer mainly includes computing and processing modules 1, 2, 3, power module, network switching module; vehicle-mounted time-keeping and timing equipment and Beidou equipment. The computing and processing modules and vehicle-mounted terminals are collectively referred to as vehicle-mounted nodes.

[0094] Computing and processing modules 1, 2 and 3 use the domestic openEuler operating system and the domestic Feiteng FD-2000 / 8-core CPU processor; according to equipment requirements, they are mainly divided into three types of terminals: operation command vehicle-mounted terminal, operation operation vehicle-mounted terminal, and driver vehicle-mounted terminal. The vehicle-mounted terminal uses the domestic openEuler operating system and the domestic Rockchip RK3588CPU processor.

[0095] The purpose of step S1 is to build an on-board embedded information platform architecture for special vehicle fleets, connect on-board nodes through Ethernet to work in coordination with Beidou equipment and time-keeping equipment, and use 5G-CPE to achieve networking between vehicles, laying the foundation for subsequent time synchronization and multi-vehicle collaborative synchronization of system time.

[0096] Step S2 includes steps S21-S22.

[0097] Step S21: Each special vehicle sets the time synchronization priority of each onboard node.

[0098] Define the time synchronization priority profile, deploy the priority profile to the vehicle terminal and computing processing module, and complete the priority setting of various types of vehicle terminals and computing processing modules.

[0099] According to the specific actual usage requirements, the time synchronization priority of various types of vehicle-mounted terminals is divided, as shown in Table 1. The larger the priority value, the higher the priority level. For example, the time synchronization priority of the vehicle-mounted terminal is defined as: operation command vehicle-mounted terminal> operation operation vehicle-mounted terminal> driver vehicle-mounted terminal. The time synchronization priority of the vehicle-mounted terminal is greater than the priority of the calculation processing modules 1, 2, and 3 of the vehicle-mounted computer.

[0100] Table 1 Description of vehicle node time synchronization priority

[0101]

[0102]

[0103] Step S22: Each vehicle-mounted node multicasts its own IP address, CPU main frequency, time synchronization priority and MAC address ID into the node resource pool via UDP (User Datagram Protocol).

[0104] The platform presets a fixed IP address for each vehicle-mounted node. Periodically, each vehicle-mounted node dials its own IP address, CPU main frequency, time synchronization priority and MAC address ID group into the node resource pool. For example, the period is 100ms.

[0105] The node resource pool includes the IP address, CPU main frequency, time synchronization priority, MAC address ID and the most recent system time synchronization update time data of all on-board nodes in the current vehicle.

[0106] The CPU main frequency and MAC address ID of each node provide election factors for subsequent monitoring node elections.

[0107] Step S3 includes steps S31-S32.

[0108] Step S31: Each special vehicle elects each on-board node to obtain a monitoring node based on the CPU main frequency and MAC address ID in the node resource pool.

[0109] like Figure 3 As shown, the monitoring node of each vehicle in the fleet is elected. Each special vehicle elects the monitoring node based on the CPU main frequency and MAC address ID based on the Bully election algorithm, including:

[0110] Select the vehicle-mounted node with the highest CPU main frequency as a candidate monitoring node. If the number of candidate monitoring nodes is 1, the vehicle-mounted node is a monitoring node.

[0111] Otherwise, an election is performed based on the MAC address ID, and the vehicle-mounted node with the largest MAC address ID is elected as the monitoring node, and the other vehicle-mounted nodes are elected as non-monitoring nodes;

[0112] If the monitoring node stops publishing the election factor within a predetermined time period, a new monitoring node is selected.

[0113] Since the MAC address ID of each vehicle node in the vehicle network environment is unique, under the premise of consistent CPU main frequency, a node with the largest MAC address ID can be elected as a monitoring node, and other nodes can be elected as non-monitoring nodes; since the CPU main frequency of Feiteng FD-2000 / 8-core CPU processor is higher than the CPU main frequency of Rockchip RK3588CPU processor, most of the time the computing processing module is elected as the monitoring node. This ensures the uniqueness of the monitoring node and simplifies the election logic. Under the premise of consistent CPU main frequency, the node with the largest MAC address ID is elected as the monitoring node, which has obvious identification characteristics and is convenient for system administrators to identify and locate. In the process of system management and maintenance, the monitoring node can be quickly found through the MAC address ID, and the corresponding configuration, monitoring and troubleshooting can be carried out, which improves the convenience and efficiency of management.

[0114] The operation status of the monitoring node is determined based on the most recent system time synchronization update time in the node resource pool. When the monitoring node stops periodically publishing the election factor and the update exceeds a predetermined time period, the monitoring node is re-elected. For example, the predetermined time period is 5 seconds.

[0115] The monitoring node frequently exchanges data with the time-keeping and timing equipment. In order to reduce the network bandwidth pressure of special vehicles, this algorithm dynamically selects a monitoring node from the device nodes that need to be time synchronized, and conducts point-to-point network communication with the time-keeping and timing equipment. This method can effectively improve the network resource utilization of special vehicles and can adapt to the vehicle-mounted embedded environment with limited network resources.

[0116] Step S32: establish communication between the monitoring node and the time-keeping and timing device, and determine the working status of the time-keeping and timing device and the validity status of the current calendar information.

[0117] The monitoring node establishes communication with the timekeeping and timing device, including:

[0118] The first step is that the monitoring node sends a first UDP heartbeat message to the fixed IP address and port number of the timekeeping and timing device;

[0119] Step 2: After receiving the first UDP heartbeat message, the time-keeping and timing device sends a second UDP heartbeat message and a UDP data message to the monitoring node in response; if the time-keeping and timing device does not receive the first UDP heartbeat message within a continuous preset time period, return to the first step;

[0120] Step 3: The monitoring node parses the received second UDP heartbeat message to determine the working status of the timekeeping and timing device and whether the current calendar information is valid;

[0121] Wherein, the UDP data message includes a sending timestamp.

[0122] The monitoring node actively sends the first UDP heartbeat message to the fixed IP address and port number of the timekeeping device. Exemplarily, the sending period is 1 second, and the UDP heartbeat message format follows the IEEE802.3 Ethernet IP / UDP encapsulation format. Exemplarily, the UDP heartbeat message includes: IP message header, UDP message header, message ID, message payload length, and cycle count field, as shown in Table 2.

[0123] Table 2 The first UDP heartbeat message data protocol

[0124]

[0125] The first UDP heartbeat message protocol has a total length of 40 bytes, including:

[0126] (1) IP header, 20 bytes in length, following the IP encapsulation format of TCP / IP, RFC1122 and RFC1123 protocols, mainly including the source IP address (IP address of the monitoring node) and the destination IP address (IP address of the timekeeping device);

[0127] (2) UDP message header, 8 bytes in length, which complies with the UDP encapsulation format of RFC768 protocol, mainly including source port number (monitoring node port number), destination port number (timekeeping device port number), length, checksum, etc.;

[0128] (3) Message ID, 4 bytes in length. For example, the first UDP heartbeat message ID is 0x111222, which is used to identify the message type.

[0129] (4) Message payload length, 4 bytes, used to indicate the payload data length;

[0130] (5) Cycle count, length 4 bytes, used to monitor the count of the first UDP heartbeat message sent by the node. The physical value range is [0,4294967295], used to indicate the number of heartbeats. When the maximum value 4294967295 is reached, it loops back to 0.

[0131] After the timekeeping and timing device receives the first UDP heartbeat message sent by the monitoring node, it records the source IP address and source port number of the first UDP heartbeat message (the IP address and port number of the monitoring node); the timekeeping and timing device responds to the source IP address and source port number and sends a second UDP heartbeat message. For example, the cycle is 1 second, and the second UDP heartbeat message format follows the IEEE802.3 Ethernet IP / UDP encapsulation format. For example, the second UDP heartbeat message includes fields such as IP message header, UDP message header, message ID, message payload length, and cycle count. The specific format is shown in Table 3. The monitoring node receives the second UDP heartbeat message from the timekeeping and timing device and confirms that the timekeeping and timing device is online.

[0132] The timekeeping and timing device encapsulates the timekeeping and timing device working status data into a UDP datagram, and sends the timekeeping and timing device working status message data to the source IP address and source port number. The timekeeping and timing device working status message format follows the IEEE802.3 Ethernet IP / UDP encapsulation format. Exemplarily, the second UDP heartbeat message includes: an IP message header, a UDP message header, a message ID, a message payload length, a timekeeping and timing device clock synchronization status, and a current calendar information valid status field. The specific message format is shown in Table 3.

[0133] Table 3 Second UDP heartbeat message data protocol

[0134]

[0135]

[0136] The second UDP heartbeat message has a total length of 40 bytes and includes:

[0137] (1) IP header, 20 bytes in length, following the IP encapsulation format of TCP / IP, RFC1122 and RFC1123 protocols, including the source IP address (IP address of the timekeeping device) and the destination IP address (IP address of the monitoring node);

[0138] (2) UDP message header, 8 bytes in length, following the UDP encapsulation format of RFC768 protocol, mainly including source port number (port number of timekeeping device), destination port number (port number of monitoring node), length, and checksum;

[0139] (3) Message ID, length 4 bytes, the second UDP heartbeat message ID is 0x222333, used to identify the message type;

[0140] (4) Message payload length, 4 bytes, used to indicate the payload data length;

[0141] (5) Clock synchronization status of the punctual timing device, length 1 byte, physical value range: {0,1,2,3,4}, 0 means asynchronous, 1 means being synchronized, 2 means synchronized, 3 means punctual, 4 means RTC (Real-Time Clock) timing;

[0142] 0: Asynchronous state, indicating that the timekeeping and timing device is not currently synchronized with the time source of the Beidou device;

[0143] 1: In the state of synchronizing, it means that the timekeeping and timing equipment is synchronizing with the time source of the Beidou equipment, but the synchronization has not been completed;

[0144] 2: Synchronized state, indicating that the timekeeping and timing equipment has been successfully synchronized with the time source of the Beidou equipment, and the current time is the most accurate;

[0145] 3: Timekeeping state, which means that the timekeeping device relies on its own clock source (such as constant temperature crystal oscillator, rubidium atomic clock, etc.) to maintain time accuracy when the Beidou device's time source is lost;

[0146] 4: RTC timing status, indicating that the timekeeping and timing equipment uses the RTC module to provide time information. It is usually used for the timekeeping and timing equipment to provide basic time functions when there is no time source from the Beidou device.

[0147] (6) Current calendar information validity status, length 1 byte, physical value range: {0,1}, 0 means invalid, 1 means valid; reserved bits occupy 2 bytes;

[0148] The monitoring node parses the second UDP heartbeat message to determine the working status of the time-keeping and timing device; if the time-keeping and timing device does not receive the first UDP heartbeat message sent by the monitoring node for 10 consecutive seconds, it is considered that the connection communication is interrupted. At this time, the time-keeping and timing device terminates the sending of all UDP data messages, the second UDP heartbeat message, and stops receiving all UDP data messages, and restarts the communication connection between the monitoring node and the time-keeping and timing device.

[0149] The monitoring node parses the UDP data of the time-keeping and timing device to obtain the data on the validity of the calendar information of the working status of the time-keeping and timing device.

[0150] Step S4, specifically.

[0151] like Figure 4 As shown, the step S4 includes:

[0152] If the working status of the timekeeping and timing devices of all vehicles in the fleet are synchronized or the working status of the timekeeping and timing devices of some vehicles are synchronized, and the current calendar information is valid, the high-precision PTP time synchronization mode is used to perform high-precision time synchronization on each vehicle-mounted node based on the clock source of the timekeeping and timing device;

[0153] If the working state of the timekeeping and timing device is being synchronized, timekeeping or RTC timing, and the current calendar information is valid, the vehicle election is performed based on the workshop 5G cellular network of the 5G-CPE to obtain a reference vehicle, and the low-precision PTP time synchronization mode is used to perform low-precision time synchronization on the vehicle-mounted nodes in the fleet based on the clock source of the timekeeping and timing device of the reference vehicle;

[0154] If the working status of the timekeeping and timing devices of all vehicles in the fleet are asynchronous, the monitoring node of the lead vehicle performs UDP multicast in a local autonomous time synchronization mode, and the on-board node of each vehicle in the fleet uses the calendar information of the monitoring node of the lead vehicle as the clock source, and uses the workshop 5G cellular network of the 5G-CPE to perform low-precision time synchronization on the on-board nodes of all vehicles in the fleet based on the time synchronization priority of the on-board nodes;

[0155] When the high-precision or low-precision PTP time synchronization mode, or the local autonomous time synchronization mode is not received within a certain time period, each on-board node adopts the local manual time synchronization mode, and performs low-precision time synchronization on the system time of the monitoring node of the lead vehicle based on the manually set system time of the lead vehicle's other on-board nodes and the on-board nodes of other vehicles in the fleet.

[0156] Exemplarily, the priority definitions of the four modes of high-precision PTP time synchronization, low-precision PTP time synchronization, local autonomous time synchronization and manual time synchronization are as shown in Table 4. The larger the priority value, the higher the priority level.

[0157] Table 4 Time synchronization mode priority description

[0158] Mode Name Priority High-precision PTP time synchronization mode 4 Low-precision PTP time synchronization mode 3 Manual time synchronization mode 2 Local autonomous time synchronization mode 1

[0159] Based on the different environmental conditions of existing vehicles, a variety of in-vehicle and inter-vehicle time synchronization modes are provided based on different time source information in the vehicle. High-precision PTP time synchronization such as Figure 5 shown.

[0160] If the working status of the timekeeping and timing devices of all vehicles in the fleet are synchronized, and the current calendar information is valid, each vehicle uses the clock source of the timekeeping and timing device of the vehicle as the reference to perform high-precision PTP time synchronization on other on-board nodes of the vehicle;

[0161] If the working status of the time-keeping and timing devices of some vehicles is synchronized, and the current calendar information is valid, the vehicles whose time-keeping and timing devices are synchronized will use the clock source of their own time-keeping and timing devices as a reference to perform high-precision PTP time synchronization on other on-board nodes of the vehicle; at the same time, for vehicles whose time-keeping and timing devices are not synchronized, use the system time of the monitoring node of the vehicle with the largest vehicle ID of the vehicles whose time-keeping and timing devices are synchronized as a reference to perform high-precision PTP time synchronization on all on-board nodes of the vehicle based on the 5G cellular network.

[0162] The high-precision PTP time synchronization mode based on delay-request measurement performs high-precision time synchronization on the system time of the vehicle node as follows:

[0163] The time keeping and timing device acts as a PTP server, and the monitoring node acts as a PTP client;

[0164] The PTP server sends a Sync message to the PTP client and records the message sending time t1;

[0165] The PTP client receives the Sync synchronization message and records the message receiving time t2;

[0166] The PTP server puts t1 in the Follow_Up follow-up delay message and sends it to the PTP client. After receiving the message, the PTP client parses out the time t1;

[0167] The PTP client sends a Delay_Req delay request message to the PTP server, and synchronously records the time t3 when the Delay_Req delay request message is sent. The PTP server receives the message and records the time t4 when it is received.

[0168] The PTP server puts the t4 time in the Delay_Resp delayed response message and sends it to the PTP client. The PTP client receives the message and parses out t4; the PTP client obtains the time values ​​t1, t2, t3 and t4;

[0169] The time offset value Offset and the network link delay Delay between the PTP server and the client are calculated as follows:

[0170] t2-t1-Offset=Delay

[0171] t4-(t3-Offset)=Delay

[0172] The calculation results are:

[0173] Offset=[(t2-t1)+(t3-t4)] / 2

[0174] Delay=[(t2-t1)+(t4-t3)] / 2

[0175] Based on the time deviation value Offset, the PTP client subtracts the Offset value from the local system time value to obtain the synchronization time with the high-precision clock source of the PTP server, and synchronously updates the local system time of the monitoring node.

[0176] Based on the IEEE 1588V2 (PTP) protocol time synchronization method, high-precision PTP time synchronization of vehicle-mounted nodes is achieved. Based on the time synchronization mechanism of delay-request measurement, high-precision PTP time synchronization of vehicle-mounted nodes of each vehicle is completed.

[0177] The time-keeping and timing equipment broadcasts synchronization messages through Ethernet; the on-board nodes respond to the synchronization messages; the time-keeping and timing equipment sends a delayed response message to each on-board node, and each on-board node calculates the network link delay and time deviation value, and performs high-precision calibration on the local time of each device node.

[0178] The time synchronization mechanism based on delay-request measurement completes the time synchronization between the time-keeping timing device and the on-board node of each vehicle. The specific process is as follows Figure 6 As shown:

[0179] a) The PTP server sends a Sync message to the PTP client. The timing device records the time t1 when the Sync message is sent. After the PTP client receives the Sync message, it records the time t2 when it is received.

[0180] b) The PTP server puts the t1 time in the Follow_Up delay message and sends it to the PTP client. After receiving this message, the PTP client software parses the time t1;

[0181] c) The PTP client sends a Delay_Req delay request message to the PTP server, and simultaneously records the time t3 when the Delay_Req delay request message is sent. After the PTP server receives the message, it records the time t4 when it is received;

[0182] d) The PTP server puts the t4 time in the Delay_Resp delay response message and sends it to the PTP client. The PTP client receives this message and parses t4. At this time, the PTP client has received the four time values ​​t1, t2, t3, and t4 required for high-precision synchronization calculation, and can then calculate two key parameters: time offset value Offset and network link delay Delay:

[0183] High-precision time synchronization based on the PTP protocol can achieve higher accuracy than traditional time synchronization methods through CAN and Ethernet vehicle buses. Its timing accuracy reaches sub-microsecond level, which can meet the needs of multi-vehicle collaboration that requires higher time synchronization accuracy and complex tasks such as firefighting and rescue that require coordinated control of unmanned vehicles.

[0184] If the working state of the timekeeping and timing device is in time synchronization, timekeeping or RTC timing, it enters the low-precision PTP time synchronization mode.

[0185] In the low-precision PTP time synchronization mode, each vehicle performs low-precision time synchronization on the system time of the vehicle node as follows:

[0186] The vehicle election includes:

[0187] Find out the special vehicles whose working status of the punctual timing device is punctual. If the number of vehicles in the punctual status is greater than 1, select the vehicle with the smallest vehicle ID value in the punctual status in the fleet as the benchmark vehicle;

[0188] Otherwise, find out the special vehicle whose working state of the timekeeping and timing device is being synchronized. If the number of vehicles in the synchronization state is greater than 1, select the vehicle with the smallest ID value in the synchronization state in the fleet as the reference vehicle;

[0189] Otherwise, find out the special vehicle whose working state of the timekeeping timing device is RTC timing. If the number of vehicles in the RTC timing state is greater than 1, select the vehicle with the smallest vehicle ID value in the RTC timing state in the fleet as the reference vehicle;

[0190] Based on the clock source of the timekeeping and timing equipment of the reference vehicle, time synchronization is performed on other onboard nodes in the reference vehicle;

[0191] At the same time, the workshop 5G cellular network of 5G-CPE is used to perform low-precision time synchronization on the on-board nodes of other vehicles in the fleet.

[0192] like Figure 7 As shown, if the working states of the timekeeping and timing devices of all vehicles in the fleet are asynchronous, the monitoring node of the head vehicle performs UDP multicast using a local autonomous time synchronization mode.

[0193] Based on the local autonomous time synchronization mode, the system time of the vehicle-mounted node of each vehicle in the fleet is synchronized with low precision, including:

[0194] Each on-board node in the lead vehicle selects the system time and time synchronization priority information of the on-board node periodically multicasted by UDP in the node resource pool; selects the system time of the on-board node with the highest time synchronization priority, and determines the validity of the selected system time based on a preset valid time threshold; if valid, updates the system time of the on-board node to the selected system time;

[0195] The system time of the monitoring node of the lead vehicle is used as the highest priority clock source, and the workshop 5G cellular network of 5G-CPE is used to synchronously update the on-board nodes of other vehicles in the fleet to the system time of the monitoring node of the lead vehicle.

[0196] The on-board node multicasts its system time and time synchronization priority information in a 100ms period, and determines the validity of the selected system time based on the preset valid time threshold information. When the selected system time information is earlier than the threshold information, it is judged to be invalid and the processing is terminated. Otherwise, it is judged to be valid time information and the subsequent steps are processed. Exemplarily, the valid time threshold is set to 00:00:00:00 on January 1, 2023.

[0197] When the timekeeping and timing equipment is not working properly, it cannot receive high-precision time synchronization information. In order to ensure the normal operation mode of special vehicle missions, a timing mechanism for the vehicle and workshop in a local manual time synchronization mode is provided.

[0198] like Figure 8As shown, based on the system time of the monitoring node of the lead vehicle manually set in the local manual time synchronization mode, the system time of the onboard node of the lead vehicle and the onboard nodes of other vehicles in the fleet are synchronized with low precision, including:

[0199] Use the time modification interface of the operation command vehicle terminal of the lead vehicle to set the system time of the monitoring node of the lead vehicle;

[0200] The validity of the system time of the monitoring node of the set head vehicle is determined based on the preset effective time threshold;

[0201] If valid, the system time of other onboard nodes of the lead vehicle and onboard nodes of other vehicles in the fleet will be synchronized with the system time of the monitoring node of the lead vehicle.

[0202] The local manual time synchronization mode of the vehicle-mounted node receives the time information set by the user through the time modification interface of the operation command vehicle terminal, and judges the time validity based on the valid time threshold information. When the modified time information is earlier than the threshold information, it is judged to be invalid and the processing is terminated. Otherwise, it is judged to be valid time information.

[0203] When the timekeeping and timing equipment is not working properly, it cannot receive high-precision time synchronization information and the local time of each vehicle-mounted terminal is inconsistent with the actual time, in order to ensure that the vehicle clock information can be manually modified in time, a local manual time synchronization method is provided, that is, the user manually sets the system time of the monitoring node of the lead vehicle through the time modification interface of the operation command vehicle-mounted terminal. Under the premise that the set system time is valid, the synchronization time update of other vehicle-mounted terminals and the calculation and processing modules of the vehicle-mounted computer in the lead vehicle, as well as the synchronization time update of the vehicle-mounted terminals and the calculation and processing modules of other vehicles are completed, so as to achieve the consistency of time of each vehicle-mounted node.

[0204] In summary, a multi-source and multi-precision operating system time synchronization method according to an embodiment of the present invention has the following beneficial effects:

[0205] 1. The operating system time synchronization method in the present invention is an autonomous and controllable customized research and development based on the domestic openEuler operating system and domestic chips; the method of the present invention not only improves the performance and reliability of the special vehicle on-board embedded information platform, but also ensures the autonomous controllability and security of the platform, and meets the needs of multi-vehicle collaboration and unmanned vehicle collaborative operations of special vehicles in complex environments;

[0206] 2. The present invention adopts a high-precision PTP time synchronization mode, based on the high-precision clock source of the timekeeping and timing equipment, and can achieve sub-microsecond high-precision time synchronization through precise timestamp exchange and deviation calculation. Compared with the traditional method that can only achieve millisecond or second accuracy, the time synchronization accuracy is greatly improved, meeting the higher requirements for time synchronization accuracy under the networked architecture of the new special vehicle electronic system, and providing reliable time guarantee for complex operation tasks involving multiple vehicles;

[0207] 3. The present invention adopts a multi-source time synchronization strategy, breaking through the limitations of a traditional single time source and integrating multiple time sources. The multi-source time synchronization strategy adopts four modes: high-precision PTP time synchronization mode, low-precision PTP time synchronization mode, local autonomous time synchronization mode, and local manual time synchronization mode. The multi-source time synchronization strategy enhances the adaptability and robustness of the system, ensuring effective time synchronization in different environments and device states;

[0208] 4. The present invention is based on the Bully election algorithm, which comprehensively considers the CPU main frequency and MAC address to elect monitoring nodes. First, the node with the highest CPU main frequency is selected as the candidate monitoring node. If the number of candidate nodes is greater than 1, the node with the largest MAC address value is selected as the monitoring node based on the MAC address. This election mechanism can select monitoring nodes with better performance and stronger uniqueness, thereby improving the rationality and accuracy of monitoring node election. At the same time, when the monitoring node stops publishing the election factor within a predetermined time period, the monitoring node can be reselected in time to ensure the stable operation of the platform in the event of node failure or abnormality;

[0209] 5. The present invention uses 5G-CPE to connect the workshop to the 5G cellular network, realizing high-speed, low-latency, and highly reliable communication for special vehicle fleets. The high bandwidth and low-latency characteristics of the 5G network support the rapid transmission and real-time response of large amounts of data, ensuring the real-time and reliability of collaborative control between vehicles; mobility management and anti-interference technology ensure the communication stability of vehicles under high-speed movement and complex electromagnetic environments. Through seamless integration with the on-board embedded information platform, 5G-CPE supports multi-vehicle collaboration and time synchronization, improving the operational efficiency and safety of the fleet. At the same time, the encrypted communication and identity authentication mechanisms of the 5G network enhance the security of the system and ensure the confidentiality and integrity of data transmission;

[0210] 6. The present invention can flexibly adjust the time synchronization mode according to the working state of the timekeeping and timing equipment and the effective state of the current calendar information. When the working state of the timekeeping and timing equipment changes, the monitoring node can timely judge and switch to the corresponding time synchronization mode, such as switching from high-precision PTP mode to low-precision PTP mode or local autonomous time synchronization mode. This flexible response mechanism enables the vehicle-mounted embedded information platform to quickly adapt to changes in equipment status, ensure the continuity and stability of time synchronization, avoid time synchronization interruptions caused by equipment failure or signal instability, and ensure the efficient coordination of special vehicles in various operating tasks and the accuracy of information transmission.

[0211] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A multi-source multi-precision operating system time synchronization method, characterized in that: The steps include: Step S1, constructing a special vehicle fleet, and building an on-board embedded information platform for each special vehicle in the fleet, wherein the platform includes an on-board computer, 5G-CPE, a timekeeping timing device, a Beidou device, and multiple on-board terminals, and the on-board computer includes multiple computing and processing modules; Step S2, each special vehicle sets the time synchronization priority of each on-board node, and each of the on-board nodes performs UDP multicast of its own IP address, CPU main frequency, time synchronization priority and MAC address ID into the node resource pool; the on-board node includes a plurality of the on-board terminals and a plurality of the computing and processing modules; Step S3, each special vehicle elects each on-board node to obtain a monitoring node based on the CPU main frequency and MAC address ID in the node resource pool, and the monitoring node establishes communication with the timekeeping and timing device to determine the working status of the timekeeping and timing device and the validity status of the current calendar information; Step S4: the monitoring node of each special vehicle determines a time synchronization mode based on the working status of the timekeeping and timing device and the validity status of the current calendar information, and performs time synchronization on each of the on-board nodes based on the time synchronization mode and the time synchronization priority.

2. The method according to claim 1, characterized in that: Each special vehicle elects the CPU main frequency and MAC address ID based on the Bully election algorithm to obtain a monitoring node, including: Select the vehicle-mounted node with the highest CPU main frequency as a candidate monitoring node. If the number of candidate monitoring nodes is 1, the vehicle-mounted node is a monitoring node. Otherwise, an election is performed based on the MAC address ID, and the vehicle-mounted node with the largest MAC address ID is elected as the monitoring node, and the other vehicle-mounted nodes are elected as non-monitoring nodes; If the monitoring node stops publishing the election factor within a predetermined time period, a new monitoring node is selected.

3. The method according to claim 1, characterized in that: The monitoring node establishes communication with the timekeeping and timing device, including: The first step is that the monitoring node sends a first UDP heartbeat message to the fixed IP address and port number of the timekeeping and timing device; Step 2: After receiving the first UDP heartbeat message, the time-keeping and timing device sends a second UDP heartbeat message and a UDP data message to the monitoring node in response; if the time-keeping and timing device does not receive the first UDP heartbeat message within a continuous preset time period, return to the first step; Step 3: The monitoring node parses the received second UDP heartbeat message to determine the working status of the timekeeping and timing device and whether the current calendar information is valid; Wherein, the UDP data message includes a sending timestamp.

4. The method according to claim 1, characterized in that: The step S4 comprises: If the working status of the timekeeping and timing devices of all vehicles in the fleet are synchronized or the working status of the timekeeping and timing devices of some vehicles are synchronized, and the current calendar information is valid, the high-precision PTP time synchronization mode is used to perform high-precision time synchronization on each vehicle-mounted node based on the clock source of the timekeeping and timing device; If the working state of the timekeeping and timing device is being synchronized, timekeeping or RTC timing, and the current calendar information is valid, the vehicle election is performed based on the workshop 5G cellular network of the 5G-CPE to obtain a reference vehicle, and the low-precision PTP time synchronization mode is used to perform low-precision time synchronization on the vehicle-mounted nodes in the fleet based on the clock source of the timekeeping and timing device of the reference vehicle; If the working status of the timekeeping and timing devices of all vehicles in the fleet are asynchronous, the monitoring node of the lead vehicle performs UDP multicast in a local autonomous time synchronization mode, and the on-board node of each vehicle in the fleet uses the calendar information of the monitoring node of the lead vehicle as the clock source, and uses the workshop 5G cellular network of the 5G-CPE to perform low-precision time synchronization on the on-board nodes of all vehicles in the fleet based on the time synchronization priority of the on-board nodes; When the high-precision or low-precision PTP time synchronization mode, or the local autonomous time synchronization mode is not received within a certain time period, each on-board node adopts the local manual time synchronization mode, and performs low-precision time synchronization on the system time of the monitoring node of the lead vehicle based on the manually set system time of the lead vehicle's other on-board nodes and the on-board nodes of other vehicles in the fleet.

5. The method according to claim 4, characterized in that: If the working status of the timekeeping and timing devices of all vehicles in the fleet are synchronized, and the current calendar information is valid, each vehicle uses the clock source of the timekeeping and timing device of the vehicle as the reference to perform high-precision PTP time synchronization on other on-board nodes of the vehicle; If the working status of the timekeeping and timing devices of some vehicles is synchronized, and the current calendar information is valid, the vehicles whose timekeeping and timing devices are synchronized will use the clock source of their own timekeeping and timing devices as a reference to perform high-precision PTP time synchronization on other on-board nodes of the vehicle; at the same time, for vehicles whose timekeeping and timing devices are not synchronized, use the system time of the monitoring node of the vehicle with the largest vehicle ID of the vehicles whose timekeeping and timing devices are synchronized as a reference to perform high-precision PTP time synchronization on all on-board nodes of the vehicle based on the 5G cellular network.

6. The method according to claim 5, characterized in that: The high-precision PTP time synchronization mode based on delay-request measurement performs high-precision time synchronization on the system time of the vehicle node as follows: The time keeping and timing device acts as a PTP server, and the monitoring node acts as a PTP client; The PTP server sends a Sync message to the PTP client and records the message sending time t1; The PTP client receives the Sync synchronization message and records the message receiving time t2; The PTP server puts t1 in the Follow_Up follow-up delay message and sends it to the PTP client. After receiving the message, the PTP client parses out the time t1; The PTP client sends a Delay_Req delay request message to the PTP server, and synchronously records the time t3 when the Delay_Req delay request message is sent. The PTP server receives the message and records the time t4 when it is received. The PTP server puts the t4 time in the Delay_Resp delayed response message and sends it to the PTP client. The PTP client receives the message and parses out t4; the PTP client obtains the time values ​​t1, t2, t3 and t4; The time offset value Offset and the network link delay Delay between the PTP server and the client are calculated as follows: t2-t1-Offset=Delay t4-(t3-Offset)=Delay The calculation results are: Offset=[(t2-t1)+(t3-t4)] / 2 Delay=[(t2-t1)+(t4-t3)] / 2 Based on the time deviation value Offset, the PTP client subtracts the Offset value from the local system time value to obtain the synchronization time with the high-precision clock source of the PTP server, and synchronously updates the local system time of the monitoring node.

7. The method according to claim 4, characterized in that: In the low-precision PTP time synchronization mode, each vehicle performs low-precision time synchronization on the system time of the vehicle node as follows: The vehicle election includes: Find out the special vehicles whose working status of the punctual timing device is punctual. If the number of vehicles in the punctual status is greater than 1, select the vehicle with the smallest vehicle ID value in the punctual status in the fleet as the benchmark vehicle; Otherwise, find out the special vehicle whose working state of the timekeeping and timing device is being synchronized. If the number of vehicles in the synchronization state is greater than 1, select the vehicle with the smallest ID value in the synchronization state in the fleet as the reference vehicle; Otherwise, find out the special vehicle whose working state of the timekeeping timing device is RTC timing. If the number of vehicles in the RTC timing state is greater than 1, select the vehicle with the smallest vehicle ID value in the RTC timing state in the fleet as the reference vehicle; Based on the clock source of the timekeeping and timing equipment of the reference vehicle, time synchronization is performed on other onboard nodes in the reference vehicle; At the same time, the workshop 5G cellular network of 5G-CPE is used to perform low-precision time synchronization on the on-board nodes of other vehicles in the fleet.

8. The method according to claim 4, characterized in that: Based on the local autonomous time synchronization mode, the system time of the vehicle-mounted node of each vehicle in the fleet is synchronized with low precision, including: Each on-board node in the lead vehicle selects the system time and time synchronization priority information of the on-board node periodically multicasted by UDP in the node resource pool; selects the system time of the on-board node with the highest time synchronization priority, and determines the validity of the selected system time based on a preset valid time threshold; if valid, updates the system time of the on-board node to the selected system time; The system time of the monitoring node of the lead vehicle is used as the highest priority clock source, and the workshop 5G cellular network of 5G-CPE is used to synchronously update the on-board nodes of other vehicles in the fleet to the system time of the monitoring node of the lead vehicle.

9. The method according to claim 4, characterized in that: Based on the system time of the monitoring node of the lead vehicle manually set in the local manual time synchronization mode, the system time of the onboard node of the lead vehicle and the onboard nodes of other vehicles in the fleet are synchronized with low precision, including: Use the time modification interface of the operation command vehicle terminal of the lead vehicle to set the system time of the monitoring node of the lead vehicle; The validity of the system time of the monitoring node of the set lead vehicle is determined based on the preset effective time threshold; If valid, the system time of other onboard nodes of the lead vehicle and onboard nodes of other vehicles in the fleet will be synchronized with the system time of the monitoring node of the lead vehicle.

10. The method according to any one of claims 1 to 9, characterized in that: The step S1 comprises: Assign a unique vehicle ID to each special vehicle in the fleet for indexing, and determine the leading vehicle and the following vehicle, wherein the leading vehicle has the smallest vehicle ID, and the following vehicle IDs increase in sequence; Each vehicle-mounted node and device in the vehicle-mounted embedded information platform of each special vehicle is connected via Ethernet; The Beidou device transfers the high-precision time TOD obtained by receiving Beidou satellite signals to the timekeeping and timing device; Each special vehicle in the fleet is connected to the 5G cellular network based on the 5G-CPE; The vehicle-mounted terminal and the computing and processing module both use the domestic openEuler operating system; the vehicle-mounted terminal uses the Rockchip RK3588 CPU processor; the computing and processing module uses the Feiteng FD-2000 / 8-core CPU processor.

Citation Information

Patent Citations

  • Wireless sensor network time synchronization method and device based on error statistics

    CN101087219A

  • Method for solving satellite navigation timing punctuality in clock synchronization system

    CN107247405A

  • Network port PTP time service function extension device and extension method

    CN114629586A