Frame determination device, frame determination method, frame determination program, and frame determination system
The frame determination device in vehicle communication systems accurately identifies event or abnormal frames by analyzing reception intervals and frame differences, addressing the limitations of existing methods in identifying irregularly timed messages.
Patent Information
- Application Number
- JP2023110928
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2025-01-20
AI Technical Summary
Existing methods for determining abnormal messages in vehicle communication systems fail to accurately identify messages sent and received at irregular intervals, such as during events, due to their reliance on predetermined communication intervals.
A frame determination device that calculates reception intervals and differences between frames to distinguish between periodic, event, and abnormal frames, using a reception interval calculation unit, first and second determination units, and an output unit to determine the nature of received data frames.
Enables accurate identification of event or abnormal frames when they occur outside predetermined intervals, enhancing security in vehicle communication systems by distinguishing between legitimate and fraudulent data frames.
Smart Images

Figure 2025008615000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an apparatus for determining a data frame transmitted from an electronic control unit, a method and a program executed by said apparatus, and a system including said apparatus. [Background technology]
[0002] Conventionally, automobiles are equipped with various kinds of electronic control devices, and these electronic control devices are connected to each other via a communication network to configure an in-vehicle system. It is known that such in-vehicle systems use a network-based intrusion detection system (NIDS) to detect suspicious access or data from the outside.
[0003] For example, Patent Document 1 discloses a communication system capable of determining, with a simple configuration, whether a message communicated in the communication system is genuine or not. In this communication system, a plurality of ECUs are connected to a communication bus to enable message communication. A specified communication interval is set for each ECU, and an ECU that transmits a message transmits the message based on this specified communication interval. If the communication interval of a received message is shorter than the specified communication interval, the message is determined to be abnormal.
[0004] Patent Document 2 discloses a relay connection unit that relays messages transmitted and received between electronic control units. This relay connection unit counts the number of messages received within a predefined set time, and if the number of messages received exceeds the set number, it determines that the message is abnormal. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] International Publication No. 2013 / 094072 [Patent Document 2] JP 2009-253557 A Summary of the Invention [Problem to be solved by the invention]
[0006] All of the methods described in the prior art documents determine whether a message is abnormal on the assumption that the messages are transmitted and received at a specified communication interval. However, messages transmitted and received between ECUs may include messages transmitted and received when some event occurs, in addition to messages transmitted and received at a specified communication interval. Since such messages are usually not transmitted and received at a specified communication interval, it is not possible to determine whether a message is normal using the conventional methods.
[0007] Therefore, the object of the present invention is to determine, when a message is received at an interval other than a specified communication interval, whether it is a message sent and received when an event occurs or whether it is an unauthorized message. [Means for solving the problem]
[0008] A frame determination device according to one aspect of the present disclosure is a frame determination device (100) connected to a network that transmits periodic frames and event frames transmitted from an electronic control device (20), the periodic frames being data frames transmitted at a predetermined cycle starting from the transmission of the periodic frame or the event frame most recently transmitted from the electronic control device, and the event frame being a data frame transmitted regardless of the predetermined cycle when a predetermined event occurs, the frame determination device including a receiving unit (101) that receives a first data frame, a receiving interval calculation unit (103) that calculates a receiving interval between the first data frame and a second data frame that is the periodic frame or the event frame received by the receiving unit immediately before the first data frame, and a receiving interval calculation unit (104) that calculates a receiving interval between the first data frame and a second data frame that is the periodic frame or the event frame received by the receiving unit immediately before the first data frame, and the first determination unit (104) determining whether or not the first data frame is the periodic frame; a difference calculation unit (105) calculating, when the first determination unit determines that the first data frame is not the periodic frame, a difference (N) between a reception time of an N-th (N is an integer equal to or greater than 1) actual reception frame which is a data frame actually received by the receiving unit after the first data frame, and a predicted reception time of an N-th virtual reception frame which is a periodic frame which the receiving unit is predicted to receive after the first data frame when it is assumed that the first data frame is the event frame; a second determination unit (106) determining, based on the difference, whether the first data frame is the event frame or an abnormal frame different from the event frame; and an output unit (107) outputting a determination result of the first data frame. Effect of the Invention
[0009] With the above-described configuration, if a received data frame is not a data frame transmitted at a specified period, it is possible to determine whether the data frame is an event frame transmitted due to the occurrence of an event, or an abnormal frame. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is a diagram for explaining an in-vehicle system having a log determination device according to a first or second embodiment. [Diagram 2] FIG. 1 is a diagram for explaining frames transmitted and received in the first or second embodiment; [Diagram 3] FIG. 1 is a diagram showing an example of the configuration of a log determination device according to a first or second embodiment; [Figure 4] FIG. 4 is a diagram for explaining a first difference calculated by the log determination device according to the first embodiment; [Diagram 5] FIG. 4 is a diagram for explaining a second difference calculated by the log determination device according to the first embodiment. [Figure 6] FIG. 4 is a diagram for explaining a first difference calculated by the log determination device according to the first embodiment; [Figure 7] FIG. 4 is a diagram for explaining a second difference calculated by the log determination device according to the first embodiment. [Figure 8] FIG. 1 is a diagram for explaining the operation of the frame determination device according to the first embodiment. [Figure 9] FIG. 11 is a diagram for explaining a first difference calculated by the log determination device according to the second embodiment. [Figure 10] FIG. 11 is a diagram for explaining a first difference calculated by the log determination device according to the second embodiment. [Figure 11] FIG. 11 is a diagram for explaining the operation of the frame determination device according to the second embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
[0012] The present invention means the invention described in the claims or in the Summary of the Invention section, and is not limited to the following embodiments. Furthermore, at least the words in quotation marks mean the words described in the claims or in the Summary of the Invention section, and are not limited to the following embodiments.
[0013] The configurations and methods described in the dependent claims are optional configurations and methods in the invention described in the independent claims. The configurations and methods of the embodiments corresponding to the configurations and methods described in the dependent claims, and the configurations and methods described only in the embodiments without being described in the claims, are optional configurations and methods in the present invention. The configurations and methods described in the embodiments when the description of the claims is broader than the description of the embodiments are also optional configurations and methods in the present invention in the sense that they are examples of the configurations and methods of the present invention. In either case, by being described in the independent claims, they become essential configurations and methods of the present invention.
[0014] The effects described in the embodiments are effects obtained when the configurations of the embodiments are provided as examples of the present invention, and are not necessarily effects that the present invention possesses.
[0015] When there are multiple embodiments, the configurations disclosed in each embodiment are not limited to each embodiment, but can be combined across the embodiments. For example, a configuration disclosed in one embodiment may be combined with another embodiment. Also, configurations disclosed in each of the multiple embodiments may be collected and combined.
[0016] The problem described in the section on problems that the invention is intended to solve is not a publicly known problem, but was discovered independently by the inventor, and this, together with the configuration and method of the present invention, is a fact that affirms the inventive step of the invention.
[0017] 1. Configuration common to all embodiments (1) In-vehicle system 1 FIG. 1 shows an in-vehicle system 1 (corresponding to a "frame determination system") configured with a frame determination device 100, a plurality of electronic control devices 20 (hereinafter, ECUs (Electric Control Units)), and a communication network 2 connecting these devices to each other. In each of the embodiments shown below, a configuration is described in which an electronic control device configured as a gateway has the function of the frame determination device 100, receives a data frame transmitted from the ECU 20, and performs a series of frame determination processes described later. However, the frame determination device 100 of the present embodiment is not limited to the electronic control device of the gateway. For example, the frame determination device 100 of the present embodiment may be provided in the in-vehicle system 1 as an electronic control device dedicated to frame determination, or each ECU 20 constituting the in-vehicle system 1 may have the function of the frame determination device 100.
[0018] The communication network 2 is a network that transmits periodic frames and event frames, which will be described later, and can use any communication method, such as CAN (Controller Area Network) and LIN (Local Interconnect Network), as well as Ethernet (registered trademark), Wi-Fi (registered trademark), Bluetooth (registered trademark), etc., but in the following example, an example using CAN will be described.
[0019] In each embodiment, an example is described in which the frame determination device 100 and the ECU 20 are devices that constitute an in-vehicle system 1 mounted on a vehicle. However, the frame determination device 100 is not limited to a device mounted on a vehicle, and can be applied to any system.
[0020] (2) ECU20 The ECU 20 is an "electronic control device" that transmits data frames periodically, i.e., at a predetermined cycle, to the frame determination device 100. The data frames transmitted by the ECU 20 at the predetermined cycle include various data detected by sensors mounted on the vehicle and control values for controlling the vehicle. Hereinafter, the data frames transmitted by the ECU 20 at the predetermined cycle are referred to as periodic frames, and the predetermined cycle in which the ECU 20 transmits the periodic frames is referred to as a cycle T.
[0021] Here, the "electronic control device" may be a physically independent electronic control device, or a virtualized electronic control device realized using virtualization technology.
[0022] Furthermore, when a predetermined event occurs, the ECU 20 transmits a data frame to the frame determination device 100 regardless of the predetermined cycle T. Hereinafter, a data frame transmitted by the ECU 20 when an event occurs is referred to as an event frame. When the ECU 20 transmits an event frame, the ECU 20 then transmits a periodic frame at the cycle T starting from the transmission of the event frame.
[0023] FIG. 2 is a diagram for explaining the transmission of data frames by the ECU 20. FIG. 2(a) shows a case where the ECU 20 transmits four periodic frames (F1 to F4) with a period T. In contrast, FIG. 2(b) shows a case where the frame F2 transmitted next to the periodic frame F1 is an event frame. The frame F2 is transmitted when an event occurs. Therefore, the transmission interval x between the frames F1 and F2 is shorter than the period T of 10 ms. Furthermore, the frame F3 is transmitted at intervals of 10 ms starting from the transmission of the frame F2. Note that in FIG. 2 and in the embodiment described later, a case where the period T is 10 ms is described as an example, but the value of the period T is, of course, arbitrary.
[0024] The ECU 20 may preset a minimum value of the transmission interval for transmitting frames, i.e., a minimum transmission interval (Xmin). Fig. 2(c) illustrates a case where an event occurs immediately after the ECU 20 transmits the frame F1. When the minimum transmission interval Xmin is set, the ECU 20 does not transmit the event frame F2 immediately after the event occurs, but transmits the frame F2 after the minimum transmission interval Xmin has elapsed.
[0025] (2) Configuration of Frame Classification Device 100 The configuration of a frame determination device 100 common to each embodiment will be described with reference to Fig. 3. The frame determination device 100 includes a receiving unit 101, a control unit 102, and an output unit 107. The control unit 102 controls the operations of the receiving unit 101 and the output unit 107. The control unit 102 further realizes a reception interval calculation unit 103, a first determination unit 104, a difference calculation unit 105, and a second determination unit 106.
[0026] The receiving unit 101 receives a data frame (corresponding to a "first data frame") via the CAN. In principle, the data frame received by the receiving unit 101 is a data frame transmitted from the ECU 20, that is, a periodic frame or an event frame. However, if an external attacker inserts a data frame disguised as being transmitted from the ECU 20 through unauthorized access, the receiving unit 101 will mistakenly recognize the unauthorized data frame as a data frame transmitted from the ECU 20 and receive it. Therefore, the receiving unit 101 will receive not only data frames that were actually transmitted from the ECU 20, but also data frames that are mistakenly recognized as being transmitted from the ECU 20.
[0027] The reception interval calculation unit 103 of the control unit 102 calculates the reception interval P between the data frame received by the receiving unit 101 and a data frame (corresponding to the "second data frame") which is a periodic frame or an event frame received by the receiving unit 101 immediately before the data frame.
[0028] As described above, the ECU 20 transmits data frames with a period T. Therefore, when the receiving unit 101 of the frame determination device 100 receives only periodic frames, the reception interval between the periodic frames is, in principle, equal to the period T. However, when the receiving unit 101 receives an event frame or an abnormal frame inserted by unauthorized access, the reception interval between the two data frames becomes shorter than the period T. Furthermore, a delay may occur in the data frames due to congestion in the communication network 2, or the reception interval between the two data frames may become shorter or longer than the period T depending on the time resolution of the timestamp that adds time information to the data frames.
[0029] The first determination unit 104 determines whether or not the data frame received by the receiving unit 101 is a periodic frame, based on the receiving interval P calculated by the receiving interval calculation unit 103. Hereinafter, the data frame to be determined by the first determination unit 104 and a second determination unit 106 (described later) will be referred to as a target frame.
[0030] For example, the first determination unit 104 determines the reception interval P and a predetermined interval threshold P T When the reception interval P is equal to or less than the interval threshold P T Whether the target frame is a periodic frame or not is determined depending on whether the interval threshold P T It is desirable for the ECU 20 to set the reception interval P to a value smaller than the period T. This is because, as described above, even if the ECU 20 transmits periodic frames with the period T, the actual reception interval P may be shorter than the period T due to congestion in the communication network, etc. For example, a value of 90% or 80% of the period T, or a value smaller than these, may be set as the interval threshold value P. T Set as.
[0031] When the first determination unit 104 determines that the target frame is not a periodic frame, the difference calculation unit 105 calculates the "difference" between the reception time of a data frame (corresponding to an "actually received frame") actually received by the receiving unit 101 after the target frame and the predicted reception time of a virtual data frame (corresponding to a "virtual received frame"). The difference calculated by the difference calculation unit 105 will be described later in each embodiment.
[0032] Here, the "difference" includes not only the simple difference (yx) but also the squared difference (y 2 -x 2 ), square root of the difference ((yx) 1 / 2 ), weighted difference (by-ax: a, b are constants), etc.
[0033] The second determination unit 106 determines whether the target frame is an event frame or an abnormal frame, based on the difference calculated by the difference calculation unit 105. The second determination unit 106 will also be described in detail later in each embodiment.
[0034] The output unit 107 outputs the determination result of the target frame. The output unit 107 transmits the determination result to, for example, a security operation center (SOC) or a server device located outside the vehicle. The output unit 107 may output the determination result indicating that the target frame is an abnormal frame only when the second determination unit 106 determines that the target frame is an abnormal frame. The output unit 107 may further transmit information about the abnormal frame (for example, the reception time, the identification number, the data included in the abnormal frame, etc.) to the SOC or the server device.
[0035] 2. Embodiment 1 (1) Configuration of frame determination device 100 Next, a configuration of the frame determination device 100 specific to this embodiment will be described. Specifically, the configurations of the difference calculation unit 105 and the second determination unit 106 will be described.
[0036] The difference calculation unit 105 of this embodiment calculates two differences described below. One is the difference (N) between the reception time of the Nth actually received frame, which is a data frame actually received by the receiving unit 101 after the target frame, and the predicted reception time of the Nth virtual received frame, which is a periodic frame predicted to be received by the receiving unit 101 after the target frame when it is assumed that the target frame is an event frame. Here, N represents an integer equal to or greater than 1. Hereinafter, such a difference will be referred to as a first difference.
[0037] The first difference will be described with reference to Fig. 4. Fig. 4(a) shows three (i.e., N=1 to 3) actually received frames F which are data frames actually received by the receiving unit 101 after the target frame. t1 ~F t3 The reception times of these frames are shown as T t1 , T t2 , T t3 In contrast, FIG. 4B shows three virtual received frames F that are predicted to be received by the receiving unit 101 after the target frame. v1 ~F v3 The predicted reception times of these virtual reception frames are T v1 , T v2 , T v3 Therefore, the difference calculation unit 105 calculates the difference d between the reception time of the first actually received frame and the predicted reception time of the first virtual received frame. a1 Similarly, the difference calculation unit 105 calculates the difference d a2 , d a3 4 and in the embodiment described later, the case where N=1 to 3 is illustrated, but the number of N is of course arbitrary.
[0038] The difference calculation unit 105 further calculates a second difference different from the first difference. The second difference is the difference between the reception time of the above-mentioned N-th actually received frame and the predicted reception time of the N-th virtual received frame, which is a periodic frame predicted to be received after the data frame received by the receiving unit 101 immediately before the target frame, assuming that the target frame has not been received.
[0039] The second difference will be described with reference to Fig. 5. Fig. 5(a) shows the same three actually received frames F as Fig. 4(a). t1 ~F t3 As in Fig. 4(a), the actually received frame F t1 ~F t3 The reception times of t1 , T t2 , T t3 In contrast, FIG. 5(b) differs from FIG. 4(b) in that it uses a frame F0 received immediately before the target frame as a starting point, and three virtual received frames F1 predicted to be received after the target frame. v1 ~F v3 The predicted reception times of these virtual reception frames are T v1 , T v2 , T v3 Therefore, the difference calculation unit 105 calculates the first actually received frame F t1 The reception time of the first virtual reception frame F v1 The difference between the predicted reception time and the b1 Similarly, the difference calculation unit 105 calculates the difference d b2 , d b3 Calculate.
[0040] Next, the difference calculation unit 105 calculates the "sum" D of the three first differences. a (=d a1 +d a2 +d a3 ) and the "sum" of the three second differences D b (=d b1 +d b2 +d b3 ) are calculated respectively.
[0041] Here, the "total value" may be a value obtained by adding up multiple values, or a value obtained from a single value.
[0042] The second determination unit 106 determines the total value D of the first differences. a and the sum of the second differences D bSpecifically, the second determination unit 106 determines whether the target frame is an event frame or an abnormal frame based on the sum D a and the sum of the second difference D b and the sum of the first differences D a is the sum of the second difference D b (corresponding to a "predetermined total threshold value"), the second determination unit 106 determines that the target frame is an event frame. a is the sum of the second difference D b If "is greater than", the target frame is determined to be an abnormal frame.
[0043] Here, "more than" includes both cases where the value is the same as the comparison target and cases where it is not.
[0044] For example, in the examples of FIGS. 4 and 5, the total value D of the first differences shown in FIG. a is clearly the sum of the second difference D shown in FIG. b Therefore, the second determination unit 106 determines that the target frame shown in the examples of FIGS.
[0045] For comparison, a case where the target frame is an abnormal frame is illustrated in Fig. 6 and Fig. 7. When the target frame is an abnormal frame, the frame that the receiver 101 receives after frame F0 should be a periodic frame that the ECU 20 transmitted after frame F0 at a predetermined period T. Therefore, the receiver 101 receives an actual received frame F, which is a periodic frame, approximately after the period T has elapsed since receiving frame F0. t1 Similarly, the receiving unit 101 receives the actual received frame F t2 and the actual received frame F t3 Receive.
[0046] 6 is a diagram for explaining the first difference when the target frame is an abnormal frame, and FIG. 7 is a diagram for explaining the second difference when the target frame is an abnormal frame. Unlike the examples of FIGS. 4 and 5, in the examples of FIGS. 6 and 7, the total value D a is clearly the sum of the second difference D shown in FIG. b Therefore, the second determining unit 106 determines that the target frame shown in the examples of Fig. 6 and Fig. 7 is an abnormal frame.
[0047] In the examples of Figs. 4 to 7, the predicted reception time of the virtual reception frame is calculated using the value of 10 ms, which is the period T. However, the difference calculation unit 105 may use other values to calculate the predicted reception time. For example, the reception interval calculation unit 103 may use an average value of reception intervals calculated in the past to calculate the predicted reception time. As described above, there is a risk that a delay will occur in the frame depending on the state of the communication network between the frame determination device 100 and the ECU 20. Therefore, by using the average value of the past reception intervals, it is possible to increase the possibility of deriving a more accurate predicted reception time. As another example, the difference calculation unit 105 may calculate the predicted reception time using the interval threshold value P used by the first determination unit 104 to determine whether or not the target frame is a periodic frame. T The predicted reception time may be calculated using the following formula:
[0048] In the examples of Figs. 4 to 7, three actually received frames and three virtual received frames are used to calculate the sum of the first differences and the sum of the second differences, but any number of actually received frames and virtual received frames may be used to calculate the first differences and the second differences. For example, one actually received frame and one virtual received frame may be used to calculate the sum of the first differences and the sum of the second differences. In this case, N=1, and the difference d between the first actually received frame and the first virtual received frame is a1 is the sum of the first difference D a The difference between the first actually received frame and the first virtual received frame is d b1 is the sum of the second difference D bThis is the case. However, by using a plurality of actual received frames and virtual received frames, for example, it is possible to prevent misjudging the target frame as an event frame or an abnormal frame due to accidental frame delay or early arrival. Therefore, it is desirable that N is an integer of 2 or more.
[0049] Furthermore, the difference calculation unit 105 may weight the first difference and the second difference, and calculate the total value of the weighted first difference and the total value of the weighted second difference, respectively. The difference calculation unit 105 may weight all differences (n) with a constant weight coefficient, but it is desirable to weight the difference (n) with a weight coefficient larger than that of the difference (n + α) (however, 1 ≤ n < n + α ≤ N). As described above, even when the reception unit 101 receives periodic frames, the reception intervals between the periodic frames do not necessarily become the same as the period T. For example, in the example of FIG. 4, for the target frame, the actual received frames F t1 , F t2 , F t3 assuming that the respective reception intervals are always 10 ms - 0.2 ms which is the period T. In this case, d a1 , d a2 , d a3 become 0.2 ms, 0.4 ms, and 0.6 ms, respectively. Thus, the difference between the reception time of the actual received frame and the predicted reception time of the virtual received frame becomes larger for the frames received farther from the target frame. Therefore, the weight coefficient is made larger for the difference between the actual received frame received earlier and the virtual received frame, and the weight coefficient is made smaller for the difference between the actual received frame received farther from the target frame and the virtual received frame for weighting.
[0050] Note that the difference calculation unit 105 may change the weight coefficient step by step. For example, the differences d a1 , d a2 may be weighted with the same weight coefficient a, and the differences d a3 , d a4 may be weighted with a weight coefficient b smaller than the weight coefficient a.
[0051] In another example, the difference may be weighted according to the content of the data stored in the actually received frame. For example, if the reliability of the data stored in the actually received frame is determined to be high, the difference may be weighted with a large weighting coefficient. The reliability of the data may be determined, for example, by whether or not the counter value included in the data frame is progressing as expected. Naturally, the reliability of the data may also be determined according to whether or not data other than the counter value is expected data.
[0052] (2) Operation of the Frame Discriminator 100 Next, the operation of the frame determination device 100 will be described with reference to Fig. 8. Note that Fig. 8 not only shows a frame determination method in the frame determination device 100, but also shows the processing procedure of a program executed by the frame determination device 100. The order of these processes is not limited to the order shown in Fig. 8. In other words, the order may be changed as long as there is no constraint such as a relationship in which a certain step utilizes the result of the previous step. The same applies to the flow diagrams of the following embodiments. The processing procedure shown in Fig. 8 is repeatedly executed every time the frame determination device 100 receives a data frame. The same applies to Fig. 11 of the second embodiment described later.
[0053] The receiving unit 101 receives a data frame which is a target frame (S101). The reception interval calculation unit 103 calculates the reception interval P between the target frame and the data frame that the receiving unit 101 received immediately before the target frame (S102). The first determination unit 104 determines the reception interval P and the interval threshold P T (S103). Here, the reception interval P is compared with the interval threshold P T If it is greater than (S103: N), the first decision unit 104 decides that the target frame is a periodic frame (S104).
[0054] On the other hand, the first determination unit 104 determines the reception interval P and the interval threshold P T As a result of comparing, the reception interval P is equal to the interval threshold P TIf it is smaller than the first difference d a1 ~d aN is calculated (S105). Furthermore, the difference calculation unit 105 calculates the second difference d b1 ~d bN is calculated (S106). Next, the second determination unit 106 calculates the sum D a and the sum of N second differences D b Here, the total value of the first differences D a is the sum of the second difference D b If the sum of the first differences D is smaller than the sum of the first differences (S107: Y), the second determination unit 106 determines that the target frame is an event frame (S108). a is the sum of the second difference D b If it is greater than (S107: N), the second determination unit 106 determines that the target frame is an abnormal frame (S109). Then, the output unit 107 outputs the determination result for the target frame (S110).
[0055] (3) Summary As described above, according to this embodiment, when a frame that is not a periodic frame is received, it is possible to determine with high accuracy whether the frame is an event frame or an abnormal frame.
[0056] 3. Embodiment 2 In the method of the first embodiment, the first difference and the second difference are used to determine whether the target frame is an event frame or an abnormal frame. However, when multiple event frames or abnormal frames are received within a short period of time, a deviation occurs in the predicted reception time, making it difficult to accurately determine the target frame. Therefore, in this embodiment, a configuration for determining that multiple event frames or abnormal frames have been received will be described.
[0057] (1) Configuration of frame determination device 100 The difference calculation unit 105 of this embodiment calculates a first difference. The method of calculating the first difference in the difference calculation unit 105 is the same as that in the first embodiment. Also, similar to the first embodiment, the difference calculation unit 105 may weight the calculated first difference. However, in this embodiment, the difference calculation unit 105 does not calculate a second difference.
[0058] The second determination unit 106 of this embodiment calculates the N first differences d a and a predetermined difference threshold d th A predetermined difference threshold d th is set based on a predetermined period T. As an example, when an error of ±20% is assumed for the predetermined period T, the predetermined difference threshold d th may be set to a value that is 20% of the predetermined period T (i.e., T×0.2).
[0059] First difference d a and a given difference threshold d th As a result of the comparison, the first difference is equal to or smaller than a predetermined difference threshold d th If the sum of the N first differences D a and a preset total threshold D th Then, the sum of the first differences D a is a given total threshold D th If the sum of the first differences D a is a given total threshold D th If it is greater than , the target frame is determined to be an abnormal frame.
[0060] In contrast, the first difference d a and a given difference threshold d th As a result of the comparison with the first difference, at least one of the first differences is equal to or exceeds a predetermined difference threshold d this greater than , the second determination unit 106 determines that the receiving unit 101 has received multiple event frames or multiple abnormal frames. When multiple event frames or multiple abnormal frames are received, it is difficult to determine whether the target frame is an event frame or an abnormal frame. Therefore, when the second determination unit 106 determines that multiple event frames or multiple abnormal frames have been received, the output unit 107 of this embodiment may output a determination result indicating that it is impossible to determine whether the target frame is an event frame or an abnormal frame.
[0061] In Fig. 9 and Fig. 10, after the target frame, frame F t2 FIG. 9 is a diagram illustrating a case where an event frame or an abnormal frame is received as a target frame and a frame F. t2 is an event frame, and Fig. 10 shows the target frame and frame F t2 are abnormal frames, respectively.
[0062] In Figure 9, frame F is an event frame. t2 By receiving the actual received frame F t3 Reception time T t3 and a virtual received frame F v3 Estimated reception time T v3 Difference d a3 is relatively large, and a given difference threshold d th Therefore, the second determination unit 106 can determine that an event frame or an abnormal frame has been received in addition to the target frame. In other words, the second determination unit 106 determines that a plurality of event frames or abnormal frames have been received.
[0063] In Fig. 10, frame F is an abnormal frame. t2 By receiving the actual received frame F t2 Reception time T t2 and a virtual received frame F v2 Estimated reception time T v2 Difference d a2 , and the actually received frame Ft3 Reception time T t3 and a virtual received frame F v3 Estimated reception time T v3 Difference d a3 is relatively large, and a given difference threshold d th 9, the second determining unit 106 can determine that a plurality of event frames or abnormal frames have been received.
[0064] In this way, in this embodiment, it is possible to determine whether a target frame is an event frame or an abnormal frame without calculating the second difference, so that it is possible to determine the target frame while reducing the amount of calculation in the control unit 102 compared to embodiment 1.
[0065] (2) Operation of the Frame Discriminator 100 The operation of the frame determination device 100 of this embodiment will be described with reference to Fig. 11. Note that the same processes as those in the frame determination device 100 of the first embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted.
[0066] In S105, the difference calculation unit 105 calculates N first differences d a1 ~d aN After calculating the first difference d a1 ~d aN and the difference threshold d th Here, at least one of the first differences is compared with a difference threshold d th If the count is greater than 1 (S111: N), the second determining unit 106 determines that the receiving unit 101 has received a plurality of event frames or abnormal frames (S112). In addition, the first difference is always less than the difference threshold d th If the sum of the first differences D a and the total threshold D th Here, the total value of the first differences D a is the total threshold D thIf the sum of the first differences D is smaller than the sum of the first differences (S113: Y), the second determination unit 106 determines that the target frame is an event frame (S108). a is the total threshold D th If it is greater than (S113: N), the target frame is determined to be an abnormal frame (S109).
[0067] (3) Summary As described above, according to this embodiment, it is possible to determine whether a target frame is an event frame or an abnormal frame while reducing the amount of calculation required to determine the target frame compared to embodiment 1. Furthermore, in this embodiment, it is possible to determine that multiple event frames or abnormal frames have been received.
[0068] 4. Embodiment 3 (Other Inventions) When a minimum transmission interval Xmin at which the ECU 20 transmits frames is set, the frame determination device 100 may use the minimum transmission interval Xmin to determine whether a target frame is an event frame or an abnormal frame.
[0069] 4(c), when the minimum transmission interval Xmin is set, the ECU 20 transmits an event frame after the minimum transmission interval Xmin has elapsed. Therefore, when the reception interval P calculated by the reception interval calculation unit 103 is shorter than the minimum transmission interval Xmin, the target frame is likely to be an abnormal frame rather than an event frame. Therefore, when the reception interval P is shorter than the minimum transmission interval Xmin, the first determination unit 104 determines that the target frame is an abnormal frame.
[0070] This embodiment may be combined with the above-mentioned embodiments 1 and 2. In this case, the first determination unit 104 first compares the reception interval P with the minimum transmission interval Xmin, and if the reception interval P is greater than the minimum transmission interval Xmin, then determines whether the reception interval P is greater than the interval threshold P T and judge whether the target frame is a periodic frame or not.
[0071] 5. Summary The features of the frame determination device and the like of the present invention have been described above.
[0072] The terms used in each embodiment are merely examples and may be replaced with synonymous terms or terms having the same functions.
[0073] The block diagrams used to explain the embodiments classify and organize the configuration of the device by function. The blocks showing the respective functions are realized by any combination of hardware or software. In addition, since the block diagrams show the functions, they can also be understood as disclosures of a method invention and a program invention that realizes the method.
[0074] The order of the functional blocks that can be understood as the processes, flows, and methods described in each embodiment may be changed as long as there are no constraints such as a relationship in which one step utilizes the results of another step that precedes it.
[0075] The terms first, second, through Nth (N is an integer) used in each embodiment and in the claims are used to distinguish two or more configurations or methods of the same type, and do not limit the order or superiority or inferiority.
[0076] Each embodiment is based on a frame determination device mounted on a vehicle, but the present invention also includes dedicated or general-purpose devices other than those for use in vehicles, unless otherwise limited in the claims.
[0077] Moreover, examples of the form of the frame determination device of the present invention include the following. Examples of the component form include a semiconductor element, an electronic circuit, a module, and a microcomputer. Examples of semi-finished products include electronic control units (ECUs (Electric Control Units)) and system boards. Finished product forms include mobile phones, smartphones, tablets, personal computers (PCs), workstations, and servers. Other examples include devices with communication functions, such as video cameras, still cameras, and car navigation systems.
[0078] Furthermore, necessary functions such as an antenna and a communication interface may be added to the frame determination device.
[0079] In addition, the present invention can be realized not only by dedicated hardware having the configuration and functions described in each embodiment, but also as a combination of a program for realizing the present invention recorded on a recording medium such as a memory or a hard disk, and general-purpose hardware having a dedicated or general-purpose CPU and memory capable of executing the program.
[0080] A program stored in a non-transient physical recording medium (for example, an external storage device (hard disk, USB memory, CD / BD, etc.) or an internal storage device (RAM, ROM, etc.)) of dedicated or general-purpose hardware can be provided to the dedicated or general-purpose hardware via a recording medium, or via a communication line from a server without using a recording medium. This makes it possible to always provide the latest functions through program upgrades. [Explanation of symbols]
[0081] 100 Frame determination device, 101 Receiving unit, 103 Receiving interval calculation unit, 104 First determination unit, 105 Difference calculation unit, 106 Second determination unit, 107 Output unit, 20 Electronic control device
Claims
1. A frame determination device (100) connected to a network that transmits periodic frames and event frames transmitted from an electronic control device (20), the periodic frame is a data frame transmitted at a predetermined cycle starting from the transmission of the periodic frame or the event frame transmitted immediately before from the electronic control device, and the event frame is a data frame transmitted regardless of the predetermined cycle when a predetermined event occurs, The frame determination device comprises: A receiving unit (101) for receiving a first data frame; a reception interval calculation unit (103) that calculates a reception interval between the first data frame and a second data frame that is the periodic frame or the event frame received by the receiving unit immediately before the first data frame; a first determination unit (104) that determines whether or not the first data frame is the periodic frame based on the reception interval; a difference calculation unit (105) that calculates, when the first determination unit determines that the first data frame is not the periodic frame, a difference (N) between a reception time of an Nth (N is an integer equal to or greater than 1) actual reception frame which is a data frame actually received by the receiving unit after the first data frame, and a predicted reception time of an Nth virtual reception frame which is a periodic frame which the receiving unit is predicted to receive after the first data frame when the first data frame is assumed to be the event frame; a second determination unit (106) that determines whether the first data frame is the event frame or an abnormal frame different from the event frame based on the difference; an output unit (107) that outputs a determination result of the first data frame; A frame determination device comprising:
2. N is an integer of 2 or more; 2. The frame determination device according to claim 1.
3. The second determination unit is If the sum of the N differences is less than a predetermined sum threshold, the first data frame is determined to be the event frame; If the sum of the N differences is greater than the predetermined sum threshold, the first data frame is determined to be the abnormal frame.
3. The frame determination device according to claim 1.
4. the difference calculation unit calculates, in addition to the first difference that is the difference, a second difference that is a difference between a reception time of the N-th actual reception frame and a predicted reception time of an N-th virtual reception frame, which is a plurality of periodic frames that are predicted to be received by the receiving unit after the second data frame if it is assumed that the first data frame has not been received; The predetermined sum threshold is a sum of N second differences.
4. The frame determination device according to claim 3.
5. the second determination unit compares a sum of the differences with the predetermined sum threshold when all of the N differences are smaller than a predetermined difference threshold.
4. The frame determination device according to claim 3.
6. The second determination unit determines that a plurality of event frames or a plurality of abnormal frames have been received when at least one of the N differences is greater than the predetermined difference threshold.
6. The frame determination device according to claim 5.
7. When the second determination unit determines that the plurality of event frames or the plurality of abnormal frames have been received, the output unit outputs the determination result indicating that it is impossible to determine whether the first data frame is the event frame or the abnormal frame.
7. The frame determination device according to claim 6.
8. The difference calculation unit calculates the predicted reception time using the predetermined period.
2. The frame determination device according to claim 1.
9. the difference calculation unit calculates the predicted reception time by using a reception interval previously calculated by the reception interval calculation unit; 2. The frame determination device according to claim 1.
10. The difference calculation unit weights the difference (n) with a weighting coefficient larger than the difference (n+α) (1≦n<n+α≦N); 3. The frame determination device according to claim 2.
11. the difference calculation unit weights the difference (n) in accordance with the data stored in the actually received frame.
3. The frame determination device according to claim 2.
12. A frame determination method executed by a frame determination device (100) connected to a network that transmits periodic frames and event frames transmitted from an electronic control device (20), comprising: the periodic frame is a data frame transmitted at a predetermined cycle starting from the transmission of the periodic frame or the event frame transmitted immediately before from the electronic control device, and the event frame is a data frame transmitted regardless of the predetermined cycle when a predetermined event occurs, The frame determination method includes: Receiving a first data frame (S101); Calculating a reception interval between the first data frame and a second data frame, which is the periodic frame or the event frame received immediately before the first data frame (S102); Based on the reception interval, it is determined whether the first data frame is the periodic frame (S103, S104). When it is determined that the first data frame is not the periodic frame, a difference (N) is calculated between a reception time of an Nth (N is an integer equal to or greater than 1) actual reception frame which is a data frame actually received after the first data frame and a predicted reception time of an Nth virtual reception frame which is a periodic frame which is predicted to be received by the receiving unit after the first data frame when the first data frame is assumed to be the event frame (S105); Based on the difference, it is determined whether the first data frame is the event frame or an abnormal frame different from the event frame (S107 to S109, S113); Outputting the determination result of the first data frame (S110); Frame determination method.
13. A frame determination program executable by a frame determination device (100) connected to an electronic control device (20), the periodic frame is a data frame transmitted at a predetermined cycle starting from the transmission of the periodic frame or the event frame transmitted immediately before from the electronic control device, and the event frame is a data frame transmitted regardless of the predetermined cycle when a predetermined event occurs, The frame determination program includes: Receiving a first data frame (S101); Calculating a reception interval between the first data frame and a second data frame, which is the periodic frame or the event frame received immediately before the first data frame (S102); It is determined whether the first data frame is the periodic frame or not based on the reception interval (S103, S104); When it is determined that the first data frame is not the periodic frame, a difference (N) is calculated between a reception time of an Nth (N is an integer equal to or greater than 1) actual reception frame which is a data frame actually received after the first data frame and a predicted reception time of an Nth virtual reception frame which is a periodic frame which is predicted to be received by the receiving unit after the first data frame when the first data frame is assumed to be the event frame (S105); Based on the difference, it is determined whether the first data frame is the event frame or an abnormal frame different from the event frame (S107 to S109, S113); Outputting the determination result of the first data frame (S110); A frame determination program that causes a process including the above to be performed.
14. A frame determination system (1) having an electronic control device (20) and a frame determination device (100) connected to a network that transmits periodic frames and event frames transmitted from the electronic control device, The electronic control device includes: transmitting the periodic frame at a predetermined cycle starting from the time of transmission of the periodic frame or the event frame transmitted immediately before, and transmitting the event frame regardless of the predetermined cycle when a predetermined event occurs; The frame determination device includes: A receiving unit (101) for receiving a first data frame; a reception interval calculation unit (103) that calculates a reception interval between the first data frame and a second data frame that is the periodic frame or the event frame received by the receiving unit immediately before the first data frame; a first determination unit (104) that determines whether or not the first data frame is the periodic frame based on the reception interval; a difference calculation unit (105) that calculates, when the first determination unit determines that the first data frame is not the periodic frame, a difference (N) between a reception time of an Nth (N is an integer equal to or greater than 1) actual reception frame which is a data frame actually received by the receiving unit after the first data frame, and a predicted reception time of an Nth virtual reception frame which is a periodic frame which the receiving unit is predicted to receive after the first data frame when the first data frame is assumed to be the event frame; a second determination unit (106) that determines whether the first data frame is the event frame or an abnormal frame different from the event frame based on the difference; an output unit (107) that outputs a determination result of the first data frame; A frame determination system comprising:
15. A frame determination method executed in a frame determination system (1) having an electronic control device (20) and a frame determination device (100) connected to a network that transmits periodic frames and event frames transmitted from the electronic control device, comprising: the periodic frame is a data frame transmitted at a predetermined cycle starting from the transmission of the periodic frame or the event frame transmitted immediately before from the electronic control device, and the event frame is a data frame transmitted regardless of the predetermined cycle when a predetermined event occurs, The frame determination method includes: Receiving a first data frame (S101); Calculating a reception interval between the first data frame and a second data frame, which is the periodic frame or the event frame received immediately before the first data frame (S102); Based on the reception interval, it is determined whether the first data frame is the periodic frame (S103, S104). When it is determined that the first data frame is not the periodic frame, a difference (N) is calculated between a reception time of an Nth (N is an integer equal to or greater than 1) actual reception frame which is a data frame actually received after the first data frame and a predicted reception time of an Nth virtual reception frame which is a periodic frame which is predicted to be received by the receiving unit after the first data frame when the first data frame is assumed to be the event frame (S105); Based on the difference, it is determined whether the first data frame is the event frame or an abnormal frame different from the event frame (S107 to S109, S113); Outputting the determination result of the first data frame (S110); Frame determination method.
Citation Information
Patent Citations
On-board relay connection unit
JP2009253557A
Communication system and communication method
WO2013094072A1