A method for calculating vehicle CAN bus load rate

Through the vehicle CAN bus load rate calculation method, multiple factors are combined to calculate the load rate of each frame of message, which solves the problem of inaccurate calculation in the existing technology and achieves high-precision and high versatility load rate calculation, which is suitable for All types of CAN bus systems.

CN115664887BActive Publication Date: 2024-08-23DONGFENG AUTOMOBILE COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211287109.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-20
Publication Date
2024-08-23
Estimated Expiration
2042-10-20

AI Technical Summary

Technical Problem

Existing CAN bus load factor calculation methods cannot comprehensively cover all types of CAN bus situations, resulting in inaccurate and unstable calculations and affecting system performance.

Method used

A vehicle CAN bus load rate calculation method is designed by obtaining the non-data frame bit length, data frame bit length, fixed message frames per second, instantaneous message frames per second, baud rate and stuffing bit length. Based on the data, multiple factors are combined to calculate the load rate of each frame message, and the sum is added to obtain the bus load rate, which is suitable for all types of CAN bus systems.

Benefits of technology

It achieves accurate calculation of the CAN bus load rate, with an accuracy of less than 2%, improves system stability, has stronger versatility, and is suitable for all types of CAN bus systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115664887B
    Figure CN115664887B
Patent Text Reader

Abstract

The present invention relates to the field of vehicle network communication technology, and specifically to a method for calculating the load rate of a whole vehicle CAN bus. First, the load rate calculation parameters of all messages in the current network segment are obtained, and the load rate calculation parameters are respectively the non-data frame bit length, the data frame bit length, the fixed message frame number per second, the instantaneous message frame number per second, the baud rate, and the data of the padding bit length bit; then the load rate calculation parameters of each frame message in the current network segment are input into a calculation module to obtain the load rate of each frame message, and the load rates of all messages are added to obtain the bus load rate of the entire network segment. The method for calculating the load rate of the whole vehicle CAN bus of the present invention has the characteristics of high accuracy and strong versatility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle-mounted network communication, and in particular to a method for calculating a load rate of a vehicle CAN bus. Background Art

[0002] As vehicle network technology has become popular, most intelligent controllers in cars use network bus communication technology, and CAN bus technology has become the most commonly used vehicle network communication technology. Since excessive load rate will cause CAN bus instability and frame loss, bus load rate is an important technical indicator of the vehicle CAN bus system.

[0003] The factors that affect the CAN bus load rate include non-data frame bit length, data frame bit length, fixed message frame number per second, instantaneous message frame number per second, baud rate, and padding bit length. The existing CAN bus load rate calculation method only includes one or more types of CAN buses and cannot cover all CAN bus types. Summary of the invention

[0004] In order to overcome the above problems, the purpose of the present invention is to provide a method for calculating the load rate of a vehicle CAN bus, which has the characteristics of high accuracy and strong versatility.

[0005] To achieve the above-mentioned purpose, the present invention provides a method for calculating the load rate of a vehicle CAN bus, which is characterized by: firstly obtaining the load rate calculation parameters of all messages in the current network segment, the load rate calculation parameters are respectively the non-data frame bit length, the data frame bit length, the number of frames per second of a fixed message, the number of frames per second of an instantaneous message, the baud rate, and the data of the padding bit length; then inputting the load rate calculation parameters of each frame of the message in the current network segment into a calculation module to obtain the load rate of each frame of the message, and adding the load rates of all the messages to obtain the bus load rate of the entire network segment.

[0006] As a preferred solution, the vehicle CAN bus load rate includes a normal bus load rate and a peak bus load rate; the method for calculating the vehicle CAN bus load rate specifically includes the following steps:

[0007] S1, the network segment detection module detects the baud rate of the current network segment;

[0008] S2. The data acquisition module collects and extracts the original data of all messages in the current network segment:

[0009] ID identifier, data frame byte length, fixed message period, instantaneous message period, baud rate and padding bit length;

[0010] S3, the data processing module processes the original data and obtains the load rate calculation parameters of all messages in the current network segment, which are the non-data frame bit length, data frame bit length, fixed message frame number per second, instantaneous message frame number per second, baud rate, and padding bit length data;

[0011] S4, inputting the load rate calculation parameters of each message frame in the current network segment into the load rate calculation module, obtaining the fixed message load rate and instantaneous message load rate and load rate difference of each message frame in the current network segment; summing up the fixed message load rates of all messages in the network segment to obtain the normal bus load rate of the network segment; summing up the difference between the normal bus load rate and the load rate of all messages in the network segment to obtain the peak bus load rate of the network segment;

[0012] S5. The load rate output module outputs the normal bus load rate and the peak bus load rate of the network segment.

[0013] As a preferred solution, in step S3:

[0014] The non-data frame bit length is determined according to the ID identifier in the original data. First, the data processing module identifies the frame type of the ID identifier. If the frame type is a standard frame, A=47 is set; if the frame type is an extended frame, A=67 is set; wherein A is the non-data frame bit length;

[0015] The data frame bit length is determined based on the following formula (1):

[0016] B=8*b (1)

[0017] In formula (1): b is the byte length of the data frame in the original data, and B is the bit length of the data frame;

[0018] The fixed message frame number per second is determined based on the following formula (2):

[0019] If c = 0, then C = 0; if c ≠ 0, then C = 1000 / c (2)

[0020] In formula (2), c is the fixed message period in the original data, and C is the number of fixed message frames per second;

[0021] The instantaneous message frame number per second is determined based on the following formula (3):

[0022] If d=0, then D=C; if d≠0, then D=1000 / d (3)

[0023] In formula (3), d is the instantaneous message period in the original data, and D is the number of frames per second of the instantaneous message.

[0024] As a preferred solution, in step S4:

[0025] S41. The fixed message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (4):

[0026] F n (%) = (A n +B n +F n )*C n / E n / 10 (4)

[0027] Among them, Fg n is the fixed message load rate of message No. N;

[0028] A n is the non-data frame bit length of message No. N;

[0029] B n is the data frame bit length of message No. N;

[0030] C n The fixed message frame rate per second of message No. N;

[0031] E n The baud rate of the Nth message, unit: Kbits / s;

[0032] F n The padding length of the Nth message;

[0033] S42: The instantaneous message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (5):

[0034] F n (%) = (A n +B n +F n )*D n / E n / 10 (5)

[0035] Among them, Fs n is the instantaneous message load rate of message No. N;

[0036] A n is the non-data frame bit length of message No. N;

[0037] B n is the data frame bit length of message No. N;

[0038] D n is the instantaneous message frame rate per second of message No. N;

[0039] E n The baud rate of the Nth message, unit: Kbits / s;

[0040] F n The padding length of the Nth message;

[0041] The load rate difference of each frame message of the S43 vehicle in this network segment is determined based on the following formula (6):

[0042] G n (%) = Fs n -Fg n (6)

[0043] Among them, G n The load rate difference of the Nth message

[0044] F n is the fixed message load rate of message No. N;

[0045] F n is the instantaneous message load rate of message No. N;

[0046] S44. The normal bus load rate of the network segment is determined based on the following formula (7):

[0047]

[0048] Where Z is the normal bus load rate;

[0049] Fg1 is the fixed message load rate of message No. 1;

[0050] Fg2 is the fixed message load rate of message No. 2;

[0051] F n is the fixed message load rate of message No. N;

[0052] The peak bus load rate of the network segment is determined based on the following formula (8):

[0053]

[0054] Where V is the peak bus load rate;

[0055] Z is the normal bus load rate;

[0056] C1 is the load rate difference of message No. 1;

[0057] C2 is the load rate difference of message No. 2;

[0058] G n is the load rate difference of the Nth message.

[0059] As a preferred solution, the vehicle CAN bus load rate calculation method is implemented based on a vehicle CAN bus load rate calculation device, and the vehicle CAN bus load rate calculation device includes a network segment detection module, a data acquisition module, a data processing module, a calculation module and a load rate output module connected in sequence through signal lines.

[0060] A vehicle CAN bus load rate detection device, characterized by comprising:

[0061] The network segment detection module is used to detect the baud rate of the current network segment;

[0062] The data acquisition module is used to collect the original data information of all messages in the current network segment, including ID identifier, data frame byte length, fixed message period, instantaneous message period, baud rate and padding bit length;

[0063] The data processing module obtains the load rate calculation parameters of all messages in the current network segment according to the original data of each frame of the message, which are the data of the non-data frame bit length, data frame bit length, fixed message frame number per second, instantaneous message frame number per second, baud rate, and padding bit length;

[0064] The load rate calculation module inputs the load rate calculation parameters of each message frame in the current network segment into the load rate calculation module to obtain the fixed message load rate and instantaneous message load rate and load rate difference of each message frame in the current network segment; the fixed message load rate of all messages in the network segment is summed to obtain the normal bus load rate of the network segment; the normal bus load rate and the load rate difference of all messages in the network segment are summed to obtain the peak bus load rate of the network segment;

[0065] The load rate output module is used to output the normal bus load rate and peak bus load rate values ​​under the network segment.

[0066] As a preferred solution, the specific process of the data processing module processing the original data and obtaining the load rate calculation parameters of all messages in the current network segment is:

[0067] The non-data frame bit length is determined according to the ID identifier in the original data. First, the data processing module identifies the frame type of the ID identifier. If the frame type is a standard frame, A=47 is set; if the frame type is an extended frame, A=67 is set; wherein A is the non-data frame bit length;

[0068] The data frame bit length is determined based on the following formula (1):

[0069] B=8*b (1)

[0070] In formula (1): b is the byte length of the data frame in the original data, and B is the bit length of the data frame;

[0071] The fixed message frame number per second is determined based on the following formula (2):

[0072] If c = 0, then C = 0; if c ≠ 0, then C = 1000 / c (2)

[0073] In formula (2), c is the fixed message period in the original data, and C is the number of fixed message frames per second;

[0074] The instantaneous message frame number per second is determined based on the following formula:

[0075] If d=0, then D=C; if d≠0, then D=1000 / d (3)

[0076] In formula (3), d is the instantaneous message period in the original data, and D is the number of frames per second of the instantaneous message.

[0077] As a preferred solution, the calculation process of the load rate calculation module is:

[0078] The fixed message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (4):

[0079] F n (%) = (A n +B n +F n )*C n / E n / 10 (4)

[0080] Among them, Fg n is the fixed message load rate of message No. N;

[0081] A n is the non-data frame bit length of message No. N;

[0082] B n is the data frame bit length of message No. N;

[0083] C n The fixed message frame rate per second of message No. N;

[0084] E n The baud rate of the Nth message, unit: Kbits / s;

[0085] F n The padding length of the Nth message;

[0086] The instantaneous message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (5):

[0087] F n (%) = (A n +B n+F n )*D n / E n / 10 (5)

[0088] Among them, Fs n is the instantaneous message load rate of message No. N;

[0089] A n is the non-data frame bit length of message No. N;

[0090] B n is the data frame bit length of message No. N;

[0091] D n is the instantaneous message frame rate per second of message No. N;

[0092] E n The baud rate of the Nth message, unit: Kbits / s;

[0093] F n The padding length of the Nth message;

[0094] The load rate difference of each frame message of the whole vehicle in this network segment is determined based on the following formula (6):

[0095] G n (%) = Fs n -Fg n (6)

[0096] Among them, G n The load rate difference of the Nth message

[0097] F n is the fixed message load rate of message No. N;

[0098] F n is the instantaneous message load rate of message No. N;

[0099] The normal bus load rate of the network segment is determined based on the following formula (7):

[0100]

[0101] Where Z is the normal bus load rate;

[0102] Fg1 is the fixed message load rate of message No. 1;

[0103] Fg2 is the fixed message load rate of message No. 2;

[0104] F n is the fixed message load rate of message No. N;

[0105] The peak bus load rate of the network segment is determined based on the following formula (8):

[0106]

[0107] Where V is the peak bus load rate;

[0108] Z is the normal bus load rate;

[0109] C1 is the load rate difference of message No. 1;

[0110] C2 is the load rate difference of message No. 2;

[0111] G n is the load rate difference of the Nth message.

[0112] The advantages of the present invention are: compared with the traditional ones, the present invention has the following advantages:

[0113] (1) The present invention takes into account various factors such as the frame type of the message, the message period and the instantaneous message period, the padding bit length, the baud rate change, etc. Compared with the theoretical bus load rate, the accuracy of the normal bus load rate and the peak bus load rate calculated by the present invention can reach within 2%, which is much higher than other methods.

[0114] (2) The traditional CAN bus load rate calculation method cannot be applied to all types of CAN bus systems, while the CAN bus load rate calculation method of the present invention is applicable to all types of CAN bus systems and is more universal than the traditional CAN bus load rate calculation method. BRIEF DESCRIPTION OF THE DRAWINGS

[0115] Figure 1 It is a flow chart of the method for calculating the load rate of the vehicle CAN bus of the present invention;

[0116] Figure 2 The result diagram of the calculation module of Example 1 using Excel function document programming calculation;

[0117] Figure 3 This is a graph showing the result of calculations performed by the calculation module of Example 2 using Excel function document programming. DETAILED DESCRIPTION

[0118] In order to better understand the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific examples.

[0119] Example 1: The baud rate of a certain vehicle model is 500Kbits / s

[0120] Combination Figure 1 As shown, the method for calculating the vehicle CAN bus load rate in this embodiment includes the steps of:

[0121] 1) The network segment detection module detects the baud rate of the current network segment: 500Kbits / s;

[0122] 2) The data acquisition module collects and extracts the original data of all messages in the current network segment:

[0123] Message 1: ID identifier (a1) is ID=0x110, data frame byte length (b1) is 8, fixed message period (c1) is 100ms, instantaneous message period (d1) is 0, baud rate (e1) is 500Kbits / s, and padding bit length (f1) is 3;

[0124] Message No. 2: ID identifier (a2) is ID=0x325, data frame byte length (b2) is 8, fixed message period (c2) is 200ms, instantaneous message period (d2) is 10ms, baud rate (e2) is 500Kbits / s, and padding bit length (f2) is 6;

[0125] 3) The data processing module processes the original data and obtains the load rate calculation parameters of all messages in the current network segment:

[0126] Message No. 1:

[0127] Extract ID=0x110 and identify the frame type as a standard frame, and set the non-data frame bit length (A1)=47;

[0128] Extract the data frame byte length (b1) to 8, and set the data frame bit length (B1) = 8*b1 = 64;

[0129] Extract the fixed message period (c1) as 100ms, and set the number of frames per second (C1) = 1000 / c1 = 10;

[0130] Extract the instantaneous message period (d1) as 0, and set the instantaneous frame number per second (D1) = C1 = 10;

[0131] Extract the baud rate (e1) to 500Kbits / s, and set the message baud rate (E1) = 500;

[0132] Extract the padding bit length bit (f1) to 3, and set the message padding bit length bit (F1) = 3;

[0133] Message No. 2:

[0134] Extract ID=0x325 and identify the frame type as a standard frame, and set the non-data frame bit length (A2)=47;

[0135] Extract the data frame byte length (b2) to 8, and set the data frame bit length (B2) = 8*b1 = 64;

[0136] Extract the fixed message period (c2) to 200ms, and set the number of frames per second (C2) = 1000 / t1 = 5;

[0137] Extract the instantaneous message period (d2) as 10ms, and set the instantaneous frame number per second (D2) = 1000 / d2 = 100;

[0138] Extract the baud rate (e2) to 500Kbits / s, and set the message baud rate (E2) = 500;

[0139] Extract the padding bit length bit (f2) to 6, and set the message padding bit length bit (F2) = 6;

[0140] 4) The calculation module first calculates the fixed message load rate and instantaneous message load rate of 2 frames of messages in the current network segment and the load rate difference:

[0141] Fixed message load rate (%) of message No. 1 (Fg1):

[0142] Fg1=(A1+B1+F1)*C1 / E1 / 10=0.228%;

[0143] Instantaneous message load rate (%) of message No. 1 (Fs1):

[0144] Fs1=(A1+B1+F1)*D1 / E1 / 10=0.228%;

[0145] Load rate difference of message No. 1 (%):

[0146] G1=Fs1-Fg1=0.228-0.228=0;

[0147] Fixed message load rate (%) of message No. 2 (Fg2):

[0148] Fg2=(A2+B2+F2)*C2 / E2 / 10=0.117%;

[0149] Instantaneous message load rate (%) of message No. 2 (Fs2):

[0150] Fs2=(A2+B2+F2)*D2 / E2 / 10=2.34%;

[0151] C2=Fs2-Fg2=2.34%-0.117%=2.223%;

[0152] Then, the fixed message load rate, instantaneous message load rate, and load rate difference of the current network segment 2-frame message are summed to obtain the normal bus load rate and peak bus load rate of the entire network segment:

[0153]

[0154]

[0155] The calculation module can be solved by programming with UI interface software or Excel function document. Figure 2 As shown, the calculation module of this embodiment adopts Excel function document programming calculation.

[0156] 5) Data output module

[0157] The data output module outputs the normal bus load rate of 0.345% and the peak bus load rate of 2.568% through the liquid crystal display.

[0158] Example 2: The baud rate of a certain vehicle model is 250Kbits / s

[0159] 1) The network segment detection module detects the baud rate of the current network segment: 250Kbits / s;

[0160] 2) The data acquisition module collects and extracts the original data of all messages in the current network segment:

[0161] Message No. 1: ID identifier (a1) is ID=0x18FF01FB, data frame byte length (b1) is 8, fixed message period (c1) is 1000ms, instantaneous message period (d1) is 0, bus baud rate (e1) is 250Kbits / s, and padding bit length (f1) is 0;

[0162] Message No. 2: ID identifier (a2) is ID=0x0C00000B, data frame byte length (b2) is 8, fixed message period (c2) is 250ms, instantaneous message period (d2) is 20ms, bus baud rate (e2) is 250Kbits / s, and padding bit length (f2) is 3;

[0163] 3) The data processing module processes the original data and obtains the load rate calculation parameters of all messages in the current network segment:

[0164] Message No. 1:

[0165] Extract ID=0x18FF01FB and identify the frame type as extended frame, and set the non-data frame bit length (A1)=67;

[0166] Extract the data frame byte length (b1) to 8, and set the data frame bit length (B1) = 8*b1 = 64;

[0167] Extract the fixed message period (c1) to 1000ms, and set the number of frames per second (C1) = 1000 / c1 = 1;

[0168] Extract the instantaneous message period (d1) to 0, and set the instantaneous frame number per second (D1) = C1 = 1;

[0169] Extract the baud rate (e1) to 250Kbits / s, and set the message baud rate (E1) = 250;

[0170] Extract the padding length bit (f1) to 0, and set the message padding length bit (F1) = 0;

[0171] Message No. 2:

[0172] Extract ID=0x0C00000B and identify the frame type as extended frame, and set the non-data frame bit length (A2)=67;

[0173] Extract the data frame byte length (b2) to 8, and set the data frame bit length (B2) = 8*b1 = 64;

[0174] Extract the fixed message period (c2) as 250ms, and set the number of frames per second (C2) = 1000 / t1 = 4;

[0175] Extract the instantaneous message period (d2) as 20, and set the instantaneous frame number per second (D2) = 1000 / d2 = 500;

[0176] Extract the baud rate (e2) to 250Kbits / s, and set the message baud rate (E2) = 250;

[0177] Extract the padding bit length bit (f2) to 3, and set the message padding bit length bit (F2) = 3;

[0178] 4) The calculation module first calculates the fixed message load rate and instantaneous message load rate of 2 frames of messages in the current network segment and the load rate difference:

[0179] Fixed message load rate (%) of message No. 1 (Fg1):

[0180] Fg1=(A1+B1+F1)*C1 / E1 / 10=0.0524%;

[0181] Instantaneous message load rate (%) of message No. 1 (Fs1):

[0182] Fs1=(A1+B1+F1)*D1 / E1 / 10=0.0524%;

[0183] Load rate difference of message No. 1 (%):

[0184] G1=Fs1-Fg1=0.0524%-0.0524%=0;

[0185] Fixed message load rate (%) of message No. 2 (Fg2):

[0186] Fg2=(A2+B2+F2)*C2 / E2 / 10=0.2144%;

[0187] Instantaneous message load rate (%) of message No. 2 (Fs2):

[0188] Fs2=(A2+B2+F2)*D2 / E2 / 10=2.68%;

[0189] C2=Fs2-Fg2=2.68%-0.2144%=2.4656%;

[0190] The normal bus load rate and peak bus load rate of the entire network segment are obtained by summing up the fixed message load rate, instantaneous message load rate, and load rate difference of all messages in a network segment:

[0191]

[0192]

[0193]

[0194] Normal bus load rate (B) = Fg1 + Fg2 = 0.0524% + 0.2144% = 0.2668%;

[0195] Peak bus load rate = B + C1 + C2 = 0.2668% + 0 + 2.4656% = 2.7324%;

[0196] Combination Figure 3 As shown, the calculation module of this embodiment adopts Excel function document programming calculation.

[0197] 5) Data output module:

[0198] The data output module outputs the normal bus load rate of 0.2668% and the peak bus load rate of 2.7324% through the liquid crystal display.

[0199] Compared with the traditional method for calculating the load rate of the vehicle CAN bus, the present invention has the following advantages:

[0200] 1. The present invention takes into account various factors such as the frame type of the message, the message period and the instantaneous message period, the padding bit length, the baud rate change, etc. Compared with the theoretical bus load rate, the accuracy of the normal bus load rate and the peak bus load rate calculated by the present invention can reach within 2%, which is much higher than other methods.

[0201] 2. The traditional CAN bus load rate calculation method cannot be applied to all types of CAN bus systems, while the CAN bus load rate calculation method of the present invention is applicable to all types of CAN bus systems and is more universal than the traditional CAN bus load rate calculation method.

Claims

1. A method for calculating the load rate of a vehicle CAN bus, characterized in that: First, the load rate calculation parameters of all messages in the current network segment are obtained, and the load rate calculation parameters are respectively the non-data frame bit length, the data frame bit length, the number of frames per second of the fixed message, the number of frames per second of the instantaneous message, the baud rate, and the data of the padding bit length; then the load rate calculation parameters of each frame of the message in the current network segment are input into the calculation module to obtain the load rate of each frame of the message, and the load rates of all messages are added up to obtain the bus load rate of the entire network segment; The vehicle CAN bus load rate includes a normal bus load rate and a peak bus load rate; the calculation method of the vehicle CAN bus load rate specifically includes the following steps: S1, the network segment detection module detects the baud rate of the current network segment; S2. The data acquisition module collects and extracts the original data of all messages in the current network segment: ID identifier, data frame byte length, fixed message period, instantaneous message period, baud rate and padding bit length; S3, the data processing module processes the original data and obtains the load rate calculation parameters of all messages in the current network segment, which are the non-data frame bit length, data frame bit length, fixed message frame number per second, instantaneous message frame number per second, baud rate, and padding bit length data; S4, inputting the load rate calculation parameters of each message frame in the current network segment into the load rate calculation module, obtaining the fixed message load rate and the instantaneous message load rate and the load rate difference of each message frame in the current network segment, the load rate difference being the difference between the instantaneous message load rate and the fixed message load rate; summing up the fixed message load rates of all messages in the network segment to obtain the normal bus load rate of the network segment; summing up the difference between the normal bus load rate and the load rates of all messages in the network segment to obtain the peak bus load rate of the network segment; S5. The load rate output module outputs the normal bus load rate and the peak bus load rate of the network segment.

2. The method for calculating the vehicle CAN bus load rate according to claim 1, characterized in that: In step S3: The non-data frame bit length is determined according to the ID identifier in the original data. First, the data processing module identifies the frame type of the ID identifier. If the frame type is a standard frame, A=47 is set; if the frame type is an extended frame, A=67 is set; wherein A is the non-data frame bit length; The data frame bit length is determined based on the following formula (1): B=8*b (1) In formula (1): b is the byte length of the data frame in the original data, and B is the bit length of the data frame; The fixed message frame number per second is determined based on the following formula (2): If c=0, then C=0; if c≠0, then C=1000 / c (2) In formula (2), c is the fixed message period in the original data, and C is the number of fixed message frames per second; The instantaneous message frame number per second is determined based on the following formula (3): If d=0, then D=C; if d≠0, then D=1000 / d (3) In formula (3), d is the instantaneous message period in the original data, and D is the number of frames per second of the instantaneous message.

3. The method for calculating the vehicle CAN bus load rate according to claim 2, characterized in that: In step S4: S31. The fixed message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (4): Fig n =(A n +B n +F n )*C n / HAVE BEEN n / 10 (4) Among them, Fg n is the fixed message load rate of message No. N; A n is the non-data frame bit length of message No. N; B n is the data frame bit length of message No. N; C n The fixed message frame rate per second of message No. N; E n The baud rate of the Nth message, unit: Kbits / s; F n The padding length of the Nth message; S32: The instantaneous message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (5): Fs n =(A n +B n +F n )*D n / E n / 10 (5) Among them, Fs n is the instantaneous message load rate of message No. N; A n is the non-data frame bit length of message No. N; B n is the data frame bit length of message No. N; D n is the instantaneous message frame rate per second of message No. N; E n The baud rate of the Nth message, unit: Kbits / s; F n The padding length of the Nth message; The load rate difference of each frame message of the S33 vehicle in this network segment is determined based on the following formula (6): G n =Fs n -Fg n (6) Among them, G n The load rate difference of the Nth message F n is the fixed message load rate of message No. N; F n is the instantaneous message load rate of message No. N; S34. The normal bus load rate of the network segment is determined based on the following formula (7): Where Z is the normal bus load rate; Fg1 is the fixed message load rate of message No. 1; Fg2 is the fixed message load rate of message No. 2; F n is the fixed message load rate of message No. N; The peak bus load rate of the network segment is determined based on the following formula (8): Where V is the peak bus load rate; Z is the normal bus load rate; G1 is the load rate difference of message No. 1; G2 is the load rate difference of message No. 2; G n is the load rate difference of the Nth message.

4. The method for calculating the vehicle CAN bus load rate according to claim 3, characterized in that: The vehicle CAN bus load rate calculation method is implemented based on a vehicle CAN bus load rate calculation device, which includes a network segment detection module, a data acquisition module, a data processing module, a calculation module and a load rate output module that are sequentially connected through signal lines.

5. A vehicle CAN bus load rate detection device, characterized in that: include: The network segment detection module is used to detect the baud rate of the current network segment; The data acquisition module is used to collect the original data information of all messages in the current network segment, including ID identifier, data frame byte length, fixed message period, instantaneous message period, baud rate and padding bit length; The data processing module obtains the load rate calculation parameters of all messages in the current network segment according to the original data of each frame of the message, which are the data of the non-data frame bit length, data frame bit length, fixed message frame number per second, instantaneous message frame number per second, baud rate, and padding bit length; The load rate calculation module inputs the load rate calculation parameters of each frame message in the current network segment into the load rate calculation module, obtains the fixed message load rate and the instantaneous message load rate and the load rate difference of each frame message in the current network segment, and the load rate difference is the difference between the instantaneous message load rate and the fixed message load rate; sums the fixed message load rates of all messages in the network segment to obtain the normal bus load rate of the network segment; sums the normal bus load rate and the load rate difference of all messages in the network segment to obtain the peak bus load rate of the network segment; The load rate output module is used to output the normal bus load rate and peak bus load rate values ​​under the network segment.

6. The vehicle CAN bus load rate detection device according to claim 5, characterized in that: The specific process of the data processing module processing the original data and obtaining the load rate calculation parameters of all messages in the current network segment is as follows: The non-data frame bit length is determined according to the ID identifier in the original data. First, the data processing module identifies the frame type of the ID identifier. If the frame type is a standard frame, A=47 is set; if the frame type is an extended frame, A=67 is set; wherein A is the non-data frame bit length; The data frame bit length is determined based on the following formula (1): B=8*b (1) In formula (1): b is the byte length of the data frame in the original data, and B is the bit length of the data frame; The fixed message frame number per second is determined based on the following formula (2): If c=0, then C=0; if c≠0, then C=1000 / c (2) In formula (2), c is the fixed message period in the original data, and C is the number of fixed message frames per second; The instantaneous message frame number per second is determined based on the following formula: If d=0, then D=C; if d≠0, then D=1000 / d (3) In formula (3), d is the instantaneous message period in the original data, and D is the number of frames per second of the instantaneous message.

7. The vehicle CAN bus load rate detection device according to claim 6, characterized in that: The calculation process of the load rate calculation module is as follows: The fixed message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (4): Fig n =(A n +B n +F n )*C n / HAVE BEEN n / 10 (4) Among them, Fg n is the fixed message load rate of message No. N; A n is the non-data frame bit length of message No. N; B n is the data frame bit length of message No. N; C n The fixed message frame rate per second of message No. N; E n The baud rate of the Nth message, unit: Kbits / s; F n The padding length of the Nth message; The instantaneous message load rate of each frame message of the vehicle in the current network segment is determined based on the following formula (5): Fs n =(A n + B n + F n )* D n / E n / 10 (5) Among them, Fs n is the instantaneous message load rate of message No. N; A n is the non-data frame bit length of message No. N; B n is the data frame bit length of message No. N; D n is the instantaneous message frame rate per second of message No. N; E n The baud rate of the Nth message, unit: Kbits / s; F n The padding length of the Nth message; The load rate difference of each frame message of the whole vehicle in this network segment is determined based on the following formula (6): G n =Fs n -Fg n (6) Among them, G n is the load rate difference of the Nth message; F n is the fixed message load rate of message No. N; F n is the instantaneous message load rate of message No. N; The normal bus load rate of the network segment is determined based on the following formula (7): Where Z is the normal bus load rate; Fg1 is the fixed message load rate of message No. 1; Fg2 is the fixed message load rate of message No. 2; F n is the fixed message load rate of message No. N; The peak bus load rate of the network segment is determined based on the following formula (8): Where V is the peak bus load rate; Z is the normal bus load rate; G1 is the load rate difference of message No. 1; G2 is the load rate difference of message No. 2; G n is the load rate difference of the Nth message.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the method for calculating the vehicle CAN bus load rate according to claim 1 is implemented.