Communication device, communication method, and computer program

By extracting and comparing hardware-dependent timestamp characteristics using IEEE802.1AS protocol, the communication device enhances anomaly detection in time synchronization by accurately determining timestamp normality.

JP7732400B2Active Publication Date: 2025-09-02AUTONETWORKS TECH LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2022096068
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2025-09-02
Estimated Expiration
2042-06-14

Smart Images

  • Figure 0007732400000001
    Figure 0007732400000001
  • Figure 0007732400000002
    Figure 0007732400000002
  • Figure 0007732400000003
    Figure 0007732400000003
Patent Text Reader

Abstract

To provide a communication device, a communication method, and a computer program.SOLUTION: A communication device includes a processing unit and a storage unit and transmits and receives frames generated according to the rules of IEEE802.1AS. The storage unit stores characteristic information of time stamps included in frames to be received. The processing unit collects time stamps included in frames received from a specific transmission source, compares characteristic information of the collected time stamps with the characteristic information of the time stamps stored in the storage unit, and thereby determines whether the time stamps included in the frames received from the transmission source are normal.SELECTED DRAWING: Figure 6
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a communication device, a communication method, and a computer program. [Background technology]

[0002] Conventionally, as a method for detecting anomalies during time synchronization, for example, Patent Document 1 discloses a method for calculating a delay time by calculating the difference between a timestamp and the current time, and detecting anomalies based on the history of that delay time. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2018-201110 Summary of the Invention [Problem to be solved by the invention]

[0004] In Patent Document 1, abnormality detection is performed based on the history of delay times, but abnormalities cannot be detected based on characteristic information of the timestamp itself.

[0005] The present invention has been made in consideration of the above circumstances, and aims to provide a communication device, a communication method, and a computer program that focus on the characteristic information of the timestamp and determine whether the timestamp contained in a frame transmitted from a specific source is normal. [Means for solving the problem]

[0006] A communication device according to one embodiment of the present disclosure is a communication device that has a processing unit and a memory unit, and sends and receives frames generated in accordance with the IEEE802.1AS protocol, wherein the memory unit stores characteristic information of timestamps included in frames to be received, and the processing unit collects timestamps included in frames received from a specific sender, and determines whether the timestamps included in frames received from the sender are normal by comparing the characteristic information of the collected timestamps with the characteristic information of the timestamps stored in the memory unit. [Effects of the Invention]

[0007] According to the present disclosure, it is possible to determine whether a timestamp included in a frame transmitted from a specific source is normal by focusing on characteristic information of the timestamp. [Brief explanation of the drawings]

[0008] [Figure 1] 1 is an explanatory diagram illustrating a configuration example of a communication system according to an embodiment of the present invention; [Figure 2] FIG. 10 is an explanatory diagram illustrating characteristic information of a timestamp. [Figure 3] FIG. 10 is a sequence diagram for calculating a synchronization time. [Figure 4] FIG. 10 is a sequence diagram for relaying a Sync frame. [Figure 5] FIG. 10 is a sequence diagram for calculating a propagation delay. [Figure 6] 10 is a flowchart illustrating a procedure for an abnormality detection process executed by the communication device. DETAILED DESCRIPTION OF THE INVENTION

[0009] (1) A communication device according to one embodiment of the present disclosure is a communication device that includes a processing unit and a memory unit and transmits and receives frames generated in accordance with the IEEE802.1AS protocol, wherein the memory unit stores characteristic information of timestamps included in frames to be received, and the processing unit collects timestamps included in frames received from a specific sender and compares the collected characteristic information of timestamps with the characteristic information of timestamps stored in the memory unit to determine whether the timestamps included in frames received from the sender are normal.

[0010] In this embodiment, by using frames generated according to the IEEE802.1AS standard, it is possible to extract characteristic information of timestamps that are hardware dependent, and to use the extracted characteristic information to determine whether or not there is an anomaly in the timestamp.

[0011] (2) A communication device according to one aspect of the present disclosure includes a plurality of communication ports, and the storage unit stores the characteristic information for each communication port.

[0012] In this embodiment, whether the timestamp is normal or not is determined based on the characteristic information for each communication port. If the timestamp received through one communication port is normal, it can be determined that the communication partner connected to that communication port is a legitimate communication partner. On the other hand, if the timestamp received through another communication port is abnormal, it can be determined that the communication partner connected to that communication port is an invalid communication partner.

[0013] (3) In one embodiment of the communication device of the present disclosure, the memory unit stores two or more types of characteristic information for each communication port, and the processing unit determines that the timestamp received through one communication port is normal if the characteristic information of the timestamp collected through one communication port matches all of the two or more types of characteristic information stored for the one communication port.

[0014] In this embodiment, two or more types of characteristic information are stored for each communication port, and the timestamp is determined to be normal only if all of the characteristic information matches. This reduces the possibility that the characteristic information of the timestamps will match by chance, making it possible to more accurately determine whether the timestamp is normal.

[0015] (4) In a communication device according to an aspect of the present disclosure, the storage unit stores a sequence of numerical values ​​in specific digits in a timestamp as characteristic information.

[0016] In this embodiment, the sequence of numbers in specific digits in a timestamp can be used as characteristic information. The ones digit, the tens digit, and the last two digits of a timestamp are easily affected by hardware. Therefore, by extracting the sequence of these numbers as characteristic information, it is possible to determine whether the collected timestamp is normal.

[0017] (5) In a communication device according to one aspect of the present disclosure, the characteristic information includes information that the last two digits of the timestamp are fixed to 00.

[0018] Depending on the hardware, in order to make the number of digits of the timestamp consistent, 00 may be added to the last two digits. In this embodiment, such hardware can detect timestamps with 00 added to the last two digits.

[0019] (6) In a communication device according to an aspect of the present disclosure, the characteristic information includes information that the last two digits of the timestamp are a multiple of four.

[0020] Depending on the hardware, the last two digits of the timestamp may be a multiple of 4. In this embodiment, it is possible to detect timestamps generated by such hardware.

[0021] (7) A communication method according to one embodiment of the present disclosure receives a frame generated in accordance with the IEEE 802.1AS standard from a specific source, collects timestamps included in the received frame, and compares characteristic information of the collected timestamps with characteristic information of timestamps previously stored in memory, thereby determining whether the timestamps included in the frame received from the source are normal.

[0022] In this embodiment, by utilizing frames generated in accordance with the IEEE802.1AS standard, it is possible to extract characteristic information that is hardware dependent, and the extracted characteristic information can be used to determine whether or not there is an abnormality in the timestamp.

[0023] (8) A computer program according to one embodiment of the present disclosure causes a computer to execute a process of receiving a frame generated in accordance with the IEEE 802.1AS standard from a specific source, collecting timestamps included in the received frame, and determining whether the timestamps included in the frame received from the source are normal by comparing characteristic information of the collected timestamps with characteristic information of timestamps previously stored in memory.

[0024] In this embodiment, by utilizing frames generated in accordance with the IEEE802.1AS standard, it is possible to extract characteristic information that is hardware dependent, and the extracted characteristic information can be used to determine whether or not there is an abnormality in the timestamp.

[0025] The present invention will now be described in detail with reference to the drawings showing embodiments thereof. (Embodiment 1) 1 is an explanatory diagram illustrating an example of the configuration of a communication system according to this embodiment. The communication system according to this embodiment includes a communication device 10 and a plurality of ECUs connected to the communication device 10. The communication device 10 is, for example, a communication device such as an ECU (Electronic Control Unit) or a switch device mounted on a vehicle. The communication device 10 includes a processing unit 11, a storage unit 12, a communication unit 13, a first communication port 14, a second communication port 15, a third communication port 16, etc.

[0026] The processing unit 11 includes, for example, a CPU (Central Processing Unit), a ROM (Read Only Memory), and a RAM (Random Access Memory). The CPU in the processing unit 11 executes a control program stored in the ROM and a program PG stored in the storage unit 12, thereby controlling the operation of the above hardware and causing the entire device to function as the communication device of the present application. The RAM in the processing unit 11 stores various data generated during the execution of various programs.

[0027] The processing unit 11 is not limited to the above configuration, and may be one or more processing circuits including an MCU (Micro Controller Unit), volatile or non-volatile memory, etc. The processing unit 11 may also have functions such as a clock that outputs date and time information, a timer that measures the elapsed time from when an instruction to start measurement is given until when an instruction to end measurement is given, and a counter that counts numbers.

[0028] The storage unit 12 is configured with a nonvolatile memory such as an EEPROM (Electronically Erasable Programmable Read Only Memory) and stores various data. The data stored in the storage unit 12 includes timestamp information, which will be described later. The program PG stored in the storage unit 12 includes a computer program for executing a process of determining whether the timestamps included in frames received via the first communication port 14 to the third communication port 16 are correct. The program PG (program product) is provided, for example, by a recording medium readable by the processing unit 11. The program PG stored in the storage unit 12 may also be downloaded from an external server (not shown).

[0029] The communication unit 13 performs processing for communicating with a plurality of communication devices connected via a first communication port 14 to a third communication port 16. In this embodiment, for example, via an Ethernet cable, a first ECU 100 is connected to the first communication port 14, a second ECU 200 is connected to the second communication port 15, and a third ECU 300 is connected to the third communication port 16.

[0030] Between the communication device 10 and each of the ECUs 100 to 300, frames generated in accordance with the IEEE802.1AS standard are transmitted and received, and time synchronization is achieved by using gPTP (generalized Precision Time Protocol). In the system configuration shown in Fig. 1, for example, the first ECU 100 is the master node, and the communication device 10 and the second ECU 200 are the slave nodes, and a time synchronization method will be described.

[0031] In this example, the first ECU 100 transmits a Sync frame including a timestamp based on a master clock to the communication device 10, and the communication device 10 calculates the synchronization time, thereby enabling the time of the communication device 10 to be synchronized with the time (master clock) of the first ECU 100. Furthermore, the communication device 10 relays the Sync frame from the first ECU 100 to the second ECU 200, and the second ECU 200 calculates the synchronization time taking into account propagation delay, thereby enabling the time of the second ECU 200 to be synchronized with the time (master clock) of the first ECU 100.

[0032] Here, if the third ECU 300 masquerades as a master node and a Sync frame including a masqueraded timestamp is transmitted from the third ECU 300, synchronization within the system cannot be ensured.

[0033] In this embodiment, characteristic information of timestamps used within the system is grasped in advance and stored in the memory unit 12, and by comparing this information with characteristic information obtained from newly collected timestamps, it is possible to determine whether the timestamps are normal (anomaly detection).

[0034] FIG. 2 is an explanatory diagram illustrating feature information of a timestamp. In this embodiment, feature information is extracted in advance by focusing on the fact that the nsec digit of a timestamp is easily affected by hardware. FIG. 2A shows an example in which, as a result of collecting timestamps from a Sync frame transmitted from the first ECU 100, all of the ones digits of the nsec digits are 6. In this case, the memory unit 12 of the communication device 10 stores feature information indicating that all of the ones digits of the nsec digits are 6 (or are all the same).

[0035] 2B shows an example in which, as a result of collecting timestamps from a Sync frame transmitted from the first ECU 100, the last two digits of nsec are a multiple of 4. In this case, the memory unit 12 of the communication device 10 stores characteristic information indicating that the last two digits of nsec are a multiple of 4.

[0036] 2C shows an example in which the last two digits of nsec have no characteristics as a result of collecting timestamps from a Sync frame transmitted from the first ECU 100. In this case, the storage unit 12 of the communication device 10 stores characteristic information indicating that the last two digits of nsec have no characteristics.

[0037] In this way, by collecting timestamps in advance and understanding their characteristics, it is possible to find characteristic information in advance. The characteristic information is not limited to that shown in FIGS. 2A to 2C , and may be, for example, characteristic information that the ones digit of nsec in the timestamps is all even numbers. Alternatively, characteristic information may be characteristic information that the ones digit of nsec is approximately the same but slightly different in units of several seconds. Furthermore, characteristic information may be characteristic information that the tens digit of nsec is frequently even (or odd) and rarely odd (or even). Furthermore, characteristic information may be characteristic information that the last two digits of nsec are fixed to 00. The characteristic information of the timestamp is not limited to these, and it is sufficient that characteristic information found in advance is stored in the storage unit 12 of the communication device 10.

[0038] The storage unit 12 may store, for each communication port, characteristic information of the timestamp of an authorized ECU that should be connected to each of the first communication port 14 to the third communication port 16. For example, if the authorized ECU that should be connected to the first communication port 14 is the first ECU 100, the storage unit 12 stores characteristic information of the timestamp obtained from the first ECU 100 in association with the first communication port 14. The same applies to the second communication port 15 and the third communication port 16.

[0039] Furthermore, two or more types of characteristic information may be stored for each communication port in the storage unit 12. For example, if the characteristic information of the timestamp collected through the first communication port 14 matches all of the two or more types of characteristic information stored for the first communication port 14, the processing unit 11 determines that the timestamp received through the first communication port 14 is normal. The same applies to the second communication port 15 and the third communication port 16.

[0040] The communication device 10 uses the above-described characteristic information to detect anomalies in the timestamp. The communication device 10 can detect anomalies in the timestamp (1) when calculating the synchronization time, (2) when relaying the Sync frame, and (3) when calculating the propagation delay.

[0041] Fig. 3 is a sequence diagram for calculating the synchronization time. In the sequence diagram of Fig. 3, the time synchronization master is, for example, the first ECU 100, and the time synchronization slave is the communication device 10. The first ECU 100 generates a timestamp based on the time (t1) output from its own master clock, and transmits a Sync frame with the timestamp added to the communication device 10. After transmitting the Sync frame, the first ECU 100 may transmit a Flow Up frame as necessary.

[0042] When the processing unit 11 of the communication device 10 receives a Sync frame through the communication unit 13, the processing unit 11 calculates the synchronization time by referring to the timestamp included in the Sync frame. In this embodiment, it is assumed that the propagation delay between the first ECU 100 and the communication device 10 is known.

[0043] The processing unit 11 detects abnormalities in the timestamps by collecting timestamps included in Sync frames for an appropriate period of time and comparing characteristic information obtained from the collected timestamps with characteristic information for each communication port pre-stored in the storage unit 12. That is, if the characteristic information obtained from the collected timestamps matches the characteristic information for each communication port pre-stored in the storage unit 12, the processing unit 11 determines that the collected timestamps are normal, and if they do not match, the processing unit 11 determines that the collected timestamps are abnormal.

[0044] 4 is a sequence diagram for relaying a Sync frame. In the sequence diagram of FIG. 4, the time synchronization master is, for example, the first ECU 100, the relay device is the communication device 10, and the time synchronization slave is, for example, the second ECU 200.

[0045] The time synchronization slave is the communication device 10. The first ECU 100 generates a timestamp based on the time (t1) output from the master clock of the first ECU 100 itself, and transmits to the communication device 10 a Sync frame with the timestamp added.

[0046] When the processing unit 11 of the communication device 10 receives a Sync frame through the communication unit 13, it transfers the received Sync frame to the second ECU 200. The processing unit 11 collects timestamps included in the transferred Sync frames for an appropriate period of time, and detects an abnormality in the timestamps by comparing characteristic information obtained from the collected timestamps with characteristic information for each communication port pre-stored in the storage unit 12. That is, if the characteristic information obtained from the collected timestamps matches the characteristic information for each communication port pre-stored in the storage unit 12, the processing unit 11 determines that the collected timestamps are normal, and if they do not match, the processing unit 11 determines that the collected timestamps are abnormal.

[0047] The second ECU 200 receives the Sync frame transferred via the communication device 10. The second ECU 200 calculates the synchronization time by referring to the timestamp included in the received Sync frame. In this embodiment, it is assumed that the propagation delay (t2-t1) between the first ECU 100 and the communication device 10, the relay processing delay (t3-t2) in the communication device 10, and the propagation delay (t4-t3) between the communication device 10 and the second ECU 200 are known. If characteristic information of the timestamps used in the system is stored in advance in the second ECU 200, an abnormality in the timestamps can be detected in the same manner as in the communication device 10.

[0048] Fig. 5 is a sequence diagram for calculating the propagation delay. In the sequence diagram of Fig. 5, the time synchronization master is, for example, the first ECU 100, and the time synchronization slave is the communication device 10. The communication device 10 generates a timestamp based on the time (t1) output from its own slave clock, and transmits a Pdelay_Req message with the timestamp attached to the first ECU 100.

[0049] The first ECU 100 returns the reception time of the Pdelay_Req message to the communication device 10 in a Pdelay_Res message.

[0050] The processing unit 11 of the communication device 10 calculates the propagation delay time when receiving the Pdelay_Res message from the first ECU 100. The processing unit 11 can calculate the propagation delay time by referring to times t1 to t4.

[0051] The processing unit 11 collects timestamps included in the Pdelay_Res message for an appropriate period of time, and detects abnormalities in the timestamps by comparing characteristic information obtained from the collected timestamps with characteristic information for each communication port pre-stored in the storage unit 12. That is, if the characteristic information obtained from the collected timestamps matches the characteristic information for each communication port pre-stored in the storage unit 12, the processing unit 11 determines that the collected timestamps are normal, and if they do not match, the processing unit 11 determines that the collected timestamps are abnormal.

[0052] 6 is a flowchart showing the procedure of anomaly detection executed by the communication device 10. The processing unit 11 of the communication device 10 collects timestamps from frames input through a specific communication port (for example, the third communication port 16) (step S101).

[0053] The processing unit 11 extracts characteristic information from the collected timestamps (step S102). The processing unit 11 may extract characteristic information by focusing on, for example, the units digit, tens digit, and last two digits of the nsec portion of the timestamp.

[0054] The processing unit 11 compares the characteristic information extracted in step S102 with the characteristic information of a specific communication port (e.g., the third communication port 16) pre-stored in the memory unit 12 (step S103), and determines whether the two match (step S104).

[0055] If it is determined that the two match (S104: YES), the processing unit 11 determines that the timestamp of the ECU connected to the specific communication port is normal (step S105).

[0056] If it is determined that the two do not match (S104: NO), the processing unit 11 determines that the timestamp of the ECU connected to the specific communication port is abnormal (step S106). If the processing unit 11 determines that the timestamp is abnormal, it may issue a warning or stop communication via the specific communication port.

[0057] In the flowchart of Figure 6, the configuration is such that a comparison is made with one piece of characteristic information stored in the memory unit 12, but it is also possible to store multiple pieces of characteristic information in the memory unit 12 and determine that the information is normal if it matches the multiple pieces of characteristic information.

[0058] As described above, in this embodiment, by utilizing frames generated in accordance with the IEEE802.1AS standards, it is possible to extract characteristic information that is hardware dependent, and to use the extracted characteristic information to determine whether or not there is an abnormality in the timestamp.

[0059] The embodiments disclosed herein should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is defined by the claims, not by the above meaning, and is intended to include all modifications within the meaning and scope of the claims.

[0060] Independent and dependent claims may be combined with each other in any and all combinations, regardless of the reference format. Furthermore, while the claims may be written in a format in which a claim references two or more other claims (multiple claim format), this is not a limitation. Multiple claims that reference at least one other multiple claim (multiple multiple claim format) may also be written. [Explanation of symbols]

[0061] 10. Communications equipment 11 Processing section 12 Storage section 13 Communications Department 14 First communication port 15 Second communication port 16 Third communication port 100 1st ECU 200 2nd ECU 300 3rd ECU

Claims

1. A communication device that includes a processing unit and a storage unit, and transmits and receives frames generated in accordance with the IEEE 802.1AS protocol, The storage unit storing characteristic information of a timestamp included in a frame to be received; The processing unit Collects timestamps contained in frames received from a particular source, By comparing the collected characteristic information of the timestamp with the characteristic information of the timestamp stored in the storage unit, it is determined whether the timestamp included in the frame received from the sender is normal. Communication equipment.

2. Equipped with multiple communication ports, The storage unit stores the characteristic information for each communication port. The communication device according to claim 1 .

3. the storage unit stores two or more types of characteristic information for each communication port, The processing unit determines that the timestamp received through one communication port is normal when the characteristic information of the timestamp collected through one communication port matches all of two or more types of characteristic information stored for the one communication port. The communication device according to claim 2 .

4. The storage unit stores a sequence of numbers in specific digits in a time stamp as characteristic information. The communication device according to any one of claims 1 to 3.

5. The characteristic information includes information that the last two digits of the timestamp are fixed to 00. The communication device according to claim 4.

6. The characteristic information includes information that the last two digits of the timestamp are a multiple of four. The communication device according to claim 4.

7. receiving a frame generated in accordance with the IEEE 802.1AS standard from a specific source; Collects timestamps contained in received frames, By comparing the collected characteristic information of the timestamp with characteristic information of the timestamp pre-stored in the memory, it is determined whether the timestamp included in the frame received from the sender is normal or not. A communication method in which processing is performed by a computer.

8. receiving a frame generated in accordance with the IEEE 802.1AS standard from a specific source; Collects timestamps contained in received frames, By comparing the collected characteristic information of the timestamp with characteristic information of the timestamp pre-stored in the memory, it is determined whether the timestamp included in the frame received from the sender is normal or not. A computer program that causes a computer to execute a process.

Citation Information

Patent Citations

  • Communication device

    JP2018201110A

  • Electronic controller, time information provision method, time information provision program, and electronic control system

    JP2022085704A