Method and apparatus for ethernet time synchronization

By determining the transmission direction and modifying the time synchronization message protocol format through the gateway node (TG), the incompatibility issue between AUTOSAR time synchronization messages and the 802.1AS protocol was resolved, enabling time synchronization of some nodes in multiple time domains and meeting the time synchronization requirements of the entire vehicle.

CN116318505BActive Publication Date: 2026-04-10NEUSOFT RUICHI AUTOMOTIVE TECH (DALIAN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-10
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In a multi-time domain, AUTOSAR time synchronization messages are incompatible with standard 802.1AS protocol time synchronization messages, causing some nodes to be unable to synchronize their time.

Method used

The gateway node (TG) determines the transmission direction of time synchronization messages and modifies the message protocol format according to the transmission direction to make it conform to the requirements of AUTOSAR multi-time domain or standard 802.1AS protocol, thereby achieving time synchronization.

Benefits of technology

It enables synchronization of some nodes that do not support multiple time domains in a multi-time domain context, thus meeting the vehicle time synchronization requirements in the context of automotive intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116318505B_ABST
    Figure CN116318505B_ABST
Patent Text Reader

Abstract

The application discloses a method and device for Ethernet time synchronization, and is applied to the technical field of communication. In the application, when a common clock node TS does not support a time synchronization message of multiple time domains in AUTOSAR, the transmission direction of the time synchronization message is determined through a gateway node TG. According to the transmission direction, the protocol format of the time synchronization message is modified. The modified time synchronization message is sent to a corresponding message transmission port. Through the modification of the protocol format in the time synchronization message, the time synchronization message meets the protocol format requirement of the time transmission message of the multiple time domains in AUTOSAR or the protocol format requirement of the time synchronization message of the TS. Even if the time domain supported by AUTOSAR does not include the time domain of the TS, the time synchronization between the TS and the TG can be realized. Therefore, the synchronization of the nodes that do not support the multiple time domains is realized under the multiple time domains.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to an Ethernet time synchronization method and device. BACKGROUND

[0002] Generally, a vehicle contains a plurality of different sensors, and the time domains of different sensors can be different. The design of multiple time domains can meet the use of multiple time sources or redundant design. The automotive open system architecture (AUTOmotive Open System Architecture, AUTOSAR) can realize the exchange and update of vehicle electronic system software, provide a basis for efficient management of increasingly complex vehicle electronics, software systems, etc., and can synchronize the time domain of the whole vehicle.

[0003] Generally, AUTOSAR can support multiple time domains, and the time synchronization message contains data unique to AUTOSAR. When a node supports the time domain contained in AUTOSAR, Ethernet time synchronization with other nodes can be achieved. Such a synchronization method can cause the AUTOSAR time synchronization message of the multiple time domains to be incompatible with the standard 802.1AS protocol time synchronization message. This can result in the inability to synchronize some nodes that do not support multiple time domains under multiple time domains. SUMMARY

[0004] Based on the above problems, the present application provides an Ethernet time synchronization method and device, which can synchronize some nodes that do not support multiple time domains under multiple time domains.

[0005] The embodiments of the present application disclose the following technical solutions:

[0006] In a first aspect, the present application provides an Ethernet time synchronization method, comprising:

[0007] A gateway node TG determines the transmission direction of a time synchronization message. A normal clock node TS is a node to be synchronized by Ethernet time, and does not support the time synchronization message in AUTOSAR. The time synchronization message of the AUTOSAR is a multiple time domain synchronization message.

[0008] According to the transmission direction, the protocol format of the time synchronization message is modified;

[0009] The modified time synchronization message is sent to the corresponding message receiving end, so that the time of the TS is synchronized with the time of the TG through Ethernet.

[0010] Optionally, the TS does not support the time synchronization message in AUTOSAR, and the TS supports the time synchronization message of the standard 802.1AS protocol.

[0011] Optionally, the modifying the protocol format of the time synchronization message according to the transmission direction specifically comprises:

[0012] when the transmission direction is that the TG sends the time synchronization message to the TS, modifying the protocol format of the time synchronization message;

[0013] assigning a time domain number Domain id of the time synchronization message to zero, and deleting an information field of the AUTOSAR in a follow-up message of the time synchronization message.

[0014] Optionally, the modifying the protocol format of the time synchronization message according to the transmission direction specifically comprises:

[0015] when the transmission direction is that the TG receives the time synchronization message from the TS, modifying the protocol format of the time synchronization message;

[0016] assigning a time domain number Domain id of the time synchronization message to a value corresponding to a time synchronization message of a time domain supported by the AUTOSAR protocol, and adding an information field of the AUTOSAR in a follow-up message of the time synchronization message.

[0017] Optionally, the method further comprises:

[0018] when the transmission direction is that the TG sends the time synchronization message to the TS, sending the modified time synchronization message to an Ethernet interface.

[0019] Optionally, the method further comprises:

[0020] when the transmission direction is that the TG receives the time synchronization message from the TS, sending the modified time synchronization message to an Ethernet synchronization EthTSyn.

[0021] Optionally, the method further comprises:

[0022] when the TS supports the time synchronization message in the AUTOSAR, the TG transmits the modified time synchronization message to a corresponding message receiving end.

[0023] In a second aspect, the present application provides an Ethernet time synchronization device, comprising:

[0024] The judgment module is used by the gateway node TG to determine the transmission direction of the time synchronization message; the ordinary clock node TS is the node to be synchronized with Ethernet time and does not support the time synchronization message in AUTOSAR, and the time synchronization message in AUTOSAR is a multi-time domain synchronization message.

[0025] An extension module is used to modify the protocol format of the time synchronization message according to the transmission direction;

[0026] The forwarding module is used to send the modified time synchronization message to the corresponding message receiver so that the time of the TS is synchronized with the time of the TG via Ethernet.

[0027] Optionally, the extension module is specifically used for:

[0028] When the transmission direction is from the TG to the TS, the protocol format of the time synchronization message is modified.

[0029] Set the Domain id of the time synchronization message to zero, and delete the AUTOSAR information field in the Follow-up Message of the time synchronization message;

[0030] When the transmission direction is that the TG receives the time synchronization message from the TS, the protocol format of the time synchronization message is modified.

[0031] Assign the Domain id of the time synchronization message to the value corresponding to the time synchronization message of the time domain supported by the AUTOSAR protocol, and add the AUTOSAR information field in the Follow-up Message of the time synchronization message.

[0032] Optionally, the forwarding module is specifically used for:

[0033] When the transmission direction is from the TG to the TS, the modified time synchronization message is sent to the Ethernet Interface.

[0034] When the transmission direction is that the TG receives the time synchronization message from the TS, the modified time synchronization message is sent to the Ethernet synchronization EthTSyn.

[0035] Compared with the prior art, this application has the following beneficial effects:

[0036] In the present application, when the ordinary clock node TS does not support the time synchronization message of the multiple time domains in AUTOSAR, the transmission direction of the time synchronization message is determined through the gateway node TG. According to the transmission direction, the protocol format of the time synchronization message is modified. The modified time synchronization message is sent to the corresponding message transmission port. By modifying the protocol format in the time synchronization message, the time synchronization message conforms to the protocol format requirements of the time transmission message of the multiple time domains in AUTOSAR or the protocol format requirements of the time synchronization message of TS. Even if the time domain supported by AUTOSAR does not include the time domain of TS, the time synchronization between TS and TG can also be realized. Therefore, the synchronization of the nodes that do not support the multiple time domains under the multiple time domains is realized. BRIEF DESCRIPTION OF DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0038] Figure 1 A flow chart of an Ethernet time synchronization method provided by an embodiment of the present application;

[0039] Figure 2 A structural schematic diagram of a multi-node data redundancy design provided by an embodiment of the present application;

[0040] Figure 3 A structural schematic diagram of time synchronization message transmission in TG of an Ethernet time synchronization method provided by an embodiment of the present application;

[0041] Figure 4 A structural schematic diagram of an Ethernet time synchronization device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order for those skilled in the art to more clearly understand the technical solutions of the present application, the application scenarios of the present application will be described first.

[0043] Under the background of intelligentization of automobiles, there are various data fusion collected by different sensors, and functions such as providing time stamps for fault record information and printing logs, so it is particularly important to realize the time synchronization of the whole vehicle. The automotive open system architecture (AUTOmotive Open System Architecture, AUTOSAR) can realize the exchange and update of vehicle electronic system software, provide a basis for efficient management of increasingly complex vehicle electronics, software systems, etc., and can synchronize the time domain of the whole vehicle.

[0044] Generally, the time domains of different sensors in a vehicle can not be the same. Among them, a global time software module (Synchronized Time-Base Manager, StbM) can maintain multiple time bases Synchronized Time Base, and theoretically one time base corresponds to one time domain. The design of multiple time domains can meet the use of multiple time sources or redundant design, and the redundant design can have synchronous path redundancy or multiple Global Time Master redundancy, etc.

[0045] At present, the Ethernet synchronization module EthTSyn in AUTOSAR can support multiple time domains, and the time synchronization message contains AUTOSAR unique data. When the node can support the time domain contained in AUTOSAR, the Ethernet time synchronization with other nodes can be realized. Such a synchronization method can cause the AUTOSAR time synchronization message of the multiple time domains to be incompatible with the standard 802.1AS protocol time synchronization message. It can cause some time synchronization messages to be unable to be synchronized under the multiple time domains.

[0046] For example, when the Domain id is any integer from 0 to 15, and the Follow_Up Message must contain the information TLV[AUTOSAR] field. If a normal clock node (Time Slave, TS) can only support the standard 802.1AS protocol stack, the TS node cannot be synchronized under the multiple time domains.

[0047] In order to solve the above technical problems, the application provides an Ethernet time synchronization method and device. In the application, when a normal clock node TS does not support the time synchronization message of the multiple time domains in AUTOSAR, the transmission direction of the time synchronization message is determined through a gateway node TG. According to the transmission direction, the protocol format of the time synchronization message is modified. The modified time synchronization message is sent to the corresponding message transmission port. By modifying the protocol format of the time synchronization message, the time synchronization message meets the protocol format requirements of the time transmission message of the multiple time domains of AUTOSAR or the protocol format requirements of the time synchronization message of the TS. Even if the time domain supported by AUTOSAR does not include the time domain of the TS, the time synchronization of the TS and the TG can also be realized. Therefore, the synchronization of some nodes that do not support the multiple time domains under the multiple time domains is realized. At the same time, the demand for multiple time domains under the background of intelligent automobiles is also met.

[0048] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0049] Figure 1 This is a flowchart illustrating an Ethernet time synchronization method provided in an embodiment of this application. Figure 1 As shown, the method includes:

[0050] S101: Gateway node TG determines the transmission direction of time synchronization messages.

[0051] Gateway nodes (TGs) can act as slave nodes to receive time synchronization messages from the Global Time Master (GMT), which is the master node. Generally, TGs support AUTOSAR multi-time domain configuration. Simultaneously, TGs can also act as master nodes to send time synchronization messages to other slave nodes. In this case, slave nodes can be other TGs or ordinary clock nodes (TSs), and the slave nodes are the nodes to be synchronized with Ethernet time. TSs can also act as master nodes to send time synchronization messages to other slave nodes; in this case, the slave nodes can only be TGs.

[0052] like Figure 2 As shown, ordinary clock node 1 does not support AUTOSAR multi-time domain configuration, while all other gateway nodes (gateway node 1, gateway node 2, and gateway node 3) and ordinary clock nodes (ordinary clock node 2, ordinary clock node 3, and ordinary clock node 4) support AUTOSAR multi-time domain configuration. Solid and dashed lines represent two synchronization redundancy paths, indicating the time synchronization scenario where the time synchronization message is sent from the global master clock to other nodes. Dotted lines represent a time synchronization path with another time base, indicating the time synchronization scenario where the time synchronization message is sent from ordinary clock node 1 to other nodes. Each time base represents a time domain.

[0053] Based on the static configuration information of the TS, it can be determined whether the TS awaiting time synchronization supports multi-time domain configuration. When the TS awaiting time synchronization does not support AUTOSAR multi-time domain configuration and only uses the standard 802.1AS protocol for the time domain, the TG determines the transmission direction of the time synchronization message in the current node.

[0054] S102: Modify the protocol format of the time synchronization message according to the transmission direction.

[0055] When the transmission direction of the time synchronization message is from the TG to the TS, the time field id of the time synchronization message is assigned a value of zero, and the information field related to AUTOSAR in the Follow-up Message in the time synchronization message is deleted.

[0056] When the transmission direction is that the TG receives the time synchronization message sent by the TS, the time field id of the time synchronization message is assigned a value corresponding to the time field id of the time field owned by the TG, and the information field related to AUTOSAR in the Follow-up Message in the time synchronization message is added.

[0057] Specifically, the value range of the time field id in the time synchronization message of the AUTOSAR multi-time field can be 0-15, and the time synchronization message contains the information field information TLV[AUTOSAR] unique to the AUTOSAR multi-time field. The value of the time field id in the time synchronization message of the standard 802.1AS protocol is 0, and the time synchronization message does not contain the information TLV[AUTOSAR] field. Among them, if the time fields supported by AUTOSAR at this time do not include the standard 802.1AS protocol, then the domain id in the multiple time fields supported by AUTOSAR cannot be the value 0.

[0058] When time synchronization is performed, the data content in the time synchronization message needs to be modified. When the TG sends the time synchronization message to the TS, the Domain id is set to 0, and the information TLV[AUTOSAR] field in the message is deleted; when the TG receives the time synchronization message sent by the TS, the Domain id is set to the domain id of the time field corresponding to the TG, and the information TLV[AUTOSAR] field is added in the message; so that the time synchronization message conforms to the protocol format of the receiving party.

[0059] S103: Send the time synchronization message to the corresponding message receiving end, so that the time of the TS is synchronized with the time of the TG.

[0060] According to the different transmission directions of the time synchronization message, the corresponding message receiving end is also different. According to the modification mode of S102, the TG time synchronization message transmission process is as shown in Figure 3

[0061] ​Specifically, when the time synchronization message is sent from the TG to the TS, the time synchronization message is sent by the Ethernet synchronization module EthTSyn to the CDD framework for message modification. The CDD sends the modified protocol to the Ethernet interface Ethernet Interface, and then the Ethernet Interface sends the modified protocol to the Ethernet driver module Ethernet Driver. The Ethernet Driver sends the modified protocol to the target time synchronization node TS. When the time synchronization message is sent from the target time synchronization node TS to the TG, the time synchronization message is sent by the TS to the Ethernet Driver, and then the Ethernet Driver sends the time synchronization message to the Ethernet Interface. The Ethernet Interface sends the time synchronization message to the CDD for message modification. The CDD sends the modified protocol to the EthTSyn, and then the EthTSyn sends the modified protocol to the StbM for management.

[0062] By modifying the time synchronization message and the corresponding message transmission mode, the Ethernet time synchronization between the target time synchronization node TS and other nodes is realized.

[0063] In addition, when the TS supports the time synchronization message in AUTOSAR, the TG can directly transmit the time synchronization message to the corresponding message receiving end.

[0064] In this application, when the ordinary clock node TS does not support the time synchronization message in AUTOSAR, the transmission direction of the time synchronization message is determined by the gateway node TG. According to the transmission direction, the protocol format of the time synchronization message is modified. The modified time synchronization message is sent to the corresponding message transmission port. By modifying the protocol format in the time synchronization message, the time synchronization message conforms to the protocol format requirements of the AUTOSAR multi-time domain time transmission message or the protocol format requirements of the time synchronization message of the TS. Even if the time domain supported by AUTOSAR does not include the time domain of the TS, the time synchronization between the TS and the TG can also be realized. Therefore, the synchronization of nodes that do not support multi-time domain under multi-time domain is realized.

[0065] Figure 4 A structure diagram of an Ethernet time synchronization device provided by an embodiment of the present application is shown in FIG. 1. As shown in FIG. 1, the device includes: Figure 4

[0066] ​The judgment module 410 is configured to determine the transmission direction of the time synchronization message when the general clock node TS does not support the time synchronization message in the AUTOSAR, the general clock node TS is a node to be time synchronized in the Ethernet, and the time synchronization message in the AUTOSAR is a multi-time domain synchronization message.

[0067] Specifically, in the TG supporting the AUTOSAR multi-time domain configuration, the AUTOSAR time synchronization function complex device driver (CDD) is added and deployed, the CDD is used to implement the time synchronization of the TS adopting the standard 802.1AS protocol and other nodes. The CDD determines the transmission direction of the time synchronization message according to whether the TS to be time synchronized supports the standard 802.1AS protocol. The CDD module is a functional module in the AUTOSAR, and a general AUTOSAR system supports the configuration of the CDD. The CDD can interact with other basic functions of the AUTOSAR, and is developed according to actual development requirements.

[0068] The extension module 420 is configured to modify the protocol format of the time synchronization message according to the transmission direction.

[0069] Specifically, the protocol format of the time synchronization message is modified according to the CDD. The modification of the protocol format of the message is the extension of the protocol format of the message, so that the modified time synchronization message can synchronize the time of the node to be synchronized with other nodes.

[0070] The forwarding module 430 is configured to send the time synchronization message to a corresponding message receiving end, so as to synchronize the Ethernet time of the TS with the TG.

[0071] Specifically, when the TG is a message sender, the time synchronization message modified by the CDD is sent to the Ethernet interface. When the TG is a message receiver, the time synchronization message modified by the CDD is sent to the EthTSyn. When the TS to be time synchronized supports the AUTOSAR protocol, the time synchronization message is directly transmitted to the corresponding receiving interface.

[0072] In the present application, the determination module 410 is used to determine the transmission direction of the time synchronization message through the gateway node TG when the ordinary clock node TS does not support the time synchronization message of the multiple time domains in AUTOSAR. The extension module 420 is used to modify the protocol format of the time synchronization message according to the transmission direction. The modified time synchronization message is sent to the corresponding message transmission port according to the forwarding module 430. By modifying the protocol format in the time synchronization message, the time synchronization message meets the protocol format requirements of the time transmission message of the multiple time domains in AUTOSAR or the protocol format requirements of the time synchronization message of the TS. Even if the time domain supported by AUTOSAR does not include the time domain of the TS, the Ethernet time synchronization between the TS and the TG can also be realized. Therefore, the synchronization of part of the time synchronization messages under the multiple time domains is realized.

[0073] It should be noted that the various embodiments in the specification are described in a progressive manner, and the same and similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the device embodiment is described relatively simply because it is basically similar to the method embodiment. The relevant parts can be referred to the part of the description of the method embodiment. The device embodiment described above is only schematic, and the units described as separate components can or can not be physically separated, and the components prompted as units can or can not be physical units, that is, they can be located in one place, or distributed on multiple network units. According to the actual needs, part or all of the modules can be selected to achieve the purpose of the present embodiment. Those skilled in the art can understand and implement it without creative labor.

[0074] The above is only one specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any skilled person in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method of Ethernet time synchronization, characterized in that, The method comprises the following steps: A gateway node TG determines a transmission direction of a time synchronization message; A common clock node TS is a node to be synchronized by Ethernet time, and does not support a time synchronization message in AUTOSAR, wherein the time synchronization message in AUTOSAR is a multi-time domain synchronization message; According to the transmission direction, the protocol format of the time synchronization message is modified; The modified time synchronization message is sent to a corresponding message receiving end, so that the time of the TS is synchronized with the time of the TG through Ethernet; The protocol format of the time synchronization message is modified when the transmission direction is that the TG sends the time synchronization message to the TS; The time domain number Domain id of the time synchronization message is assigned as zero, and the information field of the AUTOSAR in the follow-up frame Follow-up Message of the time synchronization message is deleted; The protocol format of the time synchronization message is modified when the transmission direction is that the TG receives the time synchronization message of the TS; The time domain number Domain id of the time synchronization message is assigned as a value corresponding to a time synchronization message of a time domain supported by the AUTOSAR protocol, and the information field of the AUTOSAR in the follow-up frame Follow-up Message of the time synchronization message is added. The TS does not support the time synchronization message in AUTOSAR, and the TS supports a time synchronization message of a standard 802.1AS protocol. The modified time synchronization message is sent to a corresponding message receiving end, and specifically comprises the following steps:

2. The method of claim 1, wherein, When the transmission direction is that the TG sends the time synchronization message to the TS, the modified time synchronization message is sent to an Ethernet interface Ethernet Interface.

3. The method of claim 1, wherein, The modified time synchronization message is sent to a corresponding message receiving end, and specifically comprises the following steps: When the transmission direction is that the TG receives the time synchronization message of the TS, the modified time synchronization message is sent to an Ethernet synchronization EthTSyn.

4. The method of claim 1, wherein, The method further comprises the following steps: When the TS supports the time synchronization message in AUTOSAR, the TG transmits the modified time synchronization message to a corresponding message receiving end.

5. The method of claim 1, wherein, The method comprises the following steps: A judgment module is configured to determine, by a gateway node TG, a transmission direction of a time synchronization message; 6. An apparatus for Ethernet time synchronization, the apparatus comprising: A common clock node TS is a node to be synchronized by Ethernet time, and does not support a time synchronization message in AUTOSAR, wherein the time synchronization message in AUTOSAR is a multi-time domain synchronization message; An extension module is configured to modify, according to the transmission direction, a protocol format of the time synchronization message; A forwarding module is configured to send the modified time synchronization message to a corresponding message receiving end, so that the time of the TS is synchronized with the time of the TG through Ethernet; The extension module is specifically configured to: ​ ​ When the transmission direction is that the TG sends the time synchronization message to the TS, the protocol format of the time synchronization message is modified; The time domain number Domain id of the time synchronization message is assigned as zero, and the information field of the AUTOSAR in the follow-up frame Follow-up Message of the time synchronization message is deleted; The extension module is specifically configured to: When the transmission direction is that the TG receives the time synchronization message of the TS, the protocol format of the time synchronization message is modified; The time domain number Domain id of the time synchronization message is assigned as the value corresponding to the time synchronization message of the time domain supported by the AUTOSAR protocol, and the information field of the AUTOSAR in the follow-up frame Follow-up Message of the time synchronization message is added.

7. The apparatus of claim 6, wherein, The forwarding module is specifically configured to: When the transmission direction is that the TG sends the time synchronization message to the TS, the modified time synchronization message is sent to the Ethernet interface Ethernet Interface; When the transmission direction is that the TG receives the time synchronization message of the TS, the modified time synchronization message is sent to the Ethernet synchronization EthTSyn.

Citation Information

Patent Citations

  • Time synchronization method for network segment utilizing different time synchronization protocol

    CN101009546A