Frame determination device, frame determination method, frame determination program, and frame determination system
By using the reception interval and difference calculation in the frame determination device between electronic control devices, it is possible to accurately determine whether the data frame is an event frame or an abnormal frame, and solve the problem of difficult to distinguish between event messages and illegal messages in the prior art, and improve the detection accuracy .
Patent Information
- Application Number
- CN202410876623.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-05
- Filing Date
- 2024-07-02
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art is difficult to accurately determine whether a message sent between electronic control devices is due to an event rather than an abnormal message, especially when the message is not sent at a prescribed communication interval.
A frame determination device is designed, and the reception interval calculation unit, the reception interval calculation unit, the first judgment unit, the difference calculation unit and the second judgment unit, calculate and compare the reception interval of the data frame and the predicted reception time difference of the virtual reception frame, and determine the Whether the data frame is an event frame or an exception frame.
In the case of a data frame not received at a prescribed communication interval, it is possible to accurately determine whether the data frame is an event frame sent due to an event generation or an abnormal frame, thereby improving the detection accuracy of illegal access.
Smart Images

Figure CN119276527A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an apparatus for determining a data frame transmitted from an electronic control device, a method and a program executed by the apparatus, and a system having the apparatus. Background Art
[0002] In the past, various types of electronic control devices were installed in automobiles, and these electronic control devices were connected to each other through a communication network to form an in-vehicle system. In such an in-vehicle system, a network intrusion detection system (NIDS) is known to be used to detect suspicious access and data from the outside.
[0003] For example, Patent Document 1 discloses a communication system that can determine the legality / illegality of a message communicated through a communication system by a simple configuration. In this communication system, a plurality of ECUs are connected to a communication bus in order to communicate messages. A predetermined communication interval is set in each ECU, and the ECU that sends a message sends the message based on the predetermined communication interval. Furthermore, if the communication interval of a received message is shorter than the predetermined communication interval, the message is determined to be abnormal.
[0004] Patent document 2 discloses a relay connection unit for relaying messages sent and received between electronic control units. In the relay connection unit, the number of times a message is received within a predetermined set time is counted, and when the number of receptions exceeds the set number, the message is determined to be abnormal.
[0005] Patent Document 1: International Publication No. 2013 / 094072
[0006] Patent Document 2: Japanese Patent Application Publication No. 2009-253557
[0007] The methods described in the prior art documents all take the sending and receiving of messages at a specified communication interval as a premise to determine abnormal messages. However, among the messages sent and received between ECUs, there are cases where, in addition to messages sent and received at a specified communication interval, there are also messages sent and received when a certain event occurs. Such messages are usually not sent and received at a specified communication interval, so it is impossible to use the previous methods to determine whether they are normal messages. Summary of the invention
[0008] Therefore, an object of the present disclosure is to determine, when a message is received at an interval that is not a predetermined communication interval, whether the received message is sent when an event occurs or is an illegal message.
[0009] A frame determination device in one aspect of the present disclosure is a frame determination device connected to a network that transmits periodic frames and event frames sent from an electronic control device, wherein the periodic frame is a data frame that is sent at a prescribed period starting from the time when the periodic frame or event frame sent immediately before from the electronic control device is sent, and the event frame is a data frame that is sent regardless of the prescribed period when a prescribed event occurs, and the frame determination device comprises: a receiving unit that receives a first data frame; a receiving interval calculation unit that calculates a receiving interval between the first data frame and the periodic frame or event frame, i.e., a second data frame, received by the receiving unit immediately before the first data frame; a first determination unit that determines the first data frame based on the receiving interval. whether a data frame is the above-mentioned periodic frame; a differential calculation unit, when the above-mentioned first determination unit determines that the above-mentioned first data frame is not the above-mentioned periodic frame, calculates the difference (N) between the receiving time of the data frame actually received by the above-mentioned receiving unit after the above-mentioned first data frame, that is, the Nth (N is an integer greater than 1) actual receiving frame and the predicted receiving time of the Nth virtual receiving frame, the Nth virtual receiving frame being a periodic frame predicted to be received by the above-mentioned receiving unit after the above-mentioned first data frame when the above-mentioned first data frame is assumed to be the above-mentioned event frame; a second determination unit, based on the above-mentioned difference, determines whether the above-mentioned first data frame is the above-mentioned event frame, or an abnormal frame different from the above-mentioned event frame; and an output unit, outputting the determination result of the above-mentioned first data frame.
[0010] With the above-described configuration, when the received data frame is not a data frame transmitted at a predetermined cycle, it can be determined whether the data frame is an event frame transmitted due to occurrence of an event or an abnormal frame. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a diagram for explaining a vehicle-mounted system including the log determination device according to the first or second embodiment.
[0012] Figure 2 This is a diagram for explaining frames sent and received in implementation mode 1 or 2.
[0013] Figure 3 This is a diagram showing a configuration example of a log determination device according to the first or second embodiment.
[0014] Figure 4 This is a diagram for explaining the first difference calculated by the log determination device according to the first embodiment.
[0015] Figure 5 This is a diagram for explaining the second difference calculated by the log determination device according to the first embodiment.
[0016] Figure 6 This is a diagram for explaining the first difference calculated by the log determination device according to the first embodiment.
[0017] Figure 7 This is a diagram for explaining the second difference calculated by the log determination device according to the first embodiment.
[0018] Figure 8 This is a diagram for explaining the operation of the frame determination device according to the first embodiment.
[0019] Fig. 9 This is a diagram for explaining the first difference calculated by the log determination device according to the second embodiment.
[0020] Fig.10 This is a diagram for explaining the first difference calculated by the log determination device according to the second embodiment.
[0021] Fig.11 This is a diagram for explaining the operation of the frame determination device according to the second embodiment. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[0023] In the case of multiple embodiments, the configuration disclosed in each embodiment is not limited to each embodiment, but can be combined across the embodiments. For example, the configuration disclosed in one embodiment can be combined with other embodiments. In addition, the configurations disclosed in multiple embodiments can be combined together.
[0024] 1. Configurations common to various embodiments
[0025] (1) In-vehicle system 1
[0026] Figure 1 The in-vehicle system 1 (equivalent to a "frame determination system") is shown, which is composed of a frame determination device 100, a plurality of electronic control devices 20 (hereinafter referred to as ECUs (Electric Control Units)), and a communication network 2 that interconnects these devices. In each of the embodiments shown below, an electronic control device configured as a gateway has a function as a frame determination device 100, receives data frames sent from 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 also 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 a function as a frame determination device 100.
[0027] The communication network 2 is a network for transmitting the periodic frames and event frames described later. For example, in addition to communication methods such as CAN (Controller Area Network) and LIN (Local Interconnect Network), any communication method such as Ethernet (registered trademark), Wi-Fi (registered trademark), and Bluetooth (registered trademark) can be used, but the example using CAN is explained in the following example.
[0028] In each embodiment, the frame determination device 100 and the ECU 20 are described as an example in which the frame determination device 100 and the ECU 20 are mounted on a vehicle and constitute the vehicle-mounted system 1. However, the frame determination device 100 is not limited to a device mounted on a vehicle, and can be applied to any system.
[0029] (2) ECU20
[0030] ECU20 is an "electronic control unit" that periodically transmits data frames to frame determination device 100, i.e., at a predetermined period. The data frames transmitted by ECU20 at a predetermined period include various data detected by sensors mounted on the vehicle, control values for controlling the vehicle, etc. Hereinafter, the data frames transmitted by ECU20 at a predetermined period are referred to as periodic frames, and the predetermined period for ECU20 to transmit periodic frames is referred to as period T.
[0031] Here, the “electronic control device” may be a physically independent electronic control device or a virtualized electronic control device implemented using virtualization technology.
[0032] When a predetermined event occurs, ECU 20 further sends a data frame to frame determination device 100 regardless of the predetermined period T. Hereinafter, the data frame sent by ECU 20 when an event occurs is referred to as an event frame. When ECU 20 sends an event frame, ECU 20 then sends a period frame at a period T starting from the time when the event frame is sent.
[0033] Figure 2 It is a diagram for explaining transmission of a data frame by the ECU 20 . Figure 2 (a) shows the case where the ECU 20 sends four cycle frames (F1 to F4) at a cycle T. In contrast, Figure 2 (b) shows the case where the frame F2 sent next to the periodic frame F1 is an event frame. Frame F2 is sent when an event occurs. Therefore, the sending interval x between frame F1 and frame F2 is shorter than the period T, that is, 10ms. In addition, frame F3 is sent at intervals of 10ms starting from the time when frame F2 is sent. In addition, although Figure 2In the embodiments described below, the case where the period T is 10 ms is taken as an example for explanation, but the value of the period T is of course arbitrary.
[0034] Furthermore, the ECU 20 may also pre-set a minimum value of the transmission interval of the transmission frame, that is, a minimum transmission interval (Xmin). Figure 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.
[0035] (2) Configuration of frame determination device 100
[0036] Reference Figure 3 , the structure of the frame determination device 100 common to each embodiment is described. 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 also implements a receiving interval calculation unit 103, a first determination unit 104, a difference calculation unit 105, and a second determination unit 106.
[0037] The receiving unit 101 receives a data frame (equivalent to a "first data frame") via the CAN. In principle, the data frame received by the receiving unit 101 is a data frame sent from the ECU 20, that is, a periodic frame or an event frame. However, when an external attacker inserts a data frame disguised as the sending source of the ECU 20 through illegal access, the receiving unit 101 mistakenly receives the illegal data frame as a data frame sent from the ECU 20. Therefore, the receiving unit 101 not only receives the data frame actually sent from the ECU 20, but also receives the data frame mistakenly believed to be sent from the ECU 20.
[0038] 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 the data frame (corresponding to the “second data frame”) as a periodic frame or an event frame received by the receiving unit 101 immediately before the data frame.
[0039] As described above, the ECU 20 transmits data frames at a period T. Therefore, when the receiving unit 101 of the frame determination device 100 receives only periodic frames, the reception interval between periodic frames is equal to the period T in principle. However, when the receiving unit 101 receives an event frame, or receives an abnormal frame inserted by illegal access, the reception interval between two data frames is shorter than the period T. In addition, sometimes the data frame is delayed due to congestion in the communication network 2, or sometimes the reception interval between two data frames is shorter or longer than the period T depending on the time resolution of the timestamp for assigning time information to the data frame.
[0040] The first determination unit 104 determines whether the data frame received by the receiving unit 101 is a periodic frame based on the reception interval P calculated by the reception interval calculation unit 103. Hereinafter, the data frame to be determined by the first determination unit 104 and the second determination unit 106 described later is referred to as a target frame.
[0041] For example, the first determination unit 104 compares the reception interval P with a predetermined interval threshold value P. T Compare and determine whether the received interval P is greater than the interval threshold P T Here, it is preferred to set the interval threshold P T The value is set to be smaller than the period T of the ECU 20. As described above, this is because even when the ECU 20 sends periodic frames at the period T, there is a possibility that the actual reception interval P is shorter than the period T due to congestion of the communication network. For example, a value of 90% or 80% of the period T, or a smaller value than these, is set as the interval threshold P. T .
[0042] 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 the data frame actually received by the receiving unit 101 after the target frame (equivalent to the "actual reception frame") and the predicted reception time of the virtual data frame (equivalent to the "virtual reception frame"). The difference calculated by the difference calculation unit 105 will be described later in each embodiment.
[0043] Here, "difference" only includes subtraction, including not only simple difference (y-x) but also squared difference (y 2 -x 2 ), the square root of the difference ((y-x) 1 / 2 ), weighted difference (by-ax: a and b are constants), etc.
[0044] 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 details of the second determination unit 106 will also be described later in each embodiment.
[0045] The output unit 107 outputs the determination result of the object frame. The output unit 107 sends the determination result to, for example, a SOC (Security Operation Center) or a server device located outside the vehicle. The output unit 107 may also output the determination result indicating that the object frame is an abnormal frame only when the second determination unit 106 determines that the object frame is an abnormal frame. The output unit 107 may also further send information related to the abnormal frame (for example, reception time, identification number, data contained in the abnormal frame, etc.) to the SOC or the server device.
[0046] 2. Implementation Method 1
[0047] (1) Configuration of frame determination device 100
[0048] Next, the configuration of the frame determination device 100 unique to this embodiment will be described. Specifically, the configuration of the difference calculation unit 105 and the second determination unit 106 will be described.
[0049] The difference calculation unit 105 of this embodiment calculates two differences described below. One difference is the difference (N) between the reception time of the data frame actually received by the receiving unit 101 after the object frame, that is, the Nth actual reception frame, and the predicted reception time of the Nth virtual reception frame, which is a periodic frame predicted to be received by the receiving unit 101 after the object frame when the object frame is assumed to be an event frame. Here, N represents an integer greater than 1. Hereinafter, such a difference is referred to as the first difference.
[0050] Reference Figure 4 The first difference will be described. Figure 4 (a) shows three (ie, 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 actual receiving time of these frames is T t1 、T t2 、T t3 In contrast, Figure 4 (b) shows three virtual reception frames F predicted to be received by the reception unit 101 after the target frame. v1 ~F v3 The predicted receiving times of these virtual receiving 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 actual reception frame and the predicted reception time of the first virtual reception frame. a1 Similarly, the difference calculation unit 105 calculates the difference d a2 d a3 In addition, although Figure 4 In the embodiments described below, the case where N=1 to 3 is described as an example, but the number of N is of course arbitrary.
[0051] 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 Nth actual reception frame and the predicted reception time of the Nth virtual reception frame, which is a periodic frame predicted to be received after the data frame received by the receiving unit 101 immediately before the object frame, assuming that the object frame is not received.
[0052] Reference Figure 5 The second difference will be described. Figure 5 (a) shows Figure 4 (a) The same three actual received frames F t1 ~F t3 .and Figure 4 (a) is the same, the actual received frame F t1 ~F t3 The receiving times are T t1 、T t2 、T t3 In contrast, Figure 5 (b) with Figure 4 (b) Differently, starting from the frame F0 received immediately before the target frame, three virtual received frames F0 received after the target frame are predicted. v1 ~F v3 The predicted receiving times of these virtual receiving frames are T v1 、T v2 、T v3 Therefore, the difference calculation unit 105 calculates the first actually received frame F t1 The receiving time and the first virtual receiving frame F v1 The difference d of the predicted reception time b1 Similarly, the difference calculation unit 105 calculates the difference d b2 d b3 .
[0053] Next, the difference calculation unit 105 calculates the “total value” D of the three first differences respectively. a (=d a1 +d a2 +d a3 ) and the “total value” D of the three second differences b (=d b1 +d b2 +d b3 ).
[0054] Here, the “total value” may be a value obtained from a single value in addition to a value obtained by adding a plurality of values.
[0055] The second determination unit 106 determines the total value D of the first difference based on the total value D of the first difference. a , and the sum of the second difference D b , determines whether the target frame is an event frame or an abnormal frame. Specifically, the second determination unit 106 calculates the total value D of the first difference. a The total value D of the second difference b For comparison, the total value D of the first difference a “Ratio” to the total value D of the second difference b(corresponding to the "predetermined total threshold value") is smaller than the first difference, the target frame is determined to be an event frame. a “Ratio” to the total value D of the second difference b If the error is large, the target frame is determined to be an abnormal frame.
[0056] Here, “ratio” includes both the case where the value is the same as the comparison object and the case where the value is not included.
[0057] For example, in Figure 4 , Figure 5 In the example, Figure 4 The total value D of the first difference shown a Obviously Figure 5 The total value D of the second difference shown b Therefore, the second determination unit 106 determines that Figure 4 , Figure 5 The object frame shown in the example is an event frame.
[0058] Here, for comparison, Figure 6 , Figure 7 The case where the target frame is an abnormal frame is illustrated. In the case where the target frame is an abnormal frame, the frame received by the receiving unit 101 after the frame F0 should be a periodic frame sent by the ECU 20 at a predetermined period T after the frame F0. Therefore, the receiving unit 101 receives the actual received frame F0 as a periodic frame after the period T has passed since the frame F0 was received. t1 Similarly, the receiving unit 101 receives the actual received frame F t2 And the actual received frame F t3 .
[0059] Figure 6 is a diagram for explaining the first difference when the target frame is an abnormal frame. Figure 7 FIG. 2 is a diagram for explaining the second difference when the target frame is an abnormal frame. Figure 4 , 5 The example is different. Figure 6 , 7 In the example, Figure 6 The total value D of the three first differences shown a Obviously Figure 7 The total value D of the second difference shown b Therefore, the second determination unit 106 determines that Figure 6 , Figure 7 The target frame shown in the example is an abnormal frame.
[0060] In addition, Figure 4 to Figure 7In the example, an example of calculating the predicted reception time of a virtual reception frame using the value of the period T, i.e., 10ms, is shown. However, the difference calculation unit 105 may also use other values to calculate the predicted reception time. For example, the reception interval calculation unit 103 may also use the average value of the reception intervals calculated in the past to calculate the predicted reception time. As described above, depending on the state of the communication network between the frame determination device 100 and the ECU 20, there is a concern that frames may be delayed. Therefore, by using the average value of the past reception intervals, the possibility of deriving a more accurate predicted reception time can be increased. As another example, the difference calculation unit 105 may also use the interval threshold value P used by the first determination unit 104 to determine whether the object frame is a periodic frame. T To calculate the predicted reception time.
[0061] In addition, although Figure 4 to Figure 7 In the example, three actual received frames and three virtual received frames are used to calculate the total value of the first difference and the total value of the second difference, but the number of actual received frames and virtual received frames used to calculate the first difference and the second difference is arbitrary. For example, one actual received frame and one virtual received frame can also be used to calculate the total value of the first difference and the total value of the second difference. In this case, N = 1, and the difference d between the first actual received frame and the first virtual received frame is a1 The total value D of the first difference a , the difference d between the first actual received frame and the first virtual received frame b1 The total value D of the second difference b However, by using a plurality of actual received frames and virtual received frames, it is possible to prevent the object frame from being mistakenly determined as an event frame or an abnormal frame due to, for example, an occasional frame delay or early arrival. Therefore, it is preferred that N is an integer greater than 2.
[0062] Furthermore, the difference calculation unit 105 may also weight the first difference and the second difference, and respectively calculate the total value of the weighted first differences and the total value of the weighted second differences. Although the difference calculation unit 105 may weight all the differences (n) with a constant weighting coefficient, it is preferred to weight the difference (n) with a weighting coefficient greater than the difference (n+α) (where 1≤n<n+α≤N). As described above, even when the receiving unit 101 receives periodic frames, the reception interval between the periodic frames is not necessarily the same as the period T. For example, in Figure 4 In the example, it is assumed that the target frame and the actual received frame F t1 、F t2 、F t3 The reception interval of each is always the period T, that is, 10ms-0.2ms. In this case, d a1 da2 d a3 The difference between the reception time of the actual reception frame and the predicted reception time of the virtual reception frame is greater. Therefore, weighting is performed in such a way that the difference weighting coefficient between the actual reception frame received earlier and the virtual reception frame is greater, and the difference weighting coefficient between the actual reception frame received farther from the object frame and the virtual reception frame is smaller.
[0063] In addition, the difference calculation unit 105 may change the weighting coefficient in stages. For example, the difference d may be calculated using the same weighting coefficient a. a1 d a2 The weighting factor b is smaller than the weighting factor a. a3 d a4 Weighted.
[0064] In other examples, the difference may be weighted according to the content of the data stored in the actual received frame. For example, when the reliability of the data stored in the actual received frame is determined to be high, the difference may be weighted with a larger weighting coefficient. For example, the reliability of the data may be determined according to whether the counter value included in the data frame moves as assumed. Of course, the reliability of the data may also be determined according to whether the data other than the counter value is the assumed data.
[0065] (2) Operation of frame determination device 100
[0066] Next, refer to Figure 8 , the operation of the frame determination device 100 is described. It should be noted that, Figure 8 The present invention not only shows the frame determination method in the frame determination device 100, but also shows the processing sequence of the program executed by the frame determination device 100. In addition, these processes are not limited to Figure 8 That is, the order can be changed as long as there is no restriction such as the relationship that a step uses the result of the previous step. The same is true in the flowcharts of the following embodiments. In addition, each time the frame judgment device 100 receives a data frame, it repeatedly executes Figure 8 For the processing sequence shown in the following embodiment 2 Fig.11 Same.
[0067] The receiving unit 101 receives a data frame as a target frame (S101). The receiving interval calculation unit 103 calculates a receiving interval P between the target frame and a data frame received by the receiving unit 101 immediately before the target frame (S102). The first determination unit 104 compares the receiving interval P with the interval threshold P. T Here, when the receiving interval P is smaller than the interval threshold P TIf the value is greater than 0 ( S103 : No), the first determination unit 104 determines that the target frame is a periodic frame ( S104 ).
[0068] On the other hand, the first determination unit 104 compares the reception interval P with the interval threshold P. T The result of the comparison is that the receiving interval P is greater than the interval threshold P T If the difference is smaller (S103: Yes), the difference calculation unit 105 calculates the first difference d a1 ~d aN (S105). Then, the difference calculation unit 105 calculates the second difference d b1 ~d bN (S106) Next, the second determination unit 106 calculates the total value D of the N first differences. a The sum of the N second differences D b Compare (S107). Here, the total value D of the first difference a The total value D of the second difference b If the sum of the first differences D is smaller (S107: Yes), the second determination unit 106 determines that the target frame is an event frame (S108). a The total value D of the second difference b If the target frame is larger than the target frame (S107: No), the second determination unit 106 determines that the target frame is an abnormal frame (S109). Then, the output unit 107 outputs the determination result of the target frame (S110).
[0069] (3) Summary
[0070] As described above, according to the present 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.
[0071] 3. Implementation Method 2
[0072] In the method of embodiment 1, 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 and abnormal frames are received in a short time, it is difficult to accurately determine the target frame because the predicted reception time is biased. Therefore, in this embodiment, the structure of determining whether multiple event frames and abnormal frames are received is described.
[0073] (1) Configuration of frame determination device 100
[0074] The difference calculation unit 105 of this embodiment calculates the first difference. The calculation method of the first difference in the difference calculation unit 105 is the same as that in Embodiment 1. In addition, the difference calculation unit 105 may also weight the calculated first difference as in Embodiment 1. However, in this embodiment, the difference calculation unit 105 does not calculate the second difference.
[0075] The second determination unit 106 of this embodiment compares the N first differences da calculated by the difference calculation unit 105 with a predetermined difference threshold d set in advance. th For example, a predetermined difference threshold d is set based on a predetermined period T. th As an example, assuming an error of ±20% for a predetermined period T, the predetermined difference threshold d th It can be set to a value of 20% of the predetermined period T (ie, T×0.2).
[0076] In the first difference d a The difference with the specified threshold d th The result of the comparison is that the first difference is greater than the specified difference threshold d th If the sum of the N first differences is smaller, the second determination unit 106 calculates the sum D of the N first differences. a The total threshold D th Then, the total value D of the first difference a Than the specified total threshold D th If the total value D of the first difference is smaller, the target frame is determined to be an event frame. a Than the specified total threshold D th If the error is large, the target frame is determined to be an abnormal frame.
[0077] In contrast, in the first difference d a The difference with the specified threshold d th The result of the comparison is that at least one of the first differences is greater than a predetermined difference threshold d th When the number of event frames or abnormal frames is large, 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 are received, the output unit 107 of this embodiment may also output a determination result indicating that it is impossible to determine whether the target frame is an event frame or an abnormal frame.
[0078] Fig. 9 , Fig.10 It means that after the object frame, an event frame or an abnormal frame is received as frame F t2 Figure 1. Fig. 9 The target frame and frame F are shown t2 For event frames, Fig.10 The target frame and frame F are shown t2 This is the case of abnormal frames.
[0079] exist Fig. 9In the case of receiving frame F as an event frame, t2 , is the actual received frame F t3 The receiving time T t3 With the virtual receiving frame F v3 The predicted receiving time T v3 The difference d a3 is relatively large, greater than the specified differential threshold d th Therefore, the second determination unit 106 can determine that an event frame or an abnormal frame is 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 are received.
[0080] exist Fig.10 In the process, due to receiving frame F as an abnormal frame t2 , while the actual received frame F t2 The receiving time T t2 With the virtual receiving frame F v2 The predicted receiving time T v2 The difference d a2 , and the actual received frame F t3 The receiving time T t3 With the virtual receiving frame F v3 The predicted receiving time T v3 The difference d a3 is relatively large, greater than the specified differential threshold d th Therefore, Fig. 9 The second determination unit 106 can determine that a plurality of event frames or abnormal frames have been received.
[0081] As described above, in this embodiment, it is possible to determine whether the target frame is an event frame or an abnormal frame without calculating the second difference, so that the target frame can be determined while suppressing the amount of calculation in the control unit 102 as compared with the first embodiment.
[0082] (2) Operation of frame determination device 100
[0083] Reference Fig.11 , the operation of the frame determination device 100 of the present embodiment will be described. In addition, the same reference numerals are attached to the same processing as that of the frame determination device 100 of the first embodiment, and the detailed description is omitted.
[0084] In S105, the difference calculation unit 105 calculates N first differences d a1 ~d aN Then, the second determination unit 106 determines the first difference d calculated in S105. a1 ~d aN and the difference threshold d th Here, at least one of the first differences is greater than the difference threshold dth If the first difference is greater than the difference threshold d th If the sum of the first differences is smaller, the second determination unit 106 further determines the sum of the first differences D a and the total threshold D th Compare (S113). Here, the total value D of the first difference a Than total threshold D th If the sum of the first differences D is smaller than the sum of the first differences D (S113: Yes), the second determination unit 106 determines that the target frame is an event frame (S108). a Than total threshold D th If it is larger (S113: No), it is determined that the target frame is an abnormal frame (S109).
[0085] (3) Summary
[0086] 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 for determining the target frame compared to Embodiment 1. Furthermore, in this embodiment, it is possible to determine whether a plurality of event frames or abnormal frames have been received.
[0087] 4. Implementation Method 3
[0088] (Other public)
[0089] When the minimum transmission interval Xmin for the ECU 20 to transmit frames is set, the frame determination device 100 may use the minimum transmission interval Xmin to determine whether the target frame is an event frame or an abnormal frame.
[0090] like Figure 4 As shown in (c), when the minimum transmission interval Xmin is set, the ECU 20 transmits the event frame after the minimum transmission interval Xmin has passed. Therefore, when the reception interval P calculated by the reception interval calculation unit 103 is smaller than the minimum transmission interval Xmin, the object frame is not an event frame but is likely to be an abnormal frame. Therefore, when the reception interval P is smaller than the minimum transmission interval Xmin, the first determination unit 104 determines that the object frame is an abnormal frame.
[0091] In addition, this embodiment can also be combined with the above-mentioned embodiments 1 and 2. In this case, the first determination unit 104 first compares the receiving interval P with the minimum sending interval Xmin. If the receiving interval P is larger than the minimum sending interval Xmin, the first determination unit 104 compares the receiving interval P with the interval threshold P. T The comparison is performed to determine whether the target frame is a periodic frame.
[0092] 5. Summary
[0093] The features of the frame determination device and the like of the present disclosure have been described above.
[0094] The sentences used in the embodiments are for illustrative purposes only and may be replaced with sentences having the same meaning or sentences having the same function.
[0095] The block diagram used in the description of the implementation method classifies and organizes the configuration of the device according to its function. The modules representing the respective functions are implemented by any combination of hardware or software. In addition, since the functions are shown, such a block diagram can also be understood as the disclosure of the method and the disclosure of the program for implementing the method.
[0096] The functional blocks that can be understood as the processing, flow, and method described in each embodiment may be rearranged in order unless there is a restriction such as a relationship in which one step utilizes the result of another step in the previous stage.
[0097] The terms "first", "second", and "N" (N is an integer) used in each embodiment and claim are used to distinguish two or more configurations or methods of the same kind, and do not limit the order or superiority or inferiority.
[0098] Although each embodiment is based on the premise of a frame determination device mounted on a vehicle, the present disclosure also includes dedicated or general-purpose devices other than for vehicles, except for cases specifically defined in the claims.
[0099] In addition, as examples of the form of the frame determination device disclosed in the present invention, the following forms can be listed. As the form of components, semiconductor elements, electronic circuits, modules, and microcomputers can be listed. As the form of semi-finished products, electronic control units (ECU (Electric Control Unit)) and system boards can be listed. As the form of finished products, mobile phones, smart phones, tablet computers, personal computers (PCs), workstations, and servers can be listed. In addition, it also includes devices with communication functions, such as cameras, still cameras, and car navigation systems.
[0100] Furthermore, necessary functions such as an antenna and a communication interface may be added to the frame determination device.
[0101] In addition, the present disclosure can be implemented not only by dedicated hardware having the structure and functions described in each embodiment, but also as a combination of a program for implementing the present disclosure recorded on a recording medium such as a memory or a hard disk, and general hardware having a dedicated or general-purpose CPU and memory capable of executing the program.
[0102] It is also possible to provide a program stored in a non-migratable physical recording medium (e.g., 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 via a recording medium, or from a server via a communication line instead of a recording medium, to dedicated or general-purpose hardware. In this way, the latest functions can be always provided through program upgrades.
Claims
1. A frame determination device connected to a network for transmitting a periodic frame and an event frame sent from an electronic control device, wherein: The cyclic frame is a data frame that is transmitted at a predetermined period starting from the cyclic frame or the event frame that was transmitted immediately before from the electronic control device. The event frame is a data frame that is transmitted regardless of the predetermined period when a predetermined event occurs. The frame determination device comprises: A receiving unit, receiving a first data frame; a receiving interval calculation unit, which calculates a receiving interval between the first data frame and a second data frame, wherein the second data frame is the periodic frame or the event frame received by the receiving unit immediately before the first data frame; A first determination unit, based on the receiving interval, determines whether the first data frame is the periodic frame; a difference calculation unit, when the first determination unit determines that the first data frame is not the periodic frame, calculating a difference (N) between a reception time of a data frame actually received by the receiving unit after the first data frame, that is, an Nth actual reception frame, and a predicted reception time of an Nth virtual reception frame, wherein N is an integer greater than or equal to 1, and the Nth virtual reception frame is a periodic frame 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; A second determination unit determines, based on the difference, whether the first data frame is the event frame or an abnormal frame different from the event frame; and The output unit outputs the determination result of the first data frame.
2. The frame determination device according to claim 1, wherein: N is an integer greater than or equal to 2.
3. The frame determination device according to claim 1 or 2, wherein: When the total value of the N above-mentioned differences is smaller than the prescribed total threshold, the above-mentioned second determination unit determines that the above-mentioned first data frame is the above-mentioned event frame. When the total value of the N above-mentioned differences is larger than the above-mentioned prescribed total threshold, the above-mentioned second determination unit determines that the above-mentioned first data frame is the above-mentioned abnormal frame.
4. The frame determination device according to claim 3, wherein: The difference calculation unit further calculates a second difference in addition to the first difference as the difference, the second difference being the difference between the reception time of the Nth actual reception frame and the predicted reception time of the Nth virtual reception frame, the Nth virtual reception frame being a plurality of periodic frames predicted to be received by the reception unit after the second data frame assuming that the first data frame is not received, The predetermined total threshold is a total value of the N second differences.
5. The frame determination device according to claim 3, wherein: When all of the N differences are smaller than a predetermined difference threshold, the second determination unit compares a total value of the differences with the predetermined total threshold.
6. The frame determination device according to claim 5, wherein: When at least one of the N differences is larger than the predetermined difference threshold, the second determination unit determines that a plurality of event frames or a plurality of abnormal frames have been received.
7. The frame determination device according to claim 6, wherein: When the second determination unit determines that the plurality of event frames or the plurality of abnormal frames are 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.
8. The frame determination device according to claim 1, wherein: The difference calculation unit calculates the predicted reception time using the predetermined period.
9. The frame determination device according to claim 1, wherein: The difference calculation unit calculates the predicted reception time using the reception interval calculated in the past by the reception interval calculation unit.
10. The frame determination device according to claim 2, wherein: The difference calculation unit weights the difference (n) with a weighting coefficient greater than the difference (n+α), where 1≤n<n+α≤N.
11. The frame determination device according to claim 2, wherein: The difference calculation unit weights the difference (n) according to the data stored in the actually received frame.
12. A frame determination method, which is performed by a frame determination device connected to a network that transmits periodic frames and event frames sent from an electronic control device, wherein: The cyclic frame is a data frame that is transmitted at a predetermined period starting from the cyclic frame or the event frame that was transmitted immediately before from the electronic control device. The event frame is a data frame that is transmitted regardless of the predetermined period when a predetermined event occurs. The frame determination method comprises: receiving a first data frame; Calculating a reception interval between the first data frame and a second data frame, where the second data frame is the periodic frame or the event frame received immediately before the first data frame; Based on the receiving interval, determining whether the first data frame is the periodic frame; When it is determined that the first data frame is not the periodic frame, a difference (N) between a reception time of a data frame actually received after the first data frame, that is, an Nth actually received frame, and a predicted reception time of an Nth virtual received frame is calculated, wherein N is an integer greater than or equal to 1; the Nth virtual received frame is a periodic frame 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; Based on the difference, determining whether the first data frame is the event frame or an abnormal frame different from the event frame; and The determination result of the first data frame is outputted.
13. A storage medium storing a frame determination program executable by a frame determination device connected to an electronic control device, wherein: The periodic frame is a data frame that is transmitted at a predetermined period starting from the transmission of the periodic frame or the event frame that was transmitted immediately before from the electronic control device. The event frame is a data frame that is transmitted regardless of the predetermined period when a predetermined event occurs. The frame determination program causes the frame determination device to perform a process, the process comprising: receiving a first data frame; Calculating a reception interval between the first data frame and a second data frame, where the second data frame is the periodic frame or the event frame received immediately before the first data frame; Based on the receiving interval, determining whether the first data frame is the periodic frame; When it is determined that the first data frame is not the periodic frame, a difference (N) between a reception time of a data frame actually received after the first data frame, that is, an Nth actually received frame, and a predicted reception time of an Nth virtual received frame is calculated, wherein N is an integer greater than or equal to 1; the Nth virtual received frame is a periodic frame 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; Based on the difference, determining whether the first data frame is the event frame or an abnormal frame different from the event frame; and The determination result of the first data frame is outputted.
14. A frame determination system comprising an electronic control device and a frame determination device connected to a network for transmitting periodic frames and event frames sent from the electronic control device, wherein: The electronic control device sends the cycle frame at a predetermined period starting from the time when the cycle frame or the event frame sent immediately before is sent, and sends the event frame regardless of the predetermined period when a predetermined event occurs. The frame determination device comprises: A receiving unit, receiving a first data frame; a receiving interval calculation unit, which calculates a receiving interval between the first data frame and a second data frame, wherein the second data frame is the periodic frame or the event frame received by the receiving unit immediately before the first data frame; A first determination unit, based on the receiving interval, determines whether the first data frame is the periodic frame; a difference calculation unit, when the first determination unit determines that the first data frame is not the periodic frame, calculating a difference (N) between a reception time of a data frame actually received by the receiving unit after the first data frame, that is, an Nth actual reception frame, and a predicted reception time of an Nth virtual reception frame, wherein N is an integer greater than or equal to 1, and the Nth virtual reception frame is a periodic frame 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; A second determination unit determines, based on the difference, whether the first data frame is the event frame or an abnormal frame different from the event frame; and The output unit outputs the determination result of the first data frame.
15. A frame determination method, the frame determination method being performed by a frame determination system comprising an electronic control device and a frame determination device connected to a network for transmitting periodic frames and event frames sent from the electronic control device, wherein: The cyclic frame is a data frame that is transmitted at a predetermined period starting from the cyclic frame or the event frame that was transmitted immediately before from the electronic control device. The event frame is a data frame that is transmitted regardless of the predetermined period when a predetermined event occurs. The frame determination method comprises: receiving a first data frame; Calculating a reception interval between the first data frame and a second data frame, where the second data frame is the periodic frame or the event frame received immediately before the first data frame; Based on the receiving interval, determining whether the first data frame is the periodic frame; When it is determined that the first data frame is not the periodic frame, a difference (N) between a reception time of a data frame actually received after the first data frame, that is, an Nth actually received frame, and a predicted reception time of an Nth virtual received frame is calculated, wherein N is an integer greater than or equal to 1; the Nth virtual received frame is a periodic frame 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; Based on the difference, determining whether the first data frame is the event frame or an abnormal frame different from the event frame; and The determination result of the first data frame is outputted.
Citation Information
Patent Citations
On-board relay connection unit
JP2009253557A
Communication system and communication method
WO2013094072A1