Relay device, program, and relay method

The relay device efficiently buffers data by using separate initialization processes and strategic data storage in a shared area, addressing inefficiencies in existing devices and preventing storage overflow during initialization.

JP7704038B2Active Publication Date: 2025-07-08AUTONETWORKS TECH LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022010260
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-01-26
Publication Date
2025-07-08
Estimated Expiration
2042-01-26

AI Technical Summary

Technical Problem

Existing relay devices do not efficiently buffer data when relaying data between in-vehicle ECUs, particularly during the initialization process of the device.

Method used

A relay device with multiple communication units, control units, and a shared storage unit, where control units perform separate initialization processes and buffer relay target data in a shared area when another unit's initialization is not complete, using priority, latest value, or timing-based buffering modes.

Benefits of technology

This approach ensures efficient data storage and prevents storage overflow by buffering only necessary data, allowing the relay device to operate effectively despite varying initialization completion times of control units.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007704038000001
    Figure 0007704038000001
  • Figure 0007704038000002
    Figure 0007704038000002
  • Figure 0007704038000003
    Figure 0007704038000003
Patent Text Reader

Abstract

To provide a relay device that efficiently stores (buffers) data when relaying data transmitted and received between in-vehicle ECUs.SOLUTION: In an in-vehicle system S, a relay device 2 that is mounted on a vehicle C and relays data transmitted and received between a plurality of in-vehicle ECUs 6 includes a plurality of communication units that communicate with the respective in-vehicle ECUs, a plurality of control units respectively corresponding to the plurality of communication units, and a storage unit accessible from each of the plurality of control units. Each of the plurality of control units performs initialization processing separately, and when the control unit that has completed the initialization processing acquires relay target data to be relayed via the communication unit corresponding to the other control unit that has not completed the initialization processing, a part of the acquired relay target data is stored in the storage unit by writing it in a shared area shared with other control units for which initialization processing has not been completed.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a relay device, a program, and a relay method.

Background Art

[0002] Vehicles are equipped with a plurality of in-vehicle ECUs (Electronic Control Units) for controlling in-vehicle devices such as a power train system for engine control and a body system for air conditioner control. These in-vehicle ECUs are communicably connected to a relay device via an in-company network. The relay device relays data transmitted and received between the in-vehicle ECUs connected via the in-company network (see, for example, Patent Document 1).

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] However, the relay device described in Patent Document 1 does not consider efficiently buffering the data when relaying the data, for example, immediately after the device is started.

[0005] An object of the present disclosure is to provide a relay device and the like that can efficiently store (buffer) data when relaying data transmitted and received between in-vehicle ECUs.

Means for Solving the Problems

[0006] A relay device according to one aspect of the present disclosure is a relay device mounted on a vehicle that relays data transmitted and received between a plurality of in-vehicle ECUs, and includes a plurality of communication units for communicating with each of the in-vehicle ECUs, a plurality of control units corresponding to each of the plurality of communication units, and a storage unit accessible from each of the plurality of control units. Each of the plurality of control units performs an initialization process separately. When a control unit that has completed the initialization process acquires relay target data to be relayed via a communication unit corresponding to another control unit for which the initialization process has not been completed, a part of the acquired relay target data is written into a shared area shared with the other control unit for which the initialization process has not been completed, and then stored in the storage unit.

Effect of the Invention

[0007] According to one aspect of the present disclosure, when relaying data transmitted and received between in-vehicle ECUs, it is possible to provide a relay device or the like that efficiently stores (buffers) the data.

Brief Description of the Drawings

[0008]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Embodiments for Carrying Out the Invention

[0009] [Description of Embodiments of the Present Invention] First, embodiments of the present disclosure will be listed and described. Also, at least a part of the embodiments described below may be arbitrarily combined.

[0010] (1) A relay device according to an aspect of the present disclosure is a relay device mounted on a vehicle that relays data transmitted and received between a plurality of in-vehicle ECUs, and includes a plurality of communication units for communicating with each of the in-vehicle ECUs, a plurality of control units corresponding to each of the plurality of communication units, and a storage unit accessible from each of the plurality of control units. Each of the plurality of control units performs initialization processing separately. When a control unit that has completed the initialization processing acquires relay target data to be relayed via a communication unit corresponding to another control unit whose initialization processing has not been completed, a part of the acquired relay target data is written into a shared area shared with the other control unit whose initialization processing has not been completed, and is stored in the storage unit.

[0011] In this aspect, each of the plurality of control units included in the relay device performs an initialization process separately and transitions to a state where it performs normal operations such as relay processing by starting up after undergoing the initialization process. The initialization processes by each of these plurality of control units are performed, for example, in a predetermined order, that is, these plurality of control units may perform the initialization processes sequentially. After these plurality of control units finish the initialization process, they perform relay processing (normal operation) of the data acquired (received) via the communication unit that each control unit is responsible for according to the control program executed by each individual control unit. At this time, when one control unit that has finished the initialization process and started the relay processing (normal operation) delivers the acquired relay target data to another control unit corresponding to the communication unit serving as the relay destination, the one control unit writes (buffers) the relay target data to a shared area (storage unit) shared with the other control unit. At this time, it is assumed that the other control unit has not yet finished the initialization process and has not started the relay processing (normal operation). Even in such a case, the one control unit writes (buffers) some of the acquired relay target data to the shared area (storage unit) in order to suppress depletion or overflow of the shared area (storage unit). Even when one control unit has acquired a plurality of relay target data, by buffering only some of these plurality of relay target data, it is possible to store (buffer) relay target data with a data capacity smaller than the total capacity of the acquired (received) relay target data in the storage unit. Thereby, even when the timing (the time point when the relay processing starts) at which each individual control unit starts the relay processing (normal operation) is different because each of the plurality of control units sequentially performs the initialization process, it is possible to limit the amount of relay target data written to the shared area (storage unit) shared with other control units. Therefore, it is possible to suppress a shortage (buffer overflow) of the storage area in the shared area (storage unit).That is, a time difference will occur at the start time of the relay process of each control unit. Without buffering all the data received during the period corresponding to the time difference, for example, based on a predetermined buffering mode, only a part of the received data is buffered, and it is possible to suppress a shortage of the shared area (storage unit) or the like. Thereby, the storage capacity of the storage unit mounted on the relay device can be reduced.

[0012] (2) In the relay device according to one aspect of the present disclosure, the control unit that has completed the initialization process writes relay target data having a predetermined priority or higher among the acquired relay target data to the shared area.

[0013] In this aspect, the relay target data includes multiple types of relay target data, and the priority of the relay target data is determined in advance according to the type. The control unit that has completed the initialization process, for example, writes only the relay target data of the type with a priority equal to or higher than a predetermined value to the shared area, so that the relay target data with a data capacity smaller than the total capacity of the acquired (received) relay target data can be stored (buffered) in the storage unit.

[0014] (3) In the relay device according to one aspect of the present disclosure, the relay target data is a CAN message, and the control unit that has completed the initialization process specifies the priority of the relay target data according to the CAN-ID included in the relay target data.

[0015] In this aspect, the data to be relayed is a CAN message, and the priority in the CAN message is specified by, for example, the CAN-ID included in the CAN message. The CAN message includes CAN-FD messages. In communication using the CAN protocol, the smaller the value of the CAN-ID, the higher the transmission priority in arbitration (communication mediation). By specifying the priority based on the CAN-ID, relatively important CAN messages can be stored (buffered) in the storage unit in accordance with the communication mediation in the CAN protocol. Therefore, for example, a flag value indicating the priority is assigned (set) such that for CAN-IDs below a predetermined value, the priority is 1 (1: buffering target), and for CAN-IDs with a value greater than the predetermined value, the priority is 0 (0: not a buffering target), so that the priority of the data to be relayed (CAN message) can be set. The setting of the priority is not limited to the case of two levels indicating whether it is a buffering target or not, and may be set with multiple levels of three or more levels. Or, the priority may be set using the CAN-ID value itself. In this case, the smaller the CAN-ID value, the higher the priority when buffering. Note that in this embodiment, the data transmitted and received between in-vehicle ECUs is not limited to CAN messages, and may be IP packets using the TCP / IP protocol. In the case of IP packets, the priority may be determined by the port number (TCP port number, UDP port number) defined in the TCP / IP protocol, that is, a flag value indicating whether to buffer (high: buffering target, low: not a buffering target).

[0016] (4) When the control unit that has completed the initialization process determines that the acquired multiple data to be relayed include the same type of data to be relayed, the control unit writes the latest data to be relayed of the same type of data to be relayed into the shared area.

[0017] In this aspect, among a plurality of relay target data of the same type, by writing the latest relay target data into the shared area, in each of the various relay target data, the latest value of each type of the relay target data can be stored (buffered) in the storage unit.

[0018] (5) In the relay device according to an aspect of the present disclosure, the relay target data is a CAN message, and the control unit that has completed the initialization process performs a type determination as to whether the relay target data is of the same type based on the CAN-ID included in the relay target data.

[0019] In this aspect, when the control unit that has completed the initialization process acquires relay target data that is a CAN message, in order to perform a type determination as to whether the relay target data (CAN message) is of the same type based on the CAN-ID included in the CAN message, the type determination can be performed efficiently. In the case of an IP packet, the type determination as to whether it is of the same type may be performed based on, for example, the port number (TCP port number, UDP port number) defined by the TCP / IP protocol or a combination of the port number and the source address, to determine whether the IP packet serving as the relay target data is of the same type.

[0020] (6) In the relay device according to an aspect of the present disclosure, the control unit that has completed the initialization process writes the acquired relay target data into the shared area during the buffering target period specified by the relay process start time of the other control unit for which the initialization process has not been completed.

[0021] In this aspect, the start time (initialization start time) of initialization in each control unit, the initialization time required for initialization, and the relay processing start time (relay processing start time) calculated by adding the initialization time to the start time are stored in the storage unit as, for example, initialization scheduling information. One control unit that has completed the initialization process refers to the initialization scheduling information based on its own (self-control unit) relay processing start time, identifies the relay processing start times of other control units that have not completed the initialization process, and writes the relay target data acquired during the buffering target period with the relay processing start time of the other control unit as the end point into the shared area. The buffering target period is set to be shorter than the period from the relay processing start time of the control unit that has completed the initialization process to the relay processing start time of the other control unit that has not completed the initialization process. Thereby, even when the period due to the time difference between the relay processing start time of one control unit and the relay processing start time of another control unit is longer than the buffering target period, only the relay target data acquired (received) during the buffering target period retroactively identified with the relay processing start time of the other control unit as the base point (end point) can be written into the shared area. Thereby, the latest and relatively new relay target data can be efficiently stored (buffered) based on the relay processing start time of the other control unit.

[0022] (7) In the relay device according to one aspect of the present disclosure, the buffering target period is determined based on the transmission cycle of the relay target data.

[0023] In this aspect, the buffering target period is determined based on the transmission period of the data to be relayed. For example, it is preset to be equal to or longer than the transmission period. When the data to be relayed includes multiple types of data to be relayed, the buffering target period may be set to be equal to or longer than the longest transmission period among the transmission periods of each type of data to be relayed. By setting the lower limit value of the buffering target period in this way, when the data to be relayed includes multiple types of data to be relayed, each type of data to be relayed can be acquired and stored at least once. Alternatively, the buffering target period may be set to be equal to or less than the sum of the transmission periods of each type of data to be relayed. By setting the upper limit value of the buffering target period in this way, it is possible to prevent the buffering target period from becoming excessively long and suppress an increase in the total capacity due to the data to be relayed (the data to be relayed that is the buffering target) to be stored.

[0024] (8) The relay device according to one aspect of the present disclosure includes a plurality of buffering modes for specifying a part to be written when writing a part of the acquired data to be relayed into the shared area. When writing a part of the acquired data to be relayed into the shared area, the control unit that has completed the initialization process writes a part of the acquired data to be relayed into the shared area according to one or more selected buffering modes among the plurality of buffering modes.

[0025] In this aspect, when writing a part of the acquired relay target data to the shared area, the relay device has a plurality of buffering modes for specifying a part to be written. The plurality of buffering modes include, for example, a priority mode, a latest value mode, and a mode immediately before initialization completion. When the priority mode is selected, the control unit that has completed the initialization process writes the relay target data with a predetermined priority or higher among the acquired relay target data to the shared area. When the latest value mode is selected, if the acquired relay target data includes a plurality of relay target data of the same type (for example, the same CAN ID), the control unit that has completed the initialization process writes the latest relay target data among the plurality of relay target data of the same type to the shared area. When the mode immediately before initialization completion is selected, the control unit that has completed the initialization process writes the acquired relay target data to the shared area during the buffering target period specified by the start time of the relay process of other control units whose initialization process has not been completed. When two or more buffering modes are selected by the control unit that has completed the initialization process, a part of the acquired relay target data is written to the shared area according to the combination of the two or more selected buffering modes. By setting any single buffering mode or a combination of two or more buffering modes in the plurality of buffering modes to be selectable, an appropriate buffering mode can be used according to the type, category, or driving state of the vehicle in which the relay device is mounted, etc., and the usability of the relay device can be improved.

[0026] (9) A program according to an aspect of the present disclosure is mounted on a vehicle, relays data transmitted and received between a plurality of in-vehicle ECUs, and includes a plurality of communication units for communicating with each of the in-vehicle ECUs, a plurality of control units corresponding to each of the plurality of communication units, and a storage unit accessible from each of the plurality of control units. The program causes the computer to execute a process of separately initializing each of the plurality of control units, and when a control unit that has completed the initialization process acquires relay target data to be relayed via a communication unit corresponding to another control unit that has not completed the initialization process, writing a part of the acquired relay target data to a shared area shared with the other control unit that has not completed the initialization process, and storing the data in the storage unit.

[0027] In this aspect, it is possible to provide a program that causes a computer to function as a relay device that efficiently stores (buffers) data when relaying data transmitted and received between in-vehicle ECUs.

[0028] (10) An information processing method according to an aspect of the present disclosure is mounted on a vehicle, relays data transmitted and received between a plurality of in-vehicle ECUs, and includes a plurality of communication units for communicating with each of the in-vehicle ECUs, a plurality of control units corresponding to each of the plurality of communication units, and a storage unit accessible from each of the plurality of control units. The method causes the computer to execute a process of separately initializing each of the plurality of control units, and when a control unit that has completed the initialization process acquires relay target data to be relayed via a communication unit corresponding to another control unit that has not completed the initialization process, writing a part of the acquired relay target data to a shared area shared with the other control unit that has not completed the initialization process, and storing the data in the storage unit.

[0029] In this aspect, it is possible to provide an information processing method that causes a computer to function as a relay device that efficiently stores (buffers) data when relaying data transmitted and received between in-vehicle ECUs.

[0030] [Details of Embodiments of the Present Disclosure] The present invention will be specifically described based on the drawings showing its embodiments. The relay device 2 according to the embodiment of the present disclosure will be described below with reference to the drawings. Note that the present invention is not limited to these examples, but is defined by the claims, and is intended to include all modifications within the meaning and scope equivalent to the claims.

[0031] (Embodiment 1) Hereinafter, embodiments will be described with reference to the drawings. FIG. 1 is a schematic diagram illustrating the configuration of an in-vehicle system including the relay device 2 according to Embodiment 1. FIG. 2 is a block diagram illustrating the physical configuration of the relay device 2. The in-vehicle system S is configured with the relay device 2 mounted on the vehicle C as the main device, and the relay device 2 is communicably connected to a plurality of in-vehicle ECUs 6 mounted on the vehicle C. The relay device 2 receives transmission data (communication data) transmitted from each of the plurality of in-vehicle ECUs 6, and performs relay processing of the transmission data based on header information including a message ID or a destination address included in the transmission data. The relay device 2 may further be communicably connected to an external server S1 connected to an out-vehicle network such as the Internet via the out-vehicle communication device 1. The relay device 2 may also perform relay processing on the transmission data (communication data) transmitted and received between the external server S1 and the in-vehicle ECU 6 mounted on the vehicle C.

[0032] The vehicle C is equipped with an out-vehicle communication device 1, a relay device 2, and a plurality of in-vehicle ECUs 6 for controlling various in-vehicle devices (actuators, sensors). The out-vehicle communication device 1 and the relay device 2 are communicably connected by a harness such as a serial cable. The relay device 2 and the in-vehicle ECU 6 are communicably connected by an in-vehicle network 7 compatible with a communication protocol such as CAN (Control Area Network), CAN-FD, or Ethernet (registered trademark).

[0033] The vehicle external communication device 1 includes an external communication unit (not shown) and an input / output I / F (interface) (not shown) for communicating with the relay device 2. The external communication unit is a communication device for performing wireless communication using mobile communication protocols such as LTE, 4G, 5G, and WiFi, and transmits and receives data to and from the external server S1 via the antenna 11 connected to the external communication unit. The communication between the vehicle external communication device 1 and the external server S1 is performed via an external network such as a public switched telephone network or the Internet, for example.

[0034] The relay device 2 functions as a CAN gateway or an Ethernet SW (Layer 2 switch or Layer 3 switch), etc., and further has a function of performing protocol conversion between different protocols, such as between the CAN protocol and the TCP / IP protocol. In addition to relaying communication, the relay device 2 may be a PLB (Power Lan Box) that also functions as a power distribution device that distributes and relays the power output from a power supply device such as a secondary battery and supplies power to in-vehicle devices such as actuators connected to the device itself (relay device 2). Alternatively, the relay device 2 may be configured as a functional part of a body ECU that controls the entire vehicle C. Alternatively, the relay device 2 may be an integrated ECU configured by a central control device such as a vehicle computer and performing overall control of the vehicle C.

[0035] The relay device 2 includes a control unit 3, a storage unit 4, an in-vehicle communication unit 5, and an input / output I / F 21. The control unit 3 is configured by a CPU (Central Processing Unit) or an MPU (Micro Processing Unit), etc., and reads and executes a control program P (program product) and data stored in advance in the storage unit 4 to perform various control processes and arithmetic processes, etc.

[0036] The control unit 3 is composed of a plurality of control units 3 including a first control unit 31, a second control unit 32, a third control unit 33, and a fourth control unit 34. For example, when the control unit 3 is a multi-core CPU composed of four cores (quad-core), each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 corresponds to each core. The control unit 3 is not limited to the case of a multi-core CPU, and may be a multi-CPU having a plurality of single-core CPUs, or may be one having two dual-core CPUs. The form in which the control unit 3 is composed of four cores (individual control units 3) by the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 is an example, and the control unit 3 may be composed of, for example, an octa-core or the like. Details will be described later, but each of these first control unit 31, second control unit 32, third control unit 33, and fourth control unit 34 performs initialization processing at different timings. Further, each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 has a corresponding relationship with an individual in-vehicle communication unit.

[0037] The storage unit 4 is composed of a volatile memory element such as a RAM (Random Access Memory) or a non-volatile memory element such as a ROM (Read Only Memory), an EEPROM (Electrically Erasable Programmable ROM), or a flash memory, and stores a control program P and data referred to during processing in advance. The control program P (program product) stored in the storage unit 4 may store the control program P (program product) read from a recording medium 400 readable by the relay device 2. The control program P may include individual control programs P corresponding to each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34.

[0038] The memory unit 4 is accessible from each of a plurality of cores etc. (the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34) that constitute the control unit 3, and includes a shared area 41 that is used as a shared memory by these first control unit 31, second control unit 32, third control unit 33, and fourth control unit 34. The shared area 41 may be set in an area defined by the physical address or logical address of the memory unit 4. The shared area 41 may be individually set according to the combination by each of the first control unit 31, second control unit 32, third control unit 33, and fourth control unit 34. That is, the shared area 41 may include the shared area 41 of the first control unit 31 and the second control unit 32, the shared area 41 of the first control unit 31 and the third control unit 33, the shared area 41 of the first control unit 31 and the fourth control unit 34, the shared area 41 of the second control unit 32 and the third control unit 33, the shared area 41 of the second control unit 32 and the fourth control unit 34, and the shared area 41 of the third control unit 33 and the fourth control unit 34.

[0039] The in-vehicle communication unit 5 is an input / output interface using a communication protocol such as, for example, CAN (Control Area Network), CAN-FD (CAN with Flexible Data Rate), or Ethernet (TCP / IP). The in-vehicle communication unit 5 includes a CAN communication unit 51 constituted by a CAN transceiver and an Ethernet communication unit 52 constituted by an Ethernet PHY unit, and functions as a communication unit corresponding to the physical layer for the relay device 2 and the in-vehicle ECU 6 to communicate with each other. The relay device 2 may be configured such that the number of in-vehicle communication units 5 is the same as the number of cores etc. that constitute the control unit 3.

[0040] A plurality of in-vehicle communication units 5 are provided, and each in-vehicle communication unit 5 is connected to each communication line 71 (Ethernet cable 711, CAN bus 712) that constitutes the in-vehicle network 7, that is, each bus. By providing a plurality of in-vehicle communication units 5 in this way, the in-vehicle network 7 can be divided into a plurality of buses or segments, and in-vehicle ECUs 6 can be connected to each bus or the like according to the functions of the in-vehicle ECUs 6. The control unit 3 of the relay device 2 communicates with the in-vehicle ECUs 6 connected to the in-vehicle network 7 via the in-vehicle communication unit 5.

[0041] The input / output I / F 21 is, like the input / output I / F of the vehicle external communication device 1, a communication interface for serial communication, for example. Through the input / output I / F 21, the relay device 2 is communicably connected to the vehicle external communication device 1 and the IG switch 8 that starts and stops the vehicle C. The connection between the vehicle external communication device 1 and the IG switch 8 and the relay device 2 is not limited to the case of passing through the input / output I / F, and may be a connection via the in-vehicle communication unit 5.

[0042] FIG. 3 is an explanatory diagram illustrating the initialization process in a plurality of control units 3. For example, the control unit 3 configured with a multi-core or the like (a quad-core in this embodiment) includes a first control unit 31, a second control unit 32, a third control unit 33, and a fourth control unit 34 corresponding to each core.

[0043] By sequentially starting the initialization process, the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 have different normal operation start times (initialization completion times) for starting normal operations such as relay processing. The order of these initialization processes is defined, for example, in a correspondence table described later.

[0044] In this embodiment, the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 each start the initialization process in this order. The first control unit 31 performs the initialization process first. After the initialization of the first control unit 31 is completed, the second control unit 32 starts the initialization process. After the initialization of the second control unit 32 is completed, the third control unit 33 starts the initialization process. After the initialization of the third control unit 33 is completed, the fourth control unit 34 starts the initialization process.

[0045] In this way, by each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 performing the initialization process sequentially, for example, a time difference occurs between the start time points of the normal operations of the first control unit 31 and the fourth control unit 34. Due to the occurrence of this time difference at the start time point of the normal operation, direct relay processing from the first control unit 31 to the fourth control unit 34 cannot be performed during the period from the start time point of the normal operation of the first control unit 31 to the start time point of the normal operation of the fourth control unit 34. For this reason, the first control unit 31 stores (buffers) the relay target data to be relayed via the in-vehicle communication unit 5, which is the responsibility of the fourth control unit 34, among the received (acquired) transmission data, in the shared area 41 of the first control unit 31 and the fourth control unit 34. However, if all the relay target data received during the period from the start time point of the normal operation of the first control unit 31 to the start time point of the normal operation of the fourth control unit 34 is buffered in the shared area 41, there is a concern that the storage capacity (free area) of the shared area 41 will be insufficient. In contrast, the first control unit 31 buffers only a part of the received relay target data in the shared area 41, thereby suppressing the shortage of the storage capacity (free area) of the shared area 41.

[0046] Similar to the fourth control unit 34, the first control unit 31 also performs buffering processing similar to the buffering processing for the fourth control unit 34 on the second control unit 32 and the third control unit 33 that perform initialization processing (complete the initialization processing) after the first control unit 31 itself. The second control unit 32 also performs buffering processing similar to that of the first control unit 31 on the third control unit 33 and the fourth control unit 34 that perform initialization processing after the second control unit 32 itself. The third control unit 33 also performs buffering processing similar to that of the first control unit 31 on the fourth control unit 34 that performs initialization processing after the third control unit 33 itself.

[0047] Figure 4 is an explanatory diagram (correspondence table) illustrating the correspondence between each of the plurality of control units 3 and the in-vehicle communication unit 5. Information (correspondence information) indicating the correspondence between each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 that constitute the control unit 3 and the in-vehicle communication unit 5 is stored in the storage unit 4 in, for example, a table format (correspondence table). The correspondence table includes, as management items (fields), for example, a core number, an initialization order, an initialization required time, a communication unit number, and a communication unit type.

[0048] In the management item of the core number, a device number uniquely indicating each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 that constitute the control unit 3 is stored. In the present embodiment, core numbers indicating the first control unit 31 (Core1), the second control unit 32 (Core2), the third control unit 33 (Core3), and the fourth control unit 34 (Core4) are stored. When the control unit 3 is configured with a multi-CPU, a CPU number may be stored in this management item.

[0049] In the management item of the initialization order, the order in which each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 that constitute the control unit 3 starts the initialization processing is stored. In the present embodiment, the initialization processing is performed in the order of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34. By referring to the initialization order, each control unit 3 can identify other control units 3 that perform initialization processing after the control unit 3 itself.

[0050] In the management item of the initialization required time, the time (required time) required for the initialization processes of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 respectively is stored. By referring to the initialization required time, each control unit 3 can derive the point in time when another control unit 3 that performs the initialization process after itself completes the initialization process. In this way, the correspondence table includes the initialization order and the management item of the initialization order, and thus includes the initialization scheduling information.

[0051] In the management item of the communication unit number, the device numbers of the in-vehicle communication units 5 corresponding to the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 respectively are stored. Based on the correspondence, each control unit 3 transmits and receives transmission data via the in-vehicle communication unit 5 corresponding to itself. In the management item of the communication unit type, the types of protocols of the in-vehicle communication units 5 corresponding to the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 respectively are stored. Details regarding the correspondence between each control unit 3 and the in-vehicle communication unit 5 will be described later.

[0052] FIG. 5 is an explanatory diagram (relay route table) exemplifying relay route information. The relay route information used when the relay device 2 performs relay processing on transmission data received from the in-vehicle ECU 6 or the external server S1 is stored in the storage unit 4 in, for example, a table format (relay route table). As management items (fields) of the relay route table, for example, a message ID, a relay destination communication unit, a transmission period, a priority, and a corresponding port number are included.

[0053] In the management item of the message ID, for example, a communication data identifier for classifying or identifying transmission data, such as the message ID included in the CAN message, is stored. In the management item of the relay destination communication unit, the communication unit number of the in-vehicle communication unit 5, which is the relay destination of the transmission data of the message ID stored in the same record, is stored. The communication unit number is a value defined (stored) in the correspondence table. By specifying the communication unit number, any one of the control units 3 corresponding to the communication unit number, that is, the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34, can be specified. The relay route table includes the management item of the relay destination communication unit, and thus includes route information (routing information) used when the relay device 2 performs relay processing.

[0054] In the management item of the transmission cycle, the transmission cycle of the transmission data of the message ID stored in the same record is stored. In the management item of the priority, a value indicating the priority of the transmission data of the message ID stored in the same record is stored. The priority is determined based on the message ID. In the CAN protocol, the smaller the numerical value of the message ID, the higher the priority of arbitration (communication arbitration). In the present embodiment, a message ID less than a predetermined value is set as a high priority, and a message ID greater than or equal to the predetermined value is set as a low priority.

[0055] In the management item of the corresponding port number, when the transmission data of the message ID stored in the same record is a CAN message, the port number (TCP port number, UDP port number) included in the IP packet is stored when the CAN message is protocol-converted into an IP packet. The relay route table includes the management item of the corresponding port number, and thus includes protocol conversion information used for protocol conversion between the CAN message and the IP packet when the relay device 2 performs relay processing.

[0056] FIG. 6 is an explanatory diagram (logical configuration diagram) illustrating the relay process of relay target data in the relay device 2. The first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 that constitute the control unit 3 are each provided with a corresponding in-vehicle communication unit 5.

[0057] The in-vehicle communication unit 5 corresponding to the first control unit 31 (Core1) is, for example, the CAN communication unit 51 with a communication unit number of C-01. The in-vehicle communication unit 5 corresponding to the second control unit 32 (Core2) is, for example, the CAN communication unit 51 with a communication unit number of C-02. The in-vehicle communication unit 5 corresponding to the third control unit 33 (Core3) is, for example, the Ethernet communication unit 52 with a communication unit number of e-01. The in-vehicle communication unit 5 corresponding to the fourth control unit 34 (Core4) is, for example, the Ethernet communication unit 52 with a communication unit number of e-02.

[0058] The first control unit 31 is responsible for the process of receiving (acquiring) and transmitting (outputting) the transmission data in the CAN communication unit 51 of C-01. The second control unit 32 is responsible for the process of receiving (acquiring) and transmitting (outputting) the transmission data in the CAN communication unit 51 of C-02. The third control unit 33 is responsible for the process of receiving (acquiring) and transmitting (outputting) the transmission data in the Ethernet communication unit 52 of e-01. The fourth control unit 34 is responsible for the process of receiving (acquiring) and transmitting (outputting) the transmission data in the Ethernet communication unit 52 of e-02.

[0059] The storage unit 4 includes a shared area 41 that can be accessed by the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34 respectively. When the control unit 3 that has completed the initialization process acquires relay target data to be relayed via the communication unit corresponding to another control unit 3 whose initialization process has not been completed, the shared area 41 is used as a storage area for buffering the relay target data.

[0060] In the example of this embodiment, the control unit 3 that has completed the initialization process will be described as the first control unit 31, and the other control units 3 that have not completed the initialization process will be described as the fourth control unit 34. The first control unit 31 determines (judges) whether the CAN message (transmission data) received from the CAN communication unit 51 (C-01) that it is responsible for is a relay target. For example, the first control unit 31 refers to the relay route table to determine whether the CAN message is transmission data (relay target data) that should be relayed to the fourth control unit 34.

[0061] If the CAN message is transmission data (relay target data) that should be relayed to the fourth control unit 34 and the fourth control unit 34 has not completed the initialization process, the first control unit 31 stores (buffers) the CAN message in the shared area 41. When buffering relay target data such as CAN messages in the shared area 41, the first control unit 31 buffers only some of the relay target data based on a predetermined rule among all the received relay target data. Thereby, it is possible to suppress or prevent the free area (free capacity) of the shared area 41 from being insufficient or crowded.

[0062] After completing the initialization process, the fourth control unit 34 obtains the CAN message (relay target data) buffered by the first control unit 31 by referring to the shared area 41, and generates the IP packet by protocol-converting the CAN message into the IP packet. If a plurality of CAN messages including the same message ID are buffered, the fourth control unit 34 may perform protocol conversion by including the data included in the payloads of the plurality of CAN messages in the payload of a single IP packet.

[0063] The fourth control unit 34 transmits (outputs) the generated IP packet from the Ethernet communication unit 52 (e-02) which it is in charge of, to the in-vehicle ECU 6 connected to the Ethernet communication unit 52 (e-02). Alternatively, the fourth control unit 34 may transmit (output) the generated IP packet using multicast without specifying the in-vehicle ECU 6 as the destination.

[0064] By performing buffering using the shared area 41 in this way, relay processing can be performed between the control unit 3 (the first control unit 31) that has completed the initialization process and other control units 3 (the fourth control unit 34) that have not completed the initialization process. By performing processing to make only some of the data to be relayed be buffered in the shared area 41, it is possible to suppress or prevent the free area of the shared area 41 from being insufficient or crowded.

[0065] FIG. 7 is a flowchart exemplifying the processing of the control unit 3 of the relay device 2. The control unit 3 of the relay device 2 constantly performs the following processing, for example, when the vehicle C is in the startup state (the IG switch 8 is on). The control unit 3 of the relay device 2 is, for example, a multi-core CPU composed of a plurality of cores or CPUs, and in the present embodiment, it consists of four cores (control units 3) from the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34.

[0066] These first control unit 31, second control unit 32, third control unit 33, and fourth control unit 34 sequentially perform the initialization process in a predetermined initial order. The core (control unit 3) that has completed the initialization process performs the following processing for each core (control unit 3) that has not completed the initialization process, that is, all cores (control units 3) whose initialization process is completed after itself (its own core). In the present embodiment, the core (control unit 3) that has completed the initialization process is described as the first control unit 31 (Core1) that first completes the initialization process, and the other cores (control units 3) that have not completed the initialization process are described as the fourth control unit 34 (Core4) that finally completes the initialization process.

[0067] The first control unit 31 (control unit 3) of the relay device 2 executes an initialization process (S101). The first control unit 31 of the relay device 2 acquires, for example, the on signal output from the IG switch 8, and starts the initialization process using the on signal as a trigger. The initialization process is performed, for example, in a predetermined initialization required time as shown in the correspondence table, and after the elapse of the initialization required time, the initialization process ends (completes). Thereby, the first control unit 31 of the relay device 2 becomes the control unit 3 that has ended the initialization process.

[0068] The first control unit 31 (control unit 3) of the relay device 2 determines whether or not transmission data has been received (S102). When transmission data has not been received (S102: NO), the first control unit 31 (control unit 3) of the relay device 2 performs a loop process to execute the process from S102 again.

[0069] When transmission data has been received (S102: YES), the first control unit 31 (control unit 3) of the relay device 2 determines whether or not the received transmission data is relay target data for the fourth control unit 34 (S103). When the received transmission data is not relay target data for the fourth control unit 34 (S103: NO), the first control unit 31 (control unit 3) of the relay device 2 performs a loop process to execute the process from S102 again.

[0070] When the received transmission data is relay target data for the fourth control unit 34 (S103: YES), the first control unit 31 (control unit 3) of the relay device 2 determines whether or not the fourth control unit 34 (other control unit 3) corresponding to the in-vehicle communication unit 5 that is the relay destination of the relay target data is in the process of initialization (S104). The first control unit 31 of the relay device 2 determines whether or not the fourth control unit 34 is in the process of initialization, that is, whether or not the fourth control unit 34 has ended (completed) the initialization.

[0071] When it is said that the fourth control unit 34 is in the initialization process, it is intended that the fourth control unit 34 has not completed (finished) the initialization, and it also includes the case where the fourth control unit 34 has not started the initialization. The first control unit 31 calculates the initialization completion time of the fourth control unit 34 based on its own initialization completion time (the start time of normal operation), and determines whether the fourth control unit 34 has completed (finished) the initialization based on whether the current time exceeds the initialization completion time of the fourth control unit 34.

[0072] When calculating the initialization completion time of the fourth control unit 34, the first control unit 31 may refer to, for example, the correspondence table stored in the storage unit 4. The initialization completion time of the fourth control unit 34 can be derived by adding up the initialization required times of the second control unit 32, the third control unit 33, and the fourth control unit 34, which perform initialization after the first control unit 31, based on the initialization completion time (the start time of normal operation) of the first control unit 31.

[0073] When it is determined that the initialization has been completed (not in the initialization process) (S104: NO), the first control unit 31 (control unit 3) of the relay device 2 performs relay processing (normal time processing) (S1041). When the first control unit 31 of the relay device 2 determines that the initialization of the fourth control unit 34 has been completed, for example, it performs relay processing (normal time processing) by performing inter-process communication with the process or thread being executed by the fourth control unit 34 and delivering the acquired relay target data to the fourth control unit 34. When the initialization of the fourth control unit 34 has been completed (finished), the buffering performed when the fourth control unit 34 is in the initialization process becomes unnecessary, and the relay processing by the associated processing between the first control unit 31 responsible for the CAN communication unit 51 and the fourth control unit 34 responsible for the Ethernet communication unit 52 is performed as the normal time processing of the relay device 2.

[0074] When it is determined that initialization has not been completed (i.e., initialization is in progress) (S104: YES), the first control unit 31 (control unit 3) of the relay device 2 determines whether or not the data to be relayed is a buffering target based on the priority of the data to be relayed (S105). When the fourth control unit 34 has not completed initialization, the first control unit 31 of the relay device 2 determines the presence or absence of a buffering target based on the priority of the data to be relayed by referring to, for example, the relay route table stored in the storage unit 4. For example, when the data to be relayed is a CAN message, the priority is determined according to the message ID (CAN-ID) included in the CAN message. In the present embodiment, a CAN message whose message ID value is equal to or less than a predetermined value is set as a buffering target.

[0075] When it is determined that the data is a buffering target (S105: YES), the first control unit 31 (control unit 3) of the relay device 2 stores (buffers) the data to be relayed in the shared area 41 of the storage unit 4 (S106). For example, when it is determined that the data to be relayed is a buffering target by referring to the relay route table, the first control unit 31 of the relay device 2 stores (buffers) the data to be relayed in the shared area 41 of the storage unit 4. The shared area 41 is set as a storage area that can also be accessed by the fourth control unit 34. The fourth control unit 34 that has completed the initialization process can obtain the data to be relayed buffered by the first control unit 31 by referring to the storage area.

[0076] When it is determined that the data is not a buffering target (S105: NO), the first control unit 31 (control unit 3) of the relay device 2 discards the data to be relayed (S1051). For example, when it is determined that the data to be relayed is not a buffering target by referring to the relay route table, that is, when the priority of the data to be relayed is low and buffering is unnecessary, the first control unit 31 discards the data to be relayed. This can suppress or prevent the shared area 41, which is a storage area for buffering, from becoming congested or insufficient and making it impossible to buffer data to be relayed with a high priority.

[0077] After executing S106, S1061, or S1041, the first control unit 31 (control unit 3) of the relay device 2 ends a series of processes in this flow. Alternatively, after executing S106, S1061, or S1041, the first control unit 31 (control unit 3) of the relay device 2 may perform loop processing to execute the processes starting from S102 again.

[0078] After completing the initialization process, the fourth control unit 34 (other control unit 3) of the relay device 2 refers to the shared area 41 in the storage unit 4 to acquire the relay target data stored (buffered) in the shared area 41 by the first control unit 31. When the relay target data is a plurality of CAN messages and the in-vehicle communication unit 5 responsible for the fourth control unit 34 is the Ethernet communication unit 52, the fourth control unit 34 may perform relay processing of the relay target data by converting the acquired plurality of CAN messages into a single IP packet and outputting the IP packet from the Ethernet communication unit 52 which it is responsible for.

[0079] Since the storage capacity of the payload in the IP packet is larger than the storage capacity of the payload in the CAN message, by converting a plurality of CAN messages buffered in this way into a single IP packet, the relay processing of the relay target data can be efficiently performed. That is, by completing (ending) the initialization process earlier for the control unit 3 (the first control unit 31 and the second control unit 32) responsible for the CAN communication unit 51 than the control unit 3 (the third control unit 33 and the fourth control unit 34) responsible for the Ethernet communication unit 52, a plurality of CAN messages buffered in the shared area 41 can be converted into a single IP packet and relayed, and the throughput in the relay processing can be improved. In the relay device 2 having a configuration in which each control unit 3 (the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 34) sequentially completes the initialization process, when performing relay processing by transmitting the transmission data received by the CAN communication unit 51 from the Ethernet communication unit 52, the buffering process according to this embodiment can be preferably applied.

[0080] In this embodiment, although the fourth control unit 34 converts a plurality of CAN messages buffered by the first control unit 31 into a single IP packet, the present invention is not limited to this. The first control unit 31 may convert a plurality of buffered CAN messages into a single IP packet. That is, the first control unit 31 may convert a plurality of CAN messages to be buffered into a single IP packet and store (buffer) the converted IP packet in the shared area 41. As a result, after the initialization process is completed, the fourth control unit 34 can obtain the converted IP packet by referring to the shared area 41 and output the IP packet from the Ethernet communication unit 52 that it is responsible for, so that the throughput in the relay process can be further improved.

[0081] In the above flow, the first control unit 31 (Core1) that first completes the initialization process performs the same process on the second control unit 32 (Core2) and the third control unit 33 (Core3) that perform the initialization process after itself as the process for the fourth control unit 34 (Core4) that finally completes the initialization process. The second control unit 32 and the third control unit 33 perform the same process as the fourth control unit 34 on the relay target data stored (buffered) in the shared area 41 by the first control unit 31.

[0082] The first control unit 31 (Core1) may perform parallel processing on each core (the second control unit 32, the third control unit 33, and the fourth control unit 34) that performs initialization processing after itself, for example, using a plurality of processes or threads. The first control unit 31 (Core1) may, for example, share the processing from S101 to S103 for the second control unit 32, the third control unit 33, and the fourth control unit 34 that perform initialization processing after itself, and perform the processing below S104 individually for the second control unit 32, the third control unit 33, and the fourth control unit 34, thereby enabling parallel processing. At this time, by performing the processing of S103, it may be possible to identify the relay target data (relay processing) for any core (the second control unit 32, the third control unit 33, and the fourth control unit 34). These processes are not limited in this embodiment, and the same applies to other embodiments described later.

[0083] The second control unit 32 (Core2) also performs the same processing as the above flow by the first control unit 31 on the third control unit 33 (Core3) and the fourth control unit 34 (Core4) that perform initialization processing after itself. The third control unit 33 (Core3) also performs the same processing as the above flow by the first control unit 31 on the fourth control unit 34 (Core4) that performs initialization processing after itself. Needless to say, for the fourth control unit 34 (Core4) that finally completes the initialization processing, since there is no core (control unit 3) that completes the initialization processing after itself, it is not necessary to perform the processing according to the above flow.

[0084] (Embodiment 2) FIG. 8 is a flowchart illustrating the processing of the control unit 3 of the relay device 2 according to Embodiment 2 (storing the latest value). Similar to Embodiment 1, when the vehicle C is in the startup state (the IG switch 8 is on), the control unit 3 of the relay device 2 constantly performs the following processing.

[0085] The first control unit 31 (control unit 3) of the relay device 2 executes an initialization process (S201). The first control unit 31 (control unit 3) of the relay device 2 determines whether transmission data has been received (S202). The first control unit 31 (control unit 3) of the relay device 2 determines whether the received transmission data is relay target data for the fourth control unit 34 (S203). The first control unit 31 (control unit 3) of the relay device 2 determines whether the fourth control unit 34 (other control unit 3) corresponding to the in-vehicle communication unit 5, which is the relay destination of the relay target data, is in the initialization process (S204). When it is determined that the initialization has ended (S204: NO), the first control unit 31 (control unit 3) of the relay device 2 performs a relay process (normal-time process) (S2041). The first control unit 31 of the relay device 2 performs the processes from S201 to S2041 in the same manner as S101 to S1041 of Embodiment 1.

[0086] When it is determined that the initialization has not ended (S204: YES), the first control unit 31 (control unit 3) of the relay device 2 stores (buffers) the relay target data in the shared area 41 of the storage unit 4 by overwriting. The relay target data for the fourth control unit 34 will be buffered in the shared area 41, and the relay target data is classified into a plurality of types. The types of the relay target data are, for example, when the relay target data is a CAN message, it is classified by the message ID (CAN-ID). CAN messages with the same message ID are the same type of relay target data, and CAN messages with different message IDs are different types of relay target data.

[0087] The first control unit 31 of the relay device 2 buffers only the latest relay target data of the same type among the acquired plurality of relay target data in the shared area 41. As a result, the old relay target data of the same type as the latest relay target data, which was buffered previously, will be overwritten by the latest relay target data. In this way, the first control unit 31 of the relay device 2 stores (buffers) only the latest relay target data in the shared area 41 according to the type of the acquired (received) relay target data. Therefore, when buffering the acquired (received) relay target data in the shared area 41, if the relay target data of the same type as the relay target data (for example, CAN message with the same CAN-ID) has already been buffered, the already buffered relay target data will be overwritten.

[0088] Although the first control unit 31 of the relay device 2 buffers only the latest relay target data of each type of relay target data in the shared area 41, it is not limited to this. The first control unit 31 of the relay device 2 may buffer two (two generations) of relay target data consisting of the latest and the relay target data one before the latest in the shared area 41. Or, according to the storage capacity of the shared area 41, it may buffer multiple generations of relay target data consisting of the latest and the relay target data two or more before the latest in the shared area 41. Or, the first control unit 31 of the relay device 2 may buffer the relay target data of the classification with higher priority in two generations and buffer the relay target data of the classification with lower priority in one generation (generation management lower than that of the relay target data of the classification with higher priority) according to the priority applied in Embodiment 1.

[0089] (Embodiment 3) FIG. 9 is an explanatory diagram illustrating initialization processing in a plurality of control units 3 according to Embodiment 3 (immediately before initialization is completed). Depending on the order of start of the initialization processing, a time difference occurs at the start time of normal operation. For example, the time difference at the start time of normal operation between the first control unit 31 and the fourth control unit 34 is the time (period) obtained by summing up the initialization required times of the second control unit 32, the third control unit 33, and the fourth control unit 34. In this case, the period due to the time difference at the start time of normal operation is separated into a non-buffering target period and a buffering target period, and the first control unit 31 buffers only the relay target data received during the buffering target period in the shared area 41. The buffering target period may be defined separately for each of the first control unit 31, the second control unit 32, the third control unit 33, and the fourth control unit 3 that are individual control units 3, and the respective buffering target periods may be stored in the storage unit 4, for example.

[0090] The buffering target period may be determined based on the transmission cycle of the relay target data relayed to the fourth control unit 34. The buffering target period in the fourth control unit 34 may be equal to or longer than the transmission cycle of the relay target data relayed to the fourth control unit 34, that is, the relay target data relayed via the in-vehicle communication unit 5 (Ethernet communication unit 52) corresponding to the fourth control unit 34.

[0091] When the relay target data includes a plurality of types (a plurality of message IDs, etc.) of relay target data, the buffering target period may be set to be equal to or longer than the longest transmission cycle among the transmission cycles of the relay target data of each type. By setting the lower limit value of the buffering target period in this way, even when the relay target data includes a plurality of types of relay target data, the relay target data of each type can be acquired at least once and buffered in the shared area 41.

[0092] Furthermore, the buffering target period may be set to be equal to or less than the sum of the transmission periods of the relay target data for each type. By setting the upper limit value of the buffering target period in this way, it is possible to suppress the buffering target period from becoming excessively long and suppress the total capacity of the relay target data to be buffered from increasing excessively.

[0093] During the period due to the time difference at the start of normal operation, the non-buffering target period is located in the first half, and the buffering target period is located in the second half. As a result, when taking the fourth control unit 34 as an example, relatively new relay target data including the latest relay target data received immediately before can be buffered in the shared area 41 based on the start time of normal operation of the fourth control unit 34.

[0094] FIG. 10 is a flowchart illustrating the processing of the control unit 3 of the relay device 2. Similar to Embodiment 1, when the vehicle C is started (IG switch 8 is on), the control unit 3 of the relay device 2 constantly performs the following processing. The first control unit 31 (control unit 3) of the relay device 2 executes an initialization process (S301). The first control unit 31 (control unit 3) of the relay device 2 determines whether transmission data has been received (S302). The first control unit 31 (control unit 3) of the relay device 2 determines whether the received transmission data is relay target data for the fourth control unit 34 (S303). The first control unit 31 (control unit 3) of the relay device 2 determines whether the fourth control unit 34 (other control unit 3) corresponding to the in-vehicle communication unit 5, which is the relay destination of the relay target data, is in the initialization process (S304). If it is determined that the initialization has ended (S304: NO), the first control unit 31 (control unit 3) of the relay device 2 performs a relay process (normal-time process) (S3041). The first control unit 31 of the relay device 2 performs the processes from S301 to S3041 in the same manner as from S101 to S1041 of Embodiment 1.

[0095] When it is determined that the initialization has not been completed (S304: YES), the first control unit 31 (control unit 3) of the relay device 2 determines whether it is a buffering target period (S305). When the fourth control unit 34 has not completed the initialization, the first control unit 31 of the relay device 2 determines whether the current time is included in the buffering target period for the fourth control unit 34. The buffering target period for the fourth control unit 34 is specified retroactively with the start point (end point) of the relay process of the fourth control unit 34 as the basis. An appropriate period corresponding to the storage capacity of the shared area 41 is set for the buffering target period, and for example, it may be set as a period of about 40% of the time difference at the start point of the normal processes (relay processes) of the first control unit 31 and the fourth control unit 34.

[0096] Alternatively, the buffering target period for the fourth control unit 34 may be set to a value equal to or greater than the transmission cycle of the relay target data relayed to the fourth control unit 34 (Ethernet communication unit 52: e-02), for example. When the relay target data includes multiple types of relay target data (CAN messages) such as a plurality of message IDs, the buffering target period may be set to be equal to or greater than the longest transmission cycle among the transmission cycles of each type of relay target data. Thereby, any type of relay target data can be acquired at least once and buffered in the shared area 41.

[0097] The storage unit 4 stores the buffering target periods in the fourth control unit 34 and other control units 3 (the second control unit 32 and the third control unit 33). By referring to the storage unit 4, the first control unit 31 can identify the buffering target periods of the fourth control unit 34 and the like. Similar to Embodiment 1, the first control unit 31 derives the initialization completion time (normal operation start time) of the fourth control unit 34 with reference to, for example, a correspondence table, based on the initialization completion time (normal operation start time) of the first control unit 31. The first control unit 31 calculates backward (retrospects) the buffering target period of the fourth control unit 34 from the derived initialization completion time (normal operation start time) of the fourth control unit 34, thereby deriving the start time (time) and the end time (time) of the buffering target period of the fourth control unit 34. Needless to say, the end time corresponds (matches) to the initialization completion time (normal operation start time) of the fourth control unit 34.

[0098] The first control unit 31 includes, for example, a clock function. When the current time is between the start time and the end time of the buffering target period of the fourth control unit 34, the first control unit 31 determines that the current time is the buffering target period for the fourth control unit 34. When the current time is not between the start time and the end time of the buffering target period of the fourth control unit 34, that is, when it is before the start time of the buffering target period, the first control unit 31 determines that the current time is not the buffering target period (out-of-buffering target period) for the fourth control unit 34.

[0099] When it is determined that it is the buffering target period (S305: YES), the first control unit 31 (control unit 3) of the relay device 2 stores (buffers) the relay target data in the shared area 41 of the storage unit 4 (S306). When it is determined that it is the buffering target period, that is, when the current time is included in the buffering target period for the fourth control unit 34, the first control unit 31 of the relay device 2 stores (buffers) the relay target data in the shared area 41 of the storage unit 4 in the same manner as in processing S106 of Embodiment 1.

[0100] When it is determined that the period is not a buffering target period (S305: NO), the first control unit 31 (control unit 3) of the relay device 2 discards the relay target data (S3051). When it is determined that the period is not a buffering target period, that is, when the current time is not included in the buffering target period for the fourth control unit 34, the first control unit 31 of the relay device 2 discards the relay target data in the same manner as the process S1061 of the first embodiment.

[0101] (Embodiment 4) FIG. 11 is a flowchart illustrating the processing of the control unit 3 of the relay device 2 according to the fourth embodiment (buffering mode selection). Similar to the first embodiment, when, for example, the vehicle C is in the startup state (IG switch 8 is on), the control unit 3 of the relay device 2 constantly performs the following processing.

[0102] The first control unit 31 (control unit 3) of the relay device 2 executes an initialization process (S401). The first control unit 31 of the relay device 2 performs the process of S401 in the same manner as S101 of the first embodiment.

[0103] The first control unit 31 (control unit 3) of the relay device 2 identifies the selected buffering mode (S402). The relay device 2 includes a plurality of buffering modes for identifying a part to be written when writing a part of the acquired relay target data to the shared area 41. These plurality of buffering modes are, for example, based on the buffering process in each of the above-described embodiments. The plurality of buffering modes include, for example, a priority mode, a latest value mode, and an immediately before initialization completion mode, and a flag value indicating the currently selected buffering mode is stored in the storage unit 4.

[0104] The first control unit 31 of the relay device 2 identifies the currently selected buffering mode, for example, by referring to the flag value stored in the storage unit 4. The buffering mode (flag value) may be selected (set), for example, based on an input value by an operator of the vehicle C in which the relay device 2 is mounted. Alternatively, the buffering mode (flag value) may be selected (set), for example, based on a signal transmitted from an external server S1 operated and managed by the vehicle C manufacturer. By allowing variable setting of the buffering mode in this way, buffering processing to the shared area 41 can be performed in an appropriate buffering mode for the vehicle C.

[0105] The first control unit 31 (control unit 3) of the relay device 2 performs buffering in the selected buffering mode (S403). The plurality of buffering modes include, for example, a priority mode, a latest value mode, and an immediate before initialization completion mode.

[0106] When the priority mode is selected, the first control unit 31 of the relay device 2 writes relay target data with a predetermined priority or higher among the acquired relay target data to the shared area 41. The processing of the first control unit 31 in the priority mode may perform the processing S102 to S106 of the first embodiment, for example.

[0107] When the latest value mode is selected, the first control unit 31 of the relay device 2 writes the latest relay target data among the plurality of relay target data of the same type (for example, the same CAN ID) to the shared area 41 when the acquired relay target data includes a plurality of relay target data of the same type. The processing of the first control unit 31 in the latest value mode and the priority mode may perform the processing S202 to S205 of the second embodiment, for example.

[0108] When the mode immediately before completion of initialization is selected, the first control unit 31 of the relay device 2 writes the acquired relay target data to the shared area 41 during the buffering target period specified by the start time of the relay process of other control units 3 for which the initialization process has not been completed. The process of the first control unit 31 in the mode immediately before completion of initialization may perform the processes S302 to S306 of the third embodiment, for example.

[0109] The number of buffering modes to be selected is not limited to one (singular), and a plurality of buffering modes may be selected. When two or more buffering modes are selected for the first control unit 31 of the relay device 2, a part of the acquired relay target data is written to the shared area 41 according to the combination of these two or more selected buffering modes.

[0110] All the embodiments disclosed this time should be considered as illustrative in all respects and not restrictive. The scope of the present invention is shown not by the above meaning but by the claims, and it is intended that all modifications within the meaning and scope equivalent to the claims are included.

Explanation of Signs

[0111] C Vehicle S In-vehicle system S1 External server 1 Vehicle exterior communication device 11 Antenna 2 Relay device 21 Input / output I / F 3 Control unit 31 First control unit (Core1) 32 Second control unit (Core2) 33 Third control unit (Core3) 34 Fourth control unit (Core4) 4 Storage unit 41 Shared area 400 Recording medium P Control program (program product) 5 In-vehicle communication unit 51 CAN communication unit 52 Ethernet communication unit 6 In-vehicle ECU 7 In-vehicle network 71 Communication line 711 Ethernet cable 712 CAN bus 8 IG switch

Claims

1. A relay device mounted on a vehicle and relaying data transmitted and received between a plurality of in-vehicle ECUs, comprising: a plurality of communication units for communicating with each of the in-vehicle ECUs; a plurality of control units corresponding to each of the plurality of communication units; a storage unit accessible from each of the plurality of control units, each of the plurality of control units performs an initialization process separately, when the control unit that has completed the initialization process acquires relay target data to be relayed via the communication unit corresponding to another control unit for which the initialization process has not been completed, a part of the acquired relay target data is written into a shared area shared with the other control unit for which the initialization process has not been completed, and stored in the storage unit Relay device.

2. The control unit that has completed the initialization process writes relay target data having a predetermined priority or higher among the acquired relay target data into the shared area The relay device according to claim 1.

3. The relay target data is a CAN message, the control unit that has completed the initialization process specifies the priority of the relay target data according to the CAN-ID included in the relay target data The relay device according to claim 2.

4. When the plurality of relay target data acquired by the control unit that has completed the initialization process includes the same type of relay target data, the latest relay target data among the same type of relay target data is written into the shared area The relay device according to claim 1.

5. The relay target data is a CAN message, the control unit that has completed the initialization process determines whether the relay target data is of the same type based on the CAN-ID included in the relay target data The relay device according to claim 4.

6. The control unit that has completed the initialization process writes the acquired relay target data into the shared area during a buffering target period specified by the start time of the relay process of the other control unit for which the initialization process has not been completed The relay device according to claim 1.

7. The buffering target period is determined based on the transmission cycle of the relay target data The relay device according to claim 6.

8. When writing a part of the acquired relay target data into the shared area, the relay device includes a plurality of buffering modes for specifying a part to be written The control unit that has completed the initialization process writes a part of the acquired relay target data to the shared area according to one or more selected buffering modes among the plurality of buffering modes. The relay device according to any one of claims 1 to 7.

9. Mounted on a vehicle, relays data transmitted and received between a plurality of in-vehicle ECUs, A plurality of communication units for communicating with each of the in-vehicle ECUs, A plurality of control units corresponding to each of the plurality of communication units, A computer including a storage unit accessible from each of the plurality of control units, Each of the plurality of control units performs an initialization process separately, When a control unit that has completed the initialization process acquires relay target data to be relayed via a communication unit corresponding to another control unit for which the initialization process has not been completed, a part of the acquired relay target data is written to a shared area shared with the other control unit for which the initialization process has not been completed, and is stored in the storage unit. A program for executing the process.

10. Mounted on a vehicle, relays data transmitted and received between a plurality of in-vehicle ECUs, A plurality of communication units for communicating with each of the in-vehicle ECUs, A plurality of control units corresponding to each of the plurality of communication units, A computer including a storage unit accessible from each of the plurality of control units, Each of the plurality of control units performs an initialization process separately, When a control unit that has completed the initialization process acquires relay target data to be relayed via a communication unit corresponding to another control unit for which the initialization process has not been completed, a part of the acquired relay target data is written to a shared area shared with the other control unit for which the initialization process has not been completed, and is stored in the storage unit. A relay method for executing the process.

Citation Information

Patent Citations

  • Link type multiprocessor monitoring method

    JP1993143562A

  • Communication device and program

    JP2014179838A

  • Relaying apparatus and method and program for relaying

    JP2017097851A

  • Onboard relay device, information processing method, and program

    WO2021192961A1