The present disclosure relates to an in-vehicle communication system, an in-vehicle relay device, a communication program, and a communication method for relaying messages transmitted and received by a plurality of in-vehicle communication devices installed in a vehicle.
In recent years, the number of Electronic Control Units (ECU) installed in a vehicle has been increasing. Each ECU communicates with other ECUs, exchanges information, and executes various processing. With the increase in the number of ECUs in a vehicle, the number of communication lines inside vehicles provided for communication by the ECUs has also increased, and there is concern surrounding vehicle weight increase and diminishing space to dispose communication lines inside vehicles.
In JP 2015-67187A, a vehicle control system is described which has a configuration in which the inside of a vehicle is divided into a plurality of regions, in each region, a plurality of functional ECUs are connected to a relay ECU on a first network, and the plurality of relay ECUs are connected to one another on a second network.
However, in the vehicle control system described in JP 2015-67187A, in the case in which the communication amount increases between the plurality of functional ECUs provided in the different regions, the communication band between the relay ECUs that relay these communications is put under strain, which may lead to communication delay.
The present disclosure was made in light of such circumstances and has an object of providing an in-vehicle communication system, an in-vehicle relay device, a communication program, and a communication method capable of reducing the number of communication lines provided in a vehicle and preventing communication delay.
An in-vehicle communication system according to the present aspect comprises a plurality of in-vehicle relay devices. Each of the in-vehicle relay devices include a plurality of first connection units, and an in-vehicle communication device is connected to each one of the first connection units; and a plurality of second connection units to which another one of the in-vehicle relay devices is connected. A relay processing unit is configured to execute processing to relay messages between the in-vehicle communication devices connected to the first connection units and the other one of in-vehicle relay devices connected to the second connection units, wherein two of the in-vehicle relay devices are connected to one another via two or more communication lines.
An in-vehicle relay device according to the present aspect comprises: a plurality of first connection units, an in-vehicle communication device being connected to each one of the first connection units; a plurality of second connection units to which another in-vehicle relay device is connected; and a relay processing unit configured to execute processing to relay messages between the in-vehicle communication devices connected to the first connection units and the other in-vehicle relay device connected to the second connection units.
A communication program according to the present aspect is a communication program that causes an in-vehicle relay device, which is provided with a plurality of first connection units, an in-vehicle communication device being connected to each one of the first connection units, and a plurality of second connection units to which another in-vehicle relay device is connected, wherein two or more of the second connection units are connected to the other in-vehicle relay device, to execute processing to receive messages from the in-vehicle communication devices via the first connection units; and relay received messages to the other in-vehicle relay device via one or the plurality of second connection units.
A communication method according to the present aspect comprises: via an in-vehicle relay device provided with a plurality of first connection units, an in-vehicle communication device being connected to each one of the first connection units, and a plurality of second connection units to which another in-vehicle relay device is connected, wherein two or more of the second connection units are connected to the other in-vehicle relay device, receiving messages from the in-vehicle communication devices via the first connection units; and relaying received messages to the other in-vehicle relay device via one or the plurality of second connection units.
Note that the present application can be realized not only as an in-vehicle communication system provided with the advantageous processing unit described above, but also as a communication method including such advantageous processing steps and a communication program for causing a computer to execute these steps. Also, a portion of all of the in-vehicle communication system can be realized as a semiconductor integrated circuit or as a system that includes the in-vehicle communication system.
According to the foregoing, the number of communication lines provided in a vehicle can be reduced and communication delay can be prevented.
Firstly, embodiments of the present disclosure will be listed and described. One or more parts of the embodiments described below may be combined in a discretionary manner.
An in-vehicle communication system according to the present aspect comprises: a plurality of in-vehicle relay devices. Each of the in-vehicle relay devices include a plurality of first connection units, an in-vehicle communication device being connected to each one of the first connection units; and a plurality of second connection units to which another one of the in-vehicle relay devices is connected. A relay processing unit configured to execute processing to relay messages between the in-vehicle communication devices connected to the first connection units and the other one of in-vehicle relay devices connected to the second connection units, wherein two of the in-vehicle relay devices are connected to one another via two or more communication lines.
In the present aspect, the plurality of communication lines that the in-vehicle communication devices are connected are connected to the in-vehicle relay devices, and the in-vehicle relay devices relay the transmitting and receiving of messages between the communication lines. In the vehicle, the plurality of in-vehicle relay devices are installed, and the plurality of in-vehicle relay devices are connected to one another via the communication lines. With this configuration, compared to a configuration in which all of the in-vehicle communication devices connect to one in-vehicle relay device, the number of communication lines provided in the vehicle can be reduced.
Also, the in-vehicle relay devices installed in the vehicle are connected in a manner such that two of the in-vehicle relay devices are connected via two or more communication lines and can transmit and receive messages via the plurality of communication lines. With this configuration, the communication capacity for communications between the in-vehicle relay devices where bottlenecking is likely to occur, can be increased. This allows communication delays to be prevented. Also, by increasing the communication capacity between the in-vehicle relay devices, the communication speed at the communication lines can be slowed to reduce the amount of noise in the communications.
The two or more communication lines connecting the two in-vehicle relay devices preferably follow an identical communication protocol.
In the present aspect, the two or more communication lines connecting the two in-vehicle relay devices follow an identical communication protocol. In this way, there is no need for processing by the in-vehicle relay devices to convert the message format following a communication protocol, for example, and communication delay caused by conversion processing is prevented. Furthermore, the configuration of the in-vehicle relay device can be prevented from becoming too complex, thus minimizing or preventing an increase in the cost of the in-vehicle relay device.
The in-vehicle relay devices each preferably include: a storage unit configured to store relationships between identification information attached to messages received via the first connection units and the second connection units corresponding to transmission destinations of the messages; a monitor processing unit configured to execute processing to monitor a communication status of communication via the second connection units; and an update processing unit configured to execute processing to update the relationships according to the communication status monitored by the monitor processing unit.
In the present aspect, the relationships between the identification information that are attached to the messages and the communication lines corresponding to the transmission destinations of the messages are stored in the storage unit by the in-vehicle relay device. In the case in which a message is received that is to be transmitted to the other in-vehicle relay device, the in-vehicle relay device selects the communication line on the basis of the stored relationships, outputs the message to the selected communication line, and transmits the message to the other in-vehicle relay device. Also, the in-vehicle relay device monitors the communication status at the plurality of communication lines connected to the other in-vehicle relay device. For the communication status, for example, the data amount of the messages transmitted and received at the communication line, power consumption of the communication IC (Integrated Circuit) executing communication, and the like can be used. The in-vehicle relay device executes processing to update the relationships stored in the storage unit on the basis of the results from monitoring the communication status. In this way, the relationships between the messages and the communication lines for transmitting the messages can be changed depending on the communication status, and by resolving an imbalance in the communication amount between the communication lines, the communication band can be used effectively.
The update processing unit preferably executes processing to update the relationships each time a predetermined amount of time elapses.
In the present aspect, processing to update the relationships stored in the storage unit by the in-vehicle relay device is executed each time a predetermined amount of time elapses. In this way, the relationships can be reviewed each time the predetermined amount of time elapses, and the relationships can be updated to be appropriate to the communication status at that point in time.
The update processing unit preferably executes processing to update the relationships when an imbalance level of the communication status of communication via the second connection units exceeds a threshold.
In the present aspect, processing to update the relationships stored in the storage unit by the in-vehicle relay device is executed when an imbalance level of the plurality of communication lines exceeds a threshold. Because update processing is not executed when the communication status is in a balanced state in this manner, the frequency in which update processing is executed can be reduced and the processing load and power consumption of the in-vehicle relay device can be reduced.
The update processing unit preferably updates the relationships so that a message allocated to a second connection unit of the second connection units with a larger communication amount is allocated to a second connection unit of the second connection units with a smaller communication amount.
In the present aspect, the relationships stored in the storage unit by the in-vehicle relay device are updated so that a message allocated to the communication line determined to have a larger communication amount via monitoring is allocated to the communication line with a smaller communication amount. By resolving an imbalance in the communication amount between the plurality of communication lines provided between the plurality of in-vehicle relay devices in this manner, the communication band can be used effectively.
The update processing unit preferably updates the relationships so that a message with a predetermined identification information allocated to a second connection unit of the second connection units with a larger communication amount is transmitted via the plurality of second connection units.
In the present aspect, a message with a predetermined identification information allocated to the communication line determined to have a larger communication amount via monitoring is allocated to the plurality of communication lines by the in-vehicle relay device. When a message with a predetermined identification information is needed to be transmitted, the in-vehicle relay device selects the appropriate communication line from among the plurality of communication lines and transmits the message. The communication line may be selected by a method such as alternating between communication lines, by random selection, or the like. In this way, the communication load can be distributed from the communication line with a larger communication amount to the communication line with a smaller communication amount, and an imbalance in the communication amount between the plurality of communication lines can be resolved. This allows the communication band to be used effectively.
An in-vehicle relay device according to the present aspect comprises: a plurality of first connection units, an in-vehicle communication device being connected to each one of the first connection units; a plurality of second connection units to which another in-vehicle relay device is connected; and a relay processing unit configured to execute processing to relay messages between the in-vehicle communication devices connected to the first connection units and the other in-vehicle relay device connected to the second connection units.
In the present aspect, in a similar manner to aspect (1), the number of communication lines provided in a vehicle can be reduced and communication delay can be prevented.
A communication program according to the present aspect is a communication program that causes an in-vehicle relay device, which is provided with a plurality of first connection units, an in-vehicle communication device being connected to each one of the first connection units, and a plurality of second connection units to which another in-vehicle relay device is connected, wherein two or more of the second connection units are connected to the other in-vehicle relay device, to execute processing to: receive messages from the in-vehicle communication devices via the first connection units; and relay received messages to the other in-vehicle relay device via one or the plurality of second connection units.
In the present aspect, in a similar manner to aspect (1), the number of communication lines provided in a vehicle can be reduced and communication delay can be prevented.
A communication method according to the present aspect comprises: via an in-vehicle relay device provided with a plurality of first connection units, an in-vehicle communication device being connected to each one of the first connection units, and a plurality of second connection units to which another in-vehicle relay device is connected, wherein two or more of the second connection units are connected to the other in-vehicle relay device, receiving messages from the in-vehicle communication devices via the first connection units; and relaying received messages to the other in-vehicle relay device via one or the plurality of second connection units.
In the present aspect, in a similar manner to aspect (1), the number of communication lines provided in a vehicle can be reduced and communication delay can be prevented.
A specific example of an in-vehicle communication system according to an embodiment of the present disclosure will be described with reference to the drawings. Note that the present disclosure is not limited to these examples. The present disclosure is defined by the scope of the claims, and all modifications that are equivalent to or within the scope of the claims are included.
The ECUs 3 installed in the vehicle 100 may include various ECUs, such as an ECU that controls the operation of the engine of the vehicle 100, an ECU that controls the locking and unlocking of a door, an ECU that controls turning a light on and off, an ECU that controls the operation of an airbag, an ECU that controls the operation of the Antilock Brake System (ABS), and the like. The ECUs 3 are each connected to one of the communication lines 5 disposed in the vehicle 100 and are capable of transmitting and receiving messages with other ECUs 3 via the communication lines 5 and the GWs 10.
The GWs 10 each have a plurality of the communication lines 5 connected to them and are capable of transmitting and receiving messages with the plurality of ECUs 3 via the communication lines 5. The GW 10 which receives a message transmitted by one of the ECUs 3 determines whether relay is required on the basis of an ID attached to the received message and transmits a message requiring relay from one of the communication lines 5 from which the message was not received. For this, the GWs 10 include a transmission destination map storing the relationships between IDs that are attached to messages and the communication lines 5 that are transmission destinations of messages.
In the in-vehicle communication system 1, a message from one of the ECUs 3 connected to the GW 10a can be transmitted to one of the ECUs 3 connected to the GW 10b. In this case, the GW 10a that receives the message from the ECU 3 determines whether relay to the GW 10b is required on the basis of the ID attached to the message and transmits the message to the GW 10b by outputting the message from the communication line 6. The GW 10b that receives a message from the GW 10a via the communication line 6 determines which communication line 5 is the relay destination on the basis of the ID attached to the received message and transmits the message to the communication line 5 which is the relay destination. Transmitting messages from the GW 10b to the GW 10a is executed in a similar manner.
In the in-vehicle communication system 1 according to the present embodiment, the two GWs 10 are connected via the two communication lines 6. The two communication lines 6 follow the same communication protocol, and, for example, a Controller Area Network (CAN), Ethernet (trade name), or a similar communication protocol can be employed. In the present embodiment, the communication speed is the same, irrespective of which communication line 6 is used. However, the two communication lines 6 may follow different communication protocols, and communication speed may differ.
The GW 10, in the case in which a message is to be transmitted to the other GW 10, selects one communication line 6 from the two communication lines 6. The GW 10, by outputting the message via the selected communication line 6, transmits the message to the other GW 10 via this communication line 6. Here, the GW 10 selects the communication line 6 via which the message is to be transmitted on the basis of the ID attached to the message. For this, the GWs 10 stores a transmission destination map of the relationships between the IDs that are attached to messages and the communication lines 6 for transmitting the messages.
Also, in the in-vehicle communication system 1 according to the present embodiment, the GWs 10 each monitor the communication status of the communication lines 6. Examples of the communication status monitored by the GWs 10 include, but are not limited to, the amount of transmitted data or the amount of received data for each communication line 6, the power consumption of a communication IC such as a transceiver that executes communication processing relating to the communication lines 6, and the like. The GWs 10 according to the present embodiment, execute processing to update the relationships between the message IDs and the transmission destinations stored in the transmission destination map on the basis of the results from monitoring the communication status. The processing to update the transmission destination map will be described in detail below.
The processing unit 11 is configured using, for example, a computational processing device, such as a Central Processing Unit (CPU), a Micro-Processing Unit (MPU), or the like. The processing unit 11 is capable of executing various types of processing by reading out and executing a program stored in the storage unit 12. The processing unit 11 of the present embodiment executes processing to relay a message, processing to monitor the communication status of the communication lines 6, processing to update a transmission destination map 12b stored in the storage unit 12, and the like by reading out and executing a communication program 12a stored in the storage unit 12.
The storage unit 12 is configured, for example, using a memory element, such as a flash memory, Electrically Erasable Programmable Read Only Memory (EEPROM), and the like. The storage unit 12 stores various programs executed by the processing unit 11 and various data required in the processing by the processing unit 11. The storage unit 12 of the present embodiment stores the communication program 12a executed by the processing unit 11 and the transmission destination map 12b used by the processing unit 11 to relay messages. Note that the communication program 12a, for example, may be written to the storage unit 12 when the GW 10 is manufactured, may be a program transmitted by a remote server device or the like and acquired by the GW 10 via communication, or may be a program stored in a recording medium, such as a memory card or an optical disk, that is read out by the GW 10 and stored in the storage unit 12.
The connection units 15, 16 are connectors that detachably connect to the communication lines 5, 6. The connection units 15, 16 are configured to be compatible with the shape, protocol, and the like of the communication lines 5, 6 to which they connect. Note that, in
The communication units 13, 14 execute processing relating to transmitting and receiving messages via the communication lines 5, 6 connected to the connection units 15, 16. The communication units 13, 14 transmit and receive messages following a communication protocol, such as CAN or Ethernet. The communication units 13, 14 may be configured, for example, using a communication IC such as a CAN transceiver in the case in which a CAN communication protocol is used. The communication unit 13, 14 periodically samples and obtains the potential of the communication line 5, 6 connected to the connection unit 15, 16 to convert the electric signal on the communication line 5, 6 to digital data, which is then sent to the processing unit 11 as a received message. Also, the communication unit 13, 14 converts the message received as digital data from the processing unit 11 to an electric signal and outputs the converted electric signal to the communication line 5, 6 connected to the connection unit 15, 16 to transmit the message. Note that, in
The communication buffer 17 is configured, for example, using a rewritable memory element, such as a Static Random Access Memory (SRAM), a Dynamic Random Access Memory (DRAM), or the like. The communication buffer 17 temporarily stores messages received from the ECU 3 or the other GW 10.
Also, in the GW 10 according to the present embodiment, a relay processing unit 21, a monitor processing unit 22, an update processing unit 23, and the like are realized in the processing unit 11 as a software functional block by the communication program 12a stored in the storage unit 12 being read out and executed by the processing unit 11. The relay processing unit 21 executes processing to relay a message that the communication unit 13 received from one of the ECUs 3 to another ECU 3. The relay processing unit 21 acquires the ID attached to the message received at the communication unit 13, references the transmission destination map 12b of the storage unit 12, and searches for the transmission destination corresponding to the ID in the transmission destination map 12b. The relay processing unit 21 sends the message to the communication unit 13, 14 designed as the transmission destination in the transmission destination map 12b and makes the communication unit 13, 14 transmit the message to the communication line 5, 6.
The monitor processing unit 22 executes processing to monitor the communication status of the communication lines 6 connected to the connection units 16. The monitor processing unit 22 is capable of monitoring the communication status via various methods, such as calculating the amount of transmission data of the communication lines 6 per unit time, detecting the power consumption of the communication units 14, or the like. However, the monitor processing unit 22 of the present embodiment monitors the communication status by calculating the amount of transmission data per unit time. Note that the communication load on the communication lines 6 can be measured by detecting the power consumption of the communication units 14. However, in the case in which the monitor processing unit 22 detects the power consumption of the communication units 14, hardware such as a sensor for measuring the voltage value applied to the communication units 14 or the current value running through the communication units 14 needs to operate in cooperation with the monitor processing unit 22. Thus, such hardware is omitted from the description of the example illustrated in
The update processing unit 23 executes processing to update the contents of the transmission destination map 12b stored in the storage unit 12 on the basis of the results of monitoring the communication status of the communication lines 6 by the monitor processing unit 22. The update processing unit 23 acquires the amount of transmission data per unit time of the communication lines 6 and updates the transmission destination map 12b so that a portion of the messages allocated to the communication line 6 with a larger amount of communication data is allocated to the communication line 6 with a smaller amount of communication data to resolve an imbalance in the amount of communication data between the communication lines 6. The update processing of the transmission destination map 12b executed by the update processing unit 23 will be described in detail below.
Also, in the example illustrated in
Also, the transmission destination of the message stored in the transmission destination map 12b is further divided into a first transmission destination and a second transmission destination. The first transmission destination may be set as one or two of the three channels A1, A2, A3 corresponding to the communication units 13. The second transmission destination may be set as one of the two channels B1, B2 corresponding to the communication units 14. However, in some cases, the first transmission destination or the second transmission destination are not present. Such a case is indicated in
In the illustrated example of the transmission destination map 12b, the message with the ID “1” has the channel A1 and A2 set as the first transmission destination and the channel B1 set as the second transmission destination. Also, the message with the ID “2” has the channel A2 and A3 set as the first transmission destination and the channel B2 set as the second transmission destination. The message with the ID “3” has no first transmission destination and the channel B1 set as the second transmission destination. The message with the ID “4” has the channel A2 set as the first transmission destination and the channel B2 set as the second transmission destination. The message with the ID “5” has the channel A1 and A3 set as the first transmission destination and no second transmission destination.
In the case in which a message from the ECU 3 is received at the communication unit 13, the relay processing unit 21 of the GW 10 acquires the ID attached to the message and references the transmission destination map 12b of the storage unit 12 on the basis of the acquired ID. In the case in which the ID is “1”, for example, the relay processing unit 21 acquires, from the transmission destination map 12b, the channel A1 and A2 as the first transmission destination of the message and transmits the message to the communication units 13 corresponding to the channels A1 and A2. Also, the relay processing unit 21 acquires, from the transmission destination map 12b, the channel B1 as the second transmission destination of the message with the ID “1” and transmits the message to the communication unit 14 corresponding to the channel B1.
Note that in the transmission destination map 12b of the present example, channels corresponding to the communication lines 5 that the ECUs 3 are connected to are stored as the first transmission destinations. However, a first transmission destination is not required to be stored in the transmission destination map 12b. For example, in the case in which the GW 10 receives a message at one of the communication lines 5 and the GW 10 has a configuration in which messages are relayed to all of the communication lines 5 except this communication line 5, a first transmission destination is not required to be stored in the transmission destination map 12b.
The update processing unit 23 of the GW 10 according to the present embodiment updates the second transmission destination of the transmission destination map 12b according to the communication status of the communication lines 6 monitored by the monitor processing unit 22.
In the example of the upper graph of
Note that the update processing illustrated in
If the unit time has elapsed (S2: YES), the update processing unit 23 of the processing unit 11 calculates the average value of the amount of transmission data of the channels measured by the monitor processing unit 22 (step S4). The update processing unit 23 changes the relationships of the messages to the channels so that the amount of transmission data of each channel moves closer to the average value (step S5). The update processing unit 23 updates the transmission destination map 12b of the storage unit 12 to reflect the changed relationships (step S6), and the process returns to step S1.
Note that in this flowchart, the average value is calculated by the update processing unit 23 in step S4. However, this processing is not necessarily required. In a configuration in which the update processing is executed without using the average value, the update processing unit 23 may not calculate the average value. For example, the update processing unit 23 may have a configuration in which the relationships between the messages and the channels are changed to reduce or minimize the difference between the amount of transmission data of the two channels.
The in-vehicle communication system 1 according to the present embodiment with the configuration described above, the plurality of communication lines 5 that the ECUs 3 are connected to are connected to the GWs 10, and the GWs 10 relay transmission and reception communication of messages between the communication lines 5. A plurality (two) of the GWs 10 are installed in the vehicle 100, and the two GWs 10 are connected to one another via the communication lines 6. With this configuration, compared to a configuration in which all of the ECUs 3 connect to one GW 10, the number of communication lines 5 provided in the vehicle 100 can be reduced.
Also, the two GWs 10 installed in the vehicle 100 are connected via two or more communication lines 6 and can transmit and receive messages via the plurality of communication lines 6. With this configuration, the communication capacity for communications between the GWs 10, where bottlenecking is likely to occur, can be increased. This allows communication delays to be prevented. Also, by increasing the communication capacity between the GWs 10, the communication speed at the communication lines 6 can be slowed to reduce the amount of noise in the communications.
Also, in the in-vehicle communication system 1 according to the present embodiment, the two communication lines 6 that connect the two GWs 10 are communication lines following the same communication protocol. In this way, there is no need for processing to convert the message format to the different communication protocols of the GWs 10, for example, and communication delay caused by conversion processing can be prevented. Furthermore, the configuration of the GW 10 can be prevented from becoming too complex, thus minimizing or preventing an increase in the cost of the GW 10.
Also, in the in-vehicle communication system 1 according to the present embodiment, the relationships between the IDs that are attached to the messages and the communication lines 6 corresponding to the transmission destinations of the messages are stored in the transmission destination map 12b of the storage unit 12 by the GW 10. In the case in which a message is received that is to be transmitted to the other GW 10, the GW 10 selects the communication line 6 as the transmission destination on the basis of the relationships stored in the transmission destination map 12b, outputs the message to the selected communication line 6, and transmits the message to the other GW 10. Also, the GW 10 monitors the communication status at the plurality of communication lines 6 connected to the other GW 10. For the monitored communication status, for example, the data amount of the messages transmitted and received at the communication line 6, power consumption of the communication unit 14, and the like can be used. The GW 10 executes processing to update the relationships stored in the transmission destination map 12b of the storage unit 12 on the basis of the results from monitoring the communication status. In this way, the relationships between the messages and the communication lines 6 for transmitting the messages can be changed by the GW 10 depending on the communication status, and by resolving an imbalance in the communication amount between the communication lines 6, the communication band can be used effectively.
The GW 10 according to the first embodiment executes processing to update the relationships stored in the transmission destination map 12b of the storage unit 12 each time a predetermined unit time elapses. In this way, the relationships can be reviewed each time the unit time elapses, and the relationships can be updated to be appropriate to the communication status at that point in time.
Also, the GW 10 according to the first embodiment updates the relationships stored in the transmission destination map 12b of the storage unit 12 so that a message allocated to the communication line 6 with a larger amount of transmission data is allocated to the communication line 6 with a smaller amount of transmission data. By resolving an imbalance in the amount of transmission data between the two communication lines provided between the two GWs 10 in this manner, the communication band can be used effectively.
Note that in the present embodiment, the in-vehicle communication system 1 has a configuration in which two GWs 10 are provided and the two GWs 10 are connected to one another via the two communication lines 6. However, the system configuration is not limited thereto. The in-vehicle communication system 1 may be provided with three or more GWs 10, and the plurality of GWs 10 may be connected to one another via three or more communication lines 6.
In the in-vehicle communication system 1 according to a second embodiment, the update processing unit 23 updates the transmission destination map 12b via a different method than in the first embodiment.
In the GW 10 according to the second embodiment, the channel B1 and B2 can both be set as the second transmission destination of the message. In the case in which a message with the channel B1 and B2 both set as the second transmission destination is transmitted, the relay processing unit 21 of the GW 10 according to the second embodiment, instead of transmitting the message from both the channel B1 and B2, either the channel B1 or the channel B2 is selected and then the message is transmitted. The relay processing unit 21, for example, may select the channel B1 and B2 alternately as the transmission destination or, for example, one may be selected on the basis of a generated random number.
The update processing unit 23 of the GW 10 according to the second embodiment, each time a unit time elapses, acquires the amount of transmission data of each channel measured by the monitor processing unit 22 and calculates the average value of the amount of transmission data of the two channels. The update processing unit 23 selects one message from the messages allocated to the channel with a larger amount of transmission data and sets the second transmission destination of the selected message to both the channel B1 and B2. Here, the update processing unit 23 may select the message with the largest amount of transmission data from among the messages allocated to the channel with a larger amount of transmission data.
In the example illustrated in the lower graph in
The GW 10 according to the second embodiment having the configuration described above allocates a message with a predetermined ID allocated to the communication line 6 with a larger amount of transmission data to a plurality of communication lines 6. In this way, the communication load can be distributed from the communication line 6 with a larger amount of transmission data to the communication line 6 with a smaller amount of transmission data, and an imbalance in the amount of transmission data between the plurality of communication lines 6 can be resolved. Note that in the case in which a message with both the channel B1 and B2 allocated as the second transmission destination is transmitted, the relay processing unit 21 need not transmit the message using the two channels B1 and B2 evenly. For example, the channels may be selected with a bias of a 2 to 1 ratio, for example, and the message may be transmitted.
Other configurations of the in-vehicle communication system 1 according to the second embodiment are similar to that of the in-vehicle communication system 1 according to the first embodiment. Thus, similar components are denoted with the same reference sign, and detailed description is omitted.
In the in-vehicle communication system 1 according to a third embodiment, the update processing unit 23 of the GW 10 executes the processing to update the transmission destination map 12b at a different timing than in the in-vehicle communication system 1 according to the first embodiment. The in-vehicle communication system 1 according to the third embodiment, instead of executing update processing each time a unit time elapses, executes update processing when an imbalance level in the amount of transmission data between the two communication lines 6 connecting the two GWs 10 exceeds a threshold. The GW 10 according to the third embodiment does not execute update processing unless the imbalance level exceeds the threshold.
The monitor processing unit 22 of the GW 10 according to the third embodiment measures the amount of transmission data of each of the communication lines 6 per a unit of time ranging from hundreds of milliseconds to seconds, for example and calculates the imbalance level between the communication lines 6. The imbalance level may be calculated on the basis of Formula (1) below, for example. Note that, in Formula (1), “UB” is the imbalance level, “Da” is the average value of the amount of transmission data at the plurality of communication lines 6, and “D” is the amount of transmission data of the communication line 6 with the amount of transmission data most different from the average value Da. In the present example, the two GWs 10 are connected to one another via the two communication lines 6. Thus, “D” is the amount of transmission data of one of the communication lines 6.
UB=|D−Da|/Da (1)
The update processing unit 23 of the GW 10 according to the third embodiment executes processing to update the relationships stored in the transmission destination map 12b of the storage unit 12 when the imbalance level calculated by the monitor processing unit 22 exceeds a preset threshold a. The threshold a is predetermined at the design stage of the in-vehicle communication system 1, for example. The update processing executed by the update processing unit 23 is similar to the update processing of the first embodiment and the second embodiment described above.
If the imbalance level exceeds the threshold (S14: YES), the update processing unit 23 of the processing unit 11 changes the relationships of the messages to the channels so that the amount of transmission data of each channel moves closer to the average value (step S15). The update processing unit 23 updates the transmission destination map 12b of the storage unit 12 to reflect the changed relationships (step S16), and the process returns to step S11.
The in-vehicle communication system 1 according to the third embodiment with the configuration described above calculates the imbalance level of the communication status for the plurality of communication lines 6 connecting the plurality of GWs 10, and, in the case in which the imbalance level exceeds the threshold, the update processing unit 23 executes processing to update the relationships stored in the transmission destination map 12b. Because update processing is not executed when the communication status is in a balanced state in this manner, the frequency in which update processing is executed can be reduced and the processing load and power consumption of the GW 10 can be reduced.
Note that Formula (1) for calculating the imbalance level described in the third embodiment is an example, and the imbalance level may be calculated by a different calculation method. Also, instead of determining whether or not to execute update processing on the basis of the imbalance level, a different value may be calculated and used. The GW 10, for example, may execute update processing in the case of a balance level of the communication status being a threshold or less or in the case of the difference between the maximum value and the minimum value of the amount of transmission data exceeding a threshold. The update processing may also be executed on the basis of values other than these.
Other configurations of the in-vehicle communication system 1 according to the third embodiment are similar to that of the in-vehicle communication system 1 according to the first embodiment. Thus, similar components are denoted with the same reference sign, and detailed description is omitted.
The devices of the in-vehicle communication system are provided with a computer that includes a microprocessor, ROM, RAM, and the like. The computation processing unit of the microprocessor or the like is executed by reading out a computer program including a portion or all of the steps of the sequence diagram or flowchart such as those illustrated in
The embodiments disclosed herein are examples in all respects and should not be interpreted as limiting in any manner. The present disclosure is defined not by the foregoing description, but by the scope of the claims, and all modifications that are equivalent to or within the scope of the claims are included.
Number | Date | Country | Kind |
---|---|---|---|
2018-102626 | May 2018 | JP | national |
This application is the U.S. national stage of PCT/JP2019/019694 filed on May 17, 2019, which claims priority of Japanese Patent Application No. JP 2018-102626 filed on May 29, 2018, the contents of which are incorporated herein.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2019/019694 | 5/17/2019 | WO | 00 |