Relay device, relay method, and relay program
The relay device addresses flooding in in-vehicle networks by dynamically switching update states based on network changes, reducing communication load through timely MAC address table updates.
Patent Information
- Application Number
- JP2025152186
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-07-27
- Filing Date
- 2025-09-12
- Publication Date
- 2025-12-03
AI Technical Summary
In relay devices, the MAC address table is reset if there is no communication for a certain period, leading to flooding, which is particularly problematic in resource-constrained in-vehicle networks.
A relay device with a status monitoring unit that switches between update states based on network changes, storing updated correspondence information for use in a stopped state to prevent flooding and reduce communication load.
This approach suppresses flooding and reduces communication load in in-vehicle networks by updating MAC address tables at appropriate times, ensuring efficient frame relay processing.
Smart Images

Figure 2025176139000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a relay device, a relay method, and a relay program. This application claims priority based on Japanese Patent Application No. 2022-119354, filed on July 27, 2022, the disclosure of which is incorporated herein in its entirety. [Background technology]
[0002] User's Manual of IGS-801M 4.11.4 Dynamic Learned, March 2016, PLANET Networking & Communication, [Retrieved June 6, 2022], Internet,<URL:http: / / www.planet.com.tw / storage / products / 25685 / EM-IGS-801M_v2.1.pdf> (Non-Patent Document 1), and S1700 Managed Series Ethernet Switches V100R007C00 Web User Manual, October 25, 2012, [online], HUAWEI, [Retrieved June 6, 2022], Internet,<URL:https: / / www.manualslib.com / manual / 966836 / Huawei-S1700-Series.html?page=60#manual> Non-Patent Document 2 discloses a relay device that updates a MAC (Media Access Control) address table and relays frames using the updated MAC address table. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] User's Manual of IGS-801M 4.11.4 Dynamic Learned, [online], Revised March 2016, PLANET Networking & Communication, [Retrieved June 6, 2022], Internet,<URL:http: / / www.planet.com.tw / storage / products / 25685 / EM-IGS-801M_v2.1.pdf> [Non-patent document 2] S1700 Managed Series Ethernet Switches V100R007C00 Web User Manual, October 25, 2012, [online], HUAWEI, [Retrieved June 6, 2022], Internet,<URL:https: / / www.manualslib.com / manual / 966836 / Huawei-S1700-Series.html?page=60#manual> Summary of the Invention
[0004] The relay device of the present disclosure is a relay device that performs frame relay processing between multiple functional units in an in-vehicle network, and includes: multiple communication ports; a memory unit that stores correspondence information used in the relay processing, the correspondence information indicating the correspondence relationship between the destination MAC address included in the frame and the communication port; a status monitoring unit that monitors the status of the in-vehicle network; an update unit that performs update processing of the correspondence information; and a switching unit that switches between a stopped state in which the update processing is stopped and an execution state in which the update processing is executed, the switching unit switching from the stopped state to the execution state when a change in the status of the in-vehicle network is detected by the status monitoring unit; and a storage unit that, when the switching unit switches from the execution state to the stopped state, stores the correspondence information for which the update processing was performed in the execution state in the memory unit as the correspondence information to be used for the relay processing in the stopped state.
[0005] One aspect of the present disclosure can be realized not only as a relay device having such a characteristic processing unit, but also as a semiconductor integrated circuit that realizes part or all of the relay device, or as a system that includes the relay device. [Brief explanation of the drawings]
[0006] [Figure 1] FIG. 1 is a diagram illustrating an example of a configuration of an in-vehicle communication system according to an embodiment of the present disclosure. [Figure 2] FIG. 2 is a diagram illustrating an example of a configuration of a relay device according to an embodiment of the present disclosure. [Figure 3] FIG. 3 is a diagram illustrating an example of a frame transmitted in the in-vehicle communication system according to the embodiment of the present disclosure. [Figure 4] FIG. 4 is a diagram illustrating an example of a table held by each relay device in the in-vehicle communication system according to the embodiment of the present disclosure. [Figure 5] FIG. 5 is a diagram illustrating an example of frame relay when a table update process is performed in the in-vehicle communication system according to the embodiment of the present disclosure. [Figure 6] FIG. 6 is a diagram illustrating an example of a table in an execution state of the in-vehicle communication system according to the embodiment of the present disclosure. [Figure 7] FIG. 7 is a diagram illustrating an example of a table after switching the in-vehicle communication system according to the embodiment of the present disclosure to a stopped state. [Figure 8] FIG. 8 is a flowchart illustrating an operation procedure when a relay device in an in-vehicle communication system according to an embodiment of the present disclosure executes a table update process. [Figure 9] FIG. 9 is a diagram illustrating a sequence of relay processing in the in-vehicle communication system according to the embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0007] Conventionally, in Ethernet (registered trademark), a technique for updating a MAC address table that indicates the correspondence between destination MAC addresses and communication ports is known.
[0008] [Problem to be solved by this disclosure] In a relay device, the contents of the MAC address table are reset if there has been no communication for a certain period of time, which can cause flooding, in which a unicast frame received at a certain communication port is output from all communication ports other than the one in question.The impact of flooding on relay devices is particularly significant in in-vehicle networks, where resources are limited.
[0009] The present disclosure has been made to solve the above-mentioned problems, and an object of the present disclosure is to provide a relay device, a relay method, and a relay program that can reduce the communication load in an in-vehicle network.
[0010] [Effects of this disclosure] According to the present disclosure, the communication load on an in-vehicle network can be reduced.
[0011] [Description of the embodiments of the present disclosure] First, the contents of the embodiments of the present disclosure will be listed and described. (1) A relay device according to an embodiment of the present disclosure is a relay device that performs a relay process of a frame between a plurality of functional units in an in-vehicle network, and includes a plurality of communication ports, a memory unit that stores correspondence information used in the relay process, the correspondence information indicating a correspondence relationship between a destination MAC address included in the frame and the communication port, a status monitoring unit that monitors the status of the in-vehicle network, an update unit that performs an update process of the correspondence information, and a switching unit that switches between a stopped state in which the update process is stopped and an running state in which the update process is executed, the switching unit switching from the stopped state to the running state when a change in the status of the in-vehicle network is detected by the status monitoring unit, and a storage unit that stores the correspondence information, for which the update process was performed in the running state, in the memory unit as the correspondence information to be used for the relay process in the stopped state when the switching unit switches from the running state to the stopped state.
[0012] In this way, by switching to the running state when the state of the in-vehicle network changes, storing the correspondence information updated in the running state, and using it for relay processing in the stopped state, it is possible to suppress the occurrence of flooding in the in-vehicle network while updating the correspondence information at an appropriate time, thereby reducing the communication load on the in-vehicle network.
[0013] (2) In the above (1), the change may be the addition of the functional unit to the in-vehicle network.
[0014] With this configuration, the correspondence information can be updated at an appropriate timing, such as when a new in-vehicle network is constructed.
[0015] (3) In the above (1) or (2), the switching unit may switch to the stopped state when a predetermined time has elapsed since switching to the running state.
[0016] With this configuration, the timing for switching from the running state to the stopped state can be determined by simple processing.
[0017] (4) In any of (1) to (3) above, the status monitoring unit may detect the change caused by the functional unit, and the update unit may perform the update process based on a predetermined frame transmitted from the functional unit that caused the change.
[0018] With this configuration, for example, the correspondence information can be updated using a frame according to an existing protocol that is transmitted by a functional unit that has caused a change in the state of the in-vehicle network to establish a communication connection with another functional unit. Therefore, the correspondence information can be updated while realizing Quality of Service (QoS) processing that prioritizes transmission of frames with higher priority.
[0019] (5) A relay method according to an embodiment of the present disclosure is a relay method in a relay device that relays frames between multiple functional units in an in-vehicle network and includes multiple communication ports and a memory unit that stores correspondence information used in the relay process, the correspondence information indicating the correspondence between a destination MAC address included in the frame and the communication port, and includes the steps of: monitoring the state of the in-vehicle network; when a change in the state of the in-vehicle network is detected, switching from a stopped state in which an update process of the correspondence information is stopped to an running state in which the update process is performed; performing the update process in the running state; and when switching from the running state to the stopped state, storing in the memory unit the correspondence information for which the update process was performed in the running state as correspondence information to be used for the relay process in the stopped state.
[0020] In this way, by switching to the running state when the state of the in-vehicle network changes, storing the correspondence information updated in the running state, and using it for relay processing in the stopped state, it is possible to suppress the occurrence of flooding in the in-vehicle network while updating the correspondence information at an appropriate time, thereby reducing the communication load on the in-vehicle network.
[0021] (6) A relay program according to an embodiment of the present disclosure is a relay program used in a relay device that relays frames between multiple functional units in an in-vehicle network and includes multiple communication ports and a memory unit that stores correspondence information used in the relay processing, the correspondence information indicating the correspondence between the destination MAC address included in the frame and the communication port. The relay program causes a computer to function as a status monitoring unit that monitors the status of the in-vehicle network, an update unit that performs an update process on the correspondence information, and a switching unit that switches between a stopped state in which the update process is stopped and an running state in which the update process is executed, the switching unit switching from the stopped state to the running state when a change in the status of the in-vehicle network is detected by the status monitoring unit, and a storage unit that stores the correspondence information updated by the update unit in the running state in the memory unit as the correspondence information to be used for the relay processing in the stopped state when the switching unit switches from the running state to the stopped state.
[0022] In this way, by switching to the running state when the state of the in-vehicle network changes, storing the correspondence information updated in the running state, and using it for relay processing in the stopped state, it is possible to suppress the occurrence of flooding in the in-vehicle network while updating the correspondence information at an appropriate time, thereby reducing the communication load on the in-vehicle network.
[0023] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the drawings, identical or corresponding parts are designated by the same reference numerals, and their description will not be repeated. Furthermore, at least some of the embodiments described below may be combined in any manner.
[0024] [Configuration of in-vehicle communication system] FIG. 1 is a diagram illustrating an example of a configuration of an in-vehicle communication system according to an embodiment of the present disclosure.
[0025] 1, an in-vehicle communication system 301 is mounted on a vehicle 501. The in-vehicle communication system 301 includes, for example, one or more in-vehicle ECUs (Electronic Control Units) 202 and one or more relay devices 101.
[0026] 1, the in-vehicle communication system 301 includes in-vehicle ECUs 202A, 202B, and 202C that are in-vehicle ECUs 202, and relay devices 101A, 101B, and 101C that are relay devices 101. The in-vehicle ECU 202 is an example of a functional unit.
[0027] The in-vehicle communication system 301 is not limited to a configuration including three in-vehicle ECUs 202, but may be configured to include one or more in-vehicle ECUs 202. The in-vehicle communication system 301 is not limited to a configuration including three relay devices 101, but may be configured to include one or more relay devices 101.
[0028] The in-vehicle ECU 202 is an autonomous driving ECU, a sensor, a navigation device, a TCU (Telematics Communication Unit), a human-machine interface, a camera, and the like.
[0029] The in-vehicle ECU 202 and the relay device 101 configure an in-vehicle network 401. In the in-vehicle network 401, the in-vehicle ECU 202 is connected to the relay device 101 via an Ethernet cable 11, for example.
[0030] Each vehicle-mounted ECU 202 and each relay device 101 is connected to another vehicle-mounted ECU 202 or another relay device 101 via an Ethernet cable 11 and a communication port 51 (to be described later).
[0031] The relay device 101 is, for example, a gateway device, and is capable of performing relay processing according to, for example, Layer 2 and Layer 3, which is higher than Layer 2.
[0032] Between the in-vehicle ECU 202 and the relay device 101, information is exchanged using, for example, Ethernet frames (hereinafter also simply referred to as "frames") that comply with the Ethernet communication standard.
[0033] The in-vehicle communication system 301 is not limited to a configuration in which frame relay processing is performed in accordance with the Ethernet communication standard, and may be a configuration in which frame relay processing is performed in accordance with another communication standard.
[0034] The relay device 101 relays frames between a plurality of in-vehicle ECUs 202 in the in-vehicle network 401. More specifically, the relay device 101 transmits a frame received from a certain in-vehicle ECU 202 to another in-vehicle ECU 202 as the destination.
[0035] Hereinafter, a functional unit newly added to the in-vehicle network 401 will also be referred to as a new functional unit. The in-vehicle network 401 including the new functional unit will also be referred to as a new network, and the in-vehicle network 401 before the new functional unit is added will also be referred to as an existing network. The functional unit included in the existing network will also be referred to as an existing functional unit.
[0036] In Fig. 1, the in-vehicle ECU 202C is an example of a new function unit, and the in-vehicle ECUs 202A and 202B are examples of existing function units. Fig. 1 also shows an existing network in which the in-vehicle ECU 202C and the relay device 101C are not yet connected.
[0037] [Relay device configuration] 2 is a diagram illustrating an example of a configuration of a relay device according to an embodiment of the present disclosure. The configuration of relay devices 101C is shown in FIG. 2. The configurations of relay devices 101A and 101B are the same as the configuration of relay device 101C.
[0038] 1 and 2, relay device 101 includes a plurality of communication ports 51, a relay unit 52, a storage unit 53, an update unit 54, a status monitoring unit 55, a switching unit 56, and a saving unit 57.
[0039] The relay unit 52, the update unit 54, the status monitoring unit 55, the switching unit 56, and the storage unit 57 may all or partly be realized by a processing circuit including one or more processors. The storage unit 53 may be a non-volatile memory included in the processing circuit.
[0040] The communication port 51 is a terminal to which, for example, an Ethernet cable 11 can be connected. The communication port 51 is connected to the in-vehicle ECU 202 via the Ethernet cable 11.
[0041] 1 and 2, the relay device 101C includes four communication ports 51A, 51B, 51C, and 51D, which are communication ports 51. In the relay device 101C, the relay device 101A is connected to the communication port 51A via an Ethernet cable 11, and the in-vehicle ECU 202C is connected to the communication port 51C via the Ethernet cable 11.
[0042] The relay device 101C is not limited to a configuration having four communication ports 51, but may be a configuration having two or more communication ports 51.
[0043] The relay unit 52 has, for example, a plurality of terminals (not shown) that are respectively connected to the plurality of communication ports 51. A unique port number is assigned to each terminal.
[0044] Here, the port numbers of the terminals connected to the communication ports 51A, 51B, 51C, and 51D are #1, #2, #3, and #4, respectively.
[0045] The relay unit 52 receives a frame transmitted from the in-vehicle ECU 202 or another relay device 101 via the communication port 51, and outputs the frame to another unit.
[0046] The relay unit 52 transmits a frame received from another unit to the destination in-vehicle ECU 202 or another relay device 101 via the communication port 51 .
[0047] FIG. 3 is a diagram illustrating an example of a frame transmitted in the in-vehicle communication system according to the embodiment of the present disclosure.
[0048] Referring to FIG. 3, a frame has a header and a payload.
[0049] The header stores, for example, a destination MAC address, a source MAC address, and a type, while the payload stores a destination IP address and various other information.
[0050] Here, the MAC addresses of the in-vehicle ECU 202A, the in-vehicle ECU 202B, and the in-vehicle ECU 202C are "MAC-A," "MAC-B," and "MAC-C," respectively.
[0051] 2 again, the storage unit 53 stores a MAC address table (hereinafter also referred to as "table T") used in the relay process. Table T indicates the correspondence relationship between the destination MAC address included in the frame and the communication port 51. Table T is an example of correspondence information.
[0052] More specifically, table T indicates the correspondence between the MAC address of the in-vehicle ECU 202 that is the destination of the frame and the port number of the terminal that is connected to the in-vehicle ECU 202.
[0053] FIG. 4 is a diagram illustrating an example of a table held by each relay device in the in-vehicle communication system according to the embodiment of the present disclosure.
[0054] 4, table Ta is table T stored in storage unit 53 of relay device 101A in the existing network. Table Tb is table T in storage unit 53 of relay device 101B in the existing network. Table Tc is table T in storage unit 53 of relay device 101C in the existing network.
[0055] For example, in table Ta, a destination MAC address "MAC-A" is associated with port number "#1," and a destination MAC address "MAC-B" is associated with port number "#4." In table Tb, a destination MAC address "MAC-A" is associated with port number "#1," and a destination MAC address "MAC-B" is associated with port number "#2." In table Tc, a destination MAC address "MAC-A" is associated with port number "#1," and a destination MAC address "MAC-B" is associated with port number "#1." The "discrimination information" shown in FIG. 4 will be described later.
[0056] 2 and 4, relay unit 52 in each relay device 101 relays frames transmitted and received between in-vehicle ECUs 202. In FIG.
[0057] More specifically, the relay unit 52 refers to the table T stored in the storage unit 53, and identifies the port number corresponding to the destination MAC address included in the received frame. Then, the relay unit 52 transmits the received frame to the destination in-vehicle ECU 202 from the communication port 51 corresponding to the identified port number.
[0058] For example, when the relay unit 52 in the relay device 101C receives a frame addressed to the in-vehicle ECU 202A, i.e., a frame including the destination MAC address "MAC-A," the relay unit 52 refers to the table Tc shown in Fig. 4 and identifies the port number "#1" corresponding to the destination MAC address "MAC-A." Then, the relay device 101C transmits the frame addressed to the in-vehicle ECU 202A from the communication port 51A.
[0059] The functions of the update unit 54, the state monitoring unit 55, the switching unit 56, and the storage unit 57 will be described later.
[0060] [Problem description] Incidentally, consumer relay devices that perform relay processing using a MAC address table are known. The above-mentioned Non-Patent Documents 1 and 2 disclose a technique for displaying on a screen a dynamic MAC address table, which is a MAC address table updated by the relay device. The above-mentioned Non-Patent Documents 1 and 2 also disclose a technique for a user to save the dynamic table displayed on the screen as a static MAC address table, which is a table used for relay processing when updates are stopped.
[0061] However, in the relay device 101, entries in the table T that have not had communication for a certain period of time, i.e., the above-mentioned correspondence relationships, are reset, which may cause flooding. Here, flooding refers to a situation in which a unicast frame received at a certain communication port 51 is output from all communication ports 51 other than the communication port 51. Since resources are limited in the in-vehicle network 401, the impact of flooding on the relay device 101 becomes significant.
[0062] In contrast, a relay device according to an embodiment of the present disclosure solves the above problem by using the following configuration and operation.
[0063] [Relay device configuration] 2 again, the state monitoring unit 55 in the relay device 101C monitors the state of the in-vehicle network 401. More specifically, for example, the state monitoring unit 55 detects a change in the state of the in-vehicle network 401 caused by the in-vehicle ECU 202. Here, the state monitoring unit 55 detects, as the state of the in-vehicle network 401, the addition of a new function unit to the in-vehicle network 401, specifically the addition of the in-vehicle ECU 202C.
[0064] For example, the in-vehicle ECU 202C transmits connection request information for requesting a communication connection in the in-vehicle network 401 to the relay device 101C.
[0065] The relay unit 52 in the relay device 101C outputs the connection request information received from the in-vehicle ECU 202C to the state monitoring unit 55.
[0066] When the state monitoring unit 55 receives the connection request information from the relay unit 52, it detects the in-vehicle ECU 202C that is the sender of the connection request information.
[0067] More specifically, the state monitoring unit 55 receives a frame including connection request information from the in-vehicle ECU 202C via the relay unit 52, and performs authentication processing for the in-vehicle ECU 202C using the ID and authentication password included in the frame.
[0068] When the state monitoring unit 55 has successfully authenticated the in-vehicle ECU 202C, the state monitoring unit 55 transmits a frame including authentication success information indicating that the authentication has been successful to the in-vehicle ECU 202C via the relay unit 52.
[0069] The status monitoring unit 55 may be configured to periodically broadcast a search message for detecting a new function unit via the relay unit 52. In this case, the new function unit receives the search message and transmits the connection request information in response to the received search message.
[0070] Furthermore, the status monitoring unit 55 is not limited to a configuration that detects the addition of a new functional unit to the in-vehicle network 401 as a change in the status of the in-vehicle network 401, but may also detect a change in the communication port 51 to which an existing functional unit is connected, or may detect some other event in the in-vehicle network 401.
[0071] The update unit 54 performs update processing (hereinafter also referred to as "table update processing") of the table T. More specifically, the update unit 54 switches between a stop state in which the table update processing is stopped and an execution state in which the table update processing is executed, under the control of the switching unit 56, which will be described later.
[0072] The switching unit 56 switches between a stopped state and an executing state. More specifically, the switching unit 56 switches from the stopped state to the executing state when the state monitoring unit 55 detects a change in the state of the in-vehicle network 401. Here, the switching unit 56 switches from the stopped state to the executing state when the state monitoring unit 55 detects that a new function unit has been added to the in-vehicle network 401.
[0073] Specifically, when the state monitoring unit 55 has successfully authenticated the in-vehicle ECU 202C, it outputs a switching request notification to request switching from the stopped state to the running state to the switching unit 56. Upon receiving the switching request notification from the state monitoring unit 55, the switching unit 56 switches from the stopped state to the running state.
[0074] Furthermore, the state monitoring unit 55 in the relay device 101C transmits the switching request notification to the relay devices 101A and 101B via the relay unit 52. The relay units 52 in the relay devices 101A and 101B output the switching request notification received from the relay device 101C to the switching unit 56. Upon receiving the switching request notification from the relay unit 52, the switching units 56 in the relay devices 101A and 101B switch from the stopped state to the running state. This allows all relay devices 101 in the in-vehicle network 401 to switch to the running state.
[0075] In the execution state, the update unit 54 performs the table update process based on a predetermined frame (hereinafter also referred to as "frame F") transmitted from the in-vehicle ECU 202C that caused a change in the state of the in-vehicle network 401. For example, the update unit 54 performs the table update process based on the frame F transmitted from the in-vehicle ECU 202C.
[0076] FIG. 5 is a diagram illustrating an example of frame relay when a table update process is performed in the in-vehicle communication system according to the embodiment of the present disclosure.
[0077] 2 and 5, the in-vehicle ECU 202C broadcasts a frame F. Each relay device 101 transmits the frame F from all communication ports 51 except the communication port 51 from which the frame F was received. That is, each relay device 101 floods the frame F. As a result, the in-vehicle ECUs 202A and 202B receive the frame F from the in-vehicle ECU 202C via the relay device 101.
[0078] The in-vehicle ECU 202C may broadcast, as the frame F, a frame storing a message conforming to an existing protocol for establishing a communication connection with the other in-vehicle ECUs 202A and 202B.
[0079] For example, the in-vehicle ECU 202C may broadcast a DHCP request frame according to the Dynamic Host Configuration Protocol (DHCP) as frame F. The in-vehicle ECU 202C may also broadcast a frame storing an Offer message according to SOME / IP, which is a protocol of the application layer of the Ethernet protocol suite, as frame F.
[0080] Furthermore, the frame F is not limited to a frame conforming to an existing protocol, but may be a frame dedicated to table update processing.
[0081] Furthermore, the in-vehicle ECU 202C is not limited to a configuration in which the frame F is broadcast, but may be a configuration in which the frame F is multicast or unicast.
[0082] Furthermore, when the state monitoring unit 55 detects a change in the state of the in-vehicle network 401, the switching unit 56 may transmit a frame request notification for requesting transmission of a frame F to the in-vehicle ECU 202C via the relay unit 52. In response to the frame request notification, the in-vehicle ECU 202C transmits a frame F including its own source MAC address to the relay device 101C.
[0083] 2 and 5, when relay unit 52 in relay device 101C receives frame F from in-vehicle ECU 202C, it outputs the received frame F to update unit 54 and notifies update unit 54 of the port number through which frame F was received.
[0084] The update unit 54 in each relay device 101 refers to the table T stored in the storage unit 53 and performs table update processing using the received frame F.
[0085] The update unit 54 learns the correspondence relationship between the destination MAC address and the port number included in the frame addressed to the in-vehicle ECU 202C. More specifically, in the execution state, the update unit 54 reads the source MAC address included in the received frame F, and registers the correspondence relationship between the read source MAC address and the port number received from the relay unit 52 in the table T as the correspondence relationship between the destination MAC address included in the frame addressed to the in-vehicle ECU 202C and the communication port 51 to which the frame is output.
[0086] The update unit 54 is not limited to a configuration that performs the table update process based on the frame F transmitted from the in-vehicle ECU 202C that caused the change. For example, the update unit 54 may perform the table update process based on the correspondence between the MAC address of the in-vehicle ECU 202 that may be added and the communication port 51, which is stored in advance in the storage unit 53.
[0087] The saving unit 57 saves the table T updated in the execution state in the storage unit 53. More specifically, the saving unit 57 saves the table T including the correspondence relationships learned by the update unit 54 in the storage unit 53.
[0088] FIG. 6 is a diagram illustrating an example of a table in an execution state of the in-vehicle communication system according to the embodiment of the present disclosure.
[0089] Referring to FIG. 6, in tables Ta, Tb, and Tc, a correspondence relationship between the destination MAC address "MAC-C" and the port number obtained during execution of the table update process is newly registered.
[0090] For example, in table Ta, the destination MAC address "MAC-C" is associated with port number "#2." In table Tb, the destination MAC address "MAC-C" is associated with port number "#1." In table Tc, the destination MAC address "MAC-C" is associated with port number "#3."
[0091] 4 and 6, the tables Ta, Tb, and Tc contain, in addition to the correspondence between destination MAC addresses and port numbers, discrimination information that indicates whether the correspondence contained in the tables Ta, Tb, and Tc is a correspondence registered in a past execution state or a correspondence registered in the current execution state.
[0092] More specifically, "stopped" in the "determination information" indicates that the correspondence relationship registered in the tables Ta, Tb, and Tc is a correspondence relationship registered in a past execution state. In other words, "stopped" indicates that the registration was made by switching from an execution state to a stopped state in a past table update process.
[0093] Furthermore, "execution" in the "determination information" indicates that the correspondences registered in the tables Ta, Tb, and Tc are correspondences registered in the current execution state.
[0094] As shown in FIG. 4, in the tables Ta, Tb, and Tc stored in the storage unit 53 of each relay device 101 in the existing network, "stop" is set as the "discrimination information" for all correspondence relationships.
[0095] In Figure 6, which shows tables Ta, Tb, and Tc in the execution state, compared to Figure 4, a new correspondence between the destination MAC address "MAC-C" and the port number has been registered, and "execution" has been set as the "discrimination information" for that correspondence.
[0096] FIG. 7 is a diagram illustrating an example of a table after switching the in-vehicle communication system according to the embodiment of the present disclosure to a stopped state.
[0097] For example, the switching unit 56 switches to the stopped state when a predetermined time has elapsed since switching to the running state.
[0098] When the switching unit 56 switches from the running state to the stopped state, the saving unit 57 saves the tables Ta, Tb, and Tc updated in the running state in the memory unit 53 as the tables Ta, Tb, and Tc to be used for relay processing in the stopped state.
[0099] 2 and 7, when the switching unit 56 switches from the running state to the stopped state, the saving unit 57 changes the determination information of the correspondence relationship between the destination MAC address "MAC-C" and the port number in the tables Ta, Tb, and Tc from "running" to "stopped," and saves the changed information in the memory unit 53. That is, each relay device 101 statically holds the updated table T. As a result, the correspondence relationship, for example, with "MAC-C" as the destination MAC address, is maintained without being cleared. Therefore, when the relay device 101 receives a unicast frame addressed to the in-vehicle ECU 202C, the relay device 101 can identify the port number corresponding to the unicast frame. Therefore, flooding in the in-vehicle network 401 can be suppressed.
[0100] For example, when the relay device 101 stores the updated table T in the memory unit 53 and then switches from the stopped state to the running state again, in the running state, the relay device 101 performs frame relay processing using the previously updated table T until the table T is newly updated.
[0101] Note that the switching unit 56 may switch to the stopped state when some event occurs after switching to the running state. For example, the switching unit 56 may switch to the stopped state when it receives a notification in the running state that the update unit 54 has completed the registration of the correspondence relationship and the setting of the discrimination information.
[0102] Furthermore, the storage unit 57 may be configured not to register the correspondence determination information in the table T. In this case, the relay device 101 may, for example, notify all the in-vehicle ECUs 202 in the execution state that a predetermined frame is requested, and update the table T based on the frame received from each of the in-vehicle ECUs 202.
[0103] [Operation flow] FIG. 8 is a flowchart illustrating an operation procedure when a relay device in an in-vehicle communication system according to an embodiment of the present disclosure executes a table update process.
[0104] 8, first, the relay device 101 maintains a stopped state (step S1) until it detects a change in the state of the in-vehicle network 401 (NO in step S2) or receives a switching request notification from another relay device 101 (NO in step S3). Here, it is assumed that the relay device 101 detects the addition of a new function unit as a change in the state of the in-vehicle network 401.
[0105] Next, when the relay device 101 detects the change (YES in step S2) or receives a switching request notification from another relay device 101 (YES in step S3), the relay device 101 switches from the stopped state to the running state (step S4).
[0106] Next, when the relay device 101 receives the frame F from the new function unit (YES in step S5), it refers to the table T in the storage unit 53 and updates the table T using the received frame F.
[0107] Specifically, as described above, the relay device 101 newly registers in table T the correspondence relationship between the source MAC address included in the received frame F and the communication port 51 that received the frame F as the correspondence relationship between the destination MAC address included in the frame addressed to the new functional unit and the communication port 51 to which the frame is output. Furthermore, the relay device 101 sets "execute" as the determination information for the correspondence relationship in table T. Note that if the correspondence relationship corresponding to the frame F has already been registered in table T, the relay device 101 does not update table T (step S6).
[0108] Next, the relay device 101 waits for a frame F until a predetermined time has elapsed since switching to the running state (NO in step S7), and when the predetermined time has elapsed (YES in step S7), it switches to the stopped state (step S8).
[0109] Next, the relay device 101 saves the table T updated in the running state as the table T to be used for relay processing in the stopped state. Specifically, as shown in FIG. 7 above, the relay device 101 saves the table T in which the newly registered correspondence determination information has been changed from "running" to "stopped" (step S9).
[0110] FIG. 9 is a diagram illustrating a sequence of relay processing in the in-vehicle communication system according to the embodiment of the present disclosure.
[0111] 9, first, the relay device 101C maintains a stopped state (step S11) until it detects a change in the state of the in-vehicle network 401 (NO in step S13). Here, it is assumed that the relay device 101C detects the addition of the in-vehicle ECU 202C to the in-vehicle network 401 as a change in the state of the in-vehicle network 401.
[0112] Next, when the relay device 101C detects the above change (YES in step S13), it switches from the stopped state to the running state (step S14).
[0113] Next, relay device 101C transmits a switching request notification to relay devices 101A and 101B (step S15).
[0114] Next, when relay devices 101A and 101B receive a switching request notification from relay device 101C in the stopped state (step S12), they switch from the stopped state to the running state (step S16).
[0115] Next, the in-vehicle ECU 202C transmits the frame F to the relay device 101C (step S17).
[0116] Next, when the relay device 101C receives the frame F from the in-vehicle ECU 202C, it transmits the received frame F to the relay devices 101A and 101B (step S18).
[0117] Next, the relay device 101C refers to the table Tc in the storage unit 53 and updates the table Tc using the received frame F. Furthermore, upon receiving the frame F from the relay device 101C, the relay devices 101A and 101B refer to the tables Ta and Tb in the storage unit 53 and update the tables Ta and Tb using the received frame F.
[0118] Specifically, as described above, each relay device 101 newly registers in table T the correspondence relationship between the source MAC address included in the received frame F and the communication port 51 that received the frame F as the correspondence relationship between the destination MAC address included in the frame addressed to the new functional unit and the communication port 51 to which the frame is output. Furthermore, each relay device 101 sets "execute" as the determination information for the correspondence relationship in table T (steps S19 and S20).
[0119] Next, each relay device 101 switches to a stopped state after a predetermined time has elapsed (steps S21 and S22).
[0120] Next, each relay device 101 saves the table T updated in the running state as a table T to be used for relay processing in the stopped state. Specifically, as shown in FIG. 7 above, each relay device 101 changes the determination information of the newly registered correspondence relationship in table T from "running" to "stopped" (steps S23 and S24).
[0121] Next, each in-vehicle ECU 202 in the in-vehicle communication system 301 transmits and receives frames to and from other in-vehicle ECUs 202 via each relay device 101 (step S25).
[0122] Each process (each function) in the above-described embodiments is realized by a processing circuit including one or more processors. The processing circuit may be configured as an integrated circuit or the like that combines one or more memories, various analog circuits, and various digital circuits in addition to the one or more processors. The one or more memories store programs (instructions) that cause the one or more processors to execute each of the processes. The one or more processors may execute each of the processes according to the programs read from the one or more memories, or according to logic circuits pre-designed to execute each of the processes. The processor may be various processors suitable for computer control, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a field programmable gate array (FPGA), and an application-specific integrated circuit (ASIC). Note that the physically separate processors may cooperate with each other to execute each of the processes. For example, the processors mounted on a plurality of physically separated computers may cooperate with each other to execute the above processes via a network such as a LAN (Local Area Network), a WAN (Wide Area Network), the Internet, etc. The program may be installed into the memory from an external server device or the like via the network, or may be distributed in a state stored on a recording medium such as a CD-ROM (Compact Disc Read Only Memory), a DVD-ROM (Digital Versatile Disc Read Only Memory), or a semiconductor memory, and installed into the memory from the recording medium.
[0123] The above-described embodiments should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is defined by the claims, not by the above description, and is intended to include all modifications within the meaning and scope of the claims.
[0124] The above description includes the following additional features. [Appendix 1] A relay device that performs a relay process of a frame between a plurality of functional units in an in-vehicle network, A plurality of communication ports; a storage unit that stores correspondence information used in the relay process, the correspondence information indicating a correspondence relationship between a destination MAC address included in the frame and the communication port; a status monitoring unit that monitors the status of the in-vehicle network; an update unit that performs an update process of the correspondence information; a switching unit that switches between a stop state in which the update process is stopped and an execution state in which the update process is executed, the switching unit switching from the stop state to the execution state when the state monitoring unit detects a change in the state of the in-vehicle network; a storage unit configured to store, when the switching unit switches from the running state to the stopped state, the correspondence information for which the update process was performed in the running state in the storage unit as the correspondence information to be used in the relay process in the stopped state; The storage unit stores in the memory unit discrimination information indicating whether the correspondence is the correspondence registered in the past execution state or the correspondence registered in the current execution state.
[0125] [Appendix 2] A relay device that performs a relay process of a frame between a plurality of functional units in an in-vehicle network, A plurality of communication ports; a storage unit that stores correspondence information used in the relay process, the correspondence information indicating a correspondence relationship between a destination MAC address included in the frame and the communication port; a processing circuit; The processing circuitry monitor the status of the in-vehicle network; When a change in the state of the in-vehicle network is detected, the state is switched from a stop state in which the update process of the correspondence information is stopped to an execution state in which the update process is executed; performing an update process of the correspondence information in the execution state; When switching from the running state to the stopped state, the relay device stores the correspondence information that has been updated in the running state in the storage unit as the correspondence information to be used for the relay process in the stopped state. [Explanation of symbols]
[0126] 11 Ethernet cable 51, 51A, 51B, 51C, 51D communication ports 52 Relay Section 53 Memory section 54 Update section 55 Status monitoring unit 56 Switching section 57 Preservation Department 101, 101A, 101B, 101C repeater 202,202A,202B,202C Automotive ECU 301 In-Vehicle Communication System 401 In-Vehicle Network 501 vehicles
Claims
1. A relay device that performs a relay process of a frame between a plurality of functional units in an in-vehicle network, A plurality of communication ports; a storage unit that stores correspondence information used in the relay process, the correspondence information indicating a correspondence relationship between a destination MAC address included in the frame and the communication port; a status monitoring unit that monitors the status of the in-vehicle network; an update unit that performs an update process of the correspondence information; a switching unit that switches between a stop state in which the update process is stopped and an execution state in which the update process is executed, the switching unit switching from the stop state to the execution state when the state monitoring unit detects a change in the state of the in-vehicle network; a storage unit that, when the switching unit switches from the running state to the stopped state, stores the correspondence information for which the update process was performed in the running state in the memory unit as the correspondence information to be used for the relay process in the stopped state.
2. The relay device according to claim 1 , wherein the change is the addition of the functional unit to the in-vehicle network.
3. The relay device according to claim 1 , wherein the switching unit switches the state to the stopped state when a predetermined time has elapsed since the switching to the running state.
4. the state monitoring unit detects the change caused by the functional unit; The relay device according to claim 1 , wherein the update unit performs the update process based on a predetermined frame transmitted from the functional unit that caused the change.
5. A relay method for a relay device that relays frames between a plurality of functional units in an in-vehicle network, the relay device including a plurality of communication ports and a storage unit that stores correspondence information used in the relay process, the correspondence information indicating a correspondence relationship between a destination MAC address included in the frame and the communication port, the method comprising: monitoring the status of the in-vehicle network; When a change in the state of the in-vehicle network is detected, switching from a stop state in which the update process of the correspondence information is stopped to an execution state in which the update process is executed; performing the update process in the execution state; When switching from the running state to the stopped state, the correspondence information for which the update process was performed in the running state is stored in the storage unit as correspondence information to be used for the relay process in the stopped state.
6. A relay program used in a relay device that relays frames between a plurality of functional units in an in-vehicle network, the relay device including a plurality of communication ports and a storage unit that stores correspondence information used in the relay process, the correspondence information indicating a correspondence relationship between a destination MAC address included in the frame and the communication port, the relay program comprising: Computer, a status monitoring unit that monitors the status of the in-vehicle network; an update unit that performs an update process of the correspondence information; a switching unit that switches between a stop state in which the update process is stopped and an execution state in which the update process is executed, the switching unit switching from the stop state to the execution state when the state monitoring unit detects a change in the state of the in-vehicle network; a storage unit that, when the switching unit switches from the running state to the stopped state, stores the correspondence information that has been updated in the running state in the storage unit as the correspondence information to be used in the relay process in the stopped state; A relay program to function as a
Citation Information
Patent Citations
Ethernet switch and gateway unit
JP2016163245A
Communication system and electronic control device
JP2022066959A
Method of Controlling Data Propagation Within a Network
US20110149969A1