Offline time synchronization method and device for multiple systems
Patent Information
- Application Number
- CN202411670660.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-18
AI Technical Summary
[0003]现有多系统时间同步的方案,需要额外在系统端接入时间源设备,并且要求在环内所有系统需要支持相关通讯协议、硬件时间同步协议(如NTP)等,由于多系统的硬件时间同步协议在传输时间同步数据时可能会受到网络延迟的影响,从而降低多系统时间同步的同步的精确度
[0044] From the above technical solution, it can be seen that this application discloses a multi-system offline time synchronization method and device to obtain vehicle chassis can network signals connected to different acquisition devices, and extract multiple sets of verification offline signals from vehicle chassis can network signals. With multiple sets of scroll counter offline signals, splice multiple sets of verification offline signals and multiple sets of scroll counter offline signals in the preset splicing order to obtain key values corresponding to different acquisition devices, and keys corresponding to different acquisition devices The value is matched with key values to obtain the time difference sequence between the main system and each auxiliary system, and the system time of the main system is aligned according to the time difference sequence.
Smart Images

Figure CN119483802A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of time synchronization, and more specifically, to a multi-system offline time synchronization method and device. Background Art
[0002] A common solution for time synchronization between multiple systems is to connect an external time synchronization device as a time synchronization server, and unify the clock sources of multiple systems by sending synchronization signals through the server.
[0003] The existing multi-system time synchronization solution requires additional access to a time source device on the system side, and requires all systems in the loop to support relevant communication protocols, hardware time synchronization protocols (such as NTP), etc. Since the hardware time synchronization protocol of multiple systems may be affected by network delays when transmitting time synchronization data, the synchronization accuracy of the multi-system time synchronization is reduced.
[0004] Therefore, how to improve the synchronization accuracy of multi-system time synchronization is a problem that needs to be solved urgently in this application. Summary of the invention
[0005] In view of this, the present application discloses a multi-system offline time synchronization method and device, aiming to ensure extremely high synchronization accuracy between the clocks of the multi-systems and improve the synchronization accuracy of the multi-system time synchronization.
[0006] In order to achieve the above purpose, the disclosed technical solution is as follows:
[0007] In a first aspect, the present application discloses a multi-system offline time synchronization method, the method comprising:
[0008] Get the vehicle chassis CAN network signal connected to different acquisition devices;
[0009] Extracting multiple groups of verification offline signals and multiple groups of rolling counter offline signals from the vehicle chassis CAN network signal;
[0010] splicing the multiple groups of verification offline signals and the multiple groups of rolling counter offline signals according to a preset splicing order to obtain key values corresponding to different acquisition devices;
[0011] Match the key values corresponding to different acquisition devices to obtain the time difference sequence between the main system and each subsidiary system;
[0012] The system time of the main system is aligned according to the time difference sequence.
[0013] Preferably, the step of obtaining the vehicle chassis CAN network signal connected to different acquisition devices includes:
[0014] Use the vehicle chassis CAN network signal as a synchronous CAN network signal;
[0015] The synchronous CAN network signal is connected to different acquisition devices to complete the process of acquiring the vehicle chassis CAN network signal connected to different acquisition devices; wherein the different acquisition devices include at least one main system and at least one auxiliary system.
[0016] Preferably, the extracting of multiple groups of verification offline signals and multiple groups of rolling counter offline signals from the vehicle chassis CAN network signal comprises:
[0017] The vehicle chassis CAN network signals connected to different acquisition devices are parsed through the controller area network database protocol to obtain multiple groups of initial verification signals and multiple groups of initial rolling counter offline signals;
[0018] The multiple groups of initial verification signals and the multiple groups of initial rolling counter offline signals are matched in the same frame to obtain multiple groups of verification offline signals and multiple groups of rolling counter offline signals.
[0019] Preferably, the step of splicing the multiple groups of verification offline signals and the multiple groups of rolling counter offline signals in a preset splicing order to obtain key values corresponding to different acquisition devices includes:
[0020] Obtain the generation time of multiple groups of verification offline signals and the generation time of multiple groups of rolling counter offline signals;
[0021] Determining a preset splicing order according to the generation time of the multiple groups of verification offline signals and the generation time of the multiple groups of rolling counter offline signals;
[0022] According to the preset splicing order, the multiple groups of verification offline signals and the rolling counter offline signals are spliced to obtain key values corresponding to different acquisition devices.
[0023] Preferably, the key values corresponding to different acquisition devices are matched to obtain a time difference sequence between the main system and each subsidiary system, including:
[0024] Obtain the main system time, main system key value, time of each subsidiary system and key value of each subsidiary system in different acquisition devices;
[0025] Determine the main system continuous matching key value sequence according to the main system key values in different acquisition devices, and determine the continuous matching key value sequence of the subsidiary system to be matched according to the key values of each subsidiary system in different acquisition devices;
[0026] Taking the main system time as a matching source, matching the main system continuous matching key value sequence with the continuous matching key value sequence of the subsidiary system to be matched according to the matching source and the time of each subsidiary system, to obtain the continuous matching key value sequence of the main system and each subsidiary system;
[0027] The time difference between the continuous matching key value sequences of the main system and each subsidiary system is calculated to obtain the time difference sequence between the main system and each subsidiary system.
[0028] Preferably, including:
[0029] The time difference sequence between the main system and each auxiliary system is time compensated.
[0030] Preferably, it also includes:
[0031] In the process of key value matching of key values corresponding to different acquisition devices, a matching maximum frame is added to increase the calculation efficiency of key value matching.
[0032] A second aspect of the present application discloses a multi-system offline time synchronization device, the device comprising:
[0033] An acquisition unit, used to acquire vehicle chassis CAN network signals connected to different acquisition devices;
[0034] An extraction unit, used for extracting a plurality of groups of verification offline signals and a plurality of groups of rolling counter offline signals from the vehicle chassis CAN network signal;
[0035] A splicing unit, used for splicing the multiple groups of verification offline signals and the multiple groups of rolling counter offline signals according to a preset splicing order to obtain key values corresponding to different acquisition devices;
[0036] A matching unit, used to match the key values corresponding to different acquisition devices to obtain a time difference sequence between the main system and each subsidiary system;
[0037] An alignment unit is used to align the system time of the main system according to the time difference sequence.
[0038] Preferably, the acquisition unit includes:
[0039] A first determination module is used to use the vehicle chassis CAN network signal as a synchronous CAN network signal;
[0040] The access module is used to connect the synchronous CAN network signal to different acquisition devices to complete the process of acquiring the vehicle chassis CAN network signal connected to different acquisition devices; wherein the different acquisition devices include at least 1 main system and at least 1 auxiliary system.
[0041] Preferably, the extraction unit comprises:
[0042] A parsing module, used for parsing the vehicle chassis CAN network signals connected to different acquisition devices through a controller area network database protocol to obtain multiple groups of initial verification signals and multiple groups of initial rolling counter offline signals;
[0043] The matching module is used to perform same-frame matching on the multiple groups of initial verification signals and the multiple groups of initial rolling counter offline signals to obtain multiple groups of verification offline signals and multiple groups of rolling counter offline signals.
[0044] Through the above technical scheme, it can be known that the present application discloses a method and device for offline time synchronization of multiple systems, which obtains the vehicle chassis CAN network signal connected to different acquisition devices, extracts multiple groups of verification offline signals and multiple groups of rolling counter offline signals from the vehicle chassis CAN network signal, splices the multiple groups of verification offline signals and multiple groups of rolling counter offline signals according to a preset splicing order, obtains the key values corresponding to different acquisition devices, matches the key values corresponding to different acquisition devices, obtains the time difference sequence between the main system and each subsidiary system, and aligns the system time of the main system according to the time difference sequence.
[0045] Through the above scheme, there is no need to add additional timing equipment in the process of time synchronization of different acquisition devices, that is, multiple systems. It is only necessary to extract multiple groups of verification offline signals and rolling counter offline signals from the vehicle chassis CAN network signal, and realize the offline time synchronization of multiple systems through multiple groups of verification offline signals and rolling counter offline signals. Since the offline time synchronization of multiple systems is to calibrate the time of multiple systems without relying on continuous network connection, the offline time synchronization of multiple systems does not rely on network connection. Even in an environment where the network is unavailable, each system can maintain the accuracy of time to ensure that the clocks of multiple systems have extremely high synchronization accuracy, and improve the synchronization accuracy of the time synchronization of multiple systems. In addition, the offline time synchronization of multiple systems can reduce the dependence on complex network time protocols, simplify system design, reduce system complexity and cost, and improve the convenience of maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0047] Figure 1 A flowchart of a multi-system offline time synchronization method disclosed in an embodiment of the present application;
[0048] Figure 2 A schematic diagram of the key value extraction process disclosed in the embodiment of the present application;
[0049] Figure 3 A schematic diagram of the key-value matching process disclosed in the embodiment of the present application;
[0050] Figure 4 A flowchart of a multi-system offline time synchronization algorithm disclosed in an embodiment of the present application;
[0051] Figure 5 A schematic diagram of the structure of a multi-system offline time synchronization device disclosed in an embodiment of the present application;
[0052] Figure 6 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0055] As can be seen from the background technology, the existing multi-system time synchronization solution requires additional access to the time source device at the system end, and requires all systems in the ring to support relevant communication protocols, hardware time synchronization protocols, etc. Since the hardware time synchronization protocol of the multi-system may be affected by network delays when transmitting time synchronization data, the synchronization accuracy of the multi-system time synchronization is reduced. Therefore, how to improve the synchronization accuracy of the multi-system time synchronization is a problem that needs to be solved urgently in this application.
[0056] In order to solve the above problems, the present application discloses a method and device for offline time synchronization of multiple systems. In the process of different acquisition devices, that is, time synchronization of multiple systems, no additional time synchronization equipment is required. It is only necessary to extract multiple groups of verification offline signals and rolling counter offline signals from the vehicle chassis CAN network signal, and realize offline time synchronization of multiple systems through multiple groups of verification offline signals and rolling counter offline signals. Since the offline time synchronization of multiple systems is to calibrate the time of multiple systems without relying on continuous network connection, the offline time synchronization of multiple systems does not rely on network connection. Even in an environment where the network is unavailable, each system can maintain the accuracy of time to ensure that the clocks of multiple systems have extremely high synchronization accuracy, thereby improving the synchronization accuracy of the time synchronization of multiple systems. In addition, the offline time synchronization of multiple systems can reduce the dependence on complex network time protocols, simplify system design, reduce the complexity and cost of the system, and improve the convenience of maintenance. The specific implementation method is specifically described through the following embodiments.
[0057] refer to Figure 1 As shown, a multi-system offline time synchronization method disclosed in an embodiment of the present application is provided. The multi-system offline time synchronization method mainly includes the following steps:
[0058] S101: Acquire vehicle chassis controller area network (CAN) signals connected to different acquisition devices.
[0059] In S101, the vehicle chassis CAN network signal is used as a synchronous CAN network signal through the vehicle-mounted acquisition system, and the synchronous CAN network signal is connected to different acquisition devices through the vehicle-mounted acquisition system to complete the process of obtaining the vehicle chassis CAN network signal connected to different acquisition devices.
[0060] Among them, different acquisition devices include at least one main system and multiple auxiliary systems.
[0061] It should be noted that the same set of CAN network signals are connected to all systems (ie, all acquisition devices).
[0062] As a vehicle-mounted acquisition system, the vehicle chassis CAN network signal can be used as a synchronous CAN network signal to access different systems, and the synchronization signal can be sought through the signal in the CAN frame.
[0063] CAN network signal is a commonly used communication protocol in the automotive industry. It is common for the vehicle-mounted acquisition system to be equipped with CAN network signal acquisition function. Therefore, the offline synchronization signal can be extracted from the CAN network signal as the entry point for the offline synchronization solution.
[0064] S102: extracting multiple groups of checksum offline signals and multiple groups of rolling counter offline signals from the vehicle chassis CAN network signal.
[0065] In S102, according to the database (CAN database) protocol (some call it DBC) used to describe network device messages in the CAN bus protocol, each system synchronization CAN network signal is parsed. This solution uses the checksum offline signal and the rolling counter offline signal to splice and generate a key value for matching.
[0066] Among them, the checksum offline signal is a cyclic redundancy check (CRC). The main purpose of the checksum offline signal is to output and verify whether there is an error in the data transmission process. When the physical value of the main signal changes continuously, the CRC check signal is approximately disordered, so it is more characteristic in the key value generation process.
[0067] The main purpose of the rolling counter offline signal is to avoid signal frame loss and verify whether the data source is continuously refreshed. The rolling counter offline signal is independent of the physical value of the main signal, so it is prevented from being in a stable physical value for a long time, resulting in the key value remaining unchanged.
[0068] The specific process of extracting multiple groups of checksum offline signals and rolling counter offline signals from the vehicle chassis CAN network signal is shown in A1-A2.
[0069] A1: Through the CAN database protocol, the vehicle chassis CAN network signals connected to different acquisition devices are parsed to obtain multiple groups of initial checksum signals and multiple groups of initial rolling counter offline signals.
[0070] It should be noted that the initial checksum signal is a checksum offline signal without performing same-frame matching.
[0071] The initial rolling counter offline signal is a rolling counter offline signal without same-frame matching.
[0072] A2: Multiple groups of initial checksum signals and multiple groups of rolling counter offline signals are matched in the same frame to obtain multiple groups of checksum offline signals and multiple groups of rolling counter offline signals.
[0073] In A2, multiple groups of initial checksum signals and multiple groups of rolling counter offline signals are matched in the same frame, that is, based on the frame sequence number matching method, multiple groups of initial checksum signals and multiple groups of rolling counter offline signals are matched in the same frame.
[0074] Specifically, all initial checksum signal groups are traversed, and for each group of checksum signals, a rolling counter offline signal group with the same frame number is searched. When a matching frame number is found, the corresponding checksum signal group and rolling counter signal group are taken as a group of matching results and classified as a checksum offline signal group and a rolling counter offline signal group, respectively.
[0075] S103: splicing multiple groups of checksum offline signals and rolling counter offline signals according to a preset splicing order to obtain key values corresponding to different acquisition devices.
[0076] The preset splicing order is the time order of signal generation.
[0077] In S103, the key values corresponding to different acquisition devices are obtained through the method of obtaining key values from CAN data and the preset splicing order. Figure 2 shown.
[0078] Figure 2 In the process, sinnal_1, sinnal_2, sinnal_3, sinnal_n corresponding to the multiple groups of initial checksum signals and sinnal_1, sinnal_2, sinnal_3, sinnal_n corresponding to the multiple groups of rolling counter offline signals are matched in the same frame to obtain multiple groups of checksum offline signals and multiple groups of rolling counter offline signals;
[0079] Multiple groups of checksum offline signals and rolling counter offline signals are spliced in a preset splicing order to obtain key values and CAN frame timestamps corresponding to different acquisition devices.
[0080] It should be noted that multiple groups of checksum offline signals and rolling counter offline signals are spliced in a preset splicing order for same-frame matching to generate key values, thereby enhancing the characteristic of key value generation.
[0081] In the process of splicing multiple groups of checksum offline signals and rolling counter offline signals in a preset splicing order for same-frame matching, since data frames may arrive at different times, it is necessary to align the timestamps of these data frames to ensure that they are in the same time reference frame. Same-frame matching means matching the aligned data frames in a preset splicing order to ensure that each data frame is associated with its corresponding checksum offline signal and rolling counter offline signal.
[0082] The specific process of obtaining the key values corresponding to different acquisition devices is shown in B1-B3.
[0083] B1: Obtain the generation time of multiple checksum offline signals and multiple rolling counter offline signals.
[0084] B2: Determine a preset splicing order according to the generation time of multiple checksum offline signals and the generation time of multiple rolling counter offline signals.
[0085] The preset splicing order is determined by the generation time of multiple checksum offline signals and the generation time of multiple rolling counter offline signals.
[0086] B3: According to the preset splicing order, multiple groups of checksum offline signals and rolling counter offline signals are spliced to obtain key values corresponding to different acquisition devices.
[0087] S104: Match the key values corresponding to different acquisition devices to obtain a time difference sequence between the main system and each subsidiary system.
[0088] The key-value matching is a key-value matching using the main system time as the matching source.
[0089] Key-value matching mainly includes key-value matching algorithm. The specific algorithm process is as follows Figure 3 shown.
[0090] Figure 3 In the example, first, the key value sequences corresponding to different acquisition devices (system 1 main system, system 2, system n), the main system time, the main system key value, the time of each subsidiary system, and the key value of each subsidiary system in different acquisition devices are obtained;
[0091] It should be noted that the key value sequences corresponding to different acquisition devices include the key value sequence [1, 2, 3...n] corresponding to the main system, the key value sequence [1, 2, 3...n] corresponding to system 2, and the key value sequence [1, 2, 3...n] corresponding to system n.
[0092] Secondly, the main system continuous matching key value sequence is determined according to the main system key values in different acquisition devices, and the continuous matching key value sequence of the subsidiary systems to be matched is determined according to the key values of each subsidiary system in different acquisition devices.
[0093] Among them, in the process of matching the continuous matching key value sequence of the main system with the continuous matching key value sequence of the auxiliary system to be matched, the main system time is used as the matching source. In order to improve the robustness of the algorithm, the matching method is to continuously match the data to obtain the continuous matching key value sequences corresponding to different acquisition devices.
[0094] In order to facilitate understanding of the matching method, which is a process of continuous matching of data, an example is given here to illustrate:
[0095] For example, the main system key sequence is [1, 2, 3, 1, 5, 6], and the auxiliary system key sequence is [1, 2, 3, 4, 5, 6]. The main system and the auxiliary system match in the first three frames, but there is a mismatch in the next frame. In this case, it is considered that the main system and the auxiliary system do not match continuously in the first frame. Similarly, if the auxiliary system is [2, 3, 1, 5, 6], it is considered that the auxiliary system can match continuously in the second frame, and the time difference sequence after the second frame can be extracted.
[0096] System 2 and system n are subsidiary systems.
[0097] Again, the main system time is used as the matching source, and the main system continuous matching key value sequence and the continuous matching key value sequence of the subsidiary system to be matched are matched according to the matching source and the time of each subsidiary system to obtain the continuous matching key value sequence of the main system and each subsidiary system.
[0098] Then, the time difference between the continuous matching key value sequences of the main system and each subsidiary system is calculated to obtain the time difference sequence between the main system and each subsidiary system.
[0099] Among them, the main system: (time t1, key value k1), (time t2, key value k2), ..., (time t n , key value k n ); time t1, t2...t n is the main system time;
[0100] Subsidiary system 1: (time t 1_1 , key value k 1_1 ), (time t1_2 , key value k 1_2 ),......,(time t 1_n , key value k 1_n ); time t 1_1 ,t 1_2 ......t 1_n Time for the attached system.
[0101] In order to facilitate understanding of the process of calculating the time difference between the continuous matching key value sequences of the main system and each subsidiary system to obtain the time difference sequence between the main system and each subsidiary system, an example is given here to illustrate:
[0102] For example, at the beginning, the key value k of the main system 1_1 Time t with subsidiary system 1 1_1 To match, if the time t1 of the main system is 10:00:00, the time t 1_1 =10:00:10, and the time t1 of the main system is equal to the time t 1_1 Calculate the time difference and get the first time difference to be 10 seconds;
[0103] 5 minutes later, the time t2 of the main system is 10:05:00, and the time t 1_2 It was 10:05:15, and the second time difference was 15 seconds;
[0104] Five minutes later, the time t3 of the main system is 10:10:00, and the time t 1_3 It was 10:10:20, and the third time difference was 20 seconds;
[0105] According to the first time difference, the second time difference and the third time difference, the time difference sequence between the main system and the auxiliary system 1 is obtained as (10 seconds, 15 seconds, 20 seconds).
[0106] Finally, the time difference series between the main system and each auxiliary system are time compensated.
[0107] It should be noted that by compensating the time difference sequence to compensate for the time difference, it can ensure that the time of each part of the system is more accurately synchronized. This is especially important for systems that require precise time coordination, and can achieve the following effects:
[0108] (1) Enhance system stability
[0109] The accuracy of time synchronization directly affects the stable operation of the system. By compensating the time difference sequence between the main system and each subsidiary system, system errors and failures caused by time deviation can be reduced, thereby improving the overall operational stability.
[0110] (2) Simplify time management
[0111] Time compensation can automatically adjust system time, reduce manual intervention, simplify the time management process, and improve the maintainability and manageability of the system;
[0112] (3) Adapt to changing network environment
[0113] In a complex network environment, time synchronization may be affected by factors such as network delay and jitter. Time compensation technology can help the system automatically adapt to these changes and maintain high accuracy of time synchronization.
[0114] For key value K1 matching, the matching process requires that the subsequent key value sequence of the main system and the subsequent key value sequence of the subsidiary system to be matched can be matched according to the preset splicing order as a reliable match;
[0115] As shown in Table 1.
[0116]
[0117] Table 1
[0118] In Table 1, k1 of the main system and k of the subsidiary system 1_1 Matching; k2 of the main system and k of the auxiliary system 1_2 Matching; k of the main system n k with attached system 1_n to make a match.
[0119] It should be noted that for key value matching of other subsidiary systems, it is only necessary to repeat the above process, and add the maximum matching frame in the process of key value matching corresponding to different acquisition devices to increase the calculation efficiency of key value matching. If the continuous matching is greater than the maximum matching frame, the continuous matching is considered to be completed and the algorithm loop is exited.
[0120] S105: Aligning the system time of the main system according to the time difference sequence.
[0121] In order to facilitate the understanding of the process of offline time synchronization of multiple systems, combined with Figure 4 Let's take an example:
[0122] Figure 4 In the process, the system 1 main system, system 2...system n of the vehicle-mounted acquisition system are respectively connected to the same group of CAN network signals;
[0123] Extract CAN frame synchronization key values from multiple groups of checksum offline signals and rolling counter offline signals in CAN network signals to obtain key values corresponding to different acquisition systems (i.e., different acquisition devices);
[0124] Key values corresponding to different acquisition devices are key-matched and matched to obtain a continuous matching key value sequence between the main system and each subsidiary system;
[0125] Calculate the time difference between the continuous matching key value sequences of the main system and each subsidiary system to obtain the time difference sequence between the main system and each subsidiary system;
[0126] The time difference sequence between the main system and each auxiliary system is time compensated.
[0127] The multi-system acquisition offline high-precision time synchronization method of the present application has the main advantages of not requiring additional time synchronization equipment, a simple process, and theoretically the number of systems, that is, acquisition equipment, can be expanded infinitely.
[0128] The beneficial effects of the embodiments of the present application are as follows: in the process of different acquisition devices, that is, time synchronization of multiple systems, no additional timing equipment needs to be added. It is only necessary to extract multiple groups of verification offline signals and rolling counter offline signals from the vehicle chassis CAN network signal, and realize offline time synchronization of multiple systems through multiple groups of verification offline signals and rolling counter offline signals. Since the offline time synchronization of multiple systems is to calibrate the time of multiple systems without relying on continuous network connection, the offline time synchronization of multiple systems does not rely on network connection. Even in an environment where the network is unavailable, each system can maintain time accuracy to ensure extremely high synchronization accuracy between the clocks of multiple systems, thereby improving the synchronization accuracy of the time synchronization of multiple systems. In addition, offline time synchronization of multiple systems can reduce dependence on complex network time protocols, simplify system design, reduce system complexity and cost, and improve the convenience of maintenance.
[0129] Based on the above embodiments Figure 1 A multi-system offline time synchronization method is disclosed, and an embodiment of the present application also discloses a multi-system offline time synchronization device, such as Figure 5 As shown, the multi-system offline time synchronization device includes:
[0130] An acquisition unit 501 is used to acquire a vehicle chassis CAN network signal connected to different acquisition devices;
[0131] An extraction unit 502 is used to extract multiple groups of verification offline signals and multiple groups of rolling counter offline signals from the vehicle chassis CAN network signal;
[0132] A splicing unit 503 is used to splice multiple groups of verification offline signals and multiple groups of rolling counter offline signals according to a preset splicing order to obtain key values corresponding to different acquisition devices;
[0133] A matching unit 504 is used to match the key values corresponding to different acquisition devices to obtain a time difference sequence between the main system and each subsidiary system;
[0134] The alignment unit 505 is used to align the system time of the main system according to the time difference sequence.
[0135] Furthermore, the acquisition unit 501 includes:
[0136] A first determination module is used to use the vehicle chassis CAN network signal as a synchronous CAN network signal;
[0137] The access module is used to connect the synchronous CAN network signal to different acquisition devices to complete the process of acquiring the vehicle chassis CAN network signal connected to different acquisition devices; wherein the different acquisition devices include at least one main system and at least one auxiliary system.
[0138] Further, the extraction unit 502 includes:
[0139] The parsing module is used to parse the vehicle chassis CAN network signals connected to different acquisition devices through the controller local area network database protocol to obtain multiple groups of initial verification signals and multiple groups of initial rolling counter offline signals;
[0140] The matching module is used to perform same-frame matching on multiple groups of initial verification signals and multiple groups of initial rolling counter offline signals to obtain multiple groups of verification offline signals and multiple groups of rolling counter offline signals.
[0141] Furthermore, the splicing unit 503 includes:
[0142] A first acquisition module is used to acquire the generation time of multiple groups of verification offline signals and the generation time of multiple groups of rolling counter offline signals;
[0143] A second determination module, used to determine a preset splicing order according to the generation time of multiple groups of verification offline signals and the generation time of multiple groups of rolling counter offline signals;
[0144] The splicing module is used to splice multiple groups of verification offline signals and rolling counter offline signals according to a preset splicing sequence to obtain key values corresponding to different acquisition devices.
[0145] Furthermore, the matching unit 504 includes:
[0146] The second acquisition module is used to acquire the main system time, the main system key value, the time of each subsidiary system and the key value of each subsidiary system in different acquisition devices;
[0147] A third determination module is used to determine a main system continuous matching key value sequence according to the main system key values in different acquisition devices, and to determine a continuous matching key value sequence of the subsidiary system to be matched according to the key values of each subsidiary system in different acquisition devices;
[0148] A matching module is used to use the main system time as a matching source, and to match the main system continuous matching key value sequence with the continuous matching key value sequence of the subsidiary system to be matched according to the matching source and the time of each subsidiary system, so as to obtain the continuous matching key value sequence of the main system and each subsidiary system;
[0149] The calculation module is used to calculate the time difference between the continuous matching key value sequences of the main system and each subsidiary system to obtain the time difference sequence between the main system and each subsidiary system.
[0150] Furthermore, the multi-system offline time synchronization device also includes:
[0151] The time compensation unit is used to perform time compensation on the time difference sequence between the main system and each auxiliary system.
[0152] Furthermore, the multi-system offline time synchronization device also includes:
[0153] The adding unit is used to add the matching maximum frame in the process of key value matching of key values corresponding to different acquisition devices, so as to increase the calculation efficiency of key value matching.
[0154] The beneficial effects of the embodiments of the present application are as follows: in the process of different acquisition devices, that is, time synchronization of multiple systems, no additional timing equipment needs to be added. It is only necessary to extract multiple groups of verification offline signals and rolling counter offline signals from the vehicle chassis CAN network signal, and realize offline time synchronization of multiple systems through multiple groups of verification offline signals and rolling counter offline signals. Since the offline time synchronization of multiple systems is to calibrate the time of multiple systems without relying on continuous network connection, the offline time synchronization of multiple systems does not rely on network connection. Even in an environment where the network is unavailable, each system can maintain time accuracy to ensure extremely high synchronization accuracy between the clocks of multiple systems, thereby improving the synchronization accuracy of the time synchronization of multiple systems. In addition, offline time synchronization of multiple systems can reduce dependence on complex network time protocols, simplify system design, reduce system complexity and cost, and improve the convenience of maintenance.
[0155] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned multi-system offline time synchronization method.
[0156] The present application also provides an electronic device, whose structural diagram is as follows: Figure 6As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to execute the one or more instructions 602 to perform the above-mentioned multi-system offline time synchronization method.
[0157] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0158] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0159] The steps in the methods of the embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.
[0160] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0161] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0162] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A multi-system offline time synchronization method, characterized in that: The method comprises: Get the vehicle chassis CAN network signal connected to different acquisition devices; Extracting multiple groups of verification offline signals and multiple groups of rolling counter offline signals from the vehicle chassis CAN network signal; splicing the multiple groups of verification offline signals and the multiple groups of rolling counter offline signals according to a preset splicing order to obtain key values corresponding to different acquisition devices; Match the key values corresponding to different acquisition devices to obtain the time difference sequence between the main system and each subsidiary system; The system time of the main system is aligned according to the time difference sequence.
2. The method according to claim 1, characterized in that The method of obtaining the vehicle chassis CAN network signal connected to different acquisition devices includes: Use the vehicle chassis CAN network signal as a synchronous CAN network signal; The synchronous CAN network signal is connected to different acquisition devices to complete the process of acquiring the vehicle chassis CAN network signal connected to different acquisition devices; wherein the different acquisition devices include at least one main system and at least one auxiliary system.
3. The method according to claim 1, characterized in that The extracting of multiple groups of verification offline signals and multiple groups of rolling counter offline signals from the vehicle chassis CAN network signal comprises: The vehicle chassis CAN network signals connected to different acquisition devices are parsed through the controller area network database protocol to obtain multiple groups of initial verification signals and multiple groups of initial rolling counter offline signals; The multiple groups of initial verification signals and the multiple groups of initial rolling counter offline signals are matched in the same frame to obtain multiple groups of verification offline signals and multiple groups of rolling counter offline signals.
4. The method according to claim 1, characterized in that The step of splicing the multiple groups of verification offline signals and the multiple groups of rolling counter offline signals according to a preset splicing order to obtain key values corresponding to different acquisition devices includes: Obtain the generation time of multiple groups of verification offline signals and the generation time of multiple groups of rolling counter offline signals; Determining a preset splicing order according to the generation time of the multiple groups of verification offline signals and the generation time of the multiple groups of rolling counter offline signals; According to the preset splicing order, the multiple groups of verification offline signals and the rolling counter offline signals are spliced to obtain key values corresponding to different acquisition devices.
5. The method according to claim 1, characterized in that The key values corresponding to different acquisition devices are matched to obtain a time difference sequence between the main system and each subsidiary system, including: Obtain the main system time, main system key value, time of each subsidiary system and key value of each subsidiary system in different acquisition devices; Determine the main system continuous matching key value sequence according to the main system key values in different acquisition devices, and determine the continuous matching key value sequence of the subsidiary system to be matched according to the key values of each subsidiary system in different acquisition devices; Taking the main system time as a matching source, matching the main system continuous matching key value sequence with the continuous matching key value sequence of the subsidiary system to be matched according to the matching source and the time of each subsidiary system, to obtain the continuous matching key value sequence of the main system and each subsidiary system; The time difference between the continuous matching key value sequences of the main system and each subsidiary system is calculated to obtain the time difference sequence between the main system and each subsidiary system.
6. The method according to claim 5, characterized in that include: The time difference sequence between the main system and each auxiliary system is time compensated.
7. The method according to claim 1, characterized in that Also includes: In the process of key value matching of key values corresponding to different acquisition devices, a matching maximum frame is added to increase the calculation efficiency of key value matching.
8. A multi-system offline time synchronization device, characterized in that: The device comprises: An acquisition unit, used to acquire vehicle chassis CAN network signals connected to different acquisition devices; An extraction unit, used for extracting a plurality of groups of verification offline signals and a plurality of groups of rolling counter offline signals from the vehicle chassis CAN network signal; A splicing unit, used for splicing the multiple groups of verification offline signals and the multiple groups of rolling counter offline signals according to a preset splicing order to obtain key values corresponding to different acquisition devices; A matching unit, used to match the key values corresponding to different acquisition devices to obtain a time difference sequence between the main system and each subsidiary system; An alignment unit is used to align the system time of the main system according to the time difference sequence.
9. The device according to claim 8, characterized in that The acquisition unit comprises: A first determination module is used to use the vehicle chassis CAN network signal as a synchronous CAN network signal; The access module is used to connect the synchronous CAN network signal to different acquisition devices to complete the process of acquiring the vehicle chassis CAN network signal connected to different acquisition devices; wherein the different acquisition devices include at least 1 main system and at least 1 auxiliary system.
10. The device according to claim 8, characterized in that The extraction unit comprises: A parsing module, used for parsing the vehicle chassis CAN network signals connected to different acquisition devices through a controller area network database protocol to obtain multiple groups of initial verification signals and multiple groups of initial rolling counter offline signals; The matching module is used to perform same-frame matching on the multiple groups of initial verification signals and the multiple groups of initial rolling counter offline signals to obtain multiple groups of verification offline signals and multiple groups of rolling counter offline signals.
