relay device
The relay device prioritizes and manages regulatory diagnostic frames to meet regulatory communication times, minimizing delays and maintaining overall communication efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- TOYOTA JIDOSHA KK
- Filing Date
- 2024-10-24
- Publication Date
- 2026-05-12
AI Technical Summary
Diagnostic frames with lowered priority experience communication delays, potentially failing to meet regulatory communication time requirements.
A relay device that determines regulatory diagnostic frames and prioritizes their transmission, followed by increasing the priority of response frames, ensuring timely completion of communication within regulatory constraints.
Minimizes communication delays and ensures regulatory diagnostic frames complete within stipulated times, reducing impact on other communications.
Smart Images

Figure 2026076518000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a relay device that relays communications.
Background Art
[0002] Patent Document 1 discloses a CAN-CAN interconnect device (relay device) that can appropriately transmit and receive frames between two CAN buses. In this CAN-CAN interconnect device, it is described that the priority of communication of diagnostic frames is lowered so that diagnostic frames for diagnosis do not interfere with the communication of frames such as other control signals on the CAN.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] Diagnostic frames with lowered priority have communication delays compared to control frames. If the diagnostic frames with delays are diagnostic frames not related to regulations, the communication delay is not particularly a problem. However, in the case of diagnostic frames whose communication time is defined by regulations, depending on the delay that occurs during relaying, there is a possibility that the communication cannot be completed within the time defined by the regulations.
[0005] The present disclosure has been made in view of the above problems, and an object thereof is to provide a relay device that controls relaying so that diagnostic frames can complete communication within the time defined by regulations.
Means for Solving the Problems
[0006] To solve the above problems, one aspect of the disclosed technology is a relay device for relaying communication between a client and an electronic control unit, comprising: a determination unit that determines whether a frame received from a client is a legal diagnostic frame for diagnostic communication to which regulations apply; a first processing unit that, if determined by the determination unit to be a legal diagnostic frame, transmits the legal diagnostic frame to the electronic control unit with higher priority than usual; and a second processing unit that, after a first time has elapsed since the legal diagnostic frame was transmitted to the electronic control unit, increases the priority of the response diagnostic frame received from the electronic control unit above a set value and transmits it to the client. [Effects of the Invention]
[0007] According to the relay device described above, the priority of diagnostic frames is appropriately controlled during relaying, so that diagnostic frames can complete communication within the time stipulated by law. [Brief explanation of the drawing]
[0008] [Figure 1] Configuration diagram of a network system including a relay device according to one embodiment of the present disclosure. [Figure 2] Flowchart of the processing flow for regulatory diagnostic frame communication control performed by the relay device. [Figure 3] Communication sequence diagram between client and electronic control unit [Modes for carrying out the invention]
[0009] The relay device disclosed herein performs diagnostic communication within the legally mandated time. To this end, it prioritizes and stacks diagnostic request frames received from clients using the legally mandated diagnostic address for forwarding processing, and also instantly prioritizes and responds to the legally mandated diagnostic response frames as a trigger. Hereinafter, one embodiment of this disclosure will be described in detail with reference to the drawings.
[0010] <Embodiment> [composition] Figure 1 is a schematic diagram illustrating a network system including a relay device 200 according to one embodiment of the present disclosure. The network system illustrated in Figure 1 comprises a client 100, a relay device 200, and an electronic control unit (ECU) 300. The relay device 200 and the electronic control unit 300 are mounted, for example, in a vehicle.
[0011] The client 100 is connected to the relay device 200 via cables and connectors, and is configured to communicate data with the electronic control unit (ECU) 300 via CAN through the relay device 200. This client 100 is, for example, a diagnostic device that performs diagnostic communication with the electronic control unit 300.
[0012] The relay device 200 is configured to relay data frames communicated between the client 100 and the electronic control unit (ECU) 300. This relay device 200 is sometimes called a gateway (GW). The relay device 200 includes a determination unit 210 and a processing unit 220.
[0013] The frames handled by the relay device 200 include control frames and diagnostic frames. Furthermore, diagnostic frames are divided into frames for diagnostic communication to which regulations do not apply (unregulated diagnostic frames) and frames for diagnostic communication to which regulations apply (regulated diagnostic frames). Generally, these diagnostic frames are given a relatively low communication priority so as not to interfere with the communication of control frames. As a result, as shown in Figure 1, CAN delay occurs between the client 100 and the relay device 200, and between the relay device 200 and the electronic control unit (ECU) 300 due to the CAN arbitration mechanism, and stack delay occurs in the relay device 200 according to the lower priority.
[0014] Therefore, the relay device 200 according to this embodiment suppresses delays that occur in the legal diagnostic frame by performing characteristic control by the determination unit 210 and the processing unit 220 described below.
[0015] The determination unit 210 is configured to determine whether a frame received from the client 100 is a regulated diagnostic frame. A regulated diagnostic frame is a frame whose communication time is determined by law. The determination unit 210 can determine whether a frame is a regulated diagnostic frame based on the address value of the frame received from the client 100.
[0016] The processing unit 220 is configured to perform a characteristic process for transferring the legal diagnostic frame to the electronic control unit (ECU) 300 when the determination unit 210 determines that the frame received from the client 100 is a legal diagnostic frame. More specifically, the processing unit 220 performs a process (first processing unit) that sends the legal diagnostic frame to the electronic control unit 300 with higher priority than usual, and a process (second processing unit) that, after a predetermined time has elapsed since the legal diagnostic frame was sent to the electronic control unit 300, increases the priority of the diagnostic frame received as a response from the electronic control unit 300 (response diagnostic frame) above a set value and sends it to the client 100. Furthermore, if a predetermined time has elapsed since the priority of the response diagnostic frame was increased above a set value, the processing unit 220 performs a process to lower (return to) the priority of the response diagnostic frame to the set value.
[0017] The electronic control unit (ECU) 300 is configured to communicate with the client 100 via the relay device 200. In Figure 1, the number of electronic control units 300 connected to the relay device 200 is shown as one, but the number of electronic control units 300 may be two or more.
[0018] [control] Next, referring further to FIG. 2, the control performed by the relay device 200 according to an embodiment of the present disclosure will be described. FIG. 2 is a flowchart for explaining an example of the processing procedure of the regulatory diagnostic frame communication control executed by each component of the relay device 200.
[0019] The regulatory diagnostic frame communication control illustrated in FIG. 2 is started, for example, when the relay device 200 receives a diagnostic frame from the client 100.
[0020] (Step S201) The determination unit 210 of the relay device 200 determines whether the diagnostic frame received by the relay device 200 from the client 100 is a regulatory diagnostic frame. Whether it is a regulatory diagnostic frame can be determined by recognizing that the address of the diagnostic frame received by the relay device 200 from the client 100 is a diagnostic address for regulations.
[0021] If the diagnostic frame received by the relay device 200 from the client 100 is a regulatory diagnostic frame (Step S201, Yes), the process proceeds to Step S202. On the other hand, if the diagnostic frame received by the relay device 200 from the client 100 is not a regulatory diagnostic frame (Step S201, No), the process proceeds to Step S203.
[0022] (Step S202) The processing unit 220 of the relay device 200 gives priority to the regulatory diagnostic frame over normal and transmits it from the relay device 200 to the electronic control unit (ECU) 300. Specifically, the processing unit 220 stacks the regulatory diagnostic frame with higher priority than the normal order (change of stack order), and processes it so that the regulatory diagnostic frame can be transmitted from the relay device 200 to the electronic control unit 300 with a shorter delay time than normal (suppressing the delay). By this processing, the transmission delay of the regulatory diagnostic frame from the relay device 200 to the electronic control unit 300 is suppressed.
[0023] When the regulatory diagnostic frame is sent from the relay device 200 to the electronic control unit (ECU) 300 with higher priority than usual, the process proceeds to step S204.
[0024] (Step S203) The processing unit 220 of the relay device 200 transmits the regulatory diagnostic frame from the relay device 200 to the electronic control unit (ECU) 300 in the usual manner. Specifically, the processing unit 220 stacks the regulatory diagnostic frame in the usual order (invariant stacking order) and processes it so that it can be transmitted from the relay device 200 to the electronic control unit 300.
[0025] When the regulatory diagnostic frame is transmitted from the relay device 200 to the electronic control unit (ECU) 300 as usual, this regulatory diagnostic frame communication control is terminated.
[0026] (Step S204) The processing unit 220 of the relay device 200 determines whether or not a first time has elapsed since the regulatory diagnostic frame was transmitted from the relay device 200 to the electronic control unit (ECU) 300. This first time corresponds to a period during which there is no concern about delays in regulatory communication, and is appropriately set based on the time it takes for a response diagnostic frame to the regulatory diagnostic frame to be returned from the electronic control unit 300 to the relay device 200 (for example, 30 milliseconds).
[0027] If one hour has elapsed since the regulatory diagnostic frame was transmitted from the relay device 200 to the electronic control unit (ECU) 300 (step S204, yes), the process proceeds to step S205. On the other hand, if one hour has not yet elapsed since the regulatory diagnostic frame was transmitted from the relay device 200 to the electronic control unit 300 (step S204, no), the process waits until one hour has elapsed.
[0028] (Step S205) The processing unit 220 of the relay device 200 processes the response diagnostic frames received by the relay device 200 from the electronic control unit (ECU) 300 with increased communication priority. Specifically, the processing unit 220 changes the pre-set priority of the response diagnostic frames to a higher value, and then stacks the response diagnostic frames received from the electronic control unit 300 according to the changed higher priority. This stacking change causes the response diagnostic frames to be transmitted from the relay device 200 to the client 100 with higher priority than usual. This process suppresses the transmission delay of the response diagnostic frames from the relay device 200 to the client 100.
[0029] For example, if the regulatory diagnostic frame is an 11-bit regulatory address, only the 11-bit regulatory diagnostic address will respond, so only the 11-bit response regulatory diagnostic address (response diagnostic frame) needs to be given priority. Similarly, if the regulatory diagnostic frame is a 29-bit regulatory address, only the 29-bit regulatory diagnostic address will respond, so only the 29-bit response regulatory diagnostic address (response diagnostic frame) needs to be given priority. Figure 3 shows an example of a communication sequence for a diagnostic response to a regulatory address request between client 100 and electronic control unit (ECU) 300.
[0030] When the response diagnostic frame received by the relay device 200 from the electronic control unit (ECU) 300 is processed with increased communication priority, the process proceeds to step S206.
[0031] (Step S206) The processing unit 220 of the relay device 200 determines whether a second time has elapsed since the response diagnostic frame received from the electronic control unit (ECU) 300 began to be processed with increased communication priority after the first time had elapsed. This determination is made to minimize the impact on CAN communication on control frames caused by prioritizing the processing of regulatory diagnostic frames. Therefore, this second time is set to an appropriate time (for example, 20 milliseconds) that allows the processing of the response diagnostic frame with increased priority to be completed effectively in a short time (instantaneously).
[0032] If two hours have elapsed since the response diagnostic frame began to be processed with increased communication priority (step S206, yes), the process proceeds to step S207. On the other hand, if two hours have not yet elapsed since the response diagnostic frame began to be processed with increased communication priority (step S206, no), the process waits until two hours have elapsed.
[0033] (Step S207) The processing unit 220 of the relay device 200 processes the response diagnostic frame received from the electronic control unit (ECU) 300 with a lower communication priority. Specifically, the processing unit 220 returns the priority of the response diagnostic frame, which was changed to a higher priority in step S205, back to its original preset priority, and then stacks the response diagnostic frames received from the electronic control unit 300 according to the original priority. This stacking change allows the response diagnostic frame to be transmitted from the relay device 200 to the client 100 as usual. This process eliminates the communication impact that had affected the control frame for the second time period.
[0034] When the processing of the response diagnostic frame received from the electronic control unit (ECU) 300 is performed with a lower communication priority, the diagnostic frame communication control stipulated by this regulation is terminated.
[0035] <Effects and Actions> As described above, according to the relay device 200 of one embodiment of the present disclosure, when a diagnostic frame is received from the client 100 with a diagnostic address for regulations, the priority of the regulatory diagnostic frame is increased, it is stacked and forwarded, and after the first time has elapsed since the forwarding process, the priority of the response diagnostic frame received from the electronic control unit (ECU) 300 during the second time is also increased, it is stacked and forwarded to the client 100.
[0036] This process reduces the number of points where regulatory diagnostic communications may be delayed, thereby minimizing communication delays and enabling communication to be completed within the time specified by regulations.
[0037] Furthermore, according to the relay device 200 of this embodiment, since there is no concern that regulatory diagnostic communication will be delayed during the first hour, regulatory diagnostic communication is not treated as high priority during that first hour, and other communications are given priority, thereby minimizing the impact on the overall communication.
[0038] Furthermore, according to the relay device 200 of this embodiment, since the second time period in which legal diagnostic communication is treated as high priority is instantaneous, the impact on communications other than legal communication can be reduced.
[0039] Although one embodiment of the disclosed technology has been described above, the disclosure can be understood not only as a relay device, but also as a method performed by a relay device equipped with a processor and memory, a program for performing that method, a computer-readable non-temporary storage medium storing that program, and a vehicle equipped with a relay device. [Industrial applicability]
[0040] The relay device of this disclosure can be used when it is desired to complete regulatory diagnostic communication between a client and an electronic control unit within the time stipulated by law. [Explanation of Symbols]
[0041] 100 clients 200 relay devices (GW) 210 Judgment section 220 processing units 300 Electronic Control Unit (ECU)
Claims
1. A relay device that relays communication between a client and an electronic control unit, A determination unit that determines whether the frame received from the client is a legal diagnostic frame for diagnostic communication to which regulations apply, If the determination unit determines that it is a regulatory diagnostic frame, the first processing unit transmits the regulatory diagnostic frame to the electronic control unit with higher priority than usual. A relay device comprising: a second processing unit that, after a first time has elapsed since the aforementioned regulatory diagnostic frame was transmitted to the electronic control unit, increases the priority of the response diagnostic frame received from the electronic control unit above a set value and transmits it to the client.
2. The relay device according to claim 1, wherein the second processing unit reduces the priority of the response diagnostic frame to the set value after a second time has elapsed following the first time.
3. The relay device according to claim 1 or 2, wherein the determination unit determines, based on the address value of the frame, whether or not the frame received from the client is the regulatory diagnostic frame.