Relay system, relay device, and program
The relay system addresses inefficiencies in converting DoIP and DoCAN protocols by using a relay device configuration that packs and unpacks messages with a third protocol, improving communication efficiency in vehicle diagnostic systems.
Patent Information
- Application Number
- JP2024045092
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2025-10-03
AI Technical Summary
Existing relay systems in vehicles with ECUs using CAN communication face inefficiencies when converting between DoIP and DoCAN protocols, leading to insufficient functionality in diagnostic communication.
A relay system with a first relay device and a second relay device that converts between different upper and lower protocols, using a third protocol with longer payload frames to improve communication efficiency by packing and unpacking messages.
Enhances communication efficiency in relay systems with multiple types of protocols by optimizing data transmission and conversion processes.
Smart Images

Figure 2025145086000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a technique for relaying data between multiple electronic control devices. [Background technology]
[0002] In an in-vehicle network that employs a zone architecture, ECUs that use CAN communication are connected under a zone ECU, and the zone ECUs are connected to each other, and to the central ECU, via a bus that is faster than CAN, such as Ethernet or CAN FD. CAN and Ethernet are registered trademarks. If Ethernet or CAN FD were to sequentially relay CAN communication frames, which are slow and have small message sizes, communication efficiency would decrease.
[0003] The following Patent Document 1 describes a technique for packing a plurality of CAN messages into an Ethernet frame and relaying the messages. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Japanese Patent Publication No. 2022-91585 Summary of the Invention [Problem to be solved by the invention]
[0005] DoIP, a diagnostic communication protocol over Ethernet, is becoming increasingly popular. However, at present, many ECUs in vehicles only have CAN as their communication interface. CAN is a registered trademark. Therefore, to diagnose an ECU using an external Ethernet tool that uses DoIP, it is necessary to convert between DoIP and DoCAN protocols.
[0006] However, as a result of detailed investigation by the inventors, it was found that the conventional technology described in Patent Document 1 simply packs messages and converts lower layer protocols (hereinafter referred to as lower protocols). Therefore, when the conventional technology is applied to a relay system in which various upper layer protocols (hereinafter referred to as upper protocols) are used, the problem of insufficient functionality was found.
[0007] One aspect of the present disclosure provides a technique for improving communication efficiency in a relay system that uses a plurality of types of lower protocols with different communication speeds and involves conversion of an upper protocol. [Means for solving the problem]
[0008] One aspect of the present disclosure is a relay system that relays communication between a first electronic device (5) and a second electronic device (4), and includes a first relay device (2) and a second relay device (3). The first relay device is connected to the first electronic device using a first lower-level protocol, and is configured to exchange data with the first electronic device using the first upper-level protocol and to exchange data with the second electronic device using a second upper-level protocol. The second relay device is connected to the second electronic device using the second lower-level protocol, and is connected to the first relay device using a third lower-level protocol that uses frames with a longer payload than the second lower-level protocol.
[0009] The first relay device includes a protocol conversion unit (21, 24), a first packing unit (22), and a first unpacking unit (23). The protocol conversion unit is configured to convert a first message using a first upper protocol and a first lower protocol, which are transmitted and received between the first electronic device, and a second message using a second upper protocol and a second lower protocol, and vice versa. The first packing unit is configured to transmit a combined message, which is a combination of one or more second messages supplied from the protocol conversion unit, to the second relay device using a third lower protocol. The first unpacking unit is configured to extract one or more second messages from a combined message received from the second relay device using the third lower protocol, and supply the extracted messages to the protocol conversion unit.
[0010] The second relay device includes a second packing unit (32) and a second unpacking unit (31). The second packing unit is configured to transmit a combined message, which is obtained by combining one or more second messages received from the second electronic device, to the first relay device using a third lower-level protocol. The second unpacking unit is configured to separate the combined message received from the first relay device using the third lower-level protocol, and to transmit the one or more second messages obtained by separating the combined message received from the first relay device using the third lower-level protocol individually to the second electronic device.
[0011] According to this configuration, it is possible to improve communication efficiency in a relay system that uses a plurality of types of lower protocols with different communication speeds and involves conversion of upper protocols. One aspect of the present disclosure is a relay device that is connected to a first electronic device via a first lower-level protocol and, together with a sub-relay device that is connected to a second electronic device via a second lower-level protocol, constitutes a relay system that relays communication between the first electronic device and the second electronic device.
[0012] The relay device includes a protocol conversion unit (21, 24), a packing unit (22), and an unpacking unit (23). The protocol conversion unit is configured to convert between a first message using a first upper protocol and a first lower protocol and a second message using a second upper protocol and a second lower protocol, which are transmitted and received between the first electronic device and the first electronic device. The packing unit is configured to transmit a combined message, which is obtained by combining one or more second messages supplied from the protocol conversion unit, to the sub-relay device by a third protocol that uses frames having a longer payload than the second lower protocol. The unpacking unit is configured to extract one or more second messages from the combined message received from the sub-relay device by the third lower protocol, and supply the extracted second messages to the protocol conversion unit.
[0013] The relay device configured in this manner can be used as the first relay device that constitutes the relay system described above. One aspect of the present disclosure is a program for causing a computer to function as a first relay device and a second relay device that constitute the above-described relay system.
[0014] By executing such a program, it is possible to obtain the same effect as the relay system described above. [Brief explanation of the drawings]
[0015] [Figure 1] FIG. 1 is a block diagram showing a configuration of an in-vehicle system. [Figure 2] FIG. 2 is an explanatory diagram showing a combination of communication protocols used in an in-vehicle system. [Figure 3] FIG. 2 is an explanatory diagram showing an outline of processing in a central ECU and a zone ECU. [Figure 4] FIG. 2 is an explanatory diagram showing the configuration of a communication frame. [Figure 5] FIG. 10 is a sequence diagram of communication from an external tool to an end-user ECU in the first embodiment in which multiple messages related to the same end-user ECU are packed in the same frame. [Figure 6] FIG. 4 is a sequence diagram of communication from a terminal ECU to an external tool in the first embodiment. [Figure 7] FIG. 10 is a sequence diagram for controlling the transmission interval of frames addressed to an end ECU. [Figure 8] FIG. 10 is a sequence diagram for controlling the number of frames that can be transmitted to an end ECU without confirmation. [Figure 9] FIG. 10 is a sequence diagram of communication from an external tool to end-user ECUs in a second embodiment in which a plurality of messages related to a plurality of end-user ECUs are packed in the same frame. [Figure 10] FIG. 11 is a sequence diagram of communication from an end ECU to an external tool in the second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0016] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. [1. First embodiment] [1-1.Configuration] As shown in FIG. 1, the in-vehicle system 1 of this embodiment is mounted on a vehicle. The vehicle may have an automatic driving function in addition to a manual driving function. The vehicle may be a hybrid vehicle having an engine and an electric motor as a driving source. The vehicle is not limited to a vehicle having an automatic driving function or a hybrid vehicle, but may be a vehicle having only a manual driving function, or a vehicle having only an engine or only an electric motor as a driving source. Hereinafter, a vehicle equipped with the in-vehicle system 1 will be simply referred to as a vehicle.
[0017] The in-vehicle system 1 includes one relay device (hereinafter referred to as central ECU) 2, a plurality of relay devices (hereinafter referred to as zone ECUs) 3, and a plurality of ECUs (hereinafter referred to as terminal ECUs) 4. ECU is an abbreviation for Electronic Control Unit.
[0018] The central ECU 2 controls multiple zone ECUs 3 to achieve coordinated control of the entire vehicle. The central ECU 2 is connected to the multiple zone ECUs 3 via an upper layer network. The upper layer network may be, for example, Ethernet. Ethernet is a registered trademark. The central ECU 2 has a port for connecting an external tool 5. The external tool 5 may, for example, diagnose ECUs 2 to 4. The central ECU 2 and the external tool 5 may be connected via, for example, Ethernet.
[0019] The zone ECU 3 is provided for each zone that divides the area inside the vehicle, and mainly controls the multiple end-zone ECUs 4 that exist within that zone. Each zone ECU 3 is connected to the subordinate end-zone ECUs 4 via a lower-layer network that is individually provided for each zone. The lower-layer network may be, for example, a CAN. CAN is an abbreviation for Controller Area Network and is a registered trademark.
[0020] The maximum data length of one frame is 8 bytes for CAN and 1500 bytes for Ethernet. If the Ethernet supports jumbo frames, the maximum data length of one frame is 9216 bytes.
[0021] The central ECU 2 is an electronic control device mainly composed of a microcomputer including a CPU 2a, a ROM 2b, a RAM 2c, etc. Various functions of the microcomputer are realized by the CPU 2a executing a program stored in a non-transitory storage medium. In this example, the ROM 2b corresponds to the non-transitory storage medium storing the program. Furthermore, the execution of this program executes a method corresponding to the program. Note that some or all of the functions executed by the CPU 2a may be configured as hardware using one or more ICs, etc. Furthermore, the number of microcomputers constituting the central ECU 2 may be one or more.
[0022] Hereinafter, the protocol used to connect the central ECU 2 and the external tool 5 will be referred to as the first lower protocol, the protocol used to connect the zone ECU 3 and the end-user ECU 4 will be referred to as the second lower protocol, and the protocol used to connect the central ECU 2 and the zone ECU 3 will be referred to as the third lower protocol. Also, the protocol used to exchange data between the central ECU 2 and the external tool 5 will be referred to as the first upper protocol, and the protocol used to exchange data between the central ECU 2 and the end-user ECU will be referred to as the second upper protocol. Hereinafter, the first lower protocol and the first upper protocol will be collectively referred to as external protocols, and the second lower protocol and the second upper protocol will be collectively referred to as end-user protocols.
[0023] As shown in Fig. 2, in this embodiment, the first lower-level protocol is TCP, IP, and Ethernet, the second lower-level protocol is CAN, and the third lower-level protocol is TCP / UDP, IP, and Ethernet. AUTOSAR IPduM is used as the payload of the third lower-level protocol, and one or more frames transmitted and received between the zone ECU 3 and the end ECU 4 are packaged. The first upper-level protocol is UDS and DoIP. The second upper-level protocol is UDS and DoCAN.
[0024] UDS is an abbreviation for Unified Diagnostic Services, a unified diagnostic service for automobiles standardized by ISO14229. DoIP is an abbreviation for Diagnostics over Internet Protocol, an Ethernet-based diagnostic protocol standardized by ISO13400. DoCAN is an abbreviation for Diagnostic communication over Controller Area Network, a CAN-based diagnostic protocol standardized by ISO15765. AUTOSAR is an abbreviation for AUTomotive Open System ARchitecture, a platform specification for realizing the standardization of in-vehicle software. IPduM is an abbreviation for Interaction layer Protocol Data Unit Multiplexer.
[0025] [1-2. Overview of processing in the central ECU and zone ECU] The processing executed by the central ECU 2 and the zone ECU 3 will be outlined below with reference to FIGS.
[0026] The central ECU 2 receives a DoIP message from the external tool 5. As shown in Fig. 4, the DoIP message is transmitted using a TCP frame and includes a DoIP header and DoIP data. In Fig. 4, descriptions of protocols lower than TCP are omitted.
[0027] When the central ECU 2 receives a DoIP message from the external tool 5, it executes a protocol conversion process 21 and a packing process 22. The protocol conversion process 21 is a process for converting a DoIP message into a DoCAN message. Specifically, when the central ECU 2 receives a DoIP message, it divides the DoIP data into N pieces of data each having a length that can be transmitted by CAN, which is the second lower-level protocol. N is an integer equal to or greater than 1. Hereinafter, the divided DoIP data will be referred to as divided data. The data length of the divided data is set to, for example, the data length of the CAN data (i.e., 8 bytes) minus the area length of N_AE / NPCI (described later) (e.g., 1 byte for CF in the Normal fixed addressing format). The central ECU 2 converts the information in the DoIP header into PduID and N_AE / NPCI, which are header information used in the second protocol. Furthermore, the central ECU 2 generates N DoCAN messages by adding the converted header information to each of the N pieces of divided data, and stores the messages in the transmission buffer.
[0028] The PduID is set based on the type of message included in the DoIP header. The PduID may be associated with the CANID on a one-to-one basis. The PduID may also be the CANID itself.
[0029] When N_AE is used, it may contain address information contained in the DoIP header. NPCI contains identification information indicating whether the DoCAN message is SF, FF, CF, or FC. Whether N_AE is used and the format of N_AE and NPCI depend on the addressing used in DoCAN. SF indicates that the DoCAN message is used when sending data that is completed in one frame. FF indicates that the first DoCAN message is sent and is used when sending data that is not completed in one frame. CF is used when sending data that is not completed in one frame and indicates that it is a subsequent DoCan message following FF. FC is used when receiving data that is not completed in one frame and indicates that it is a DoCan message sent by the receiving side to arbitrate the exchange of subsequent DoCan messages. In the following, DoCAN messages indicated by SF are referred to as SF messages. The same applies to FF, CF, and FC.
[0030] If the number of divisions N of the DoIP data is 1 (for example, the data length of the DoIP data is 7 bytes or less), an SF message is used. If the number of divisions N of the DoIP data is 2 or more (i.e., the data length of the DoIP data is 8 bytes or more), an FF message is used for the first DoCAN message, and a CF message is used for subsequent DoCAN messages.
[0031] The packing process 22 is a process of packing one or more DoCAN messages generated by the protocol conversion process 21 into a frame (hereinafter referred to as a packed frame) of the third lower protocol (i.e., TCP / UDP) and transmitting the packed frame to the zone ECU 3. Specifically, for SF messages, FF messages, and FC messages, the central ECU 2 generates packed frames in which only the DoCAN message is packed. For CF messages, the central ECU 2 generates packed frames in which CF messages are packed as much as the data area of the packed frame allows, or a specified number of CF messages are packed. In other words, multiple packed frames in which multiple CF messages are packed may be generated from one DoIP message.
[0032] When the zone ECU 3 receives a packing frame from the central ECU 2, it executes unpacking processing 31. The unpacking processing 31 is a process of extracting one or more DoCAN messages packed in the packing frame by unpacking them and transmitting them to the end ECU 4. The zone ECU 3 performs ID conversion for each extracted DoCAN message, converting the PduID into a CANID, and transmits the extracted DoCAN message to the end ECU 4. If multiple CF messages are extracted, the zone ECU 3 transmits each CF message sequentially at a preset transmission interval.
[0033] When the zone ECU 3 receives a DoCAN message from the end ECU 4, it executes packing processing 32. The packing processing 32 is a process of packing one or more DoCAN messages received from the end ECU 4 into the data area of a packed frame and transmitting the packed frame to the central ECU 2. Specifically, if the received DoCAN message is an SF message, an FF message, or an FC message, the zone ECU 3 generates a packed frame in which only the DoCAN message is packed. If the received DoCAN message is a CF message, once the waiting time has elapsed or the number of received CF messages has reached an upper limit, the zone ECU 3 generates a packed frame in which all CF messages received from the end ECU 4 during that time are packed. Note that if a subsequent CF message is received during the waiting time, the waiting time may be updated or extended. In other words, CF messages received consecutively within the waiting time may be packed within the maximum data length that can be transmitted in a lower frame of the third lower protocol.
[0034] When the central ECU 2 receives a packed frame from the zone ECU 3, it executes an unpacking process 23 and a protocol conversion process 24. The unpacking process 23 is a process for extracting individual packed DoCAN messages by unpacking the packed frame.
[0035] The protocol conversion process 24 converts a DoCAN message into a DoIP message. Specifically, if the extracted DoCAN message is an SF message, the central ECU 2 generates a DoIP message using the CAN data extracted from the SF message as the DoIP data, and transmits the DoIP message to the external tool 5. If the extracted DoCAN message is an FF message or a CF message, the central ECU 2 sequentially stores the DoCAN data extracted from the FF message and the CF message in a message buffer. When a message transmission condition is met, the central ECU 2 generates a DoIP message using the CAN data stored in the message buffer as the DoIP data, and transmits the DoIP message to the external tool 5. The message transmission condition may include the elapse of an upper limit time since the start of storing the DoCAN data in the message buffer, and the data length of the CAN data stored in the message buffer reaching the upper limit value of the TCP segment for transmitting the DoIP message.
[0036] The zone ECU 3 only packs and unpacks DoCAN messages and transfers them, and the central ECU 2 performs protocol processing related to DoCAN between the zone ECU 3 and the terminal ECU 4.
[0037] In this embodiment, the central ECU 2 and the zone ECU 3 individually perform the above-described processing for each end ECU 4 identified by the DoIP header, CANID / PduID, N_AE, and the like.
[0038] [1-4. Overall movement] [1-4-1. Communication from external tool to end ECU] Next, the operation of the in-vehicle system 1 when transmitting a DoIP message from the external tool 5 to the end-station ECU 4 will be described with reference to the sequence diagram of FIG.
[0039] In S10, the external tool 5 transmits a DoIP message to the central ECU 2. When the central ECU 2 receives the DoIP message, it divides the DoIP data to generate one or more DoCAN messages and stores the generated DoCAN messages in the transmission buffer in S11. If the DoCAN message stored at the top of the transmission buffer is an SF or FF message, the central ECU 2 generates a packed frame in which the FF or SF message is packed alone in S12 and transmits the packed frame to the zone ECU 3.
[0040] When the zone ECU 3 receives the packing frame, it extracts the DoCAN message from the packing frame and converts the PduID into a CANID in S13. In S14, the zone ECU 3 transmits the ID-converted DoCAN message to the end ECU 4.
[0041] If the DoCAN message received from the zone ECU 3 is an FF message, the end ECU 4 generates an FC message and transmits it to the zone ECU 3 in S15. If the DoCAN message received from the zone ECU 3 is an SF message, it is not necessary to transmit an FC message. Therefore, the following description will be given of the operation when the end ECU 4 receives an FF message.
[0042] When the zone ECU 3 receives the FC message from the end ECU 4, the zone ECU 3 generates a packing frame in which the FC message is packed independently in S16. In S17, the zone ECU 3 transmits the generated packing frame to the central ECU 2.
[0043] When the central ECU 2 receives the packed frame in which the FC message is packed, the central ECU 2 generates a packed frame in which one or more CF messages are packed in S18.
[0044] In S19, the central ECU 2 transmits the generated packing frame to the zone ECU 3. When the zone ECU 3 receives the packing frame, it extracts a plurality of CF messages from the packing frame and converts the CANID of each CF message into a PduID in S20.
[0045] In S21, the zone ECU 3 transmits the ID-converted CF frames to the end ECU 4 in order at a set transmission interval. In S22, when the continuous transmission condition is satisfied, the central ECU 2 generates a packing frame by the same process as in S18, and transmits the generated packing frame to the zone ECU 3, as in S19. The continuous transmission condition may include a condition in which a CF remains in the transmission buffer despite the packing frame being transmitted in S19, and a certain time has elapsed since the previous transmission of the packing frame.
[0046] The central ECU 2 repeatedly executes the process of S22 until there are no more CF messages in the transmission buffer. The processing in the zone ECU 3 that receives this packing frame is the same as the processing in S20 and S21 described above.
[0047] [1-4-2. Communication from end ECU to external tool] Next, the operation of the in-vehicle system 1 when transmitting a DoCAN message from the end ECU 4 to the external tool 5 will be described with reference to the sequence diagram of FIG.
[0048] When there is data to be sent to the external tool 5, the end ECU 4 divides the data into pieces that can be sent by one DoCAN message and generates DoCAN messages. If the divided data can be sent by a single DoCAN message, it generates an SF message, and if it needs to be sent by multiple DoCAN messages, it generates an initial FF message and one or more subsequent CF messages and stores them in the send buffer.
[0049] In S30, the end ECU 4 transmits the DoCAN message stored at the top of the transmission buffer, that is, the FF or SF message, to the zone ECU 3. When the zone ECU 3 receives an FF or SF message from the end ECU 4, the zone ECU 3 generates a packed frame in which the FF or SF message is packed alone in S31.
[0050] In S32, the zone ECU 3 transmits the generated packing frame to the central ECU 2. When the central ECU 2 receives the packing frame from the zone ECU 3, it extracts the DoCAN message from the packing frame in S33. If the extracted DoCAN message is an SF message, the central ECU 2 converts the DoCAN message into a DoIP message. Then, in S34, the central ECU 2 transmits the DoIP message to the external tool 5, as indicated by the dashed arrow in FIG. 6.
[0051] If the extracted DoCAN message is an FF message in S33, the central ECU2 starts generating DoIP data (i.e., restoring the transmission data) by storing the DoCAN data included in the FF message in a message buffer. The central ECU2 also generates an FC message that is a response to the FF message, and generates a packed frame in which the FC message is packed alone.
[0052] In S35, the central ECU 2 transmits the generated packing frame to the zone ECU 3. When the zone ECU 3 receives the packing frame from the central ECU 2, in S36, it extracts the FC message from the packing frame and converts the PduID into a CANID.
[0053] In S37, the zone ECU 3 transmits the ID-converted FC message to the end ECU 4. When the end ECU 4 receives the FC message from the zone ECU 3, in S38, it transmits the DoCAN message stored in the transmission buffer, that is, the CF message, to the zone ECU 3 continuously at the set transmission interval.
[0054] When the zone ECU 3 receives a CF message from the end ECU 4, it waits until a frame transmission condition is met, and when the frame transmission condition is met, in S39, it generates a packed frame by packing one or more CF messages that have been received at that time. The frame transmission condition may include, for example, the elapse of a waiting time since the first CF frame was received, and the total length of the multiple received CF messages reaching the upper limit of the data length that can be transmitted in a packed frame.
[0055] In S40, the zone ECU 3 transmits the generated packing frame to the central ECU 2. When the central ECU 2 receives a packing frame from the zone ECU 3, in S41, it extracts multiple CF messages from the packing frame. The central ECU 2 also extracts DoCAN data included in each of the multiple CF messages and stores the data in a message buffer. Furthermore, when a message transmission condition is met, the central ECU 2 generates a DoIP message that converts all of the DoCAN data stored in the message buffer into DoIP data. The message transmission condition may include the total data length of the data stored in the message buffer reaching an upper limit value of the TCP segment used to transmit the DoIP message, and the elapse of a predetermined time since the reception of an FF message or the transmission of the previous DoIP message related to the FF message.
[0056] In S42, the central ECU 2 transmits the DoIP message generated in S41 to the external tool 5. If the zone ECU 3 continues to receive CF messages from the end ECU 4 after transmitting the packing frame in S40, the zone ECU 3 repeats the processes described in S39 and S40. Accordingly, the central ECU 2 also repeats the processes described in S41 and S42.
[0057] [1-4-3. Controlling the transmission interval of CF messages to end ECUs] Next, the operation of the end ECU 4 in the in-vehicle system 1 when it uses an FC message to control the reception interval of a CF message will be described with reference to the sequence diagram of Fig. 7. Since the operation is basically the same as that in the sequence diagram of Fig. 5, the same processes and procedures are denoted by the same reference numerals and will not be described again.
[0058] When the end ECU 4 receives the FF message from the zone ECU 3 in S14, the end ECU 4 sets an STmin parameter specifying the transmission interval of the CF message in the FC message that the end ECU 4 transmits to the zone ECU 3 in S15.
[0059] When the central ECU 2 receives a packing frame in which a CF message is packed via the zone ECU 3, in S181, it extracts the CF message from the packing frame to generate a setting message and also generates a packing frame in which one or more CF messages are packed.
[0060] The setting message is a message that instructs the zone ECU 3 to set the transmission interval of the CF message in accordance with the STmin parameter indicated in the FC message. In S182, the central ECU 2 transmits the setting message to the zone ECU 3. After that, when a sufficient time has elapsed for the setting message to be reflected in the zone ECU 3, the central ECU 2 transmits, in S19, to the zone ECU 3 a packed frame in which one or more CF messages are packed.
[0061] When the zone ECU 3 receives the setting message from the central ECU 2, it sets the transmission interval to be used for transmitting the CF message in accordance with the contents of the setting message in step S183. Hereinafter, the set transmission interval will be referred to as STmin.
[0062] When the zone ECU 3 receives a packing frame containing one or more CF messages from the central ECU 2, in S21, it extracts the CF messages from the packing frame, and in S211, it transmits the extracted one or more CF messages sequentially at the set transmission interval STmin.
[0063] The initial value of STmin may be set arbitrarily. [1-4-4. Controlling the number of consecutive CF messages received from the end ECU] Next, the operation of the end ECU 4 in the in-vehicle system 1 when controlling the number of consecutively received CF messages using an FC message will be described with reference to the sequence diagram of Fig. 8. Since the operation is basically the same as that in the sequence diagram of Fig. 5, the same processes and procedures are denoted by the same reference numerals and will not be described again.
[0064] When the FF message is received from the zone ECU 3 in step S14, the end ECU 4 sets in step S15 a BS parameter that specifies the number of consecutive CF messages to be received in the FC message to be sent to the zone ECU 3. Here, BS=2.
[0065] When the central ECU 2 receives a packed frame in which an FC message is packed via the zone ECU 3 in S17, the central ECU 2 extracts the FC message from the packed frame and stores the value of the BS parameter indicated in the FC message in S184. Thereafter, the central ECU 2 generates a packed frame in which the number of CF messages indicated in the BS parameter is packed.
[0066] In S19, the central ECU 2 transmits the packing frame generated in S184 to the zone ECU 3. When the zone ECU 3 receives the packing frame, it extracts the CF messages from the packing frame in S20, and transmits all of the extracted (ie, two) CF messages to the end ECU 4 in sequence in S212.
[0067] When the end ECU 4 receives the number of CF messages indicated by the BS parameter of the previously transmitted FC message, it transmits the FC messages to the zone ECU 3 in S151. Here, it is assumed that the value of the BS parameter is changed to 3.
[0068] Thereafter, the processing of S16, S17, S184, S19, S20, and S212 is similar. However, since BS is changed to 3, three CF messages are packed into the packing frame transmitted from the central ECU 2 to the zone ECU 3 in S19, and three CF messages are transmitted consecutively from the zone ECU 3 to the end ECU 4 in S212. Furthermore, the end ECU 4, having received the three CF messages, transmits an FC message to the zone ECU 3. Thereafter, the same processing is repeated. Note that the initial value of the BS parameter may be set arbitrarily.
[0069] [1-5. Terminology] In this embodiment, the central ECU 2 corresponds to the first relay device and relay device of the present disclosure, the zone ECU 3 corresponds to the second relay device and sub-relay device, the terminal ECU 4 corresponds to the second electronic device, and the external tool 5 corresponds to the first electronic device. In this embodiment, the central ECU 2 that executes the protocol conversion processes 21 and 24 corresponds to the protocol conversion unit of the present disclosure, the central ECU 2 that executes the packing process 22 corresponds to the first packing unit of the present disclosure, and the central ECU 2 that executes the unpacking process 23 corresponds to the first unpacking unit of the present disclosure. In this embodiment, the zone ECU 3 that executes the unpacking process 31 corresponds to the second unpacking unit of the present disclosure, and the zone ECU 3 that executes the packing process 32 corresponds to the second packing unit of the present disclosure. In this embodiment, the second message packed by the packing processes 22 and 32 corresponds to the combined message of the present disclosure.
[0070] [1-6.Effects] According to the first embodiment described above in detail, the following effects are achieved. (1a) In the in-vehicle system 1, the central ECU 2 performs protocol conversion between DoIP messages used for exchanging data with the external tool 5 and DoCAN messages used for exchanging data with the end-user ECU 4. Communication between the central ECU 2 and the zone ECU 3, which uses a lower-level protocol with a faster communication speed than communication between the zone ECU 3 and the end-user ECU 4, is performed using a packed frame in which one or more DoCAN messages are packed. Therefore, the in-vehicle system 1 can improve the efficiency of communication related to ECU diagnosis.
[0071] (1b) The zone ECU 3 simply packs and unpacks DoCAN data, and the central ECU 2 executes processing in accordance with the DoCAN protocol, such as arbitration of control content using FC messages. Therefore, the zone ECU 3 can have a simple configuration.
[0072] [2. Second Embodiment] [2-1. Differences from the first embodiment] The second embodiment has the same basic configuration as the first embodiment, so differences will be described below. Note that the same reference numerals as those in the first embodiment indicate the same configuration, and reference will be made to the preceding description.
[0073] In the first embodiment described above, a packing frame is generated using a DoCAN message transmitted and received by one end-point ECU 4. In contrast, the second embodiment differs from the first embodiment in that a packing frame is generated using a DoCAN message transmitted and received by different end-point ECUs 4.
[0074] [2-2. Communication from an external tool to multiple end ECUs] 9, a description will be given of the operation of transmitting a DoIP message from the external tool 5 to multiple end-point ECUs 4 under the control of the same zone ECU 3 in the in-vehicle system 1. Hereinafter, the multiple end-point ECUs 4 connected to the same zone ECU 3 will be referred to as a target ECU group.
[0075] In S50, the external tool 5 transmits a plurality of DoIP messages with different destinations to the central ECU 2. Here, a case will be described in which all of the destination end ECUs 4 belong to the target ECU group.
[0076] In step S51, the central ECU 2 performs protocol conversion processing 21 for each received DoIP message to generate a DoCAN message, and stores the DoCAN message in a transmission buffer provided for each destination terminal ECU 4.
[0077] If an FF message or SF message is stored at the top of the transmission buffer addressed to the target ECU group, the central ECU 2 extracts the FF message or SF message and generates a packed frame in which one or more of the collected FF messages or SF messages are packed. Figure 9 shows a case where FF messages are extracted from three end ECUs 4 identified as A, B, and C that belong to the target ECU group.
[0078] In S52, the central ECU 2 transmits the packing frame to the zone ECU 3. When the zone ECU 3 receives the packing frame from the central ECU 2, in S53, it extracts a plurality of FF messages from the packing frame and converts the PduID of each FF frame into a CANID.
[0079] In S54, the zone ECU 3 transmits each of the extracted FF messages to each of the end ECUs 4 that are destinations. When each end ECU 4 receives the FF message, it generates an FC message and transmits it to the zone ECU 3 in S55.
[0080] When the zone ECU 3 receives an FC message, it generates a packing frame in which all FC messages received during a predetermined waiting time are packed in S56. Note that if another FC frame is received during the waiting time, the waiting time may be updated or extended.
[0081] In S57, the zone ECU 3 transmits the packing frame generated in S56 to the central ECU 2. When the central ECU 2 receives a packing frame from the zone ECU 3, in S58, it extracts one or more FC frames from the packing frame. The central ECU 2 sequentially extracts CF frames from the transmission buffers associated with the extracted FC frames according to a predetermined extraction rule, and if a frame transmission condition is met, generates a packing frame in which all of the extracted CF data is packed. The frame transmission condition is the same as the condition described in the first embodiment. The extraction rule may be, for example, to extract a specified number (e.g., two) of CF messages from all transmission buffers associated with the target ECU group and storing CF messages (hereinafter referred to as the target transmission buffer group). Alternatively, the extraction rule may be to extract CF buffers one by one from the target transmission buffer group in order, and repeat this process until the total length of the extracted CF messages reaches the upper limit data length.
[0082] In S59, the central ECU 2 transmits the packing frame generated in S58 to the zone ECU 3. When the zone ECU 3 receives the packing frame, in step S60, it extracts a plurality of CF messages from the packing frame and converts the PduID into a CANID.
[0083] In S61, the extracted CF messages are sequentially transmitted to the end-user ECUs 4 that are the destinations. Thereafter, while a CF message remains in the transmission buffer of the central ECU 2, the processing of S58 to S61 is repeatedly executed each time the continuous transmission condition is satisfied. [2-3. Communication from multiple end ECUs to external tools] The operation of the in-vehicle system 1 when a plurality of end ECUs 4 under the control of the same zone ECU 3 each transmit a DoCAN message to the external tool 5 will be described with reference to the sequence diagram of FIG.
[0084] In step S70, each of the end ECUs 4 transmits an FF message to each of the zone ECUs 3. When the zone ECU 3 receives an FF message from any of the end ECUs 4, in step S71, the zone ECU 3 generates a packed frame by packing all of the FF frames received during a predetermined waiting time. If the zone ECU 3 receives another FF frame during the waiting time, the zone ECU 3 may update or extend the waiting time.
[0085] In step S72, the zone ECU 3 transmits the packing frame generated in step S71 to the central ECU 2. When the central ECU 2 receives a packing frame from the zone ECU 3, it extracts multiple FF messages from the packing frame in S73. The central ECU 2 stores the DoCAN data contained in each extracted FF message in a message buffer provided for each end ECU 4 that sent the FF message. The central ECU 2 also generates an FC message in response to each FF message, and generates a packing frame that packs all of the generated FC messages.
[0086] In S74, the central ECU 2 transmits the packing frame generated in S73 to the zone ECU 3. When the zone ECU 3 receives the packing frame from the central ECU 2, in S75, the zone ECU 3 extracts a plurality of FC frames from the packing frame.
[0087] In S76, the zone ECU 3 transmits each FC frame to the end ECU 4 that is the destination. When the end ECU 4 receives the FC message from the zone ECU 3, it starts transmitting a CF message in S77.
[0088] When the zone ECU 3 receives a CF message from the end ECU 4, it generates a packed frame in S78 by packing all CF messages received from the end ECUs 4 belonging to the target ECU group until a transmission condition is met. The transmission condition may be the passage of a predetermined waiting time, or the total length of the received CF messages reaching the upper limit of the data length of the packed frame. Note that if another CF message is received during the waiting time, the waiting time may be updated or extended.
[0089] In S79, the zone ECU 3 transmits the packing frame generated in S78 to the central ECU 2. When the central ECU 2 receives a packing frame from the zone ECU 3, it extracts multiple CF frames from the packing frame at S80 and stores the DoCAN data contained in each CF frame in a message buffer provided for each source end ECU 4. Furthermore, the central ECU 2 determines whether a message transmission condition is met for each message buffer, and if the message transmission condition is met, it generates a DoIP message that uses the DoCAN data stored in the message buffer as DoIP data. The message transmission conditions are the same as those described in the first embodiment.
[0090] In S81, the central ECU 2 transmits the DoIP message generated in S80 to the external tool 5. Thereafter, as long as a CF message remains in the message buffer, the processes of S80 to S81 are repeatedly performed each time the continuous transmission condition is met.
[0091] [2-4. Effects] According to the second embodiment described above in detail, the effects (1a) and (1b) of the first embodiment described above are achieved, and further, the following effects are achieved.
[0092] (2a) In this embodiment, DoCAN messages are not packed for each end ECU 4, but DoCAN messages relating to multiple end ECUs 4 connected to the same zone ECU 3 are packed into one packing frame.
[0093] Therefore, the efficiency of diagnostic communication can be further improved. 3. Other Embodiments Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments and can be implemented in various modified forms.
[0094] (3a) In the above embodiment, the central ECU 2 checks the settings of the BS parameter and the STmin parameter included in the FC message and performs the necessary processing. For example, instead of the central ECU 2, the zone ECU 3 may check the contents of the FC message before performing the packing process 32 and perform the necessary processing without going through the central ECU 2.
[0095] (3b) In the above embodiment, Ethernet is used as the third lower protocol and CAN is used as the second lower protocol. However, the third lower protocol only needs to have a faster communication speed than the second lower protocol. For example, when CAN is used as the second lower protocol, CAN FD, CAN XL, or Ethernet and IEEE 1722 may be used as the third lower protocol. Furthermore, when Ethernet or CAN XL is used as the third lower protocol, CAN FD may be used as the second lower protocol. CAN FD stands for CAN with Flexible Data Rate. CAN XL stands for CAN with Extended Length. IEEE 1722 is a transport protocol for time-sensitive applications. The data length of one frame is a maximum of 64 bytes in CAN FD and a maximum of 2048 bytes in CAN XL.
[0096] (3c) The ECUs 2-4 and the methods described herein may be implemented by a special-purpose computer configured by configuring a processor and memory programmed to execute one or more functions embodied in a computer program. Alternatively, the ECUs 2-4 and the methods described herein may be implemented by a special-purpose computer configured by configuring a processor with one or more dedicated hardware logic circuits. Alternatively, the ECUs 2-4 and the methods described herein may be implemented by one or more special-purpose computers configured by combining a processor and memory programmed to execute one or more functions with a processor configured with one or more hardware logic circuits. Furthermore, the computer program may be stored as instructions executed by a computer on a computer-readable non-transitory tangible recording medium. The methods for implementing the functions of each unit included in the ECUs 2-4 do not necessarily need to include software; all of the functions may be implemented using one or more hardware components.
[0097] (3d) Multiple functions possessed by one component in the above embodiments may be realized by multiple components, or one function possessed by one component may be realized by multiple components. Also, multiple functions possessed by multiple components may be realized by one component, or one function realized by multiple components may be realized by one component. Also, part of the configuration of the above embodiments may be omitted. Also, at least part of the configuration of the above embodiments may be added to or substituted for the configuration of another of the above embodiments.
[0098] (3e) In addition to the relay system configured by the central ECU 2 as the first relay device and the zone ECU 3 as the second relay device described above, and the central ECU 2 and the zone ECU 3, the present disclosure can also be realized in various forms, such as a program for causing a computer to function as a relay system, a non-transient physical recording medium such as a semiconductor memory on which this program is recorded, and a relay method.
[0099] [4. Technical Ideas Disclosed in the Present Specification] [Item 1] A relay system that relays communication between a first electronic device (5) and a second electronic device (4), a first relay device (2) connected to the first electronic device by a first lower protocol, configured to exchange data with the first electronic device by using a first upper protocol, and to exchange data with the second electronic device by using a second upper protocol; a second relay device (3) connected to the second electronic device by a second lower-level protocol and connected to the first relay device by a third lower-level protocol that uses frames having a longer payload than the second lower-level protocol; Equipped with The first relay device a protocol conversion unit (21, 24) configured to convert between a first message using the first upper protocol and the first lower protocol and a second message using the second upper protocol and the second lower protocol, which are transmitted and received between the first electronic device and the first electronic device; a first packing unit (22) configured to transmit a combined message obtained by combining one or more of the second messages supplied from the protocol conversion unit to the second relay device using the third lower protocol; a first unpacking unit (23) configured to extract one or more second messages from the combined message received from the second relay device according to the third lower protocol and supply the extracted second messages to the protocol conversion unit; Equipped with The second relay device a second packing unit (32) configured to combine one or more of the second messages received from the second electronic device and transmit the combined message to the first relay device according to the third lower protocol; a second unpacking unit (31) configured to individually transmit one or more second messages obtained by unpacking the combined message received from the first relay device according to the third lower protocol to the second electronic device; Equipped with Relay system.
[0100] [Item 2] The relay system according to item 1, the first higher level protocol is DoIP, the second higher level protocol is DoCAN; Relay system.
[0101] [Item 3] The relay system according to item 1 or 2, the first lower-level protocol is Ethernet; the second lower-level protocol is CAN or CAN FD, The third lower-level protocol is one of CAN FD, CAN XL, Ethernet and AUTOSAR IPduM, or Ethernet and IEEE1722. Relay system.
[0102] [Item 4] A relay system according to any one of items 1 to 3, The first packing unit and the second packing unit are configured to determine whether or not the second messages need to be combined according to identification information that identifies the type of the second messages. Relay system.
[0103] [Item 5] A relay system according to any one of items 1 to 4, the second unpacking unit is configured to change a transmission interval used when transmitting the restored second messages to the second electronic device based on information transmitted from the first relay device. Relay system.
[0104] [Item 6] A relay system according to any one of items 1 to 5, The second packing unit is configured to perform transmission to the first relay device when at least one of the following occurs: a total length of the combined second messages reaches an upper limit value; and a certain time has elapsed since the previous transmission. Relay system. [Explanation of symbols]
[0105] 1...In-vehicle system, 2...Central ECU, 3...Zone ECU, 4...End ECU, 5...External tool, 21, 24...Protocol conversion process, 22, 32...Packing process, 23, 31...Unpacking process.
Claims
1. A relay system that relays communication between a first electronic device (5) and a second electronic device (4), a first relay device (2) connected to the first electronic device by a first lower protocol, configured to exchange data with the first electronic device by using a first upper protocol, and configured to exchange data with the second electronic device by using a second upper protocol; a second relay device (3) connected to the second electronic device by a second lower-level protocol and connected to the first relay device by a third lower-level protocol that uses frames with a longer payload than the second lower-level protocol; Equipped with The first relay device a protocol conversion unit (21, 24) configured to convert between a first message using the first upper protocol and the first lower protocol and a second message using the second upper protocol and the second lower protocol, which are transmitted and received between the first electronic device and the first electronic device; a first packing unit (22) configured to combine one or more of the second messages supplied from the protocol conversion unit and transmit the combined message to the second relay device using the third lower protocol; a first unpacking unit (23) configured to extract one or more second messages from the combined message received from the second relay device according to the third lower protocol and supply the extracted second messages to the protocol conversion unit; Equipped with The second relay device a second packing unit (32) configured to combine one or more of the second messages received from the second electronic device and transmit the combined message to the first relay device according to the third lower protocol; a second unpacking unit (31) configured to individually transmit one or more second messages obtained by unpacking the combined message received from the first relay device according to the third lower protocol to the second electronic device; Equipped with Relay system.
2. The relay system according to claim 1, the first upper layer protocol is DoIP, the second higher level protocol is DoCAN; Relay system.
3. The relay system according to claim 1, the first lower-level protocol is Ethernet; the second lower protocol is CAN or CAN FD; The third lower-level protocol is one of CAN FD, CAN XL, Ethernet and IPduM of AUTOSAR, or Ethernet and IEEE 1722. Relay system.
4. The relay system according to claim 1, The first packing unit and the second packing unit are configured to determine whether or not the second messages need to be combined, according to identification information that identifies the type of the second messages. Relay system.
5. The relay system according to claim 1, the second unpacking unit is configured to change a transmission interval used when transmitting the restored second messages to the second electronic device based on information transmitted from the first relay device. Relay system.
6. The relay system according to claim 1, The second packing unit is configured to perform transmission to the first relay device when at least one of the following occurs: a total length of the combined second messages reaches an upper limit value; and a certain time has elapsed since the previous transmission. Relay system.
7. A relay device that is connected to a first electronic device by a first lower-level protocol and that, together with a sub-relay device that is connected to a second electronic device by a second lower-level protocol, constitutes a relay system that relays communication between the first electronic device and the second electronic device, a protocol conversion unit configured to convert between a first message using a first upper protocol and the first lower protocol and a second message using a second upper protocol and the second lower protocol, which are transmitted and received between the first electronic device and the first electronic device; a first packing unit configured to transmit a combined message obtained by combining one or more of the second messages supplied from the protocol conversion unit to the sub-relay device by a third lower protocol that uses frames having a payload longer than that of the second lower protocol; a first unpacking unit configured to extract one or more second messages from the combined message received from the second relay device according to the third lower protocol, and supply the extracted second messages to the protocol conversion unit; A relay device comprising:
8. Computer, a first relay device connected to a first electronic device by a first lower protocol, configured to exchange data with the first electronic device by using a first upper protocol, and configured to exchange data with a second electronic device by using a second upper protocol; a second relay device connected to the second electronic device by a second lower-level protocol and connected to the first relay device by a third lower-level protocol that uses frames having a longer payload than the second lower-level protocol, and which, together with the first relay device, constitutes a relay system that relays communication between the first electronic device and the second electronic device; A program for functioning as The first relay device a protocol conversion unit configured to convert between a first message using the first upper protocol and the first lower protocol and a second message using the second upper protocol and the second lower protocol, which are transmitted and received between the first electronic device and the first electronic device; a first packing unit configured to transmit a combined message obtained by combining one or more of the second messages supplied from the protocol conversion unit to the second relay device using the third lower protocol; a first unpacking unit configured to extract one or more second messages from the combined message received from the second relay device according to the third lower protocol, and supply the extracted second messages to the protocol conversion unit; Equipped with The second relay device a second packing unit configured to combine one or more of the second messages received from the second electronic device and transmit the combined message to the first relay device according to the third lower protocol; a second unpacking unit configured to individually transmit one or more second messages obtained by unpacking the combined message received from the first relay device according to the third lower protocol to the second electronic device; Equipped with program.
Citation Information
Patent Citations
Relay device for vehicle communication, relay method for vehicle communication and program
JP2022091585A
Cited By
Ionic compound, absorbent and absorption device
US12612404B2