In-vehicle relay device, relay method, and relay program
Patent Information
- Application Number
- JP2023099499
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2025-10-31
AI Technical Summary
In-vehicle relay devices experience reduced or unstable throughput during idle times between packet transmissions, leading to inefficiencies in in-vehicle networks.
The in-vehicle relay device sets a window size larger than the requested data size to stabilize throughput by adjusting the number of packets transmitted per unit time, using a setting unit to notify the source function unit of the adjusted data size through a communication unit.
This configuration allows for stable and efficient packet transmission by increasing the number of packets received per unit time, enhancing network performance.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an in-vehicle relay device, a relay method, and a relay program. [Background technology]
[0002] Conventionally, an in-vehicle relay device that relays packets transmitted and received between functional units has been developed. For example, Patent Document 1 (JP Patent Publication No. 2015-147446) discloses the following vehicle control device. That is, the vehicle control device has a plurality of unit vehicle control devices mounted on a vehicle and connected by a network, and a vehicle identification code for identifying a vehicle is stored in at least one unit vehicle control device, and each of the unit vehicle control devices has a node that exchanges messages with an external diagnostic device via communication, one of the nodes is designated as a representative node, and unique identification information held by the representative node is transferred to and stored in other nodes as vehicle identification information, and each node replies to a vehicle identification request message transmitted from the diagnostic device to each of the nodes with either a vehicle identification response message including the vehicle identification code and the vehicle identification information stored in each of the nodes itself, or a vehicle identification response message including the vehicle identification information stored in each of the nodes itself without including the vehicle identification code. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2015-147446 A Summary of the Invention [Problem to be solved by the invention]
[0004] For example, an in-vehicle relay device may transmit a packet to a destination functional unit and then request a source functional unit of the packet to transmit a new packet. In this case, there is a vacant time between when the in-vehicle relay device transmits a packet to the destination functional unit and when the in-vehicle relay device receives a new packet from the source functional unit, and the throughput between the source functional unit and the in-vehicle relay device may decrease or become unstable. A technology capable of realizing a stable throughput within the limited resources of an in-vehicle network is desired.
[0005] The present disclosure has been made to solve the above-mentioned problems, and its purpose is to provide an in-vehicle relay device, a relay method, and a relay program that can achieve stable throughput in packet transmission in an in-vehicle network. [Means for solving the problem]
[0006] The vehicle-mounted relay device of the present disclosure is an vehicle-mounted relay device that relays packets transmitted and received between functional units, and is equipped with a setting unit that sets a window size, which is the maximum data size of the packet that a source functional unit, which is the functional unit from which the packet is sent, can send to the vehicle-mounted relay device, and which is the maximum value to be notified to the source functional unit when a communication connection between the source functional unit and the vehicle-mounted relay device is established, and a communication unit that notifies the source functional unit of the window size set by the setting unit, and when the communication unit receives the packet from the source functional unit after notifying the window size, it performs a response process in which a response packet for the received packet is sent to the source functional unit including control information for controlling a requested data size, which is the data size of the packet that the source functional unit is requested to send, and the setting unit sets the window size to a value larger than the requested data size.
[0007] One aspect of the present disclosure can be realized not only as an in-vehicle relay device equipped with such a characteristic processing unit, but also as a semiconductor integrated circuit that realizes part or all of the in-vehicle relay device, or as a system that includes the in-vehicle relay device. Effect of the Invention
[0008] According to the present disclosure, a stable throughput can be achieved in packet transmission in an in-vehicle network. [Brief description of the drawings]
[0009] [Figure 1] FIG. 1 is a diagram illustrating a configuration of a communication system according to a first embodiment of the present disclosure. [Diagram 2] FIG. 2 is a diagram illustrating an example of an IP packet transmitted and received between the vehicle-mounted relay device according to the first embodiment of the present disclosure and the diagnostic device. [Diagram 3] FIG. 3 is a diagram illustrating a configuration of an in-vehicle relay device according to the first embodiment of the present disclosure. [Figure 4] FIG. 4 is a diagram showing an example of a processing sequence of a diagnostic device and an in-vehicle relay device in a communication system of a comparative example. [Diagram 5] FIG. 5 is a diagram illustrating an example of a correspondence table stored by the vehicle-mounted relay device according to the first embodiment of the present disclosure. [Figure 6] FIG. 6 is a sequence diagram illustrating an example of a process of the diagnostic device and the vehicle-mounted relay device in the communication system according to the first embodiment of the present disclosure. [Figure 7] FIG. 7 is a sequence diagram illustrating another example of the processing of the diagnostic device and the vehicle-mounted relay device in the communication system according to the first embodiment of the present disclosure. [Figure 8] FIG. 8 is a diagram illustrating an example of an updated correspondence table stored in the vehicle-mounted relay device according to the first embodiment of the present disclosure. [Figure 9] FIG. 9 is a flowchart defining an operation procedure when the vehicle-mounted relay device according to the first embodiment of the present disclosure performs the setting process and the response process. [Figure 10] FIG. 10 is a diagram illustrating a configuration of a modified example of the communication system according to the first embodiment of the present disclosure. [Figure 11] FIG. 11 is a diagram illustrating a configuration of a modified example of a vehicle-mounted relay device according to the first embodiment of the present disclosure. [Figure 12] FIG. 12 is a diagram illustrating an example of an updated correspondence table stored in the modified example of the vehicle-mounted relay device according to the first embodiment of the present disclosure. [Figure 13] FIG. 13 is a diagram illustrating a configuration of an in-vehicle relay device according to the second embodiment of the present disclosure. [Figure 14] FIG. 14 is a diagram illustrating an example of a correspondence table stored by the vehicle-mounted relay device according to the second embodiment of the present disclosure. [Figure 15] FIG. 15 is a flowchart defining an operation procedure when the vehicle-mounted relay device according to the second embodiment of the present disclosure performs the setting process and the response process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0010] First, the contents of the embodiments of the present disclosure will be listed and described. (1) An in-vehicle relay device according to an embodiment of the present disclosure is an in-vehicle relay device that relays packets transmitted and received between functional units, and includes a setting unit that sets a window size, which is the maximum data size of the packet that a source functional unit, which is the functional unit from which the packet is sent, can send to the in-vehicle relay device, and which is to be notified to the source functional unit when a communication connection between the source functional unit and the in-vehicle relay device is established, and a communication unit that notifies the source functional unit of the window size set by the setting unit, wherein when the communication unit receives the packet from the source functional unit after notifying the window size, the communication unit performs a response process in which a response packet for the received packet is sent to the source functional unit including control information for controlling a requested data size, which is the data size of the packet that the source functional unit is requested to send, and the setting unit sets the window size to a value larger than the requested data size.
[0011] In this way, when a communication connection with a functional unit that is a source of a packet is established, a window size larger than the requested data size notified in the response process is notified to the functional unit, so that a larger number of packets per unit time than the number of packets to be transmitted to the destination functional unit can be received, and thus the received packets can be transmitted to the destination functional unit during the period until the requested new packets arrive from the source functional unit. Therefore, a stable throughput can be achieved in packet transmission.
[0012] (2) In the above (1), when the communication unit receives the packet from the source functional unit after notifying the window size, the setting unit may determine the requested data size based on a target value of throughput between the vehicle-mounted relay device and the functional unit to which the received packet is relayed, and the communication unit may notify the source functional unit of the control information for controlling the requested data size determined by the setting unit in the response processing.
[0013] With this configuration, the request data size notified to the source functional unit can be adjusted according to the target throughput value between the vehicle-mounted relay device and the destination functional unit, thereby stabilizing the throughput and bringing it closer to the target value.
[0014] (3) In the above (1) or (2), when the communication unit receives the packet from the source functional unit after notifying the window size, the setting unit may perform a calculation process to calculate the requested data size based on a round-trip time from when the communication unit transmits the response packet to when the communication unit receives the packet in response to the response packet, and the communication unit may notify the source functional unit of the control information for controlling the requested data size calculated by the setting unit in the response process.
[0015] With this configuration, the requested data size to be notified to the source functional unit can be adjusted according to the round-trip time of the packet between the vehicle-mounted relay device and the source functional unit, so that the requested data size taking into account the length of the round-trip time can be notified to the source functional unit.
[0016] (4) In the above (3), the vehicle-mounted relay device may be provided with a measurement unit that measures the round-trip time, and the setting unit may calculate the requested data size in the calculation process based on the round-trip time measured by the measurement unit.
[0017] With this configuration, the requested data size based on the actual measured round-trip time can be notified to the source functional unit, so that a more accurate requested data size according to the load situation of the in-vehicle network can be notified to the source functional unit.
[0018] (5) In (3) above, the communication unit may communicate with a plurality of the source function units, and the vehicle-mounted relay device may further include a round-trip time determination unit that determines the round-trip time depending on the source function unit, and the setting unit may calculate the requested data size based on the round-trip time determined by the round-trip time determination unit in the calculation process.
[0019] With this configuration, it is possible to notify an appropriate requested data size based on the round-trip time for each source functional unit, thereby achieving more stable throughput when transmitting packets from each source functional unit to a destination functional unit.
[0020] (6) In the above (1) or (2), the communication unit may communicate with a plurality of the source functional units, and when the packet is received by the communication unit, the setting unit may determine the requested data size depending on the source functional unit, and the communication unit may notify the source functional unit of the control information for controlling the requested data size determined by the setting unit in the response process.
[0021] With this configuration, an appropriate requested data size can be notified to each source functional unit, thereby achieving more stable throughput when packets from each source functional unit are sent to a destination functional unit.
[0022] (7) In any one of (1) to (6) above, the communication unit notifies the source function unit of an acknowledgment number included in the response packet as the control information in the response process.
[0023] With this configuration, the requested data size can be notified to the source functional unit through a simple process that uses an existing acknowledgment number.
[0024] (8) In any of (1) to (7) above, the source functional unit may be provided outside an in-vehicle network including the in-vehicle relay device and connected to the in-vehicle relay device via a LAN cable, and the communication unit may relay the packet to the functional unit provided in the in-vehicle network.
[0025] With this configuration, for example, when performing fault diagnosis on a vehicle, a stable throughput can be achieved in packet transmission in an in-vehicle network to which a diagnostic device is connected.
[0026] (9) A relay method according to an embodiment of the present disclosure is a relay method in an in-vehicle relay device that relays packets transmitted and received between functional units, and includes the steps of: setting a window size, which is a data size equivalent to the maximum number of packets per unit time that a source functional unit, which is the functional unit from which the packets are sent, can send to the in-vehicle relay device, and which is a data size to be notified to the source functional unit when a communication connection between the source functional unit and the in-vehicle relay device is established; notifying the source functional unit of the set window size; and, when the packet is received from the source functional unit after notifying the window size, performing a response process to send a response packet to the received packet including control information for controlling a requested data size, which is a data size equivalent to the number of packets per unit time that the source functional unit is requested to send, to the source functional unit, and in the step of setting the window size, the window size is set to a value larger than the requested data size.
[0027] In this way, when a communication connection with a functional unit that is a source of a packet is established, a window size larger than the requested data size notified in the response process is notified to the functional unit, so that a larger number of packets per unit time than the number of packets to be transmitted to the destination functional unit can be received, and thus the received packets can be transmitted to the destination functional unit during the period until the requested new packets arrive from the source functional unit. Therefore, a stable throughput can be achieved in packet transmission.
[0028] (10) A relay program according to an embodiment of the present disclosure is a relay program used in an in-vehicle relay device that relays packets transmitted and received between functional units, and is a program for causing a computer to function as: a setting unit that sets a window size, which is the maximum data size of the packet that a source functional unit, which is the functional unit from which the packet is sent, can send to the in-vehicle relay device, and which is to be notified to the source functional unit when a communication connection between the source functional unit and the in-vehicle relay device is established; and a communication unit that notifies the source functional unit of the window size set by the setting unit, wherein when the communication unit receives the packet from the source functional unit after notifying the source functional unit of the window size, the communication unit performs a response process in which a response packet for the received packet is sent to the source functional unit including control information for controlling a requested data size, which is the data size of the packet that the source functional unit is requested to send, and the setting unit sets the window size to a value larger than the requested data size.
[0029] In this way, when a communication connection with a functional unit that is a source of a packet is established, a window size larger than the requested data size notified in the response process is notified to the functional unit, so that a larger number of packets per unit time than the number of packets to be transmitted to the destination functional unit can be received, and thus the received packets can be transmitted to the destination functional unit during the period until the requested new packets arrive from the source functional unit. Therefore, a stable throughput can be achieved in packet transmission.
[0030] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the drawings, the same or corresponding parts are denoted by the same reference numerals, and the description thereof will not be repeated. In addition, at least some of the embodiments described below may be arbitrarily combined.
[0031] <First embodiment> [Communication Systems] Fig. 1 is a diagram showing a configuration of a communication system according to a first embodiment of the present disclosure. With reference to Fig. 1, a communication system 501 includes an in-vehicle system 301 and a diagnostic device 201. The in-vehicle system 301 is mounted on a vehicle 1. The diagnostic device 201 is, for example, a diagnostic tool conforming to DoIP (Diagnostics over Internet Protocol), which is a communication standard defined in ISO13400, and performs fault diagnosis of the in-vehicle system 301. The diagnostic device 201 is an example of a functional unit.
[0032] The vehicle-mounted system 301 includes the vehicle-mounted relay device 101 and a plurality of vehicle-mounted devices 202. The vehicle-mounted devices 202 are an example of a functional unit.
[0033] The in-vehicle devices 202 include an automatic driving ECU (Electronic Control Unit), an engine ECU, a body control ECU, a TCU (Telematics Communication Unit), a sensor, a navigation device, a human-machine interface, a camera, and the like.
[0034] 1, the in-vehicle system 301 includes in-vehicle devices 202A and 202B that are in-vehicle devices 202. The in-vehicle relay device 101 and the multiple in-vehicle devices 202 configure an in-vehicle network 401.
[0035] The in-vehicle system 301 is not limited to a configuration including two in-vehicle devices 202, and may be a configuration including one in-vehicle device 202 or three or more in-vehicle devices 202.
[0036] The vehicle-mounted relay device 101 is, for example, a gateway device, and is capable of relaying data between a plurality of vehicle-mounted devices 202 connected thereto.
[0037] Each of the in-vehicle devices 202 is connected to the in-vehicle relay device 101 via an Ethernet (registered trademark) cable 11, for example.
[0038] More specifically, the vehicle-mounted relay device 101 includes a plurality of communication ports 51. The communication ports 51A, 51B, and 51C are terminals to which an Ethernet cable 11 can be connected, for example. The vehicle-mounted devices 202A and 202B are connected to the communication ports 51A and 51B via the Ethernet cable 11, respectively.
[0039] In addition, the vehicle-mounted relay device 101 is not limited to being connected to the vehicle-mounted equipment 202 via an Ethernet cable 11, but may also be connected to the vehicle-mounted equipment 202 via a bus conforming to standards such as CAN (Controller Area Network), CAN FD (CAN with Flexible Data Rate), FlexRay (registered trademark), MOST (Media Oriented System Transport) (registered trademark), LIN (Local Interconnect Network), and CXPI (Clock Extension Peripheral Interface) (registered trademark).
[0040] In addition, the vehicle-mounted relay device 101 can relay data between the diagnostic device 201 and the vehicle-mounted device 202 connected thereto.
[0041] More specifically, for example, diagnostic device 201 is provided outside vehicle-mounted network 401 including vehicle-mounted relay device 101, and is connected to vehicle-mounted relay device 101 via LAN (Local Area Network) cable 12 such as an Ethernet cable.
[0042] Specifically, the communication port 51D, which is the communication port 51 in the vehicle-mounted relay device 101, is a terminal to which, for example, the LAN cable 12 can be connected. The diagnostic device 201 is connected to the communication port 51D via the LAN cable 12.
[0043] The vehicle-mounted relay device 101 is not limited to a configuration having four communication ports 51, and may be a configuration having two, three, five or more communication ports 51.
[0044] For example, IP packets are used to exchange information between the vehicle-mounted relay device 101 and the vehicle-mounted device 202, and between the vehicle-mounted relay device 101 and the diagnostic device 201. The IP packets are stored in Ethernet frames and transmitted.
[0045] (TCP connection) The diagnostic device 201 transmits and receives IP packets including messages to and from the vehicle-mounted relay device 101 by establishing a communication connection for exchanging predetermined messages according to a connection-based protocol.
[0046] FIG. 2 is a diagram illustrating an example of an IP packet transmitted and received between the vehicle-mounted relay device according to the first embodiment of the present disclosure and the diagnostic device.
[0047] 2, diagnostic device 201 and in-vehicle relay device 101 transmit and receive IP packets in accordance with TCP (Transmission Control Protocol) / IP. Diagnostic device 201 and in-vehicle relay device 101 establish a TCP connection, which is a communication connection in accordance with TCP / IP, by a three-way handshake.
[0048] More specifically, the diagnostic device 201 creates an IP packet (hereinafter also referred to as a “SYN packet”) including a TCP packet with the SYN (synchronize) flag in the TCP header set to on, and transmits the created SYN packet to the vehicle-mounted relay device 101.
[0049] When the vehicle-mounted relay device 101 receives a SYN packet from the diagnostic device 201, it creates an IP packet (hereinafter also referred to as a "SYN / ACK packet") including a TCP packet with the SYN flag and ACK (acknowledgement) flag in the TCP header set to on, and transmits the IP packet including the created SYN / ACK packet to the diagnostic device 201.
[0050] When the diagnostic device 201 receives a SYN / ACK packet from the vehicle-mounted relay device 101, it creates an IP packet (hereinafter also referred to as an "ACK packet") including a TCP packet with the ACK flag in the TCP header set to ON, and transmits the created ACK packet to the vehicle-mounted relay device 101. As a result, a TCP connection between the diagnostic device 201 and the vehicle-mounted relay device 101 is established.
[0051] In addition, when the diagnostic device 201 terminates the TCP connection with the vehicle-mounted relay device 101, it creates an IP packet (hereinafter also referred to as a "FIN packet") including a TCP packet with the FIN (finish) flag set on in the TCP header, and transmits the created FIN packet to the vehicle-mounted relay device 101.
[0052] When the vehicle-mounted relay device 101 receives a FIN packet from the diagnostic device 201, it creates an IP packet (hereinafter also referred to as a "FIN / ACK packet") including a TCP packet with the FIN flag and ACK flag set on in the TCP header, and transmits the created FIN / ACK packet to the diagnostic device 201.
[0053] When the diagnostic device 201 receives the FIN / ACK packet from the in-vehicle relay device 101, it creates an ACK packet and transmits the created ACK packet to the in-vehicle relay device 101. This terminates the TCP connection between the diagnostic device 201 and the in-vehicle relay device 101.
[0054] The diagnostic device 201 transmits one or more IP packets to the destination in-vehicle device 202 via the in-vehicle relay device 101 during a connection period Tc of the TCP connection with the in-vehicle relay device 101 .
[0055] Specifically, for example, during the connection period Tc, the diagnostic device 201 creates an IP packet (hereinafter also referred to as a "DoIP packet") that includes a message conforming to the DoIP standard and includes, as a source IP address and a destination IP address, respectively, of its own IP address and the IP address of the destination in-vehicle device 202. Then, the diagnostic device 201 transmits the created DoIP packet to the destination in-vehicle device 202 via the in-vehicle relay device 101.
[0056] [Vehicle-mounted relay device] FIG. 3 is a diagram showing a configuration of an in-vehicle relay device according to a first embodiment of the present disclosure. With reference to FIG. 3, the in-vehicle relay device 101 includes a plurality of communication ports 51, a relay unit 52, a processing unit 53, and a storage unit 54. The relay unit 52 includes a buffer 55. The processing unit 53 includes a setting unit 61, a measurement unit 62, and an update unit 63. One or both of the relay unit 52 and the processing unit 53 are realized, for example, by a processing circuit including one or more processors. The storage unit 54 is, for example, a non-volatile memory included in the processing circuit. The relay unit 52 is an example of a communication unit.
[0057] The relay unit 52 performs a relay process for relaying data transmitted and received between devices connected to its own vehicle-mounted relay device 101 .
[0058] More specifically, the relay unit 52 is capable of performing relay processing according to, for example, layer 2 and layer 3 which is higher than layer 2.
[0059] Specifically, the relay unit 52 relays IP packets transmitted and received between the in-vehicle devices 202. When the relay unit 52 receives an IP packet from a certain in-vehicle device 202, it transmits the received IP packet to the in-vehicle device 202 of the destination.
[0060] Furthermore, relay unit 52 performs a packet relay process for relaying IP packets transmitted and received between diagnostic device 201 and in-vehicle device 202 .
[0061] More specifically, for example, when the relay unit 52 receives a DoIP packet from the diagnostic device 201, the relay unit 52 stores the received DoIP packet in the buffer 55 and performs a conversion process to convert the destination IP address included in the received DoIP packet.
[0062] Specifically, for example, the storage unit 54 stores an Address Resolution Protocol (ARP) table that indicates the correspondence between IP addresses and Media Access Control (MAC) addresses.
[0063] When the relay unit 52 receives a DoIP packet from the diagnostic device 201, the relay unit 52 refers to the ARP table in the storage unit 54 to identify the MAC address corresponding to the destination IP address included in the DoIP packet as the destination MAC address.
[0064] The storage unit 54 further stores an address table Tb10 indicating the correspondence between destination MAC addresses and communication ports.
[0065] When the relay unit 52 identifies the destination MAC address, it identifies the communication port 51 corresponding to the destination MAC address by referring to the address table Tb10 in the storage unit 54. Then, the relay unit 52 transmits the DoIP packet stored in the buffer 55 from the identified communication port 51 to the in-vehicle device 202 as the relay destination.
[0066] When the in-vehicle device 202 receives the DoIP packet from the in-vehicle relay device 111, the in-vehicle device 202 performs a predetermined process based on the received DoIP packet. For example, when the DoIP packet contains a message requesting acquisition of data necessary for the diagnostic device 201 to perform a fault diagnosis, the in-vehicle device 202 acquires the data.
[0067] [Problem description] 4 is a diagram showing an example of a sequence of processes of a diagnostic device and an in-vehicle relay device in a communication system according to a comparative example. In FIG. 4, DoIP packets transmitted in the communication system according to the comparative example are indicated by white rectangles.
[0068] Referring to FIG. 4, first, when a communication connection is established with the vehicle-mounted relay device 111, which is the vehicle-mounted relay device of the comparative example (step S1), the diagnostic device 211, which is the diagnostic device of the comparative example, transmits one DoIP packet to the vehicle-mounted relay device 111 (step S2).
[0069] Next, the in-vehicle relay device 111 performs conversion processing on the DoIP packet received from the diagnosis device 211, and transmits the converted DoIP packet to the in-vehicle device 202 (step S3).
[0070] Next, the in-vehicle relay device 111 transmits a transmission request packet, which is an IP packet requesting the diagnostic device 211 to transmit a DoIP packet, to the diagnostic device 211 in accordance with DoIP. In the example shown in Fig. 4, the in-vehicle relay device 111 transmits a transmission request packet requesting the diagnostic device 211 to transmit one DoIP packet (step S4).
[0071] Next, when the diagnostic device 211 receives the transmission request packet from the vehicle-mounted relay device 111, the diagnostic device 211 transmits one DoIP packet to the vehicle-mounted relay device 111 (step S5).
[0072] Thereafter, the processes from step S3 to step S5 are repeated in the same manner. Then, diagnostic device 211 and in-vehicle relay device 111 terminate the TCP connection (step S6).
[0073] The vehicle-mounted relay device 111 waits from transmitting a transmission request packet to the diagnostic device 211 until receiving a DoIP packet from the diagnostic device 211. That is, in the communication system of the comparative example, the period from when the vehicle-mounted relay device 111 transmits a transmission request packet to the diagnostic device 211 until when the vehicle-mounted relay device 111 receives the DoIP packet from the diagnostic device 211 is an idle time during which the vehicle-mounted relay device 111 does not perform packet relay processing and conversion processing. Therefore, in the communication system of the comparative example, the throughput between the diagnostic device 211 and the vehicle-mounted relay device 111 decreases due to the idle time, and is not stable.
[0074] Therefore, the vehicle-mounted relay device 101 according to the embodiment of the present disclosure solves the above problem by the following configuration and operation.
[0075] [Configuration of vehicle-mounted relay device] (Settings process) 3 again, the setting unit 61 in the vehicle-mounted relay device 101 sets a maximum value M of the number of DoIP packets per unit time that a source functional unit of a packet (hereinafter also referred to as a "source functional unit") can transmit to the vehicle-mounted relay device 101. More specifically, the setting unit 61 performs a setting process to set the maximum value M to be notified to the source functional unit when a communication connection is established between the source functional unit and the vehicle-mounted relay device 101. The relay unit 52 notifies the source functional unit of the maximum value M set by the setting unit 61. In the first embodiment of the present disclosure, the source functional unit will be described as the diagnostic device 201 shown in FIG. 1.
[0076] More specifically, relay unit 52 transmits and receives packets to and from diagnostic device 201 in accordance with the above-mentioned TCP / IP.
[0077] The setting unit 61 monitors the packets received by the relay unit 52, and checks the contents of the packets by referring to the TCP headers of the packets.
[0078] If the packet received by relay unit 52 is an ACK packet in response to a SYN / ACK packet, setting unit 61 determines that a communication connection between diagnostic device 201 and its own in-vehicle relay device 101 has been established.
[0079] Here, when the relay unit 52 receives a DoIP packet from the diagnostic device 201, it performs a response process of transmitting a response packet P2 to the diagnostic device 201 in response to the DoIP packet. The response packet P2 includes the total value of the data size of the DoIP packets that the diagnostic device 201 is requested to transmit (hereinafter, also referred to as the "requested data size Dr").
[0080] Specifically, for example, in the response process, the relay unit 52 includes the number of DoIP packets per unit time (hereinafter also referred to as the "number of requested packets Nr") equivalent to the requested data size Dr in the response packet P2.
[0081] When the setting unit 61 determines that a communication connection between the diagnostic device 201 and its own vehicle-mounted relay device 101 has been established, it calculates an initial value of the number of request packets Nr included in the response packet P2.
[0082] FIG. 5 is a diagram illustrating an example of a correspondence table stored by the vehicle-mounted relay device according to the first embodiment of the present disclosure.
[0083] 5, the storage unit 54 stores a correspondence table Tb1 indicating a correspondence relationship between an ID (Identifier) of a source functional unit (hereinafter also referred to as a "source ID") and a requested data size Dr. The correspondence table Tb1 is registered in the storage unit 54 by the manufacturer of the vehicle 1, for example, when the vehicle 1 is shipped. The "RTT" shown in FIG. 5 will be described later.
[0084] In the correspondence table Tb1, a source ID of "not applicable" and a requested data size Dr of "Y0 bytes" are registered as initial values.
[0085] Referring back to FIG. 3, storage unit 54 further stores data size Ds of each DoIP packet transmitted from diagnostic device 201.
[0086] When the setting unit 61 determines that a communication connection between the diagnostic device 201 and its own vehicle-mounted relay device 101 has been established, it calculates the number of requested packets Nr equivalent to the requested data size Dr "Y0 bytes" using the correspondence table Tb1 and the data size Ds per DoIP packet stored in the memory unit 54.
[0087] After calculating the number of requested packets Nr, the setting unit 61 sets, in a setting process, a TCP window size (hereinafter also simply referred to as "window size"), which is a data size equivalent to the maximum value M, to a value larger than the requested data size Dr equivalent to the calculated number of requested packets Nr, i.e., limits the number of requested packets Nr to a value smaller than the maximum value M. Then, the setting unit 61 notifies the relay unit 52 of the set window size.
[0088] When relay unit 52 receives the notification from setting unit 61, it creates an IP packet (hereinafter also referred to as "notification packet P0") that includes the notified window size and includes, as a source address and a destination IP address, the IP address of its own vehicle-mounted relay device 101 and the IP address of diagnostic device 201. Then, relay unit 52 transmits the created notification packet P0 to diagnostic device 201.
[0089] When a communication connection is established between the source function unit and its own vehicle-mounted relay device 101, the relay unit 52 receives a number of DoIP packets (hereinafter also referred to as "packets P10") from the source function unit according to the maximum value M.
[0090] More specifically, when the diagnostic device 201 receives a notification packet P0 from the vehicle-mounted relay device 101, the diagnostic device 201 transmits to the vehicle-mounted relay device 101 packets P10 the number of which corresponds to the window size included in the received notification packet P0.
[0091] 6 is a sequence diagram showing an example of processing of a diagnostic device and an in-vehicle relay device in a communication system according to a first embodiment of the present disclosure. In FIG. 6, DoIP packets transmitted in the communication system 501 are indicated by white rectangles.
[0092] 6, first, when a TCP connection is established with the diagnostic device 201 (step S11), the in-vehicle relay device 101 transmits a notification packet P0 including a window size equivalent to a maximum value M to the diagnostic device 201. Here, it is assumed that the window size included in the notification packet P0 is a window size equivalent to "maximum value M=3" (step S12).
[0093] Next, when the diagnostic device 201 receives the notification packet P0 from the vehicle-mounted relay device 101, the diagnostic device 201 transmits three packets P10 to the vehicle-mounted relay device 101 (step S13).
[0094] Next, when the vehicle-mounted relay device 101 receives three packets P10 from the diagnosis device 201, it performs conversion processing on each of the received packets P10, and stores the three packets P10 after the conversion processing in the buffer 55. Then, the vehicle-mounted relay device 101 transmits to the vehicle-mounted device 202, the number of DoIP packets determined according to the throughput Th between the vehicle-mounted device 101 and the vehicle-mounted device 202, which is the relay destination. Here, the number of DoIP packets after the conversion processing that the vehicle-mounted relay device 101 transmits to the vehicle-mounted device 202, the relay destination, is assumed to be one. As a result, the number of packets P10 stored in the buffer 55 of the vehicle-mounted relay device 101 becomes two (step S14). Note that steps S15 and thereafter shown in FIG. 6 will be described later.
[0095] (Calculating the requested data size) Referring again to FIG. 3, for example, when the relay unit 52 receives a packet P10 from the diagnostic device 201 after notifying the maximum value M, the setting unit 61 determines the requested data size Dr based on the target value G of the throughput Th between its own vehicle-mounted relay device 101 and the vehicle-mounted equipment 202 to which the received packet P10 is to be relayed.
[0096] More specifically, for example, the setting unit 61 performs a calculation process to calculate the number of requested packets Nr based on the target value G of the throughput Th and the round trip time from when the relay unit 52 transmits the response packet P2 until it receives a DoIP packet (hereinafter also referred to as "packet P11") in response to the response packet P2. Hereinafter, the round trip time is also referred to as "RTT" (Round Trip Time).
[0097] Specifically, for example, when relay unit 52 transmits notification packet P0 to diagnostic device 201, relay unit 52 outputs to measurement unit 62 a transmission notification R0 indicating that notification packet P0 has been transmitted.
[0098] The measurement unit 62 measures the RTT. For example, when the measurement unit 62 receives a transmission notification R0 from the relay unit 52, the measurement unit 62 starts a timer (not shown).
[0099] When relay unit 52 receives packet P10 in response to notification packet P0 from diagnostic device 201, relay unit 52 outputs to measurement unit 62 a reception notification R1 indicating that packet P10 has been received.
[0100] The measurement unit 62 stops the timer when it receives the reception notification R1 from the relay unit 52. Then, the measurement unit 62 measures the time from when the timer is started to when it is stopped as the RTT. After measuring the RTT, the measurement unit 62 reads out the correspondence table Tb1 in the storage unit 54.
[0101] 5 further shows the correspondence relationship between source IDs and RTTs. In the correspondence table Tb1, an RTT of "X0 milliseconds" is registered as the initial value.
[0102] The measurement unit 62 refers to the correspondence table Tb1 to check whether the measured RTT matches the RTT indicated in the correspondence table Tb1.
[0103] If the measured RTT matches the initial value of the RTT indicated in the correspondence table Tb1, the measurement unit 62 outputs to the setting unit 61 measurement result information K1 indicating that the measured RTT matches the initial value and indicating the measured RTT.
[0104] On the other hand, if the measured RTT differs from the initial value of the RTT indicated in the correspondence table Tb1, the measurement unit 62 outputs to the setting unit 61 measurement result information K2 indicating that the measured RTT differs from the initial value and indicating the measured RTT.
[0105] The storage unit 54 further stores a target value G of the throughput Th. The target value G is registered in the storage unit 54 by the manufacturer of the vehicle 1, for example, when the vehicle 1 is shipped.
[0106] When the setting unit 61 receives the measurement result information K1 or the measurement result information K2 from the measurement unit 62, in a calculation process, the setting unit 61 calculates the requested data size Dr by multiplying the RTT indicated by the measurement result information K1 or the measurement result information K2 received from the measurement unit 62 by the target value G of the throughput Th stored in the memory unit 54.
[0107] Then, the setting unit 61 calculates the number of requested packets Nr using the calculated requested data size Dr and the data size Ds per DoIP packet stored in the storage unit 54, and outputs the calculated number of requested packets Nr to the relay unit 52. Furthermore, when the setting unit 61 calculates the requested data size Dr using the measurement result information K2 from the measurement unit 62, it outputs to the update unit 63 table update information T1 including the RTT indicated by the measurement result information K2 and the calculated requested data size Dr.
[0108] (Notification of requested data size) When the relay unit 52 receives a packet P10 from the diagnostic device 201 after notifying the maximum value M, the relay unit 52 performs a response process of transmitting a response packet P2 in response to the received packet P10 to the diagnostic device 201. For example, in the response process, the relay unit 52 notifies the diagnostic device 201 of control information for controlling the requested data size Dr determined by the setting unit 61.
[0109] More specifically, for example, in the response process, relay unit 52 notifies diagnostic device 201 of an acknowledgement number (hereinafter also referred to as "ACK number") included in response packet P2 as control information.
[0110] Specifically, for example, in the response process, the relay unit 52 notifies the diagnostic device 201 of the number of request packets Nr calculated by the setting unit 61 by adjusting the ACK number included in the response packet P2.
[0111] For example, when relay unit 52 receives the calculation result from setting unit 61, relay unit 52 creates a response packet P2 including an ACK number obtained by adding the number of requested packets Nr indicated by the calculation result to the sequence number included in packet P10 received from diagnostic device 201. Then, relay unit 52 transmits the created response packet P2 to diagnostic device 201.
[0112] When the diagnostic device 201 receives the response packet P2 from the vehicle-mounted relay device 101, it transmits to the vehicle-mounted relay device 101 packets P11 whose number is calculated by subtracting the sequence number contained in packet P10 from the ACK number contained in the received response packet P2.
[0113] Referring again to FIG. 6, the process from step S15 onward will be described. The vehicle-mounted relay device 101 transmits a response packet P2 to the diagnostic device 201. In the example shown in FIG. 6, when the vehicle-mounted relay device 101 receives a packet P10 in response to the notification packet P0 (step S13), it measures RTT1, which is a round trip time between the vehicle-mounted relay device 101 and the diagnostic device 201. Then, the vehicle-mounted relay device 101 calculates a requested data size Dr and a requested packet number Nr by multiplying the measured RTT1 by a target value G of the throughput Th. Here, it is assumed that the requested packet number Nr is two. In this case, the vehicle-mounted relay device 101 transmits a response packet P2 including an ACK number adjusted so that the requested packet number Nr is two to the diagnostic device 201 (step S15).
[0114] Next, the in-vehicle relay device 101 transmits one packet P10 after the conversion process to the relay destination in-vehicle device 202. As a result, the number of packets P10 stored in the buffer 55 of the in-vehicle relay device 101 becomes one (step S16).
[0115] Next, the in-vehicle relay device 101 transmits the converted packet P10 to the in-vehicle device 202 as the relay destination. As a result, the number of packets P10 stored in the buffer 55 of the in-vehicle relay device 101 becomes zero (step S17).
[0116] Next, after RTT1 has elapsed since transmitting the response packet P2, the vehicle-mounted relay device 101 receives two packets P11 from the diagnosis device 201. Then, the vehicle-mounted relay device 101 performs a conversion process on each of the received packets P11, and stores the two packets P11 after the conversion process in the buffer 55 (step S18).
[0117] Next, the vehicle-mounted relay device 101 transmits to the diagnosis device 201 a response packet P2 including a sequence number adjusted so that the number of requested packets Nr becomes two (step S19).
[0118] Next, the in-vehicle relay device 101 transmits the converted packet P11 to the in-vehicle device 202 as the relay destination. As a result, the number of packets P11 stored in the buffer 55 of the in-vehicle relay device 101 becomes one (step S20).
[0119] Next, the in-vehicle relay device 101 transmits the converted packet P11 to the in-vehicle device 202 as the relay destination. As a result, the number of packets P11 stored in the buffer 55 of the in-vehicle relay device 101 becomes zero (step S21).
[0120] Thereafter, the same processes as those from step S18 to step S21 are repeated. Then, diagnostic device 201 and in-vehicle relay device 101 terminate the TCP connection (step S22).
[0121] 7 is a sequence diagram showing another example of the process of the diagnostic device and the vehicle-mounted relay device in the communication system according to the first embodiment of the present disclosure. In FIG. 7, the DoIP packets transmitted in the communication system 501 are indicated by white rectangles.
[0122] 7, the processes from step S31 to step S34 are similar to the processes from step S11 to step S14 shown in FIG.
[0123] Next, the vehicle-mounted relay device 101 transmits a response packet P2 to the diagnostic device 201. In the example shown in FIG. 7, when the vehicle-mounted relay device 101 receives a packet P10 in response to the notification packet P0 (step S33), it measures RTT2, which is a round trip time between the vehicle-mounted relay device 101 and the diagnostic device 201, and calculates the requested data size Dr. Here, it is assumed that RTT2 is a value smaller than RTT1 shown in FIG. 6. In this case, for example, the number of requested packets Nr is 1, which is smaller than the "number of requested packets Nr=2" shown in FIG. 6. Therefore, the vehicle-mounted relay device 101 transmits a response packet P2 including an ACK number adjusted so that the number of requested packets Nr becomes 1 to the diagnostic device 201 (step S35).
[0124] Next, the in-vehicle relay device 101 transmits the converted packet P10 to the in-vehicle device 202 as the relay destination. As a result, the number of packets P10 stored in the buffer 55 of the in-vehicle relay device 101 becomes one (step S36).
[0125] Next, the vehicle-mounted relay device 101 receives one packet P11 from the diagnosis device 201 after RTT2 has elapsed since transmitting the response packet P2. Then, the vehicle-mounted relay device 101 performs conversion processing on the received packet P11, and stores the one packet P11 after the conversion processing in the buffer 55. As a result, one packet P10 and one packet P11 are stored in the buffer 55. That is, the number of DoIP packets stored in the buffer 55 becomes two (step S37).
[0126] Next, the in-vehicle relay device 101 transmits one of the converted packets P10 and P11 to the in-vehicle device 202. Here, the in-vehicle relay device 101 transmits one converted packet P10 to the in-vehicle device 202. As a result, the number of DoIP packets stored in the buffer 55 becomes one, the packet P11 (step S38).
[0127] Next, the vehicle-mounted relay device 101 transmits to the diagnosis device 201 a response packet P2 including an ACK number adjusted so that the number of requested packets Nr becomes 1 (step S39).
[0128] Next, after RTT2 has elapsed since the vehicle-mounted relay device 101 transmitted the response packet P2, the vehicle-mounted relay device 101 receives one packet P11 from the diagnosis device 201. Then, the vehicle-mounted relay device 101 performs conversion processing on the received packet P11, and stores the one packet P11 after the conversion processing in the buffer 55. As a result, the number of packets P11 stored in the buffer 55 becomes two (step S40).
[0129] Next, the in-vehicle relay device 101 transmits the converted packet P11 to the in-vehicle device 202 as the relay destination. As a result, the number of packets P11 stored in the buffer 55 of the in-vehicle relay device 101 becomes one (step S41).
[0130] Thereafter, the same processes as those from step S39 to step S41 are repeated. Then, diagnostic device 201 and in-vehicle relay device 101 terminate the TCP connection (step S42).
[0131] (Table update process) For example, when the update unit 63 receives table update information T1 from the setting unit 61, the update unit 63 performs a table update process to update the correspondence table Tb1.
[0132] More specifically, when updating section 63 receives table update information T1 from setting section 61, it outputs to relay section 52 ID request information requesting transmission of the ID of diagnostic device 201.
[0133] The ARP table in the storage unit 54 further indicates the correspondence between the source ID and the destination IP address.
[0134] When the relay unit 52 receives the ID request information from the update unit 63, the relay unit 52 refers to the ARP table in the storage unit 54 to identify the source ID corresponding to the destination IP address included in the DoIP packet stored in the buffer 55. Then, the relay unit 52 notifies the update unit 63 of the identified source ID.
[0135] Upon receiving the notification from the relay unit 52, the update unit 63 reads out the correspondence table Tb1 in the storage unit 54. Then, the update unit 63 registers, in the correspondence table Tb1, the source ID notified from the relay unit 52, and the RTT and the requested data size Dr included in the table update information T1 received from the setting unit 61 in association with each other.
[0136] FIG. 8 is a diagram illustrating an example of an updated correspondence table stored in the vehicle-mounted relay device according to the first embodiment of the present disclosure.
[0137] 8, in the updated correspondence table Tb1, a source ID "ID-A", an RTT "X1 milliseconds", and a requested data size "Y1 bytes" are registered in association with each other.
[0138] (When packet P11 is received in response to response packet P2) For example, when the relay unit 52 receives a packet P11 in response to the response packet P2, the setting unit 61 determines the requested data size Dr based on the updated correspondence table Tb1.
[0139] More specifically, for example, when the relay unit 52 receives a packet P11 after sending a response packet P2, the relay unit 52 identifies a source ID corresponding to the destination IP address contained in the received packet P11 by referring to the ARP table in the memory unit 54, and notifies the setting unit 61 of the identified source ID.
[0140] When the setting unit 61 receives the notification from the relay unit 52, it reads out the correspondence table Tb1 in the storage unit 54. Then, the setting unit 61 specifies the requested data size Dr corresponding to the source ID notified by the relay unit 52 by referring to the correspondence table Tb1.
[0141] Then, when the setting unit 61 identifies the requested data size Dr, it calculates the number of requested packets Nr equivalent to the identified requested data size Dr using the data size Ds per DoIP packet stored in the memory unit 54, and notifies the relay unit 52 of the calculated number of requested packets Nr.
[0142] When the setting unit 61 calculates the number of requested packets Nr using the measured RTT and the target value G of the throughput Th in the above calculation process, the setting unit 61 may store the calculation result in the storage unit 54. In this case, upon receiving a notification from the relay unit 52, the setting unit 61 notifies the relay unit 52 of the number of requested packets Nr stored in the storage unit 54.
[0143] When relay unit 52 receives the notification from setting unit 61, in response processing, relay unit 52 notifies diagnostic device 201 of the notified number of request packets Nr.
[0144] [Operation flow] FIG. 9 is a flowchart defining an operation procedure when the vehicle-mounted relay device according to the first embodiment of the present disclosure performs the setting process and the response process.
[0145] 9, first, when a TCP connection is established with diagnostic device 201 (YES in step S101), in-vehicle relay device 101 sets a maximum value M to be notified to diagnostic device 201. For example, as described above, in-vehicle relay device 101 sets a window size equivalent to the maximum value M of the number of DoIP packets that diagnostic device 201 can transmit to itself per unit time (step S102).
[0146] Next, the vehicle-mounted relay device 101 transmits a notification packet P0 including the set window size to the diagnostic device 201 (step S103).
[0147] Next, the vehicle-mounted relay device 101 waits for the arrival of a packet P10 from the diagnosis device 201 in response to the notification packet P0 (NO in step S104), and upon receiving the packet P10 (YES in step S104), measures the RTT (step S105).
[0148] Next, the vehicle-mounted relay device 101 calculates the requested data size Dr. For example, as described above, the vehicle-mounted relay device 101 calculates the requested data size Dr by multiplying the measured RTT by the target value G of the throughput Th stored in the storage unit 54 (step S106).
[0149] Next, if the measurement result of the RTT differs from the initial value of the RTT indicated in the correspondence table Tb1 in the storage unit 54 (YES in step S107), the vehicle-mounted relay device 101 performs a table update process to update the correspondence table Tb1. For example, as described above, the vehicle-mounted relay device 101 registers the source ID of the diagnostic device 201, the measured RTT, and the calculated requested data size Dr in the correspondence table Tb1 in association with each other (step S108).
[0150] Next, when the vehicle-mounted relay device 101 completes the table update process (step S108) or when the RTT measurement result is the same as the initial value of the RTT indicated in the correspondence table Tb1 (NO in step S107), it transmits a response packet P2 based on the requested data size Dr to the diagnostic device 201. For example, as described above, the vehicle-mounted relay device 101 notifies the diagnostic device 201 of the number of requested packets Nr equivalent to the calculated requested data size Dr by adjusting the ACK number included in the response packet P2 (step S109).
[0151] Next, the vehicle-mounted relay device 101 waits for the arrival of a packet P11 in response to the response packet P2 (NO in step S110).
[0152] Then, when the in-vehicle relay device 101 receives the packet P11 in response to the response packet P2 from the diagnostic device 201 (YES in step S110), the in-vehicle relay device 101 transmits the response packet P2 based on the requested data size Dr to the diagnostic device 201 (step S109).
[0153] When the TCP connection with the diagnostic device 201 is terminated (YES in step S111), the vehicle-mounted relay device 101 waits for the TCP connection to be newly established (NO in step S101).
[0154] [Variations] When communicating with a plurality of diagnostic devices 201, the vehicle-mounted relay device 101 may be configured to perform the following process for determining the number of requested packets Nr.
[0155] Fig. 10 is a diagram showing a configuration of a modified example of a communication system according to the first embodiment of the present disclosure. With reference to Fig. 10, in the modified example, a communication system 501A includes an in-vehicle system 301 and diagnostic devices 201A and 201B which are a plurality of diagnostic devices 201. Hereinafter, it is assumed that the transmission source IDs of diagnostic devices 201A and 201B are "ID-A1" and "ID-A2", respectively. The transmission source ID is an ID unique to each diagnostic device 201.
[0156] Diagnostic devices 201A and 201B are connected to communication ports 51C and 51D of in-vehicle relay device 101 via LAN cables 12A and 12B, respectively. Note that communication system 501A is not limited to a configuration including two diagnostic devices 201, and may be a configuration including three or more diagnostic devices 201.
[0157] Fig. 11 is a diagram showing a configuration of a modified example of a vehicle-mounted relay device according to the first embodiment of the present disclosure. With reference to Fig. 11, vehicle-mounted relay device 101A includes a relay unit 52A instead of relay unit 52, as compared to vehicle-mounted relay device 101 shown in Fig. 3. Also, processing unit 53 in vehicle-mounted relay device 101A includes an update unit 63A instead of update unit 63, as compared to vehicle-mounted relay device 101 shown in Fig. 3. Update unit 63A is an example of a round-trip time determination unit.
[0158] The relay unit 52A communicates with a plurality of diagnostic devices 201. More specifically, for example, the relay unit 52A transmits and receives packets to and from each diagnostic device 201 in accordance with TCP / IP.
[0159] When relay unit 52A receives packet P10 in response to notification packet P0 from each diagnostic device 201, relay unit 52A notifies measurement unit 62 of the source ID of diagnostic device 201.
[0160] The measurement unit 62 starts the timer upon receiving the above-mentioned transmission notification R0 from the relay unit 52A, and then stops the timer upon receiving the reception notification R21 from the relay unit 52A.
[0161] Then, the measurement unit 62 measures the RTT and checks whether the measured RTT matches the initial value of the RTT indicated in the correspondence table Tb1 in the storage unit .
[0162] Here, the RTT between the vehicle-mounted relay device 101 and the diagnostic device 201A, and the RTT between the vehicle-mounted relay device 101 and the diagnostic device 201B are assumed to be different from the initial RTT value "X0 milliseconds" indicated in the correspondence table Tb1 shown in FIG.
[0163] If the measured RTT differs from the initial value of the RTT indicated in the correspondence table Tb1, the measurement unit 62 outputs to the setting unit 61 measurement result information K21 indicating that the measured RTT differs from the initial value, the measured RTT, and the source ID notified by the relay unit 52A.
[0164] When the setting unit 61 calculates the number of requested packets Nr using the measurement result information K21 from the measurement unit 62, it outputs table update information T2 to the update unit 63A, the table update information T2 including the source ID and RTT indicated in the measurement result information K21, and the requested data size Dr corresponding to the calculated number of requested packets Nr.
[0165] For example, updating unit 63A determines the RTT depending on diagnostic device 201. More specifically, when updating unit 63A receives table update information T2 from setting unit 61, updating unit 63A reads out correspondence table Tb1 in storage unit 54. Then, updating unit 63A registers the source ID, RTT, and requested data size Dr included in table update information T2 in correspondence table Tb1.
[0166] FIG. 12 is a diagram illustrating an example of an updated correspondence table stored in the modified example of the vehicle-mounted relay device according to the first embodiment of the present disclosure.
[0167] 12, in the modified example, in the updated correspondence table Tb1, a source ID "ID-A1", an RTT "X1 milliseconds", and a requested data size Dr "Y1 bytes" are associated and registered. A source ID "ID-A2", an RTT "X2 milliseconds", and a requested data size Dr "Y2 bytes" are associated and registered.
[0168] Upon completing the table update process, the update unit 63A outputs to the setting unit 61 an update completion notification indicating that the table update process has been completed.
[0169] Referring back to FIG. 3, in the calculation process, the setting unit 61 calculates the number of requested packets Nr based on the RTT determined by the update unit 63A.
[0170] More specifically, when the setting unit 61 receives an update completion notification from the update unit 63A and a source ID from the relay unit 52A, the setting unit 61 reads the correspondence table Tb1 in the storage unit 54. Then, the setting unit 61 refers to the correspondence table Tb1 to identify the requested data size Dr corresponding to the source ID received from the relay unit 52A.
[0171] Then, the setting unit 61 uses the data size Ds of each DoIP packet stored in the memory unit 54 to calculate the number of requested packets Nr equivalent to the identified requested data size Dr, and outputs the calculated number of requested packets Nr to the relay unit 52A.
[0172] In the communication system 501 according to the first embodiment of the present disclosure, the vehicle-mounted relay device 101 is configured to determine the requested data size Dr based on the target value G of the throughput Th between the vehicle-mounted device 202, which is the relay destination of the DoIP packet, and the RTT between the vehicle-mounted relay device 101 and the diagnostic device 201, but this is not limited thereto. The vehicle-mounted relay device 101 may be configured to determine the requested data size Dr based on either the target value G of the throughput Th or the RTT.
[0173] In addition, in the communication system 501 according to the first embodiment of the present disclosure, the vehicle-mounted relay device 101 is configured to notify the diagnostic device 201 of the number of request packets Nr equivalent to the requested data size Dr in the response process, but this is not limited to the above. The vehicle-mounted relay device 101 may be configured to notify the diagnostic device 201 of the requested data size Dr in the response process. In this case, the diagnostic device 201 stores the data size Ds of one DoIP packet. Then, the diagnostic device 201 uses the data size Ds to calculate the number of request packets Nr equivalent to the requested data size Dr notified from the vehicle-mounted relay device 101.
[0174] In addition, in the communication system 501 according to the first embodiment of the present disclosure, the vehicle-mounted relay device 101 is configured to measure the RTT between the vehicle-mounted relay device 101 and the diagnostic device 201 and calculate the requested data size Dr based on the measured RTT, but this is not limited thereto. In the vehicle-mounted relay device 101, the RTT may be registered in advance in the storage unit 54 by the manufacturer of the vehicle 1. In this case, the vehicle-mounted relay device 101 does not measure the RTT, and calculates the requested data size Dr based on the RTT stored in the storage unit 54. Also, the storage unit of the diagnostic device 201 may be configured to store the RTT. In this case, the vehicle-mounted relay device 101 does not measure the RTT, and requests the diagnostic device 201 to transmit information indicating the RTT when a communication connection between the vehicle-mounted relay device 101 and the diagnostic device 201 is established, for example. Then, the vehicle-mounted relay device 101 calculates the requested data size Dr based on the information received from the diagnostic device 201.
[0175] In addition, in the communication system 501 according to the first embodiment of the present disclosure, the vehicle-mounted relay device 101 is configured to notify the diagnosis device 201 of the confirmation response number included in the response packet P2 as control information, but this is not limited to this. The vehicle-mounted relay device 101 may be configured to include the number of request packets Nr in the response packet P2 and transmit it to the diagnosis device 201.
[0176] In addition, in the communication system 501 according to the first embodiment of the present disclosure, the in-vehicle relay device 101 is configured to establish a TCP connection with one diagnostic device 201 and notify the diagnostic device 201 of the calculated number of requested packets Nr, but this is not limited thereto. When the in-vehicle relay device 101 establishes a TCP connection with a plurality of diagnostic devices 201, the in-vehicle relay device 101 may be configured to notify each diagnostic device 201 of a common number of requested packets Nr.
[0177] In addition, in the communication system 501 according to the first embodiment of the present disclosure, the storage unit 54 in the vehicle-mounted relay device 101 is configured to store the target value G of the throughput Th registered by the manufacturer of the vehicle 1, but this is not limited to this. The vehicle-mounted relay device 101 may be configured to update the target value G depending on the state of its own resources, for example, the usage rate of at least one of the buffer 55 and the CPU (Central Processing Unit).
[0178] Next, another embodiment of the present disclosure will be described with reference to the drawings. In the drawings, the same or corresponding parts are designated by the same reference characters and the description thereof will not be repeated.
[0179] <Second embodiment> In the above-described first embodiment of the present disclosure, the in-vehicle relay device 101 performs setting processing and response processing in a configuration in which the IP packet from the diagnostic device 201 is relayed to the in-vehicle device 202. In contrast, in the second embodiment of the present disclosure, the in-vehicle relay device 102 performs setting processing and response processing in a configuration in which the IP packet from the in-vehicle device 202 is relayed to the diagnostic device 201. Contents other than those described below are the same as those of the in-vehicle relay device 101 according to the first embodiment.
[0180] Fig. 13 is a diagram showing a configuration of an in-vehicle relay device according to a second embodiment of the present disclosure. With reference to Fig. 13, compared to the in-vehicle relay device 101 shown in Fig. 3, the in-vehicle relay device 102 includes a relay unit 252 instead of the relay unit 52, and a processing unit 253 instead of the processing unit 53. Compared to the processing unit 53 shown in Fig. 3, the processing unit 253 includes a setting unit 261 instead of the setting unit 61. One or both of the relay unit 252 and the processing unit 253 are realized, for example, by a processing circuit including one or more processors. The storage unit 54 is, for example, a non-volatile memory included in the processing circuit.
[0181] The relay unit 252 communicates with a plurality of in-vehicle devices 202. Specifically, for example, the relay unit 252 transmits and receives IP packets to and from each in-vehicle device 202 in accordance with TCP / IP, similar to the relay unit 52 shown in FIG.
[0182] During the connection period Tc of the TCP connection with the vehicle-mounted relay device 102, the vehicle-mounted device 202 creates an IP packet (hereinafter also referred to as "packet P31") that includes diagnostic information used in fault diagnosis and includes its own IP address and the IP address of the diagnostic device 201 as the source IP address and destination IP address, respectively. Then, the vehicle-mounted device 202 transmits the created packet P31 to the diagnostic device 201 via the vehicle-mounted relay device 102.
[0183] In the vehicle-mounted relay device 102 , when the relay unit 252 receives the packet P 31 from the vehicle-mounted device 202 , the relay unit 252 stores the received packet P 31 in the buffer 55 and transmits the packet P 31 to the diagnostic device 201 .
[0184] The storage unit 54 further stores an address table Tb20 that indicates the correspondence between destination IP addresses and communication ports.
[0185] When relay unit 252 receives packet P31 from in-vehicle device 202, relay unit 252 identifies a communication port 51 corresponding to the destination IP address included in packet P31 by referring to address table Tb20 in storage unit 54. Then, relay unit 252 transmits packet P31 received from in-vehicle device 202 to diagnostic device 201 from the identified communication port 51.
[0186] When the diagnostic device 201 receives the packet P31 from the in-vehicle relay device 102, the diagnostic device 201 performs a predetermined process based on the received packet P31. For example, the diagnostic device 201 performs a fault diagnosis of the in-vehicle device 202 based on the diagnostic information included in the packet P31 received from the in-vehicle relay device 102.
[0187] (Settings process) In the vehicle-mounted relay device 101, the setting unit 261 performs a setting process for setting the maximum value M when a communication connection between the vehicle-mounted device 202 and the vehicle-mounted relay device 102 is established.
[0188] More specifically, for example, the setting unit 261 monitors the IP packets received by the relay unit 252, and when it determines that a communication connection between the in-vehicle equipment 202 and its own in-vehicle relay device 102 has been established, it outputs an ID request notification to the relay unit 252 requesting the transmission of the source ID.
[0189] When the relay unit 252 receives an ID request notification from the setting unit 261 , it notifies the setting unit 261 of the source ID included in the IP packet received when its own in-vehicle relay device 102 establishes a TCP connection with the in-vehicle device 202 .
[0190] FIG. 14 is a diagram illustrating an example of a correspondence table stored by the vehicle-mounted relay device according to the second embodiment of the present disclosure.
[0191] 14, the storage unit 54 stores, for example, a correspondence table Tb2 indicating the correspondence between a source ID and a requested data size.
[0192] In the correspondence table Tb2, the requested data size corresponding to the sender ID "ID-B1" is "Z1 bytes", and the requested data size corresponding to the sender ID "ID-B2" is "Z2 bytes".
[0193] Referring again to FIG. 13, when the setting unit 261 receives a notification from the relay unit 252, the setting unit 261 identifies the requested data size Dr corresponding to the source ID notified by the relay unit 252 by referring to the correspondence table Tb2 in the memory unit 54.
[0194] Then, based on the specified requested data size Dr and the data size Ds per packet P31 stored in the storage unit 54, the setting unit 261 calculates the number of requested packets Nr equivalent to the requested data size Dr.
[0195] When the setting unit 261 calculates the number of requested packets Nr, the setting unit 261 sets the maximum value M to a value smaller than the calculated number of requested packets Nr in the setting process. Then, the setting unit 261 notifies the relay unit 252 of the window size equivalent to the maximum value M.
[0196] When relay unit 252 receives the notification from setting unit 261, it creates an IP packet (hereinafter also referred to as "notification packet P30") that includes the notified window size and includes, as a source address and a destination IP address, the IP address of its own in-vehicle relay device 102 and the IP address of diagnostic device 201. Then, relay unit 252 transmits the created notification packet P30 to in-vehicle device 202.
[0197] When the in-vehicle device 202 receives the notification packet P30 from the in-vehicle relay device 102, the in-vehicle device 202 transmits to the in-vehicle relay device 102 packets P31 the number of which corresponds to the window size included in the received notification packet P30.
[0198] (Response processing) For example, when the relay unit 252 receives the packet P31, the setting unit 261 determines the requested data size Dr depending on the type of the in-vehicle device 202.
[0199] More specifically, the storage unit 54 further stores an address table Tb20 indicating the correspondence between destination IP addresses and source IDs.
[0200] When the relay unit 252 receives a packet P31 from the in-vehicle device 202 after notifying the window size corresponding to the maximum value M, the relay unit 252 identifies a source ID corresponding to the destination IP address contained in the packet P31 by referring to the address table Tb20 in the memory unit 54, and notifies the setting unit 261 of the identified source ID.
[0201] When the setting unit 261 receives the notification from the relay unit 252, the setting unit 261 refers to the correspondence table Tb2 in the storage unit 54 to identify the requested data size Dr corresponding to the sender ID notified by the relay unit 252.
[0202] Then, the setting unit 261 calculates the number of requested packets Nr equivalent to the specified requested data size Dr, based on the specified requested data size Dr and the data size Ds per packet P31 stored in the storage unit 54. Then, the setting unit 261 notifies the relay unit 252 of the calculated number of requested packets Nr.
[0203] In addition, the setting unit 261 may store the calculated number of requested packets Nr in the storage unit 54 in the above setting process. In this case, upon receiving a notification from the relay unit 252, the setting unit 261 notifies the relay unit 252 of the number of requested packets Nr stored in the storage unit 54.
[0204] For example, in the response process, the relay unit 252 notifies the source vehicle-mounted device 202 of the request packet number Nr determined by the setting unit 261.
[0205] More specifically, for example, when the relay unit 252 receives a notification from the setting unit 261, the relay unit 252 creates a response packet P2 including a sequence number obtained by adding the number of request packets Nr notified by the setting unit 261 to the sequence number included in the immediately preceding packet P31 from the source in-vehicle device 202. Then, the relay unit 252 transmits the created response packet P2 to the source in-vehicle device 202.
[0206] [Operation flow] 15 is a flowchart that defines an operation procedure when the in-vehicle relay device according to the second embodiment of the present disclosure performs the setting process and the response process. Here, as an example, the operation procedure when the in-vehicle relay device 102 performs the setting process and the response process in the case where the in-vehicle relay device 102 relays the packet P31 from the in-vehicle device 202A to the diagnostic device 201 will be described.
[0207] 15, first, when a TCP connection is established with the in-vehicle device 202A (YES in step S201), the in-vehicle relay device 102 sets a maximum value M to be notified to the in-vehicle device 202 that is the source of the packet P31. For example, as described above, the in-vehicle relay device 101 sets a window size equivalent to the maximum value M of the number of packets P31 that the in-vehicle device 202 can transmit to itself per unit time (step S202).
[0208] Next, the vehicle-mounted relay device 102 transmits a notification packet P30 including the set window size to the vehicle-mounted device 202A (step S203).
[0209] Next, the in-vehicle relay device 102 waits for the arrival of a packet P31 from the in-vehicle device 202A in response to the notification packet P30 (NO in step S204), and upon receiving the packet P31 (YES in step S204), determines the requested data size Dr. For example, as described above, the in-vehicle relay device 102 identifies the requested data size Dr corresponding to the source ID of the in-vehicle device 202A by referring to the correspondence table Tb2 in the storage unit 54 (step S205).
[0210] Next, the vehicle-mounted relay device 102 transmits a response packet P2 based on the determined number of request packets Nr to the vehicle-mounted device 202A. For example, as described above, the vehicle-mounted relay device 102 notifies the vehicle-mounted device 202A of the number of request packets Nr corresponding to the calculated request data size Dr by adjusting the ACK number included in the response packet P2 (step S206).
[0211] Next, the vehicle-mounted relay device 102 waits for the arrival of a packet P31 in response to the response packet P2 (NO in step S207).
[0212] Then, when the vehicle-mounted relay device 102 receives the packet P31 in response to the response packet P2 from the vehicle-mounted device 202A (YES in step S207), it transmits the response packet P2 based on the requested data size Dr to the vehicle-mounted device 202A (step S206).
[0213] When the TCP connection with the in-vehicle device 202A is terminated (YES in step S208), the in-vehicle relay device 102 waits for the TCP connection to be newly established (NO in step S201).
[0214] In the in-vehicle system 301 according to the second embodiment of the present disclosure, the in-vehicle relay device 102 is configured to determine the requested data size Dr according to each in-vehicle device 202 and notify the in-vehicle device 202 of the requested packet number Nr corresponding to the determined requested data size Dr, but this is not limited thereto. The in-vehicle relay device 102 may be configured to notify each in-vehicle device 202 of a common requested packet number Nr.
[0215] In addition, in the in-vehicle system according to the second embodiment of the present disclosure, the in-vehicle relay device 102 is configured to determine the requested data size Dr based on the correspondence table Tb2, but this is not limited to the above. The in-vehicle relay device 102 may be configured to measure the RTT between the in-vehicle device 202 and determine the requested data size Dr based on the measured RTT and a target value of the throughput between the diagnostic device to which the packet P31 is relayed, like the in-vehicle relay device 101 according to the first embodiment.
[0216] The other configurations and operations are similar to those of the vehicle-mounted relay device 101 according to the first embodiment, and therefore detailed description will not be repeated here.
[0217] The above-described embodiments should be considered as illustrative and not restrictive in all respects. The scope of the present invention is defined by the claims, not by the above description, and is intended to include all modifications within the meaning and scope of the claims.
[0218] Each process (each function) of the above-mentioned embodiment is realized by a processing circuit including one or more processors. The above-mentioned processing circuit may be composed of an integrated circuit or the like in which one or more memories, various analog circuits, and various digital circuits are combined in addition to the above-mentioned one or more processors. The above-mentioned one or more memories store programs (instructions) that cause the above-mentioned one or more processors to execute each of the above-mentioned processes. The above-mentioned one or more processors may execute each of the above-mentioned processes according to the programs read from the above-mentioned one or more memories, or may execute each of the above-mentioned processes according to a logic circuit designed in advance to execute each of the above-mentioned processes. The above-mentioned processors may be various processors suitable for computer control, such as a CPU, a GPU (Graphics Processing Unit), a DSP (Digital Signal Processor), an FPGA (Field Programmable Gate Array), and an ASIC (Application Specific Integrated Circuit). The above-mentioned physically separated processors may execute each of the above-mentioned processes in cooperation with each other. For example, the processors mounted on each of a plurality of physically separated computers may cooperate with each other via a network such as a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, etc. The program may be installed in the memory from an external server device or the like via the network, or may be distributed in a state stored in a recording medium such as a CD-ROM (Compact Disc Read Only Memory), a DVD-ROM (Digital Versatile Disc Read Only Memory), or a semiconductor memory, and installed in the memory from the recording medium.
[0219] The above description includes the following additional features. [Appendix 1] An in-vehicle relay device that relays packets transmitted and received between functional units, A processing circuit is provided, The processing circuitry includes: a window size is set as a maximum value of a data size of the packet that a source functional unit, which is a source of the packet, can transmit to the vehicle-mounted relay device, and is to be notified to the source functional unit when a communication connection between the source functional unit and the vehicle-mounted relay device is established; notifying the source functional unit of the set window size; when receiving the packet from the source functional unit after notifying the source functional unit of the window size, a response process is performed in which a response packet for the received packet includes control information for controlling a requested data size, which is a data size of the packet that is requested to be transmitted by the source functional unit, and the response packet is transmitted to the source functional unit; The vehicle-mounted relay device sets the window size to a value larger than the requested data size. [Explanation of symbols]
[0220] 1 vehicle 11 Ethernet cable 12, 12A, 12B LAN cable 51, 51A, 51B, 51C, 51D Communication port 52, 52A, 252 Relay section 53,253 Processing section 54 Storage section 61,261 Settings 62 Measurement section 63,63A update section 101, 101A, 102 Vehicle-mounted relay device 201, 201A, 201B Diagnostic equipment 202,202A,202B Vehicle equipment 301 In-vehicle systems 401 In-vehicle network 501,501A Communication Systems
Claims
1. An in-vehicle relay device that relays packets transmitted and received between functional units, a setting unit that sets a window size, which is a maximum value of a data size of the packet that a source functional unit that is a source of the packet can transmit to the vehicle-mounted relay device, and which is the maximum value to be notified to the source functional unit when a communication connection between the source functional unit and the vehicle-mounted relay device is established; a communication unit that notifies the source function unit of the window size set by the setting unit, when the communication unit receives the packet from the source functional unit after notifying the window size, the communication unit performs a response process of transmitting a response packet to the received packet to the source functional unit, the response packet including control information for controlling a requested data size, which is a data size of the packet that is requested to be transmitted by the source functional unit; The setting unit sets the window size to a value larger than the requested data size.
2. when the communication unit receives the packet from the source functional unit after notifying the window size, the setting unit determines the requested data size based on a target value of throughput between the vehicle-mounted relay device and the functional unit that is a relay destination of the received packet; The vehicle-mounted relay device according to claim 1 , wherein the communication unit notifies the transmission source function unit of the control information for controlling the request data size determined by the setting unit in the response process.
3. when the communication unit receives the packet from the source function unit after notifying the window size, the setting unit performs a calculation process to calculate the requested data size based on a round-trip time from when the communication unit transmits the response packet to when the communication unit receives the packet in response to the response packet; 3 . The vehicle-mounted relay device according to claim 1 , wherein the communication unit notifies the transmission source function unit of the control information for controlling the request data size calculated by the setting unit in the response process. 4 .
4. The vehicle-mounted relay device further includes: A measurement unit that measures the round trip time, The vehicle-mounted relay device according to claim 3 , wherein the setting unit calculates the requested data size based on the round-trip time measured by the measurement unit in the calculation process.
5. The communication unit communicates with a plurality of the transmission source function units; The vehicle-mounted relay device further includes: a round trip time determination unit that determines the round trip time depending on the source functional unit, The vehicle-mounted relay device according to claim 3 , wherein the setting unit calculates the requested data size based on the round-trip time determined by the round-trip time determination unit in the calculation process.
6. The communication unit communicates with a plurality of the transmission source function units; when the communication unit receives the packet, the setting unit determines the requested data size depending on the source functional unit; 3 . The vehicle-mounted relay device according to claim 1 , wherein the communication unit notifies the transmission source function unit of the request data size determined by the setting unit in the response process.
7. 3 . The vehicle-mounted relay device according to claim 1 , wherein the communication unit notifies the transmission source function unit of an acknowledgment response number included in the response packet as the control information in the response process. 4 .
8. the transmission source function unit is provided outside an in-vehicle network including the in-vehicle relay device, and is connected to the in-vehicle relay device via a LAN cable; The vehicle-mounted relay device according to claim 1 , wherein the communication unit relays the packet to the functional unit provided in the vehicle-mounted network.
9. A relay method in an in-vehicle relay device that relays packets transmitted and received between functional units, comprising: setting a window size, which is a maximum value of a data size of the packet that a source functional unit, which is the source of the packet, can transmit to the vehicle-mounted relay device, and which is the maximum value to be notified to the source functional unit when a communication connection between the source functional unit and the vehicle-mounted relay device is established; notifying the source function unit of the set window size; and performing a response process in which, when the packet is received from the source functional unit after the notification of the window size, a response packet for the received packet is transmitted to the source functional unit, the response packet including control information for controlling a requested data size, which is a data size of the packet that the source functional unit is requested to transmit, is transmitted to the source functional unit; A relay method, comprising: setting the window size to a value larger than the requested data size in the step of setting the window size.
10. A relay program used in an in-vehicle relay device that relays packets transmitted and received between functional units, comprising: Computer, a setting unit that sets a window size, which is a maximum value of a data size of the packet that a source functional unit that is a source of the packet can transmit to the vehicle-mounted relay device, and which is the maximum value to be notified to the source functional unit when a communication connection between the source functional unit and the vehicle-mounted relay device is established; a communication unit that notifies the source function unit of the window size set by the setting unit; It is a program to function as when the communication unit receives the packet from the source functional unit after notifying the window size, the communication unit performs a response process of transmitting a response packet to the received packet to the source functional unit, the response packet including control information for controlling a requested data size, which is a data size of the packet that is requested to be transmitted by the source functional unit; The setting unit sets the window size to a value larger than the requested data size.