Relay device, communication system, and processing method

JP7559695B2Active Publication Date: 2024-10-02AUTONETWORKS TECH LTD +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2021116631
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-07-14
Publication Date
2024-10-02
Estimated Expiration
2041-07-14

AI Technical Summary

Benefits of technology

【0010】 上記の態様によれば、データの送信が指示されてから、データの判定時点までの全体期間の決定を実現することができる。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007559695000001
    Figure 0007559695000001
  • Figure 0007559695000002
    Figure 0007559695000002
  • Figure 0007559695000003
    Figure 0007559695000003
Patent Text Reader

Abstract

To provide a relay device, a communication system, and a processing method capable of determining an entire period from when a data transmission instruction is given to when data is determined.SOLUTION: A relay device relays communication. The relay device includes: a receiving unit that receives communication data from a communication device; a storage unit that stores the communication data received by the receiving unit; and a processing unit that performs processing. First periods and second periods are alternately set. The processing unit changes the total number of first periods and second periods included in a next predetermined period whenever a predetermined period including the first periods and the second periods elapses. The processing unit determines whether or not the communication data is stored in the storage unit. The processing unit identifies a period to which a communication determination time point when a determination is made belongs, among the first periods and the second periods when determining that the communication data is stored in the storage unit.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a relay device, a communication system, and a processing method. [Background technology]

[0002] Patent Document 1 discloses a communication system in which a communication device transmits data to another communication device via a relay device. The communication device transmits prioritized data that needs to reach another communication device within a short period of time. When the relay device receives prioritized data from the communication device, it determines whether or not to transmit the received prioritized data. An allowed period during which the transmission of prioritized data is permitted and a prohibited period during which the transmission of prioritized data is prohibited are set alternately and repeatedly. When the time point at which the relay device determines whether or not to transmit the prioritized data falls within the allowed period, it transmits the received prioritized data during the allowed period. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] International Publication No. 2020 / 136843 Summary of the Invention [Problem to be solved by the invention]

[0004] When it is possible to determine the entire period from when a communication device is instructed to transmit data to when the data is judged, for example, the communication device can adjust the time when the communication device is instructed to transmit the prioritized data so that the judgment time of the prioritized data falls within an allowed period. However, Patent Document 1 does not disclose a configuration that can realize the determination of the entire period.

[0005] The present disclosure has been made in consideration of such circumstances, and its purpose is to provide a relay device, a communication system, and a processing method that can determine the entire period from when data transmission is instructed to the time when the data is judged. [Means for solving the problem]

[0006] A relay device according to one embodiment of the present disclosure is a relay device that relays communications, and is equipped with a receiving unit that receives communication data from a communication device, a memory unit that stores the communication data received by the receiving unit, and a processing unit that executes processing, in which first and second periods are set alternately, and each time a predetermined period that includes the first and second periods elapses, the processing unit changes the total number of the first and second periods included in the next predetermined period, determines whether the communication data is stored in the memory unit, and if it determines that the communication data is stored in the memory unit, identifies the period among the first and second periods to which the communication determination time point at which the determination was made belongs.

[0007] A communication system according to one embodiment of the present disclosure includes a communication device that transmits data and a relay device that receives data from the communication device and transmits the received data, the communication device has a communication processing unit that performs processing, and the communication processing unit instructs the relay device to transmit communication data, the relay device has a relay receiving unit that receives the communication data from the communication device, a relay memory unit that stores the communication data received by the relay receiving unit, and a relay processing unit that performs processing, and a first period and a second period are set alternately, and each time a predetermined period including the first period and the second period elapses, the relay processing unit changes the total number of the first period and the second period included in the next predetermined period, determines whether the communication data is stored in the relay memory unit, and if it determines that the communication data is stored in the relay memory unit, identifies the period among the first period and the second period to which the communication determination time point at which the determination was made belongs.

[0008] A processing method according to one aspect of the present disclosure is a processing method for a relay device that relays communication, the relay device including a receiving unit that receives communication data from a communication device and a storage unit that stores the communication data received by the receiving unit, the processing method being executed by a computer to change the total number of the first and second periods included in a next predetermined period each time a predetermined period including first and second periods that are set alternately elapses, determine whether the communication data is stored in the storage unit, and, if it is determined that the communication data is stored in the storage unit, identify a period to which the communication determination time point at which the determination was made belongs among the first and second periods.

[0009] The present disclosure can be realized not only as a relay device having such a characteristic processing unit, but also as a processing method having such characteristic processing steps, or as a computer program for causing a computer to execute such steps. Furthermore, the present disclosure can be realized as a semiconductor integrated circuit that realizes part or all of the relay device, or as a communication system including the relay device. Effect of the Invention

[0010] According to the above aspect, it is possible to determine the entire period from when an instruction to transmit data is given to transmit the data to when the data is judged. [Brief description of the drawings]

[0011] [Figure 1] 1 is a block diagram showing a configuration of a main part of a communication system according to a first embodiment. [Diagram 2] FIG. 2 is an explanatory diagram of a relay method of the relay device. [Diagram 3] FIG. 2 is an explanatory diagram of operations performed in a transmission buffer. [Figure 4] 10 is an explanatory diagram of a method for determining a relay frame performed by a relay device; [Diagram 5] 11 is a table showing the relationship between relay decision points and operations regarding a relay frame. [Figure 6]10 is an explanatory diagram of a method of determining a communication frame performed by a relay device; [Figure 7] 11 is a table showing the relationship between communication determination points and operations regarding communication frames. [Figure 8] 2 is a block diagram showing a main configuration of a relay device; FIG. [Figure 9] FIG. 4 is an explanatory diagram of the contents of pattern data. [Figure 10] 11 is a table showing the contents of target data. [Figure 11] FIG. 2 is a block diagram showing a main configuration of an in-vehicle device. [Figure 12] 10 is a flowchart showing an initial setting procedure performed by a relay device and an in-vehicle device; [Figure 13] 10 is a flowchart showing an initial setting procedure performed by a relay device and an in-vehicle device; [Figure 14] FIG. 11 is a sequence diagram for explaining an overview of a method for determining an overall period of an in-vehicle device. [Figure 15] FIG. 11 is an explanatory diagram of a method for identifying a belonging range. [Figure 16] FIG. 13 is an explanatory diagram of a method for determining an entire period when there are two ranges as belonging ranges. [Figure 17] 13 is a flowchart showing a procedure for a period change process corresponding to a communication queue of a transmission buffer. [Figure 18] 13 is a flowchart showing a procedure of a communication frame relay process of a transmission buffer. [Figure 19] 10 is a flowchart showing a procedure of a period determination process of an in-vehicle device; [Figure 20] 10 is a flowchart showing a procedure of a relay frame transmission process of an in-vehicle device. [Figure 21] FIG. 11 is an explanatory diagram of the contents of pattern data in the second embodiment. [Figure 22] 13 is a flowchart showing a procedure for a transmission buffer period notification process in the third embodiment. [Diagram 23] 10 is a flowchart showing a procedure of a period determination process of an in-vehicle device; [Figure 24]13 is a flowchart showing an initial setting procedure performed by a relay device and an in-vehicle device in the fourth embodiment. [Diagram 25] FIG. 11 is a sequence diagram for explaining an overview of a method for determining an overall period of an in-vehicle device. [Figure 26] 13 is a flowchart showing a procedure for a period change process corresponding to a communication queue of a transmission buffer. [Figure 27] 5 is a flowchart showing a procedure of a communication frame transmission process of an in-vehicle device. [Figure 28] 13 is a flowchart showing a procedure for a period adjustment process of a transmission buffer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] [Description of the embodiments of the present disclosure] First, the embodiments of the present disclosure will be listed and described. At least a part of the embodiments described below may be arbitrarily combined.

[0013] (1) A relay device according to an embodiment of the present disclosure is a relay device that relays communication, and includes a receiving unit that receives communication data from a communication device, a storage unit that stores the communication data received by the receiving unit, and a processing unit that executes processing, in which first and second periods are set alternately, and the processing unit changes the total number of the first and second periods included in the next predetermined period each time a predetermined period including the first and second periods elapses, determines whether the communication data is stored in the storage unit, and, when it is determined that the communication data is stored in the storage unit, identifies a period to which the communication determination time point at which the determination was made belongs among the first and second periods.

[0014] (2) In a relay device according to one aspect of the present disclosure, the processing unit changes the total number of each of a plurality of consecutive predetermined periods so that the total numbers of the plurality of predetermined periods are different from one another, and changes the position of the boundary within each of the plurality of predetermined periods so that the positions of the boundary between the first period and the second period are different from one another.

[0015] (3) In a relay device according to one aspect of the present disclosure, the processing unit changes the total number for each of a number of consecutive predetermined periods so that the total numbers included in each of the consecutive predetermined periods are different from one another, and repeats the number of consecutive predetermined periods a number of times.

[0016] (4) In a relay device according to one embodiment of the present disclosure, the receiving unit receives communication data from the communication device each time the specified period elapses, and the processing unit changes the total number for each of a number of consecutive specified periods so that the total numbers included in each of the specified periods are different from one another, and when the number of specified periods has elapsed, identifies a range to which the communication determination time falls within the specified period based on a number of identification results related to the period, and determines the entire period from when the communication device is instructed to transmit communication data to when the communication determination time falls based on the identified range.

[0017] (5) In a relay device according to one embodiment of the present disclosure, the receiving unit receives relay data for relaying, the received relay data is stored in the memory unit, and permitted periods during which transmission of the relay data is permitted and prohibited periods during which transmission of the relay data is prohibited are set alternately, and the processing unit determines whether the relay data is stored in the memory unit, and if it determines that the relay data is stored in the memory unit, identifies a period among the permitted period and prohibited period to which the relay determination point at which the determination was made belongs, and if the identified period is the permitted period, instructs transmission of the relay data and adjusts the start point or length of the permitted period based on the determined overall period.

[0018] (6) A communication system according to one embodiment of the present disclosure includes a communication device that transmits data and a relay device that receives data from the communication device and transmits the received data, the communication device has a communication processing unit that performs processing, the communication processing unit instructs the relay device to transmit communication data, the relay device has a relay receiving unit that receives the communication data from the communication device, a relay memory unit that stores the communication data received by the relay receiving unit, and a relay processing unit that performs processing, a first period and a second period are set alternately, the relay processing unit changes the total number of the first period and the second period included in the next specified period each time a predetermined period including the first period and the second period elapses, determines whether the communication data is stored in the relay memory unit, and if it determines that the communication data is stored in the relay memory unit, identifies the period among the first period and the second period to which the communication determination time point at which the determination was made belongs.

[0019] (7) In a communication system according to one embodiment of the present disclosure, the communication processing unit instructs the relay receiving unit to transmit communication data each time the specified period elapses, the relay processing unit changes the total number for each of a number of consecutive specified periods so that the total numbers included in each of the specified periods are different from one another, and when the number of specified periods has elapsed, the communication processing unit identifies a range to which the communication determination time falls during the specified period based on a number of identification results identified by the relay processing unit, and determines the entire period from the instruction to transmit communication data to the communication determination time based on the identified range.

[0020] (8) In a communication system according to one embodiment of the present disclosure, the communication processing unit instructs the relay receiving unit to transmit relay data for relaying, the relay memory unit stores the relay data received by the relay receiving unit, and an allowed period during which transmission of the relay data is permitted and a prohibited period during which transmission of the relay data is prohibited are alternately set, the relay processing unit determines whether the relay data is stored in the relay memory unit, and if it determines that the relay data is stored in the relay memory unit, identifies a period among the allowed period and prohibited period to which the relay determination time point at which the determination was made belongs, and if the identified period is the allowed period, instructs the transmission of the relay data, and the communication processing unit determines a transmission instruction time point at which to instruct the transmission of the relay data based on the determined overall period.

[0021] (9) In a communication system according to one embodiment of the present disclosure, when the identified period is the first period, the relay processing unit instructs the communication data received by the relay receiving unit to be transmitted to the communication device, and when the identified period is determined to be the second period, the relay processing unit discards the communication data received by the relay receiving unit. When the multiple predetermined periods have elapsed, the communication processing unit determines the range to which the communication determination time belongs during the specified period based on the multiple reception results of the communication data.

[0022] (10) A processing method according to one aspect of the present disclosure is a processing method for a relay device that relays communications and includes a receiving unit that receives communication data from a communication device and a memory unit that stores the communication data received by the receiving unit, wherein a computer executes the following steps each time a predetermined period including first and second periods that are set alternately elapses: changing the total number of first and second periods included in a next predetermined period; determining whether the communication data is stored in the memory unit; and, if it is determined that the communication data is stored in the memory unit, identifying the period among the first and second periods to which the communication determination time point at which the determination was made belongs.

[0023] In the above aspect, for example, the communication device instructs transmission of communication data each time a predetermined period elapses. The relay device changes the total number of first periods and second periods included in the next predetermined period each time a predetermined period elapses. The relay device identifies the period to which the communication judgment time point of the communication data belongs. Based on the identification results of the multiple communication data, the communication device or the relay device can identify a range within the predetermined period to which the communication judgment time point of the communication data belongs. Based on the identified range, the communication device or the relay device can determine the entire period from when the communication device instructs transmission of communication data to when the communication judgment time point belongs.

[0024] In the above aspect, for example, the communication device instructs transmission of communication data each time a predetermined period has elapsed. The total number of first periods and second periods is different for a plurality of consecutive predetermined periods. After the plurality of consecutive predetermined periods have elapsed, the communication device or the relay device identifies a range to which the communication determination time point of the communication data belongs within the predetermined period based on the identification results of the plurality of communication data.

[0025] When the boundaries of consecutive predetermined periods coincide, and the communication determination time points fluctuate near the coincident boundaries, the period to which the communication determination time points belong is not fixed to one period in each of the predetermined periods. Therefore, the communication device or relay device cannot accurately identify the range to which the communication determination time points belong. However, the positions of the boundaries of consecutive predetermined periods are different from each other. Therefore, the communication device or relay device can accurately identify the range to which the communication determination time points belong even if the communication determination time points fluctuate.

[0026] In the above aspect, for example, the communication device instructs transmission of communication data each time a predetermined period has elapsed. The communication device or relay device identifies the range to which the communication determination time point belongs based on the identification results of the multiple communication data each time multiple consecutive predetermined periods have elapsed. The relay device repeats the multiple predetermined periods multiple times. Therefore, in the case where the communication determination time point fluctuates, the communication device or relay device can determine an overall period that takes the fluctuation into consideration based on the multiple identified ranges to which the communication determination time point belongs.

[0027] In the above aspect, for example, the communication device instructs transmission of communication data each time a predetermined period has elapsed. When the predetermined period has elapsed, the relay device identifies the range of the communication determination time based on the identification result of the multiple communication data. The relay device determines the entire period based on the identified range of the communication data.

[0028] In the above aspect, the relay device adjusts the start point or the length of the permitted period based on the determined overall period, for example, so that the relay determination point of the relay data belongs to the permitted period.

[0029] In the above aspect, for example, the communication device instructs transmission of communication data each time a predetermined period has elapsed. When the predetermined period has elapsed, the communication device identifies a range to which the communication determination time point belongs based on the identification result of the multiple communication data. The communication device determines the entire period based on the identified range.

[0030] In the above aspect, the communication device determines a transmission instruction time point for instructing the relay device to transmit relay data based on the determined overall period, for example, so that the relay determination time point for the relay data belongs to the permitted period.

[0031] In the above aspect, the communication data reception result indicates a result of identifying communication data related to a period. The communication device identifies a range to which the communication determination time point belongs based on the reception result, and determines the entire period based on the identified range.

[0032] [Details of the embodiment of the present disclosure] Specific examples of communication systems according to embodiments of the present disclosure will be described below with reference to the drawings. Note that the present invention is not limited to these examples, but is defined by the claims, and is intended to include all modifications within the meaning and scope of the claims.

[0033] (Embodiment 1) <Communication system configuration> 1 is a block diagram showing a main configuration of a communication system 1 in the first embodiment. The communication system 1 is mounted on a vehicle M. The communication system 1 includes a relay device 2 and three in-vehicle devices 3a, 3b, and 3c. Each of the in-vehicle devices 3a, 3b, and 3c is, for example, an ECU (Electronic Control Unit). The relay device 2 is connected to three connection connectors 2a, 2b, and 2c, respectively. The in-vehicle devices 3a, 3b, and 3c are detachably connected to the connection connectors 2a, 2b, and 2c, respectively.

[0034] Each of the on-vehicle devices 3a, 3b, and 3c functions as a communication device. Each of the on-vehicle devices 3a, 3b, and 3c transmits and receives a relay frame for relaying. The relay frame is data composed of a plurality of bits, and corresponds to relay data. The relay device 2 receives a relay frame from each of the on-vehicle devices 3a, 3b, and 3c. When the relay device 2 receives a relay frame from the on-vehicle device 3a, it transmits the received relay frame to one of the on-vehicle devices 3b and 3c. Similarly, when the relay device 2 receives a relay frame from the on-vehicle device 3b, it transmits the received relay frame to one of the on-vehicle devices 3a and 3c. When the relay device 2 receives a relay frame from the on-vehicle device 3c, it transmits the received relay frame to one of the on-vehicle devices 3a and 3b. As described above, the relay device 2 relays communication between two of the on-vehicle devices 3a, 3b, and 3c.

[0035] Each of the in-vehicle devices 3a, 3b, 3c transmits a relay frame including sensor data or instruction data to the relay device 2. The sensor data indicates a detection value detected by a sensor. The vehicle M has, for example, a reception unit that receives instructions from an occupant. The instruction data indicates, for example, an instruction received by the reception unit. The instruction data indicates, for example, an instruction to lock or unlock the doors. When each of the in-vehicle devices 3a, 3b, 3c receives a relay frame from the relay device 2, it performs an operation based on the received relay frame.

[0036] Each of the in-vehicle devices 3a, 3b, and 3c transmits and receives a communication frame to determine an overall period, which will be described later. A communication frame is data consisting of a plurality of bits, and corresponds to communication data. The relay device 2 receives a communication frame from each of the in-vehicle devices 3a, 3b, and 3c. When the relay device 2 receives a communication frame from the in-vehicle device 3a, it transmits the received communication frame to the in-vehicle device 3a. Similarly, when the relay device 2 receives a communication frame from the in-vehicle device 3b, it transmits the received communication frame to the in-vehicle device 3b. When the relay device 2 receives a communication frame from the in-vehicle device 3c, it transmits the received communication frame to the in-vehicle device 3c.

[0037] <Operation of Relay Device 2> Fig. 2 is an explanatory diagram of a relay method of the relay device 2. The relay device 2 has a device storage unit 22 (see Fig. 8). As shown in Fig. 2, the device storage unit 22 is provided with three receiving buffers Ra, Rb, and Rc and three transmitting buffers Ta, Tb, and Tc as storage areas. The relay device 2 writes relay frames received from the in-vehicle devices 3a, 3b, and 3c into the receiving buffers Ra, Rb, and Rc. Similarly, the relay device 2 writes communication frames received from the in-vehicle devices 3a, 3b, and 3c into the receiving buffers Ra, Rb, and Rc.

[0038] Relay frames whose destinations are the on-board devices 3a, 3b, and 3c are written into the transmission buffers Ta, Tb, and Tc, respectively. Similarly, communication frames whose destinations are the on-board devices 3a, 3b, and 3c are written into the transmission buffers Ta, Tb, and Tc, respectively. Each of the relay frames and communication frames indicates a destination.

[0039] The relay device 2 transfers relay frames stored in the reception buffers Rb and Rc, which are destined for the in-vehicle device 3a, to the transmission buffer Ta. Similarly, the relay device 2 transfers relay frames stored in the reception buffers Ra and Rc, which are destined for the in-vehicle device 3b, to the transmission buffer Tb. The relay device 2 transfers relay frames stored in the reception buffers Ra and Rb, which are destined for the in-vehicle device 3c, to the transmission buffer Tc.

[0040] The destinations of the communication frames stored in the receiving buffers Ra, Rb, and Rc are the in-vehicle devices 3a, 3b, and 3c, respectively. Therefore, the relay device 2 transfers the communication frames stored in the receiving buffers Ra, Rb, and Rc, respectively, to the transmitting buffers Ta, Tb, and Tc.

[0041] The relay device 2 transmits the relay frames and communication frames stored in the transmission buffer Ta to the in-vehicle device 3a. Similarly, the relay device 2 transmits the relay frames and communication frames stored in the transmission buffer Tb to the in-vehicle device 3b. The relay device 2 transmits the relay frames and communication frames stored in the transmission buffer Tc to the in-vehicle device 3c.

[0042] 3 is an explanatory diagram of the operation performed in the transmission buffer Ta. Each of the transmission buffers Ta, Tb, and Tc is provided with a first queue Q1, a second queue Q2, and a communication queue Qm as storage areas. Each of the in-vehicle devices 3a, 3b, and 3c transmits two types of relay frames. Hereinafter, the two types of relay frames are referred to as a first relay frame and a second relay frame, respectively.

[0043] The relay device 2 writes a first relay frame whose destination is the in-vehicle device 3a to a first queue Q1 in the transmission buffer Ta. Furthermore, the relay device 2 writes a second relay frame whose destination is the in-vehicle device 3a to a second queue Q2 in the transmission buffer Tb. The relay device 2 writes a communication frame whose destination is the in-vehicle device 3a to a communication queue Qm.

[0044] The writing performed by the relay device 2 in each of the transmission buffers Tb, Tc is the same as the writing performed by the relay device 2 in the transmission buffer Ta. The relay device 2 writes a first relay frame, a second relay frame, and a communication frame whose destination is the in-vehicle device 3b to the first queue Q1, the second queue Q2, and the communication queue Qm of the transmission buffer Tb, respectively. The relay device 2 writes a first relay frame, a second relay frame, and a communication frame whose destination is the in-vehicle device 3c to the first queue Q1, the second queue Q2, and the communication queue Qm of the transmission buffer Tc, respectively.

[0045] In each of the transmission buffers Ta, Tb, and Tc, when a first relay frame is stored in the first queue Q1, the relay device 2 transmits or discards the first relay frame stored in the first queue Q1. After transmitting the first relay frame, the relay device 2 discards the transmitted first relay frame. The discarding of the relay frame is realized by deleting the relay frame from the device storage unit 22.

[0046] Similarly, in each of the transmission buffers Ta, Tb, and Tc, when a second relay frame is stored in the second queue Q2, the relay device 2 transmits or discards the second relay frame stored in the second queue Q2. After transmitting the second relay frame, the relay device 2 discards the transmitted second relay frame. In each of the transmission buffers Ta, Tb, and Tc, when a communication frame is stored in the communication queue Qm, the relay device 2 transmits or discards the communication frame stored in the communication queue Qm. After transmitting the communication frame, the relay device 2 discards the transmitted communication frame. The discarding of the communication frame is achieved by deleting the communication frame from the device storage unit 22.

[0047] FIG. 4 is an explanatory diagram of a method of determining a relayed frame performed by relay device 2. Relay device 2 has master counter 20 (see FIG. 8). A count value is stored in master counter 20. FIG. 4 shows the count value of master counter 20. A fixed count number is determined in advance. The count number is 2 or more. Master counter 20 increments the count value by 1 each time a fixed period has elapsed. When the count value is (count number)-1, master counter 20 resets the count value to zero when a fixed period has elapsed. In the example of FIG. 4, the count number is 120. One period is expressed as (count number)·(fixed period). "·" represents a product.

[0048] For each of the first queue Q1 and the second queue Q2, an open period and a closed period are set alternately and repeatedly. In the example of Fig. 4, for the first queue Q1, a period in which the count value is within the range of 0 to 74 is an open period. A period in which the count value is within the range of 75 to 119 is a closed period. For the second queue Q2, a period in which the count value is within the range of 0 to 74 is a closed period. A period in which the count value is within the range of 75 to 119 is an open period.

[0049] The relay device 2 determines whether or not a first relay frame is stored in the first queue Q1. If the relay device 2 determines that the first relay frame is stored in the first queue Q1, it identifies the period to which the relay judgment time point at which the determination was made belongs from the open period or the closed period. Similarly, the relay device 2 determines whether or not a second relay frame is stored in the second queue Q2. If the relay device 2 determines that the second relay frame is stored in the second queue Q2, it identifies the period to which the relay judgment time point at which the determination was made belongs from the open period or the closed period.

[0050] Fig. 5 is a table showing the relationship between relay determination time points and operations for a relay frame. As shown in Fig. 5, the relay device 2 transmits the first relay frame when the period of the first queue Q1 to which the relay determination time point belongs is an open period. The first relay frame stored in each of the transmission buffers Ta, Tb, and Tc is transmitted to the in-vehicle devices 3a, 3b, and 3c. The relay device 2 discards the first relay frame when the period to which the relay determination time point belongs is a closed period.

[0051] Similarly, when the period of the second queue Q2 to which the relay determination time belongs is an open period, the relay device 2 transmits the second relay frame. The second relay frames stored in the transmission buffers Ta, Tb, and Tc are transmitted to the in-vehicle devices 3a, 3b, and 3c. When the period to which the relay determination time belongs is a closed period, the relay device 2 discards the second relay frame.

[0052] The open period of the first queue Q1 and the second queue Q2 corresponds to an allowed period during which the transmission of relay frames is allowed, and the closed period of the first queue Q1 and the second queue Q2 corresponds to a prohibited period during which the transmission of relay frames is prohibited.

[0053] Fig. 4 shows a method of determining the first and second relay frames stored in the transmission buffer Ta. The first row of Fig. 4 shows the relay determination time points of the first and second relay frames transmitted by the in-vehicle device 3b to the relay device 2. The second row of Fig. 4 shows the relay determination time points of the first and second relay frames transmitted by the in-vehicle device 3c to the relay device 2. The third row of Fig. 4 shows the first and second relay frames transmitted by the relay device 2 to the in-vehicle device 3a.

[0054] 4, among the multiple first relay frames whose source is one of the in-vehicle devices 3b and 3c, the first relay frame whose relay determination time point belongs to the open period of the first queue Q1 is transmitted to the in-vehicle device 3a by the relay device 2. Among the multiple first relay frames whose source is one of the in-vehicle devices 3b and 3c, the first relay frame whose relay determination time point belongs to the close period of the first queue Q1 is discarded by the relay device 2.

[0055] Similarly, among the multiple second relay frames whose transmission source is one of the in-vehicle devices 3b and 3c, the second relay frame whose relay determination time point belongs to the open period of the second queue Q2 is transmitted to the in-vehicle device 3a by the relay device 2. Among the multiple second relay frames whose transmission source is one of the in-vehicle devices 3b and 3c, the second relay frame whose relay determination time point belongs to the closed period of the second queue Q2 is discarded by the relay device 2. As described above, the relay device 2 transmits and discards relay frames in accordance with the IEEE 802.1Qbv and IEEE 802.1Qci standards. IEEE is a registered trademark and an abbreviation for the Institute of Electrical and Electronics Engineers.

[0056] FIG. 6 is an explanatory diagram of a method of determining a communication frame performed by the relay device 2. For the communication queue Qm as well, open periods and closed periods are set alternately and repeatedly. One cycle includes an open period and a closed period. The open period and the closed period of the communication queue Qm correspond to a first period and a second period, respectively. One cycle corresponds to a predetermined period. The relay device 2 determines whether or not a communication frame is stored in the communication queue Qm. If the relay device 2 determines that a communication frame is stored in the communication queue Qm, it identifies the period to which the communication determination time point at which the determination was made belongs from among the open period and the closed period.

[0057] Fig. 7 is a table showing the relationship between the communication judgment time point and the operation for the communication frame. As shown in Fig. 6, the relay device 2 transmits the communication frame when the period to which the communication judgment time point belongs is an open period. The communication frames stored in the transmission buffers Ta, Tb, and Tc are transmitted to the in-vehicle devices 3a, 3b, and 3c. The relay device 2 discards the communication frame when the period to which the communication judgment time point belongs is a closed period.

[0058] Fig. 6 shows a method of determining a communication frame stored in the transmission buffer Ta. The first row of Fig. 6 shows a communication determination time of a communication frame transmitted from the in-vehicle device 3a to the relay device 2. The second row of Fig. 6 shows a communication frame transmitted from the relay device 2 to the in-vehicle device 3a. As shown in Fig. 6, a communication frame whose communication determination time belongs to the open period of the communication queue Qm is transmitted by the relay device 2 to the in-vehicle device 3a. A communication frame whose communication determination time belongs to the close period of the communication queue Qm is discarded by the relay device 2. The relay device 2 transmits and discards communication frames as described above in accordance with the IEEE802.1Qbv and IEEE802.1Qci standards.

[0059] As shown in Fig. 6, the relay device 2 can change the total number of open periods and closed periods included in one cycle every time one cycle elapses. In the example of Fig. 6, the relay device 2 changes the total number of open periods and closed periods included in one cycle from 2 to 4. The in-vehicle device 3a repeatedly instructs the transmission of communication frames when the count value is zero.

[0060] The relay device 2 identifies the period to which the communication judgment time point of the communication frame belongs for each of the K periods. K is an integer equal to or greater than 2. The in-vehicle device 3a identifies the range to which the communication judgment time point belongs in one period based on the K identification results related to the period. The in-vehicle device 3a determines the entire period from when the in-vehicle device 3a is instructed to transmit the communication frame to the communication judgment time point based on the identified range. The in-vehicle device 3a instructs the transmission of the first relay frame and the second relay frame based on the determined entire period so that the relay judgment time point belongs to an open period.

[0061] Similarly, each of the in-vehicle devices 3b and 3c repeatedly instructs transmission of communication frames when the count value is zero. Each of the in-vehicle devices 3b and 3c specifies its own range, similar to the in-vehicle device 3a. Each of the in-vehicle devices 3b and 3c determines the overall period for the in-vehicle devices 3b and 3c, similar to the in-vehicle device 3a. Each of the in-vehicle devices 3b and 3c instructs transmission of the first relay frame and the second relay frame, similar to the in-vehicle device 3a.

[0062] <Configuration of Relay Device 2> FIG. 8 is a block diagram showing the main configuration of the relay device 2. As described above, the relay device 2 has the master counter 20 and the device storage unit 22. The relay device 2 further has three device communication ICs 21a, 21b, and 21c and a device control unit 23. IC is an abbreviation for Integrated Circuit. The master counter 20, the device communication ICs 21a, 21b, and 21c, the device storage unit 22, and the device control unit 23 are connected to a device bus 24. The device communication ICs 21a, 21b, and 21c are connected to the connection connectors 2a, 2b, and 2c, respectively. As described above, the connection connectors 2a, 2b, and 2c are connected to the in-vehicle devices 3a, 3b, and 3c, respectively.

[0063] The device communication ICs 21a, 21b, and 21c receive relay frames, communication frames, request data, start data, and the like from the in-vehicle devices 3a, 3b, and 3c. The device communication ICs 21a, 21b, and 21c function as a receiver and a relay receiver. The device communication ICs 21a, 21b, and 21c transmit relay frames, communication frames, response data, count data, pattern data, target data, and the like to the in-vehicle devices 3a, 3b, and 3c according to instructions from the device control unit 23.

[0064] The request data is data that requests the transmission of response data. The start data indicates the start of transmission of a communication frame. The response data is transmitted when the request data is received. The count data indicates the count value of the master counter 20. The pattern data indicates the arrangement of open periods and closed periods for each of the K periods. The target data indicates a target time point. The target time point is the time point at which a determination should be made as to whether or not a relay frame has been stored.

[0065] FIG. 9 is an explanatory diagram of the contents of the pattern data. FIG. 9 shows an example in which the count number is 120 and K is 3. In the pattern data, the arrangement of the open period and the closed period for each of the first, second and third cycles is shown by the count value of the master counter 20. For example, the open period of the first cycle is a period in which the count value is a value in the range from 0 to 59. The closed period of the first cycle is a period in which the count value is a value in the range from 60 to 119. In the example of FIG. 9, the number of open periods matches the number of closed periods for each of the K cycles.

[0066] The total number of open periods and closed periods included in the i-th cycle is 2 to the power of i, where i is any natural number equal to or less than K, and may be 1, 2,...,K. In the example of Fig. 9, the lengths of the multiple periods included in each cycle are the same. Note that the length of each of the multiple periods included in each cycle may be different from the length of at least one of the other periods.

[0067] The relay device 2 changes the total number and boundary positions of the open periods and closed periods of the communication queue Qm from the first cycle to the Kth cycle in accordance with the pattern data. The boundaries to be changed are the boundaries between the open periods and closed periods. Each time one cycle elapses, the relay device 2 changes the total number of open periods and closed periods of the communication queue Qm included in the next cycle. The relay device 2 changes the total number of open periods and closed periods included in each of the successive K cycles so that the total numbers included in each of the successive K cycles are different from each other.

[0068] Fig. 10 is a table showing the contents of the target data. As described above, the target data indicates the target time of the relay frame. The target time is represented by the count value of the master counter 20. Fig. 10 shows the target data used by the in-vehicle device 3a. The in-vehicle device 3a transmits the first relay frame and the second relay frame to the device communication IC 21a so that the relay determination time becomes the target time.

[0069] In the example of Fig. 10, the in-vehicle device 3a transmits a first relay frame whose destination is the in-vehicle device 3b so that the relay determination time is the time when the count value of the master counter 20 is zero. The in-vehicle device 3a transmits a first relay frame whose destination is the in-vehicle device 3c so that the relay determination time is the time when the count value of the master counter 20 is 20. Similarly, the in-vehicle device 3a transmits a second relay frame whose destination is the in-vehicle device 3b so that the relay determination time is the time when the count value of the master counter 20 is 60. The in-vehicle device 3a transmits a second relay frame whose destination is the in-vehicle device 3c so that the relay determination time is the time when the count value of the master counter 20 is 100.

[0070] The contents of the target data used by each of the on-board devices 3b and 3c are similar to the contents of the target data used by the on-board device 3a. The target data used by the on-board device 3b indicates the contents of a relay frame whose destination is one of the on-board devices 3a and 3c. The target data used by the on-board device 3c indicates the contents of a relay frame whose destination is one of the on-board devices 3a and 3b. It is preferable that the target time points of a plurality of first relay frames having the same destination and different transmission sources are different from each other. Similarly, it is preferable that the target time points of a plurality of second relay frames having the same destination and different transmission sources are different from each other.

[0071] The device storage unit 22 shown in FIG. 8 stores pattern data and three target data. The device control unit 23 has a processing element that executes processing, for example, a CPU (Central Processing Unit). The device control unit 23 functions as a processing unit and a relay processing unit. The device storage unit 22 further stores a computer program Pr. The computer program Pr is a program product. The processing element (computer) of the device control unit 23 executes the computer program Pr to execute three data transmission processes, three period change processes, a data movement process, communication frame relay processes for each of the transmission buffers Ta, Tb, and Tc, a first relay process and a second relay process for the transmission buffer Ta, a first relay process and a second relay process for the transmission buffer Tb, and a first relay process and a second relay process for the transmission buffer Tc.

[0072] Each of the three data transmission processes is a process for transmitting response data, count data, pattern data, target data, etc. to the in-vehicle devices 3a, 3b, 3c. The period change process is a process for changing the total number and boundary positions, etc., of the open period and closed period of the communication queue Qm from the first cycle to the Kth cycle in accordance with the pattern data. Each of the three period change processes corresponds to the communication queue Qm of the transmission buffers Ta, Tb, Tc. The data movement process is a process for moving a relay frame or a communication frame from one of the reception buffers Ra, Rb, Rc to at least one of the transmission buffers Ta, Tb, Tc. The communication frame relay process is a process for relaying a communication frame. The first relay process is a process for relaying a first relay frame. The second relay process is a process for relaying a second relay frame.

[0073] The computer program Pr may be provided to the relay device 2 using a non-transient storage medium Ar that readably stores the computer program Pr. The storage medium Ar is, for example, a portable memory. Examples of the portable memory include a CD-ROM, a USB (Universal Serial Bus) memory, an SD card, a micro SD card, and a Compact Flash (registered trademark). When the storage medium Ar is a portable memory, the processing element of the device control unit 23 may read the computer program Pr from the storage medium Ar using a reading device (not shown). The read computer program Pr is written to the device storage unit 22. Furthermore, the computer program Pr may be provided to the relay device 2 by a communication unit (not shown) of the relay device 2 communicating with an external device. In this case, the processing element of the device control unit 23 acquires the computer program Pr through the communication unit. The acquired computer program Pr is written to the device storage unit 22.

[0074] Furthermore, the number of processing elements included in device control unit 23 is not limited to 1, and may be 2 or more. When device control unit 23 has multiple processing elements, the multiple processing elements may cooperate to execute the above-mentioned processes, such as the three data transmission processes and the three period change processes.

[0075] The device storage unit 22 is composed of, for example, a non-volatile memory and a volatile memory. In this case, for example, a computer program Pr, pattern data, target data, etc. are stored in the non-volatile memory of the device storage unit 22. For example, three receiving buffers Ra, Rb, Rc and three transmitting buffers Ta, Tb, Tc are provided in the storage area of ​​the volatile memory of the device storage unit 22.

[0076] <Configuration of the in-vehicle devices 3a, 3b, and 3c> 11 is a block diagram showing the main configuration of the in-vehicle device 3a. The in-vehicle device 3a has a slave counter 30, a device communication IC 31, a device storage unit 32, and a device control unit 33. These are connected to a device bus 34. The device communication IC 31 is further connected to a device connector B. The device connector B of the in-vehicle device 3a is detachably connected to the connection connector 2a.

[0077] A count value is stored in the slave counter 30. Like the master counter 20, the slave counter 30 increments the count value by one each time a certain period of time has elapsed. The certain period of time and the count number of the slave counter 30 are the same as those of the master counter 20. When the count value is (count number)-1, the slave counter 30 resets the count value to zero when a certain period of time has elapsed. The device control unit 33 synchronizes the count value of the slave counter 30 with the count value of the master counter 20.

[0078] The device communication IC 31 receives relay frames, communication frames, response data, count data, pattern data, target data, etc. from the device communication IC 21a of the relay device 2. The device communication IC 31 transmits relay frames, communication frames, request data, start data, etc. according to instructions from the device control unit 33.

[0079] The device storage unit 32 stores a computer program Pe. The computer program Pe is a program product. The device control unit 33 has a processing element that executes processing, such as a CPU. The device control unit 33 functions as a communication processing unit. The processing element (computer) of the device control unit 33 executes the computer program Pe to execute adjustment processing, period determination processing, writing processing, relay frame transmission processing, and the like.

[0080] In the adjustment process, the device control unit 33 adjusts the count value of the slave counter 30. In the adjustment process, the device control unit 33 further writes pattern data, target data, etc. to the device storage unit 32. The period determination process is a process for determining the entire period. The write process is a process for writing a relay frame to the device storage unit 32. The relay frame transmission process is a process for transmitting a relay frame to the relay device 2.

[0081] The computer program Pe may be provided to the in-vehicle device 3a using a non-transitory storage medium Ae that readably stores the computer program Pe. The storage medium Ae is, for example, a portable memory. When the storage medium Ae is a portable memory, the processing element of the device control unit 33 may read the computer program Pe from the storage medium Ae using a reading device (not shown). The read computer program Pe is written to the device storage unit 32. Furthermore, the computer program Pe may be provided to the in-vehicle device 3a by a communication unit (not shown) of the in-vehicle device 3a communicating with an external device. In this case, the processing element of the device control unit 33 acquires the computer program Pe through the communication unit. The acquired computer program Pe is written to the device storage unit 32.

[0082] Furthermore, the number of processing elements included in the device control unit 33 is not limited to 1, and may be 2 or more. When the device control unit 33 has multiple processing elements, the multiple processing elements may cooperate to execute adjustment processing, period determination processing, writing processing, relay frame transmission processing, and the like.

[0083] The device storage unit 32 is configured with, for example, a non-volatile memory and a volatile memory. In this case, for example, the computer program Pe and target data, etc. are stored in the non-volatile memory of the device storage unit 32.

[0084] The in-vehicle devices 3b and 3c are configured similarly to the in-vehicle device 3a. The connector 2a corresponds to the connectors 2b and 2c. The device communication IC 21a corresponds to the device communication ICs 21b and 21c.

[0085] <Initial Settings Performed by Relay Device 2> 12 and 13 are flowcharts showing the procedure of the initial setting performed by the relay device 2 with the in-vehicle device 3a. In the initial setting, the device control unit 23 of the relay device 2 executes a data transmission process. The device control unit 33 of the in-vehicle device 3a executes an adjustment process. The device control unit 23 of the relay device 2 executes a data transmission process when the in-vehicle device 3a is removed from the connection connector 2a. The device control unit 33 of the in-vehicle device 3a executes an adjustment process when the in-vehicle device 3a is connected to the connection connector 2a.

[0086] In the data transmission process, the device control unit 23 determines whether or not the in-vehicle device 3a is connected to the connector 2a (step S1). If the device control unit 23 determines that the in-vehicle device 3a is not connected to the connector 2a (S1: NO), it executes step S1 again and waits until the in-vehicle device 3a is connected to the connector 2a. If the device control unit 23 determines that the in-vehicle device 3a is connected to the connector 2a (S1: YES), it instructs the device communication IC 21a to transmit count data indicating the count value of the master counter 20 to the device communication IC 31 of the in-vehicle device 3a (step S2).

[0087] In the adjustment process, the device control unit 33 of the in-vehicle device 3a determines whether the device communication IC 31 has received the count data (step S11). If the device control unit 33 determines that the device communication IC 31 has not received the count data (S11: NO), it executes step S11 again and waits until the device communication IC 31 receives the count data. If the device control unit 33 determines that the device communication IC 31 has received the count data (S11: YES), it adjusts the count value of the slave counter 30 to the count value indicated by the count data received by the device communication IC 31 (step S12).

[0088] Next, the device control unit 33 instructs the device communication IC 31 to transmit the request data to the device communication IC 21a of the relay device 2 (step S13). The request data includes device transmission count information indicating the count value of the slave counter 30 at the time when the request data is transmitted. Hereinafter, the count value of the slave counter 30 at the time when the request data is transmitted is referred to as the device transmission count value.

[0089] After executing step S2, the device control unit 23 of the relay device 2 determines whether the device communication IC 21a has received the request data (step S3). If the device control unit 23 determines that the device communication IC 21a has not received the request data (S3: NO), it executes step S3 again and waits until the device communication IC 21a receives the request data. If the device control unit 23 determines that the device communication IC 21a has received the request data (S3: YES), it instructs the device communication IC 21a to transmit response data to the device communication IC 31 of the in-vehicle device 3a (step S4).

[0090] The response data includes the device transmission count information, device reception count information, and device transmission count information contained in the request data. The device reception count information indicates the count value of the master counter 20 at the time when the device communication IC 21a receives the request data. The device transmission count information indicates the count value of the master counter 20 at the time when the device communication IC 21a transmits the response data. In the following, the count value of the master counter 20 at the time when the device communication IC 21a receives the request data is referred to as the device reception count value. The count value of the master counter 20 at the time when the device communication IC 21a transmits the response data is referred to as the device transmission count value.

[0091] After executing step S13, the device control unit 33 of the in-vehicle device 3a determines whether or not the device communication IC 31 has received response data from the device communication IC 21a of the relay device 2 (step S14). If the device control unit 33 determines that the device communication IC 31 has not received the response data (S14: NO), it executes step S14 again and waits until the device communication IC 31 receives the response data.

[0092] Hereinafter, the count value of the slave counter 30 at the time when the device communication IC 31 receives the response data will be referred to as a device reception count value. As described above, the response data includes device transmission count information, device reception count information, and device transmission count information.

[0093] The equipment sending count value, equipment receiving count value, equipment sending count value, and equipment receiving count value are represented by Het, Hrr, Hrt, and Her, respectively. The propagation times of the request data and the response data are assumed to be the same. In this case, the difference Hd between the count values ​​of the master counter 20 and the slave counter 30 is expressed by the following formula (1). Hd=((Hrr-Het)-(Her-Hrt)) / 2···(1)

[0094] When the device control unit 33 determines that the device communication IC 31 has received the response data (S14: YES), it executes fine adjustment of the count value of the slave counter 30 based on the difference Hd (step S15). As described above, when the device communication IC 31 of the in-vehicle device 3a receives count data from the device communication IC 21a of the relay device 2, the device control unit 33 adjusts the count value of the slave counter 30 to the count value indicated by the count data received by the device communication IC 31. Therefore, the count value of the slave counter 30 is smaller than the actual count value of the master counter 20.

[0095] In step S15, the device control unit 33 increases the count value of the slave counter 30 by the absolute value of the difference Hd. As a result, the count value of the slave counter 30 substantially matches the count value of the master counter 20.

[0096] In addition, in formula (1), if Hrr is smaller than Het, the value required for the count value to reach Hrr from Het is used as (Hrr-Het).If Hrt is smaller than Her, the value required for the count value to reach Her from Hrt is used as (Her-Hrt). The method for calculating the difference Hd is not limited to the method using equation (1).

[0097] After executing step S4, the device control unit 23 of the relay device 2 instructs the device communication IC 21a to transmit the pattern data to the device communication IC 31 of the in-vehicle device 3a (step S5). After executing step S15, the device control unit 33 of the in-vehicle device 3a determines whether the device communication IC 31 has received the pattern data from the device communication IC 21a (step S16). If the device control unit 33 determines that the device communication IC 31 has not received the pattern data (S16: NO), it executes step S16 again and waits until the device communication IC 31 receives the pattern data.

[0098] When it is determined that the device communication IC 31 has received the pattern data (S16: YES), the device control unit 33 writes the pattern data received by the device communication IC 31 into the device storage unit 32 (step S17).

[0099] After executing step S5, the device control unit 23 of the relay device 2 instructs the device communication IC 21a to transmit the target data for the in-vehicle device 3a to the device communication IC 31 of the in-vehicle device 3a (step S6). After executing step S6, the device control unit 23 ends the data transmission process. If the in-vehicle device 3a is removed from the connection connector 2a, the device control unit 23 executes the data transmission process again.

[0100] After executing step S17, the device control unit 33 of the in-vehicle device 3a determines whether the device communication IC 31 has received the target data of the in-vehicle device 3a from the device communication IC 21a (step S18). If the device control unit 33 determines that the device communication IC 31 has not received the target data (S18: NO), it executes step S18 again and waits until the device communication IC 31 receives the target data.

[0101] When the device control unit 33 determines that the device communication IC 31 has received the target data for the in-vehicle device 3a (S18: YES), the device control unit 33 writes the target data for the in-vehicle device 3a received by the device communication IC 31 to the device storage unit 32 (step S19). After executing step S19, the device control unit 33 ends the adjustment process. When the in-vehicle device 3a is reconnected to the connection connector 2a after being removed from the connection connector 2a, the device control unit 33 executes the adjustment process again.

[0102] As described above, when the device control unit 23 and the equipment control unit 33 execute the data transmission process and the adjustment process, respectively, the count values ​​of the master counter 20 and the slave counter 30 substantially match. Furthermore, the device storage unit 32 of the in-vehicle device 3a stores the pattern data and the target data for the in-vehicle device 3a.

[0103] If the count number and the fixed period of the slave counter 30 do not match the count number and the fixed period of the master counter 20, the device communication IC 21a of the relay device 2 transmits count data indicating the count value, count number, and fixed period of the master counter 20 to the device communication IC 31 of the in-vehicle device 3a in step S2. When the device communication IC 31 receives the count data, the device control unit 33 adjusts the count value, count number, and fixed period of the slave counter 30 to the count value, count number, and fixed period indicated by the count data.

[0104] The initial settings performed by the relay device 2 for each of the in-vehicle devices 3b and 3c are the same as the initial settings performed by the relay device 2 for the in-vehicle device 3a. The connector 2a corresponds to the connectors 2b and 2c. The device communication IC 21a corresponds to the device communication ICs 21b and 21c.

[0105] <Overview of how the overall period is determined> 14 is a sequence diagram for explaining an outline of a method for determining the total period of the in-vehicle device 3a. After the count value of the master counter 20 is synchronized with the count value of the slave counter 30, the in-vehicle device 3a determines the total period of the in-vehicle device 3a. The in-vehicle device 3a first transmits start data to the relay device 2. When the relay device 2 receives the start data, it waits until the count value of the master counter 20 becomes zero.

[0106] When the count value becomes zero, the relay device 2 starts changing the period in accordance with the pattern data. As described above, the relay device 2 changes the total number and boundary positions, etc., of the open period and closed period of the communication queue Qm from the first cycle to the Kth cycle in accordance with the pattern data. The boundaries to be changed are the boundaries between the open period and the closed period. The relay device 2 repeats changing the period in accordance with the pattern data N times, where N is an integer equal to or greater than 2.

[0107] After transmitting the start data, the in-vehicle device 3a waits until the count value of the slave counter 30 reaches zero. When the count value reaches zero, the in-vehicle device 3a transmits a communication frame to the relay device 2. When the relay device 2 receives a communication frame, it writes the received communication frame into the reception buffer Ra. Next, the relay device 2 transfers the communication frame stored in the reception buffer Ra to the transmission buffer Ta. Next, the relay device 2 determines whether or not a communication frame is stored in the transmission buffer Ta.

[0108] When the relay device 2 determines that a communication frame is stored in the transmission buffer Ta, it identifies the period to which the determined communication determination time belongs, among the open period and closed period of the communication queue Qm. If the identified period is an open period, the relay device 2 transmits the communication frame to the in-vehicle device 3a. If the identified period is a closed period, the relay device 2 discards the communication frame. Therefore, for the in-vehicle device 3a, the reception of a communication frame means that the period identified by the relay device 2 is an open period. For the in-vehicle device 3a, the failure to receive a communication frame means that the period identified by the relay device 2 is a closed period. The reception result corresponds to the identification result regarding the period.

[0109] Each time the count value becomes zero, the in-vehicle device 3a transmits a communication frame to the relay device 2. The in-vehicle device 3a transmits the communication frame (K·N) times to the relay device 2. Based on the (K·N) reception results, the in-vehicle device 3a identifies the N ranges to which the communication determination time point belongs.

[0110] FIG. 15 is an explanatory diagram of a method for determining the belonging range. FIG. 15 shows an example in which the pattern data shown in FIG. 9 is used. In the example of FIG. 9, K is 3. The in-vehicle device 3a identifies the belonging range based on the K reception results. FIG. 15 shows an example in which the K communication determination time points received by the relay device 2 from the in-vehicle device 3a are 67. The in-vehicle device 3a does not recognize that the communication determination time point is 67. Therefore, the in-vehicle device 3a does not recognize the belonging range to which the communication determination time point belongs. The in-vehicle device 3a receives the pattern data from the relay device 2.

[0111] When the communication determination time point is 67, the relay device 2 discards the communication frame transmitted from the in-vehicle device 3a during the first period. The relay device 2 transmits the communication frame transmitted from the in-vehicle device 3a during the second period to the in-vehicle device 3a. The relay device 2 transmits the communication frame transmitted from the in-vehicle device 3a during the third period to the in-vehicle device 3a. Based on the three reception results, the in-vehicle device 3a recognizes that the three periods identified by the relay device 2 in the first period, second period, and third period are a closed period, an open period, and an open period, respectively.

[0112] When the belonging range is a range in which the three periods are a closed period, an open period, and an open period, respectively, in the example of Fig. 15, the belonging range is a range from 60 to 74. In this way, the in-vehicle device 3a specifies the belonging range based on the K reception results.

[0113] The open periods and closed periods of the pattern data are arranged such that the number of ranges in which the three periods corresponding to the three cycles are closed periods, open periods, and open periods is 1. Specifically, in the i-th cycle of the pattern data, the open periods and closed periods are arranged such that the number of open periods and closed periods existing within a common range in the 1st to (i-1)th cycles is 1 or less.

[0114] In FIG. 15, the number of common ranges in the first cycle is 2. The first common range is the open period in the first cycle. The second common range is the closed period in the first cycle. For the second cycle, the number of open periods and closed periods that belong to each common range is 1.

[0115] The number of common ranges of the first and second periods is 4. The first common range is a range in which the periods corresponding to the first and second periods are open periods and open periods, respectively. The second common range is a range in which the periods corresponding to the first and second periods are open periods and closed periods, respectively. The third common range is a range in which the periods corresponding to the first and second periods are closed periods and open periods, respectively. The fourth common range is a range in which the periods corresponding to the first and second periods are closed periods and closed periods, respectively. With respect to the third period, the number of open periods and closed periods each belonging to each common range of the first and second periods is 1. Only open periods or only closed periods may be arranged within the common range.

[0116] As shown in FIG. 14, the in-vehicle device 3a identifies N belonging ranges, and then determines the entire period of the in-vehicle device 3a based on the identified N belonging ranges. The entire period is indicated by the width of the count value from the transmission instruction value at which the transmission of a communication frame is instructed to the communication determination time point. The transmission instruction value is a count value. As described above, the count value is incremented by 1 each time a certain period has elapsed. Therefore, the entire period is the product of the width of the count value and the certain period. As described above, the in-vehicle device 3a instructs the transmission of a communication frame when the count value is zero. Therefore, the count value at the communication determination time point indicates the entire period.

[0117] In order to determine the overall period of the in-vehicle device 3a, the in-vehicle device 3a first determines a calculated value for calculating the overall period. If the identified N belonging ranges are the same, the in-vehicle device 3a determines the calculated value to be the median value of the identified belonging ranges. The in-vehicle device 3a determines the overall period to be the product of a value obtained by subtracting the transmission instruction value (=0) of the communication frame from the determined calculated value and a fixed period. The determined overall period is indicated by a value obtained by subtracting the transmission instruction value from the calculated value. There is a possibility that two ranges are included in the N belonging ranges identified by the in-vehicle device 3a. That is, there is a possibility that ranges E1 and E2 exist as belonging ranges.

[0118] 16 is an explanatory diagram of a method for determining the entire period when there are two ranges E1 and E2 as belonging ranges. When the in-vehicle device 3a transmits multiple communication frames, the communication judgment time points of these communication frames may not be the same. In other words, the communication judgment time point may vary.

[0119] In the example of Fig. 16, the communication determination time point fluctuates around 75. Range E1 is a range from 60 to 74. Range E2 is a range from 75 to 89. When there are two ranges E1 and E2 as belonging ranges, the in-vehicle device 3a determines the calculated value of the entire period to be a value within the majority range that is the largest among ranges E1 and E2. The more minority ranges that are the smallest among ranges E1 and E2, the closer the calculated value of the entire period is to a value within the minority range.

[0120] For example, when the number of ranges E2 is greater than the number of ranges E1, the in-vehicle device 3a determines the calculated value to be within range E2. The more the number of ranges E1 is, the closer the calculated value is to range E1 within range E2. In this way, the entire period is determined taking into account the fluctuation of the communication determination time point. The method of determining the entire period is not limited to the above-mentioned method, and there is no problem if the entire period is determined based on the specified N ranges.

[0121] The method of determining the total period for each of the in-vehicle devices 3b and 3c is the same as the method of determining the total period for the in-vehicle device 3a. In the following, a specific process performed by the device control unit 23 of the relay device 2 and the in-vehicle devices 3a, 3b, and 3c in relation to a method for determining the entire period will be described.

[0122] <Change the period according to the pattern data> 17 is a flowchart showing the procedure of the period change process corresponding to the communication queue Qm of the transmission buffer Ta. The period change process is executed by the device control unit 23 of the relay device 2 after the initial setting is performed. The value of the variable U is stored in the device storage unit 22 of the relay device 2. The device control unit 23 changes the value of the variable U. In the period change process, the device control unit 23 first determines whether the device communication IC 21a has received start data from the in-vehicle device 3a (step S21). When the device control unit 23 determines that the device communication IC 21a has not received the start data (S21: NO), it executes step S21 again and waits until the device communication IC 21a receives the start data.

[0123] When the device control unit 23 determines that the device communication IC 21a has received the start data (S21: YES), it sets the value of the variable U to zero (step S22) and determines whether the count value of the master counter 20 is zero (step S23). When the device control unit 23 determines that the count value is not zero (S23: NO), it executes step S23 again and waits until the count value becomes zero.

[0124] When the device control unit 23 determines that the count value is zero (S23: YES), it changes the period in accordance with the pattern data (step S24). As described above, the device control unit 23 changes the total number of open periods and closed periods included in the next cycle in accordance with the pattern data each time one cycle elapses. The device control unit 23 changes the total number of open periods and closed periods included in each cycle so that the total numbers included in each of the consecutive K cycles are different from one another. Next, the device control unit 23 increments the value of the variable U by 1 (step S25).

[0125] After executing step S25, device control unit 23 determines whether the value of variable U is N or not (step S26). If device control unit 23 determines that the value of variable U is not N (S26: NO), device control unit 23 executes step S23 and changes the period in accordance with the pattern data again. If device control unit 23 determines that the value of variable U is N (S26: YES), device control unit 23 ends the period change process. After ending the period change process, device control unit 23 executes the period change process again.

[0126] As described above, in the period change process, device control section 23 repeats changing the period in accordance with the pattern data N times. The period change process corresponding to the communication queue Qm of the transmission buffers Tb and Tc is similar to the period change process corresponding to the communication queue Qm of the transmission buffer Ta. The device communication IC 21a corresponds to the device communication ICs 21b and 21c. The in-vehicle device 3a corresponds to the in-vehicle devices 3b and 3c.

[0127] <Movement of communication frames and relay frames performed by relay device 2> As described above, the device control unit 23 of the relay device 2 executes the data movement process. In the data movement process, the device control unit 23 writes the communication frames received by the device communication ICs 21a, 21b, and 21c, respectively, to the receiving buffers Ra, Rb, and Rc of the device storage unit 22. The device control unit 23 transfers the communication frames stored in the receiving buffers Ra, Rb, and Rc, respectively, to the communication queues Qm of the transmitting buffers Ta, Tb, and Tc. The device storage unit 22 functions as a relay storage unit.

[0128] The device control unit 23 writes the relay frames received by the device communication ICs 21a, 21b, and 21c into the receiving buffers Ra, Rb, and Rc. The device control unit 23 transfers the relay frames whose destination is the in-vehicle device 3a, among the relay frames stored in the receiving buffers Rb and Rc, to the transmitting buffer Ta. Here, the device control unit 23 transfers the first relay frame to the first queue Q1 of the transmitting buffer Ta. The device control unit 23 transfers the second relay frame to the second queue Q2 of the transmitting buffer Ta.

[0129] Similarly, the device control unit 23 transfers relay frames whose destination is the in-vehicle device 3b, among the relay frames stored in the reception buffers Ra, Rc, to the transmission buffer Tb. Here, the device control unit 23 transfers the first relay frame to the first queue Q1 of the transmission buffer Tb. The device control unit 23 transfers the second relay frame to the second queue Q2 of the transmission buffer Tb. The device control unit 23 transfers relay frames whose destination is the in-vehicle device 3c, among the relay frames stored in the reception buffers Ra, Rb, to the transmission buffer Tc. Here, the device control unit 23 transfers the first relay frame to the first queue Q1 of the transmission buffer Tc. The device control unit 23 transfers the second relay frame to the second queue Q2 of the transmission buffer Tc.

[0130] <Relay of communication frames performed by relay device 2> 18 is a flowchart showing a procedure of a communication frame relay process of the transmission buffer Ta. In the communication frame relay process of the transmission buffer Ta, the device control unit 23 of the relay device 2 determines whether or not a communication frame is stored in the communication queue Qm of the transmission buffer Ta (step S31). When the device control unit 23 determines that a communication frame is not stored in the communication queue Qm (S31: NO), it executes step S31 again and waits until a communication frame is written in the communication queue Qm.

[0131] When the device control unit 23 determines that a communication frame is stored in the communication queue Qm (S31: YES), it reads out the count value of the master counter 20 (step S32). The count value read out in step S32 corresponds to the communication determination time point at which it was determined that a communication frame was stored in the communication queue Qm. Next, the device control unit 23 identifies the period to which the count value read out in step S32 belongs, among the open period and the closed period of the communication queue Qm (step S33).

[0132] Next, the device control unit 23 judges whether or not the period identified in step S33 is an open period (step S34). If the identified period is not an open period, it means that the identified period is a closed period. If the device control unit 23 judges that the identified period is an open period (S34: YES), it instructs the device communication IC 21a to transmit the communication frame stored in the communication queue Qm (step S35). As a result, the device communication IC 21a transmits the communication frame to the device communication IC 31 of the in-vehicle device 3a. The transmitted communication frame is discarded.

[0133] When the device control unit 23 determines that the specified period is not an open period (S34: NO), it discards the communication frames stored in the communication queue Qm (step S36). After executing one of steps S35 and S36, the device control unit 23 ends the communication frame relay process of the transmission buffer Ta. Thereafter, the device control unit 23 executes the communication frame relay process of the transmission buffer Ta again.

[0134] As described above, in the communication frame relay process, the device control unit 23 instructs the device communication IC 21a to transmit a communication frame whose communication determination time point belongs to the open period to the in-vehicle device 3a. The communication frame relay process of each of the transmission buffers Tb and Tc is similar to the communication frame relay process of the transmission buffer Ta. The device communication IC 21a corresponds to the device communication ICs 21b and 21c. The in-vehicle device 3a corresponds to the in-vehicle devices 3b and 3c.

[0135] <Determining the overall period> 19 is a flowchart showing the procedure of the period determination process of the in-vehicle device 3a. The period change process of the in-vehicle device 3a is executed by the device control unit 33 after the initial setting is performed. The values ​​of variables X and Y are stored in the device storage unit 32 of the in-vehicle device 3a. The device control unit 33 changes the values ​​of the variables X and Y.

[0136] In the period determination process, the device control unit 33 of the in-vehicle device 3a first sets the values ​​of variables X and Y to zero (step S41). Next, the device control unit 33 instructs the device communication IC 31 to transmit start data to the device communication IC 21a of the relay device 2 (step S42). After executing step S42, the device control unit 33 determines whether the count value of the slave counter 30 is zero (step S43). Here, zero is a predetermined transmission instruction value of a communication frame. When the device control unit 33 determines that the count value is not zero (transmission instruction value of a communication frame) (S43: NO), it executes step S43 again and waits until the count value becomes zero.

[0137] When the device control unit 33 determines that the count value is zero (a transmission instruction value for a communication frame) (S43: YES), it instructs the device communication IC 31 to transmit a communication frame to the device communication IC 21a of the relay device 2 (step S44). Here, the destination of the communication frame is the in-vehicle device 3a. When step S44 is executed, the device communication IC 31 transmits the communication frame to the device communication IC 21a of the relay device 2. As described above, when the communication determination time point belongs to the open period, the device communication IC 21a of the relay device 2 transmits the communication frame to the device communication IC 31. When the communication determination time point belongs to the close period, the device communication IC 21a of the relay device 2 discards the communication frame.

[0138] After executing step S44, the device control unit 33 writes reception result data indicating the reception result of the device communication IC 31 with respect to the communication frame to the device storage unit 32 (step S45). Next, the device control unit 33 increments the value of the variable X by 1 (step S46). After executing step S46, the device control unit 33 determines whether the value of the variable X is K or not (step S47). When the device control unit 33 determines that the value of the variable X is not K (S47: NO), it executes step S43 again. When the count value becomes zero, that is, when the next period arrives, the device control unit 33 instructs the device communication IC 21a to transmit a communication frame. As described above, the device control unit 33 instructs the device communication IC 21a to transmit a communication frame every time one period elapses. The device communication IC 21a receives a communication frame from the device communication IC 31 of the in-vehicle device 3a every time one period elapses.

[0139] When the device control unit 33 determines that the value of the variable X is K (S47: YES), as described with reference to Fig. 15, it identifies the range to which the communication determination time point belongs in one period based on the K reception results (step S48). Next, the device control unit 33 sets the value of the variable X to zero (step S49) and increments the value of the variable Y by 1 (step S50). After executing step S50, the device control unit 33 determines whether the value of the variable Y is N (step S51).

[0140] When the device control unit 33 determines that the value of the variable Y is not N (S51: NO), it executes step S43 again and instructs the transmission of the communication frame K times. As described above, the device control unit 33 identifies the belonging range N times. When the device control unit 33 determines that the value of the variable Y is N (S51: YES), it determines the entire period of the in-vehicle device 3a as described above (step S52). Next, the device control unit 33 writes the entire period data indicating the entire period determined in step S52 to the device storage unit 32 (step S53). After executing step S53, the device control unit 33 ends the period determination process.

[0141] As described above, the device control unit 33 specifies the range to which the communication determination time point belongs based on the K reception results. The device control unit 33 determines the entire period that takes into account fluctuations in the communication determination time point based on the specified N ranges to which the communication determination time point belongs. The period determination process of each of the in-vehicle devices 3b and 3c is similar to the period determination process of the in-vehicle device 3a. The device communication IC 21a corresponds to the device communication ICs 21b and 21c.

[0142] <Relay of Relay Frames Performed by Relay Device 2> The device control unit 23 of the relay device 2 executes the first relay process and the second relay process of the transmission buffer Ta, similar to the communication frame relay process of the transmission buffer Ta. In the description of the communication frame relay process of the transmission buffer Ta, the communication frame, the communication determination time point, and the communication queue Qm are replaced with the first relay frame, the relay determination time point, and the first queue Q1, respectively. This makes it possible to explain the first relay process of the transmission buffer Ta. In the description of the communication frame relay process of the transmission buffer Ta, the communication frame, the communication determination time point, and the communication queue Qm are replaced with the second relay frame, the relay determination time point, and the second queue Q2, respectively. This makes it possible to explain the second relay process of the transmission buffer Ta.

[0143] The device control unit 23 of the relay device 2 executes the first relay process for each of the transmission buffers Tb and Tc in the same manner as the first relay process for the transmission buffer Ta. The device control unit 23 of the relay device 2 executes the second relay process for each of the transmission buffers Tb and Tc in the same manner as the second relay process for the transmission buffer Ta. The transmission buffer Ta corresponds to the transmission buffers Tb and Tc.

[0144] <Writing of data frames by each of the in-vehicle devices 3a, 3b, and 3c> As described above, the device control unit 33 of each of the in-vehicle devices 3a, 3b, and 3c executes the write process. In the case where each of the in-vehicle devices 3a, 3b, and 3c has a sensor, when sensor data is input from the sensor, in the write process, the device control unit 33 generates a relay frame including the input sensor data. In the case where each of the in-vehicle devices 3a, 3b, and 3c has a reception unit that receives an instruction, when the reception unit receives an instruction, in the write process, the device control unit 33 generates a relay frame including instruction data indicating the received instruction. The device control unit 33 writes the generated relay frame to the device storage unit 32. The relay frame generated by the device control unit 33 is a first relay frame or a second relay frame.

[0145] <Transmission of relay frames by the in-vehicle devices 3a, 3b, and 3c> 20 is a flowchart showing the procedure of the relay frame transmission process of the in-vehicle device 3a. After the device control unit 33 of the in-vehicle device 3a executes the period determination process, when a relay frame is written to the device storage unit 32, the device control unit 33 executes the relay frame transmission process. The device storage unit 32 stores total period data indicating the total period determined in the period determination process.

[0146] In the relay frame transmission process, the device control unit 33 determines a transmission instruction value for the relay frame based on the target time indicated by the target data and the overall period indicated by the overall period data (step S61). The transmission instruction value for the relay frame is the count value (time) of the slave counter 30 at which the device control unit 33 instructs the transmission of the relay frame. The transmission instruction value for the relay frame corresponds to the transmission instruction time.

[0147] It is assumed that the relay frame stored in the device storage unit 32 is the second relay frame whose destination is the in-vehicle device 3b. In this case, as shown in FIG. 10, the target time point of the second relay frame is 60. It is assumed that the width of the count value corresponding to the entire period is 30. In this case, the transmission instruction value of the relay frame is 30 (=60-30). It is assumed that the relay frame stored in the device storage unit 32 is the first relay frame whose destination is the in-vehicle device 3b. In this case, the target time point of the first relay frame is zero. When the count number is 120, the transmission instruction value of the relay frame is 90 (=0-30+120).

[0148] Next, the device control unit 33 determines whether the count value of the slave counter 30 is the transmission instruction value for the relay frame determined in step S61 (step S62). If the device control unit 33 determines that the count value is not the transmission instruction value for the relay frame (S62: NO), it executes step S62 again and waits until the count value becomes the transmission instruction value determined in step S61.

[0149] When the device control unit 33 determines that the count value is the relay frame transmission instruction value (S62: YES), it instructs the device communication IC 31 to transmit the relay frame stored in the device storage unit 32 to the relay device 2 (step S63). After executing step S63, the device control unit 33 ends the frame transmission process.

[0150] As described above, the device communication IC 31 of the in-vehicle device 3a determines a transmission instruction value for instructing the relay device 2 to transmit a relay frame based on the determined overall period so that the relay determination time point of the relay frame belongs to the open period. The relay frame transmission process of each of the on-board devices 3b and 3c is similar to the relay frame transmission process of the on-board device 3a.

[0151] (Embodiment 2) In the pattern data in the first embodiment, the total number of open periods and closed periods included in the i-th cycle is 2 to the power of 2. As described above, i is an arbitrary natural number equal to or less than K. However, in the pattern data, the total number of open periods and closed periods included in the i-th cycle is not limited to 2 to the power of 2. The following describes the differences between embodiment 2 and embodiment 1. Since the configurations other than those described below are common to embodiment 1, the components common to embodiment 1 are given the same reference numerals as embodiment 1 and descriptions thereof will be omitted.

[0152] <Pattern data content> Fig. 21 is an explanatory diagram of the contents of pattern data in the second embodiment. Fig. 21 shows an example in which the count number is 210 and K is 4. In the pattern data in the second embodiment, the total number of open periods and closed periods in each period is a prime number. In the example of Fig. 21, the total numbers of the first period, second period, third period and fourth period are 2, 3, 5 and 7, respectively. For the K periods, the positions of the boundaries of the open periods and closed periods are different from each other.

[0153] In the i-th period of the pattern data, the open periods and closed periods are arranged so that the number of each of the open periods and closed periods existing within a common range of the 1st to (i-1)th periods is equal to or less than 1. In the example of Fig. 21, the lengths of the multiple periods included in each period are the same.

[0154] <Change the period according to the pattern data> In step S24 of the period change process, the device control unit 23 of the relay device 2 changes the period in accordance with the pattern data, similar to embodiment 1. Therefore, the device control unit 23 changes the position of the boundary within each period so that the positions of the boundary between the open period and the closed period are different from each other for K periods.

[0155] In the pattern data in the first embodiment, as shown in FIG. 16, the boundaries of the three periods coincide at 60 (count value). Therefore, when the communication determination time varies around 60, the period to which the communication determination time belongs is not fixed to one period in each of the first period, the second period, and the third period. Therefore, the device control unit 23 cannot accurately identify the range to which the communication determination time belongs based on the K periods identified in the K periods. However, in the second embodiment, the positions of the boundaries of the open period and the closed period are different from each other for the K periods. Therefore, even if the communication determination time varies, the device control unit 23 can accurately identify the range to which the communication determination time belongs.

[0156] As in the first embodiment, the length of each of the multiple periods included in each cycle may be different from the length of at least one of the other periods. Therefore, in the pattern data, the lengths of the multiple open periods and multiple closed periods included in the K cycles may be adjusted so that the lengths of all common ranges related to the K cycles match. In addition, the total number of open periods and closed periods in each cycle may not be a prime number.

[0157] <Effects of communication system 1> The communication system 1 in the second embodiment achieves the same effects as the communication system 1 in the first embodiment.

[0158] (Embodiment 3) In the first embodiment, the device control unit 23 of the relay device 2 executes a communication frame relay process for each of the transmission buffers Ta, Tb, and Tc, thereby notifying the device control unit 33 of each of the in-vehicle devices 3a, 3b, and 3c of the period to which the communication determination time belongs. However, the method of notifying the period to which the communication determination time belongs is not limited to this method. The following describes the differences between the third embodiment and the first embodiment. Since the configurations other than those described below are the same as those of the first embodiment, the components common to the first embodiment are given the same reference numerals as those of the first embodiment, and the description thereof will be omitted.

[0159] <Configuration of Relay Device 2> The processing element (computer) of the device control unit 23 in the second embodiment executes the computer program Pr to execute period notification processing for each of the transmission buffers Ta, Tb, and Tc instead of the communication frame relay processing for each of the transmission buffers Ta, Tb, and Tc. In each of the three period notification processing, the device control unit 23 notifies the in-vehicle devices 3a, 3b, and 3c of the period to which the communication determination time point belongs.

[0160] <Period notification processing> 22 is a flowchart showing the procedure of the period notification process of the transmission buffer Ta in the embodiment 3. In the period notification process of the transmission buffer Ta, the device control unit 23 of the relay device 2 determines whether or not a communication frame is stored in the communication queue Qm of the transmission buffer Ta (step S71). When the device control unit 23 determines that a communication frame is not stored in the communication queue Qm (S71: NO), it executes step S71 again and waits until a communication frame is written in the communication queue Qm.

[0161] When the device control unit 23 determines that a communication frame is stored in the communication queue Qm (S71: YES), it reads out the count value of the master counter 20 (step S72). The count value read out in step S72 corresponds to the communication determination time point at which it was determined that a communication frame was stored in the communication queue Qm. Next, the device control unit 23 identifies the period to which the count value read out in step S72 belongs, among the open period and the closed period of the communication queue Qm (step S73).

[0162] Next, the device control unit 23 instructs the device communication IC 21a to transmit period data indicating the period identified in step S33 (step S74). The period data indicates, for example, the number of times that the device control unit 23 has identified an open period (or a closed period). The device control unit 33 of the in-vehicle device 3a can recognize the period identified by the device control unit 23 based on whether the number of times indicated by the period data has increased. After executing step S74, the device control unit 23 ends the period notification process for the transmission buffer Ta. Thereafter, the device control unit 23 executes the period notification process for the transmission buffer Ta again.

[0163] As described above, every time the device communication IC 21a receives a communication frame from the device communication IC 31 of the in-vehicle device 3a, it transmits the period data to the device communication IC 31. In this way, the period specified by the device control unit 23 is notified to the in-vehicle device 3a. The period notification process for each of the transmission buffers Tb and Tc is the same as the period notification process for the transmission buffer Ta. The device communication IC 21a corresponds to the device communication ICs 21b and 21c. The in-vehicle device 3a corresponds to the in-vehicle devices 3b and 3c. In the third embodiment, the relay device 2 does not need to transmit a communication frame to the in-vehicle devices 3a, 3b, and 3c.

[0164] <Determining the overall period> 23 is a flowchart showing the procedure of the period determination process of the in-vehicle device 3a. When comparing the third embodiment with the first embodiment, the contents of the period determination process are different. In the period determination process of the in-vehicle device 3a in the third embodiment, the device control unit 33 executes steps S41 to S44 and S46 to S53 in the same manner as in the first embodiment. Therefore, detailed description of these steps will be omitted.

[0165] In the period determination process of the in-vehicle device 3a, after executing step S44, the device control unit 33 determines whether or not the device communication IC 31 has received period data from the device communication IC 21a of the relay device 2 (step S81). When the device control unit 33 determines that the device communication IC 31 has not received period data (S81: NO), it executes step S81 and waits until the device communication IC 31 receives the period data.

[0166] When the device control unit 33 determines that the device communication IC 31 has received the period data (S81: YES), it writes the period data received by the device communication IC 31 to the device storage unit 32 (step S82). After executing step S82, the device control unit 33 executes step S46. In step S48, based on the K periods indicated by the K period data stored in the device storage unit 32, it identifies the range to which the communication determination time point belongs.

[0167] As described above, the device control unit 33 identifies the range to which the communication determination time point belongs, based on the K pieces of period data. In the third embodiment, the period determination process of each of the in-vehicle devices 3b and 3c is similar to the period determination process of the in-vehicle device 3a. The device communication IC 21a corresponds to the device communication ICs 21b and 21c.

[0168] <Effects of Communication System 1 and Notes> The communication system 1 in the third embodiment achieves the same effects as the communication system 1 in the first embodiment. In the third embodiment, the pattern data in the second embodiment may be used.

[0169] (Embodiment 4) In the first embodiment, the transmission instruction value of the relay frame is determined based on the entire period. However, the target determined based on the entire period may be different from the transmission instruction value of the relay frame. The following describes the differences between embodiment 4 and embodiment 1. Since the configurations other than those described below are common to embodiment 1, the components common to embodiment 1 are given the same reference numerals as embodiment 1 and descriptions thereof will be omitted.

[0170] <Initial settings> 24 is a flowchart showing the procedure of initial setting performed by the relay device 2 and the in-vehicle device 3a in the fourth embodiment. When comparing the fourth embodiment with the first embodiment, the contents of the data transmission process and the adjustment process are different. In the data transmission process, the device control unit 23 of the relay device 2 executes steps S1 to S4 in the same manner as in the first embodiment. In the adjustment process, the device control unit 33 of the in-vehicle device 3a executes steps S11 to S15 in the same manner as in the first embodiment. Therefore, detailed explanations of steps S1 to S4 and S11 to S15 will be omitted.

[0171] In the adjustment process, after executing step S15, the device control unit 33 instructs the device communication IC 31 to transmit the transmission instruction value data of the in-vehicle device 3a to the device communication IC 21a of the relay device 2 (step S101). The transmission instruction value data of the in-vehicle device 3a indicates the transmission instruction value of the relay frame transmitted by the in-vehicle device 3a. After executing step S101, the device control unit 33 ends the adjustment process. The transmission instruction value of the relay frame is determined in advance. The transmission instruction value data is stored in advance in the device storage unit 32.

[0172] In the data transmission process, after executing step S4, the device control unit 23 determines whether the device communication IC 21a has received the transmission instruction value data of the in-vehicle device 3a from the device communication IC 31 of the in-vehicle device 3a (step S91). If the device control unit 23 determines that the device communication IC 21a has not received the transmission instruction value data of the in-vehicle device 3a (S91: NO), it executes step S91 again and waits until the device communication IC 21a receives the transmission instruction value data of the in-vehicle device 3a.

[0173] When the device control unit 23 determines that the device communication IC 21a has received the transmission instruction value data of the in-vehicle device 3a (S91: YES), the device control unit 23 writes the transmission instruction value data of the in-vehicle device 3a received by the device communication IC 21a to the device storage unit 22 (step S92). After executing step S92, the device control unit 33 ends the adjustment process.

[0174] As described above, when the device control unit 23 performs the initial setting with the in-vehicle device 3a, the transmission instruction value data of the in-vehicle device 3a is stored in the device storage unit 22. The count value of the slave counter 30 is synchronized with the count value of the master counter 20. The initial settings performed by the relay device 2 for each of the in-vehicle devices 3b and 3c are the same as the initial settings performed by the relay device 2 for the in-vehicle device 3a. The connector 2a and the device communication IC 21a for the in-vehicle device 3a correspond to the connector 2b and the device communication IC 21b for the in-vehicle device 3b, respectively. Furthermore, the connector 2a and the device communication IC 21a for the in-vehicle device 3a correspond to the connector 2c and the device communication IC 21c for the in-vehicle device 3c, respectively.

[0175] <Overview of how the overall period is determined> 25 is a sequence diagram for explaining an outline of a method for determining the entire period of the in-vehicle device 3a. In the fourth embodiment, after the initial setting is performed, the relay device 2 transmits the start data, not the in-vehicle device 3a. When the in-vehicle device 3a receives the start data, the relay device 2 waits until the count value of the slave counter 30 reaches zero. When the count value reaches zero, the in-vehicle device 3a transmits a communication frame to the relay device 2. Thereafter, the in-vehicle device 3a transmits a communication frame to the relay device 2 every time the count value reaches zero.

[0176] After transmitting the start data, the relay device 2 waits until the count value of the master counter 20 reaches zero. When the count value reaches zero, the relay device 2 starts changing the period in accordance with the pattern data. The relay device 2 executes changing the period in accordance with the pattern data N times. Each time the relay device 2 receives a communication frame from the in-vehicle device 3a, it identifies the period to which the communication determination time point (count value) of the received communication frame belongs, among the open period and close period of the communication queue Qm of the transmission buffer Ta.

[0177] The in-vehicle device 3a transmits a communication frame to the relay device 2 (K·N) times. The relay device 2 identifies the N belonging ranges to which the communication judgment time point belongs based on the (K·N) identification results. The relay device 2 determines the entire period of the in-vehicle device 3a based on the identified N belonging ranges. The identification of the belonging range performed by the relay device 2 is similar to the identification of the belonging range performed by the in-vehicle device 3a in embodiment 1. The determination of the entire period performed by the relay device 2 is similar to the determination of the entire period performed by the in-vehicle device 3a in embodiment 1.

[0178] The method of determining the total period for each of the in-vehicle devices 3b and 3c is the same as the method of determining the total period for the in-vehicle device 3a. In the following, a specific process performed by the device control unit 23 of the relay device 2 and the in-vehicle devices 3a, 3b, and 3c in relation to a method for determining the entire period will be described.

[0179] <Change the period according to the pattern data> 26 is a flowchart showing the procedure of the period change process corresponding to the communication queue Qm of the transmission buffer Ta. When comparing the fourth embodiment with the first embodiment, the contents of the period change process are different. In the period change process in the fourth embodiment, the device control unit 23 of the relay device 2 executes steps S22 to S26 in the same manner as in the first embodiment. Therefore, detailed description thereof will be omitted.

[0180] In the period change process, first, the device control unit 23 instructs the device communication IC 21a to transmit start data to the device communication IC 31 of the in-vehicle device 3a (step S111). After executing step S111, the device control unit 23 executes step S22.

[0181] The period change process corresponding to the communication queue Qm of the transmission buffers Tb and Tc is similar to the period change process corresponding to the communication queue Qm of the transmission buffer Ta. The device communication IC 21a corresponds to the device communication ICs 21b and 21c. The in-vehicle device 3a corresponds to the in-vehicle devices 3b and 3c.

[0182] <Configuration of the in-vehicle devices 3a, 3b, and 3c> The processing element (computer) of the device control unit 33 in the fourth embodiment executes the computer program Pe to execute a communication frame transmission process for transmitting a communication frame instead of the period determination process.

[0183] <Communication frame transmission process> 27 is a flowchart showing the procedure of the communication frame transmission process of the in-vehicle device 3a. The communication frame transmission process of the in-vehicle device 3a is executed by the device control unit 33 after initial settings are performed. As in the first embodiment, the values ​​of variables X and Y are stored in the device storage unit 32 of the in-vehicle device 3a. In the communication frame transmission process of the in-vehicle device 3a, the device control unit 33 executes steps S41, S43, S44, and S46 to S51 of the period determination process in the first embodiment. Therefore, detailed explanations of these steps will be omitted.

[0184] In the communication frame transmission process of the in-vehicle device 3a, the device control unit 33 first determines whether the device communication IC 31 has received the start data (step S121). If the device control unit 33 determines that the device communication IC 31 has not received the start data (S121: NO), it executes step S121 again and waits until the device communication IC 31 receives the start data. If the device control unit 33 determines that the device communication IC 31 has received the start data (S121: YES), it executes step S41.

[0185] After executing step S41, the device control unit 33 executes step S43. After executing step S44, the device control unit 33 executes step S46. When the device control unit 33 determines that the value of the variable Y is N (S51: YES), it ends the communication frame transmission process. The communication frame transmission process of each of the in-vehicle devices 3b and 3c is similar to the communication frame transmission process of the in-vehicle device 3a. The device communication IC 21a corresponds to the device communication ICs 21b and 21c.

[0186] <Transmission of relay frames by the in-vehicle devices 3a, 3b, and 3c> In the relay frame transmission process of each of the in-vehicle devices 3a, 3b, and 3c (see FIG. 20), the device control unit 33 does not execute step S61, but executes steps S62 and S63. The transmission instruction value in step S62 is the transmission instruction value indicated by the transmission instruction value data. The device communication IC 31 of each of the in-vehicle devices 3a, 3b, and 3c transmits a relay frame when the count value reaches the transmission instruction value indicated by the transmission instruction value data. In the fourth embodiment, target data is not used.

[0187] <Configuration of Relay Device 2> The processing element (computer) of the device control unit 23 in the fourth embodiment further executes a period adjustment process for each of the transmission buffers Ta, Tb, and Tc by executing the computer program Pr. The period adjustment process is a process for adjusting the start time or length of the open period of each of the first queue Q1 and the second queue Q2. The device storage unit 22 stores the values ​​of variables Fa, Ga, Fb, Gb, Fc, and Gc used in the three period adjustment processes. These values ​​are changed by the device control unit 23.

[0188] <Period adjustment processing> FIG. 28 is a flowchart showing the procedure of the period adjustment process of the transmission buffer Ta. The period adjustment process of the transmission buffer Ta is executed by the device control unit 23 in parallel with the communication frame transmission process of the in-vehicle device 3a after the initial setting is performed. In the period adjustment process of the transmission buffer Ta, the device control unit 23 first sets the values ​​of the variables Fa and Ga to zero (step S131). Next, the device control unit 23 determines whether or not a communication frame is stored in the communication queue Qm of the transmission buffer Ta (step S132). When the device control unit 23 determines that a communication frame is not stored in the communication queue Qm (S132: NO), it waits until a communication frame is stored in the communication queue Qm.

[0189] When the device control unit 23 determines that a communication frame is stored in the communication queue Qm (S132: YES), it reads out the count value of the master counter 20 (step S133). The count value read out in step S133 corresponds to the communication determination time point at which it was determined that a communication frame was stored in the communication queue Qm. Next, the device control unit 23 identifies the period to which the count value read out in step S133 belongs among the open period and closed period of the communication queue Qm (step S134). After executing step S134, the device control unit 23 increments the value of the variable Fa by 1 (step S135) and determines whether the value of the variable Fa is K (step S136).

[0190] If device control unit 23 determines that the value of variable Fa is not K (S136: NO), it executes step S132 again and identifies the period to which the communication judgment time point of the next received communication frame belongs. In this manner, K periods to which the communication judgment time points of K communication frames belong are identified.

[0191] When the device control unit 23 determines that the value of the variable Fa is K (S136: YES), it determines the belonging range to which the communication determination time point belongs in one cycle based on the determined K periods (step S137). The determination of the belonging range performed by the device control unit 23 is similar to the determination of the belonging range performed by the device control unit 33 of the in-vehicle device 3a. Next, the device control unit 23 sets the value of the variable Fa to zero (step S138), and increments the value of the variable Ga by 1 (step S139). After executing step S139, the device control unit 23 determines whether the value of the variable Ga is N (step S140).

[0192] When the device control unit 23 determines that the value of the variable Ga is not N (S140: NO), it executes step S132 again. The device control unit 23 newly identifies K periods to which the communication determination time point belongs, and newly identifies the belonging range based on the identified K periods. As described above, the device control unit 23 identifies the belonging range N times. When the device control unit 23 determines that the value of the variable Ga is N (S140: YES), it determines the entire period of the in-vehicle device 3a based on the identified N belonging ranges (step S141). The identification of the entire period performed by the device control unit 23 is similar to the identification of the entire period performed by the device control unit 33 of the in-vehicle device 3a.

[0193] Next, the device control unit 23 adjusts the open periods of the first queue Q1 and the second queue Q2 of the transmission buffer Ta based on the total period determined in step S141 (step S142). The adjustment of the open period is an adjustment of the start time or length of the open period. In one cycle, the period other than the open period is a closed period. Therefore, when the start time and length of the open period are determined, the start time and length of the closed period are automatically determined. Each of the in-vehicle devices 3a, 3b, 3c transmits the first relay frame or the second relay frame when the count value of the slave counter 30 is the transmission instruction value indicated by the transmission instruction value data.

[0194] In step S142, the device control unit 23 adjusts the start point or length of the open period of the first queue Q1 for the transmission buffer Ta so that the relay determination time points of all first relay frames whose destination is the in-vehicle device 3a belong to the open period of the first queue Q1. Also, the device control unit 23 adjusts the start point or length of the open period of the second queue Q2 for the transmission buffer Ta so that the relay determination time points of all second relay frames whose destination is the in-vehicle device 3a belong to the open period of the second queue Q2. After executing step S142, the device control unit 23 ends the period adjustment process.

[0195] The period adjustment process for each of the transmission buffers Tb and Tc is the same as the period adjustment process for the transmission buffer Ta. The in-vehicle device 3a corresponds to the in-vehicle devices 3b and 3c. The variable Fa corresponds to the variables Fb and Fc. The variable Ga corresponds to the variables Gb and Gc.

[0196] <Effects of Communication System 1 and Notes> The communication system 1 in the fourth embodiment has the same effects as the communication system 1 in the first embodiment, except for the effect obtained by adjusting the transmission instruction value of the relay frame. In the fourth embodiment, the pattern data in the second embodiment may be used.

[0197] <Modifications of the First to Fourth Embodiments> In the first to fourth embodiments, each of the device communication ICs 21a, 21b, and 21c has a processing element that executes processing. Each of the device communication ICs 21a, 21b, and 21c may execute a part of the above-mentioned processing executed by the device control unit 23 instead of the device control unit 23. In this case, the whole of the device communication ICs 21a, 21b, and 21c and the device control unit 23, or one of the device communication ICs 21a, 21b, and 21c, functions as a processing unit or a relay processing unit. Similarly, the device communication IC 31 has a processing element that executes processing. The device communication IC 31 may execute a part or all of the above-mentioned processing executed by the device control unit 33 instead of the device control unit 33. In this case, both the device communication IC 31 and the device control unit 33, or the device communication IC 31 functions as a communication processing unit.

[0198] The transmission instruction value of the communication frame may be a value other than zero. Furthermore, if the fluctuation range of the communication judgment time point is small, N may be 1. In this case, the calculated value of the entire period is determined to be, for example, the median value of the identified belonging range. Furthermore, each of the in-vehicle devices 3a, 3b, and 3c may transmit multiple first relay frames during the open period of the first queue Q1. Similarly, each of the in-vehicle devices 3a, 3b, and 3c may transmit multiple second relay frames during the open period of the second queue Q2.

[0199] The process performed when the relay determination time point belongs to a closed period is not limited to discarding the relay frame, and may be to suspend transmission of the relay frame. In this case, for example, the relay frame is not transmitted until the next open period arrives. When the next open period arrives, the relay frame whose transmission has been suspended is transmitted. The number of queues for relay frames provided in each of the transmission buffers Ta, Tb, and Tc is not limited to 2, and may be 3 or more. The number of in-vehicle devices connected to the relay device 2 is not limited to 3, and may be 4 or more.

[0200] The disclosed embodiments 1 to 4 are illustrative in all respects and should not be considered as limiting. The scope of the present invention is defined by the claims, not by the above meaning, and is intended to include all modifications within the scope and meaning equivalent to the claims. [Explanation of symbols]

[0201] 1. Communication Systems 2. Relay Device 2a, 2b, 2c connection connector 3a,3b,3c In-vehicle equipment (communication equipment) 20 Master Counter 21a, 21b, 21c Device communication IC (receiver, relay receiver) 22 Device memory unit (memory unit, relay memory unit) 23 Device control section (processing section, relay processing section) 24 Device Bus 30 Slave Counter 31 Equipment communication IC 32 Device storage section 33 Equipment control section (communication processing section) 34 Device Bus Ae,Ar storage medium B Device Connector E1,E2 range M Vehicle Pe,Pr Computer Program Q1 1st queue Q2 2nd queue Qm communication queue Ra, Rb, Rc receive buffer Ta, Tb, Tc transmit buffer

Claims

1. A relay device that relays communication, A receiving unit that receives communication data from a communication device; a storage unit that stores the communication data received by the receiving unit; A processing unit for executing processing; Equipped with The first period and the second period are set alternately, The processing unit includes: Each time a predetermined period including the first period and the second period elapses, a total number of the first period and the second period included in a next predetermined period is changed; determining whether the communication data is stored in the storage unit; When it is determined that the communication data is stored in the storage unit, a period to which the communication determination time point for which the determination was made belongs is specified between the first period and the second period. Relay device.

2. The processing unit includes: changing the total number of each of the plurality of consecutive predetermined periods so that the total numbers of the consecutive predetermined periods are different from each other; The position of the boundary between the first period and the second period is changed within each of the plurality of predetermined periods so that the positions of the boundary between the first period and the second period are different from each other. The relay device according to claim 1 .

3. The processing unit includes: changing the total number for each of a plurality of consecutive predetermined periods such that the total numbers included in each of the consecutive predetermined periods are different from one another; Repeating the plurality of predetermined periods a plurality of times The relay device according to claim 1 or 2.

4. the receiving unit receives communication data from the communication device each time the predetermined period elapses; The processing unit includes: changing the total number for each of a plurality of consecutive predetermined periods so that the total numbers included in each of the consecutive predetermined periods are different from one another; When the plurality of predetermined periods have elapsed, a range to which the communication determination time point belongs is identified within the predetermined period based on a plurality of identification results relating to the period; Based on the identified range of belonging, a whole period from when the communication device is instructed to transmit communication data to when communication is determined is determined. The relay device according to any one of claims 1 to 3.

5. The receiving unit receives relay data for relaying, The storage unit stores the received relay data, an allowed period during which the transmission of the relay data is permitted and a prohibited period during which the transmission of the relay data is prohibited are set alternately; The processing unit includes: determining whether the relay data is stored in the storage unit; When it is determined that the relay data is stored in the storage unit, a period to which the relay determination time point for which the determination was made belongs is identified from among the permitted period and the prohibited period; If the specified period is the permitted period, instruct the transmission of the relay data; Adjusting the start point or length of the permitted period based on the determined overall period. The relay device according to claim 4.

6. A communication device for transmitting data; a relay device that receives data from the communication device and transmits the received data; Equipped with The communication device includes a communication processing unit that executes processing, The communication processing unit instructs the relay device to transmit communication data; The relay device is a relay receiving unit for receiving the communication data from the communication device; a relay storage unit that stores the communication data received by the relay receiving unit; A relay processing unit that executes processing; having The first period and the second period are set alternately, The relay processing unit includes: Each time a predetermined period including the first period and the second period elapses, a total number of the first period and the second period included in a next predetermined period is changed; determining whether the communication data is stored in the relay storage unit; When it is determined that the communication data is stored in the relay storage unit, a period to which the communication determination time point belongs is specified between the first period and the second period. Communication systems.

7. the communication processing unit instructs the relay receiving unit to transmit communication data each time the predetermined period elapses; the relay processing unit changes the total number for each of a plurality of consecutive predetermined periods so that the total numbers included in each of the consecutive predetermined periods are different from one another; The communication processing unit: When the plurality of predetermined periods have elapsed, a range to which the communication determination time point belongs is identified for the predetermined period based on a plurality of identification results identified by the relay processing unit; Based on the identified range of belonging, the entire period from when the transmission of the communication data is instructed to the communication determination time is determined.

7. The communication system according to claim 6.

8. The communication processing unit instructs the relay receiving unit to transmit relay data for relaying; The relay storage unit stores the relay data received by the relay receiving unit, an allowed period during which the transmission of the relay data is permitted and a prohibited period during which the transmission of the relay data is prohibited are set alternately; The relay processing unit includes: determining whether the relay data is stored in the relay storage unit; When it is determined that the relay data is stored in the relay storage unit, a period to which the relay determination time point belongs is specified among the permitted period and the prohibited period; If the specified period is the permitted period, instruct the transmission of the relay data; The communication processing unit determines a transmission instruction time point for instructing transmission of the relay data based on the determined entire period.

8. The communication system according to claim 7.

9. The relay processing unit includes: When the specified period is the first period, instructing the relay receiver to transmit the communication data received by the relay receiver to the communication device; When it is determined that the specified period is the second period, the communication data received by the relay receiving unit is discarded; The communication processing unit, when the plurality of predetermined periods have elapsed, specifies a range to which the communication determination time point belongs during the predetermined period based on a plurality of reception results of the communication data. A communication system according to claim 7 or 8.

10. A processing method for a relay device that relays communication, the relay device comprising: a receiving unit that receives communication data from a communication device; and a storage unit that stores the communication data received by the receiving unit, the processing method comprising the steps of: changing a total number of the first periods and the second periods included in a next predetermined period each time a predetermined period including first periods and second periods that are set alternately elapses; determining whether the communication data is stored in the storage unit; When it is determined that the communication data is stored in the storage unit, a step of identifying a period to which the communication determination time point for which the determination was made belongs, from among the first period and the second period. The processing method performed by the computer.

Citation Information

Patent Citations

  • On-vehicle gateway apparatus

    JP2010245794A

  • Relay and communication system

    JP2021034861A

  • Communication device, relay device, communication system, and communication method

    WO2010052892A1

  • Relay device, communication system, communication method, and communication program

    WO2020105129A1

  • Relay device, relay method and relay program

    WO2020136843A1