Vehicle bus load rate calculation method and system and electronic equipment

By obtaining vehicle communication information from the local database and automatically calculating the bus load rate, the problem of obtaining the degree and efficiency of vehicle bus load rate in the prior art is solved, and efficient and automated bus load rate calculation and display is realized.

CN119603200AActive Publication Date: 2025-03-11CHINA FAW CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411495359.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-03-11
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

The degree of automation and efficiency of obtaining the load rate of the vehicle bus in the prior art leads to the need for repeated calculations multiple times in the design of the entire vehicle network communication architecture, which is time-consuming and labor-intensive.

Method used

By responding to the operation instructions of the display interface, the vehicle's communication information is obtained from the local database, the bus baud rate is determined based on the target communication method, and the target bus load rate is automatically calculated based on the data length, the number of communication data, the transmission period and the bus baud rate, and displayed in the display interface.

Benefits of technology

It realizes automatic calculation of vehicle bus load rate, improves acquisition efficiency, avoids the problems of low efficiency and accuracy caused by manual calculation, and provides an intuitive bus load rate display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603200A_ABST
    Figure CN119603200A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle bus load rate calculation method and system and electronic equipment. The method relates to the field of vehicle communication data processing, and comprises the following steps: in response to a first operation instruction acting on a display interface, obtaining communication information of a vehicle from a local database; determining a bus baud rate corresponding to a target communication mode based on the target communication mode of the vehicle; in response to a second operation instruction acting on the display interface, determining a target bus load rate corresponding to the target communication mode based on the data length, the number of communication data, the sending period and the bus baud rate; and displaying the target bus load rate in a display interface. According to the invention, the technical problems of low acquisition automation degree and low acquisition efficiency when the bus load rate of the vehicle is acquired in the prior art are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle communication data processing, and in particular to a method, system and electronic equipment for calculating a vehicle bus load rate. Background Art

[0002] The existing calculation of vehicle-mounted CAN and CAN-FD bus load rate is mostly to calculate the bus load rate after the minimum filling and the maximum filling, and then calculate the average load rate. When the average load rate is higher than the threshold, an alarm is issued to provide a preliminary reference for the design of the vehicle network communication architecture. However, the actual vehicle network architecture has multiple links. Before the vehicle network architecture is designed, the load rate calculation needs to be repeated many times, which leads to low efficiency in obtaining the vehicle's bus load rate.

[0003] In addition, current vehicle networks widely use CAN-FD as the transmission medium. Most of them set different load rates for the arbitration field, control field and data field, and then perform calculations manually. Different load rates will increase the amount of calculations, and the large amount of calculations when calculating the bus load rate will be time-consuming and labor-intensive, which leads to a low degree of automation in obtaining the vehicle's bus load rate.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a method, system and electronic device for calculating a vehicle bus load rate, so as to at least solve the technical problems of low automation and low efficiency in obtaining the vehicle bus load rate in the related art.

[0006] According to one aspect of an embodiment of the present invention, a method for calculating a vehicle bus load rate is provided, comprising: in response to a first operation instruction acting on a display interface, obtaining communication information of the vehicle from a local database, wherein the communication information is communication information between multiple controllers inside the vehicle, and the communication information at least includes: at least one communication data between the multiple controllers, the data length of the communication data, the communication baud rate of the communication data, the sending period of the communication data sent by the multiple controllers, and the amount of communication data; based on a target communication mode of the vehicle, determining a bus baud rate corresponding to the target communication mode, wherein the target communication mode includes one of the following: a controller area network communication mode, or a controller area network-flexible data rate communication mode, and the bus baud rate includes: a first baud rate of the arbitration segment and a second baud rate of the data segment; in response to a second operation instruction acting on the display interface, determining a target bus load rate corresponding to the target communication mode based on the data length, the amount of communication data, the sending period and the bus baud rate; and displaying the target bus load rate on the display interface.

[0007] Optionally, the method also includes one of the following: responding to a third operation instruction in the display interface, determining that the communication mode corresponding to the third operation instruction is the target communication mode of the vehicle; determining the target communication mode of the vehicle based on the communication baud rate or data length.

[0008] Optionally, the target communication mode of the vehicle is determined based on the communication baud rate or the data length, including: in response to a determination strategy corresponding to the communication baud rate stored in a local database, determining the target communication mode based on the determination strategy and the communication baud rate; in response to no determination strategy stored in the local data, determining the target communication mode based on the data length.

[0009] Optionally, based on the determination strategy and the communication baud rate, the target communication mode is determined, including: in response to the communication baud rate matching the threshold in the determination strategy, determining the target communication mode to be the controller area network communication mode; in response to the communication baud rate not matching the threshold, determining the target communication mode to be the controller local area network-flexible data rate communication mode.

[0010] Optionally, based on the data length, the target communication mode is determined, including: in response to the data length being greater than a preset length, determining the target communication mode to be a controller local area network-flexible data rate communication mode; in response to the data length being less than or equal to a preset length, determining the target communication mode to be a controller local area network communication mode.

[0011] Optionally, determining the bus baud rate corresponding to the target communication mode includes: in response to the target communication mode being a controller area network communication mode, determining the first baud rate and the second baud rate to be first preset values; in response to the target communication mode being a controller area network-flexible data rate communication mode, determining the first baud rate to be a first preset value and the second baud rate to be a second preset value, wherein the second preset value is greater than the first preset value.

[0012] Optionally, based on the data length, the amount of communication data, the sending cycle and the bus baud rate, the target bus load rate corresponding to the target communication mode is determined, including: based on the data length, the amount of communication data, the sending cycle and the bus baud rate, multiple bus load rates of the vehicle corresponding to the target communication mode are calculated, wherein the multiple bus load rates include: an unfilled bus load rate and a maximum filled bus load rate; and the average of the unfilled bus load rate and the maximum filled bus load rate is obtained to obtain the target bus load rate corresponding to the target communication mode.

[0013] Optionally, based on the data length, the amount of communication data, the sending cycle and the bus baud rate, multiple bus load rates of the vehicle corresponding to the target communication mode are calculated, including: based on the data length, respectively calculating the first data length of the communication data when unfilled and the second data length after filling; based on the first data length, the amount of communication data, the sending cycle and the bus baud rate, obtaining the unfilled bus load rate corresponding to the target communication mode, and at the same time based on the second data length, the sending cycle and the bus baud rate, obtaining the maximum filled bus load rate corresponding to the target communication mode; summarizing the unfilled bus load rate and the maximum filled bus load rate to obtain multiple bus load rates.

[0014] Optionally, based on the data length, a first data length of the communication data before filling and a second data length after filling are calculated respectively, including: determining the data length to be the first data length; removing the frame start length, the response segment length, the frame end length and the interval segment length in the data length to obtain the second preset data length; obtaining the quotient of the second preset data length and the bus baud rate to obtain the filling bit; obtaining the sum of the data length and the filling bit to obtain the second data length.

[0015] Optionally, based on the first data length, the amount of communication data, the sending cycle and the bus baud rate, the unfilled bus load rate corresponding to the target communication mode is obtained, and based on the second data length, the sending cycle and the bus baud rate, the maximum filled bus load rate corresponding to the target communication mode is obtained, including: obtaining the product of the sending cycle and the bus baud rate to obtain a first product; obtaining the quotient of the first data length and the first product to obtain the unfilled load rate of the communication data, and obtaining the quotient of the second data length and the first product to obtain the maximum filled load rate of the communication data; based on the amount of communication data, obtaining the sum of the unfilled load rates of multiple communication data to obtain the unfilled bus load rate, and based on the amount of communication data, obtaining the sum of the maximum filled load rates of multiple communication data to obtain the maximum filled bus load rate.

[0016] Optionally, after acquiring the communication information of the vehicle from the local database, the method further includes: displaying the communication information on the display interface in response to a fourth operation instruction acting on the display interface.

[0017] According to another aspect of an embodiment of the present invention, a vehicle bus load rate calculation system is also provided, including: a display interface for displaying a target bus load rate of a vehicle, wherein the display interface at least includes: a display area for displaying the target bus load rate; a software program for obtaining communication information of the vehicle from a local database, and determining a bus baud rate corresponding to the target communication mode based on the target communication mode of the vehicle, and determining a target bus load rate corresponding to the target communication mode based on a data length in the communication information, an amount of communication data in the communication information, a sending period and a bus baud rate.

[0018] Optionally, the display interface also includes: a first component, wherein the first component is used to obtain communication information of the vehicle; a second component, wherein the second component is used to determine a target bus load rate corresponding to a target communication mode; a third component, wherein the third component is used to determine a target communication mode of the vehicle; and a fourth component, wherein the fourth component is used to display communication information.

[0019] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.

[0020] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0021] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0022] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0023] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.

[0024] In the embodiment of the present invention, the communication information of the vehicle is obtained from the local database in response to the first operation instruction acting on the display interface; the bus baud rate corresponding to the target communication mode is determined based on the target communication mode of the vehicle; the target bus load rate corresponding to the target communication mode is determined based on the data length, the number of communication data, the sending cycle and the bus baud rate in response to the second operation instruction acting on the display interface; the target bus load rate is displayed in the display interface. It is easy to notice that the communication information of the vehicle can be automatically obtained through the first operation instruction, without the need to manually add the vehicle communication information, so as to achieve the purpose of being able to automatically, simply and efficiently obtain the communication information. In addition, the bus load rate corresponding to the target communication mode can be automatically calculated through the second operation instruction, avoiding the technical problem of low efficiency and accuracy caused by manual calculation based on a large amount of communication information. Further, the target bus load rate is displayed in the display interface, so that the user can intuitively see the target bus load rate, so as to achieve the purpose of being able to automatically, simply and efficiently obtain the vehicle bus load rate, thereby achieving the technical effect of improving the automation degree and acquisition efficiency of obtaining the vehicle bus load rate, thereby solving the technical problem of low acquisition automation degree and low acquisition efficiency when obtaining the vehicle bus load rate in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0026] Figure 1 is a flow chart of a method for calculating a vehicle bus load rate according to an embodiment of the present invention;

[0027] Figure 2 is a schematic diagram of a display interface of an optional vehicle bus load rate calculation system according to an embodiment of the present invention;

[0028] Figure 3 is a flow chart of an optional method for calculating a vehicle bus load rate according to an embodiment of the present invention;

[0029] Figure 4 4 is a schematic diagram of a vehicle bus load rate calculation system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] According to an embodiment of the present invention, an embodiment of a method for calculating a vehicle bus load rate is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0033] Figure 1 is a flow chart of a method for calculating a vehicle bus load rate according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:

[0034] Step S102, in response to the first operation instruction acting on the display interface, obtains the communication information of the vehicle from the local database, wherein the communication information is the communication information between multiple controllers inside the vehicle, and the communication information at least includes: at least one communication data between the multiple controllers, the data length of the communication data, the communication baud rate of the communication data, the sending period of the communication data sent by the multiple controllers, and the amount of communication data.

[0035] The above-mentioned vehicle can be any vehicle that needs to perform bus load rate calculation. The specific type is not limited in this embodiment, and the user can set it according to actual needs. The above-mentioned local database can be a local database located in the vehicle bus load rate calculation system. After reading the communication information of the vehicle, the vehicle bus load rate calculation system can store the read communication information in the local database, wherein the local database can also be called a controller area network (Controller Area Network, CAN) database. Among them, the communication information is the information generated by the communication between multiple controllers inside the vehicle, which can include but is not limited to: at least one communication data between multiple controllers, the data length of the communication data, the communication baud rate of the communication data, the sending period of the communication data sent by multiple controllers, and the amount of communication data. The above-mentioned first operation instruction is used to obtain the communication information of the vehicle.

[0036] Figure 2 is a schematic diagram of a display interface of an optional vehicle bus load rate calculation system according to an embodiment of the present invention, such as Figure 2 As shown, the display interface 21 includes: a display area 22 and multiple components 23, wherein the multiple components include: a first component 23-1, a second component 23-2, a third component 23-3 and a fourth component 23-4. The display area 21 is used to display communication information, and the first component (such as Figure 2 The second component (such as "Select CAN Data Configuration File, DBC) file") 23-1 is used to obtain the communication information of the vehicle based on the first operation instruction. Figure 2 23-2, used to determine different bus load rates corresponding to different communication modes of the vehicle based on the second operation instruction. The third component (such as Figure 2 The communication method is Controller Area Network - Flexible Data-Rate (CAN-FD)” 23-3, which is used to determine the target communication method of the vehicle based on the third operation instruction. The fourth component (such as Figure 2 "Display detailed statistical information of communication data") 23-4, used to display detailed statistical information of communication data in the communication information in the display area based on the fourth operation instruction.

[0037] In an optional embodiment, in order to solve the technical problems of low automation and low efficiency in obtaining the bus load rate of a vehicle in the prior art, the present invention provides a method for calculating the bus load rate of a vehicle, which is applied to the calculation system of the bus load rate of a vehicle in the implementation of the present invention. In the case where the bus load rate of a vehicle needs to be calculated, the user can first operate the first component in the display interface, for example, Figure 2 The "Select DBC File" component in the system is clicked, pressed, slid or dragged, and a first operation instruction can be generated in response to the operation. The first operation instruction is used to obtain the communication information of the vehicle from the CAN database, wherein the communication information is the communication information between multiple controllers inside the vehicle, and the communication information at least includes: at least one communication data between multiple controllers, the data length of the communication data, the communication baud rate of the communication data, the transmission cycle of the communication data sent by multiple controllers, and the number of communication data. Through this calculation system, users do not need to repeat the load rate calculation work many times, which improves the calculation efficiency of the load rate at the beginning of network design, and the operation is simple and convenient. In addition, only the CAN database file (DBC file) is required as input to extract information from the CAN for calculation.

[0038] Step S104, based on the target communication mode of the vehicle, determine the bus baud rate corresponding to the target communication mode, wherein the target communication mode includes one of the following: a controller area network communication mode, or a controller area network-flexible data rate communication mode, and the bus baud rate includes: a first baud rate of the arbitration segment and a second baud rate of the data segment.

[0039] In an optional embodiment, the target communication mode of the vehicle can be determined by displaying whether the third component in the interface receives the third operation instruction in the vehicle bus load rate calculation system, wherein the third operation instruction is used to determine the target communication mode of the vehicle. For example, when the third component receives the third operation instruction, the communication mode corresponding to the third operation instruction can be determined as the target communication mode, such as the CAN-FD communication mode. When the third operation instruction is not received, the target communication mode of the vehicle can be further determined based on the communication information of the vehicle, for example, the target communication mode of the vehicle can be determined by the communication baud rate or data length.

[0040] In another optional embodiment, when the target communication mode is determined, the vehicle bus load rate calculation system can determine the bus baud rate corresponding to the target communication mode based on a preset correspondence table through a software program in the vehicle bus load rate calculation system. For example, when the target communication mode is determined to be a CAN communication mode, the specific values ​​of the first baud rate of the arbitration segment and the second baud rate of the data segment can be determined based on a preset correspondence relationship, and when the target communication mode is determined to be a CAN-FD communication mode, the specific values ​​of the first baud rate of the arbitration segment and the second baud rate of the data segment can be determined based on a preset correspondence relationship.

[0041] Step S106, in response to the second operation instruction acting on the display interface, determining the target bus load rate corresponding to the target communication mode based on the data length, the amount of communication data, the sending cycle and the bus baud rate.

[0042] The second operation instruction is used to determine a target bus load rate corresponding to a target communication mode.

[0043] In an optional embodiment, when the second component in the display interface receives a user operation (for example, a click operation, a press operation, a slide operation, or a drag operation), for example, Figure 2 The "Calculate the number of messages and load rate" component in the vehicle is clicked, pressed, slid or dragged, and a second operation instruction can be generated based on the operation. At this time, the target bus load rate corresponding to the target communication mode can be calculated based on the data length, the number of communication data, the sending cycle and the bus baud rate by the software program in the vehicle bus load rate calculation system. For example, multiple bus load rates of the vehicle corresponding to the target communication mode can be calculated based on the data length, the number of communication data, the sending cycle and the bus baud rate, wherein the multiple bus load rates include: an unfilled bus load rate, a maximum filled bus load rate, and then the average of the unfilled bus load rate and the maximum filled bus load rate can be obtained to obtain the target bus load rate corresponding to the target communication mode.

[0044] It should be noted that, when the second component is selected, the amount of communication data can also be obtained by counting through the software program.

[0045] Among them, when there is one communication data, the unfilled bus load rate and the maximum filled bus load rate corresponding to one communication data can be obtained based on the data length, the number of communication data, the sending cycle and the bus baud rate, and then the average of the unfilled bus load rate and the maximum filled bus load rate corresponding to the communication data can be obtained, that is, the target bus load rate of the vehicle under the target communication mode can be obtained.

[0046] Among them, in the case that there are multiple communication data, the unfilled load rate and the maximum filled load rate corresponding to the multiple communication data can be obtained based on the data lengths corresponding to the multiple communication data, the number of communication data, the sending cycle and the bus baud rate. Secondly, the sum of multiple unfilled load rates corresponding to the multiple communication data can be obtained to obtain the unfilled bus load rate, and the sum of multiple maximum filled load rates corresponding to the multiple communication data can be obtained to obtain the maximum filled bus load rate. Finally, the average of the unfilled bus load rate and the maximum filled bus load rate can be obtained, that is, the target bus load rate of the vehicle under the target communication mode can be obtained.

[0047] Step S108, displaying the target bus load rate in the display interface.

[0048] In another optional embodiment, when the target bus load rate is obtained, the vehicle bus load rate calculation system can display the target bus load rate in the display interface. Among them, the vehicle bus load rate calculation system of the embodiment of the present invention supports automatic adjustment of the load rate calculation without manual setting; can intuitively display the cycle and number of the current bus message, and is convenient for adjusting, expanding, and adding messages according to the current load rate; integrates the basic algorithm of load rate calculation, uses the maximum fill load rate and the non-fill load rate to calculate the average load rate, and reduces the error of CAN load rate calculation.

[0049] In the embodiment of the present invention, the communication information of the vehicle is obtained from the local database in response to the first operation instruction acting on the display interface; the bus baud rate corresponding to the target communication mode is determined based on the target communication mode of the vehicle; the target bus load rate corresponding to the target communication mode is determined based on the data length, the number of communication data, the sending cycle and the bus baud rate in response to the second operation instruction acting on the display interface; the target bus load rate is displayed in the display interface. It is easy to notice that the communication information of the vehicle can be automatically obtained through the first operation instruction, without the need to manually add the vehicle communication information, so as to achieve the purpose of being able to automatically, simply and efficiently obtain the communication information. In addition, the bus load rate corresponding to the target communication mode can be automatically calculated through the second operation instruction, avoiding the technical problem of low efficiency and accuracy caused by manual calculation based on a large amount of communication information. Further, the target bus load rate is displayed in the display interface, so that the user can intuitively see the target bus load rate, so as to achieve the purpose of being able to automatically, simply and efficiently obtain the vehicle bus load rate, thereby achieving the technical effect of improving the automation degree and acquisition efficiency of obtaining the vehicle bus load rate, thereby solving the technical problem of low acquisition automation degree and low acquisition efficiency when obtaining the vehicle bus load rate in the related art.

[0050] Optionally, the method also includes one of the following: responding to a third operation instruction in the display interface, determining that the communication mode corresponding to the third operation instruction is the target communication mode of the vehicle; determining the target communication mode of the vehicle based on the communication baud rate or data length.

[0051] The third operation instruction mentioned above can determine the target communication mode of the vehicle.

[0052] In an optional embodiment, when receiving a user operation on a third component in the display interface, for example, Figure 2 As shown, when the component with "communication mode is CAN-FD" is clicked, pressed, slid or dragged, a third operation instruction can be generated. The software program in the vehicle bus load rate calculation system can determine the communication mode corresponding to the third operation instruction, which is the target communication mode of the vehicle.

[0053] In another optional embodiment, when the user does not operate the third component in the display interface, the target communication mode of the vehicle can also be determined based on the communication baud rate or the data length through a software program. For example, the target communication mode of the vehicle can be determined based on a determination strategy corresponding to the communication baud rate stored in a local database, and when the determination strategy is not stored in the local data, the target communication mode can be determined based on the data length. For another example, the target communication mode of the vehicle can also be determined based on a preset threshold of the communication baud rate stored in the local database, and when the communication baud rate does not meet the preset threshold, the target communication mode can be determined based on the data length. Optionally, determining the target communication mode of the vehicle based on the communication baud rate or the data length includes: determining the target communication mode based on the determination strategy and the communication baud rate in response to the determination strategy corresponding to the communication baud rate stored in the local database; determining the target communication mode based on the data length in response to the determination strategy not being stored in the local data.

[0054] The above determination strategy may be a strategy set in advance by the user and stored in the local database, which is used to determine the communication baud rate to determine the target communication mode of the vehicle. The specific content may include but is not limited to: when the communication baud rate is a threshold, the target communication mode is determined to be a CAN communication mode, and when the communication baud rate is not a threshold, the target communication mode is determined to be a CAN-FD communication mode.

[0055] In an optional embodiment, when determining the target communication mode of the vehicle based on the communication baud rate or the data length, it can be first determined whether a determination strategy corresponding to the communication baud rate is stored in the local database. When it is determined that a determination strategy corresponding to the communication baud rate is stored in the local database, the communication baud rate can be determined based on the determination strategy to determine the target communication mode. For example, the communication baud rate can be compared with a threshold in the determination strategy, and the target communication mode can be determined based on the comparison result. When it is determined that a determination strategy corresponding to the communication baud rate is not stored in the local database, the target communication mode can be determined based on the data length. The communication baud rate is determined to determine the target communication mode. For example, the data length can be compared with a preset threshold to determine the target communication mode.

[0056] Optionally, based on the determination strategy and the communication baud rate, the target communication mode is determined, including: in response to the communication baud rate matching the threshold in the determination strategy, determining the target communication mode to be the controller area network communication mode; in response to the communication baud rate not matching the threshold, determining the target communication mode to be the controller local area network-flexible data rate communication mode.

[0057] The above threshold can be set by the user in advance to determine the target communication mode. If the communication baud rate meets the threshold, the target communication mode can be determined to be the CAN communication mode. If the communication baud rate does not meet the threshold, the target communication mode can be determined to be the CAN-FD communication mode. The specific data of the threshold is 500Kbps.

[0058] In an optional embodiment, the communication baud rate can be first matched with a threshold in the determination strategy. When it is determined that the communication baud rate matches the threshold in the determination strategy, the target communication mode can be determined to be a controller area network communication mode. When it is determined that the communication baud rate does not match the threshold, the target communication mode can be determined to be a controller local area network-flexible data rate communication mode.

[0059] Optionally, based on the data length, the target communication mode is determined, including: in response to the data length being greater than a preset length, determining the target communication mode to be a controller local area network-flexible data rate communication mode; in response to the data length being less than or equal to a preset length, determining the target communication mode to be a controller local area network communication mode.

[0060] The above-mentioned preset length may be data set in advance by the user in the local database, which is used to determine the specific target communication mode of the vehicle, wherein the value of the preset length is 8 bytes.

[0061] In an optional embodiment, the data length may be compared with a preset length first. When the data length is greater than the preset length, the target communication mode may be determined to be a controller area network-flexible data rate communication mode. When the data length is less than or equal to the preset length, the target communication mode may be determined to be a controller area network communication mode. Optionally, determining the bus baud rate corresponding to the target communication mode includes: in response to the target communication mode being a controller area network communication mode, determining the first baud rate and the second baud rate to be first preset values; in response to the target communication mode being a controller area network-flexible data rate communication mode, determining the first baud rate to be a first preset value and the second baud rate to be a second preset value, wherein the second preset value is greater than the first preset value.

[0062] The first preset value may be set in advance by the user, and in the CAN communication mode, the first baud rate value of the arbitration segment, specifically 500Kbps. The second preset value may be set in advance by the user, and in the CAN-FD communication mode, the second baud rate value of the data segment, specifically 2Mbps.

[0063] In an optional embodiment, when the target communication mode is determined to be a CAN communication mode, it can be determined that the first baud rate and the second baud rate are both first preset values. When the target communication mode is determined to be a CAN-FD communication mode, it can be determined that the first baud rate is a first preset value and the second baud rate is a second preset value, wherein the second preset value is greater than the first preset value.

[0064] Optionally, based on the data length, the amount of communication data, the sending cycle and the bus baud rate, the target bus load rate corresponding to the target communication mode is determined, including: based on the data length, the amount of communication data, the sending cycle and the bus baud rate, multiple bus load rates of the vehicle corresponding to the target communication mode are calculated, wherein the multiple bus load rates include: an unfilled bus load rate and a maximum filled bus load rate; and the average of the unfilled bus load rate and the maximum filled bus load rate is obtained to obtain the target bus load rate corresponding to the target communication mode.

[0065] In an optional embodiment, when there is only one communication data, firstly, multiple bus load rates of the vehicle corresponding to the target communication mode can be calculated based on the data length, the number of communication data, the sending cycle and the bus baud rate, wherein the multiple bus load rates include: unfilled bus load rate and maximum filled bus load rate. For example, based on the data length, the first data length of the communication data when it is not filled and the second data length after filling can be calculated respectively, and then the unfilled bus load rate corresponding to the target communication mode can be obtained based on the first data length, the number of communication data, the sending cycle and the bus baud rate, and the maximum filled bus load rate corresponding to the target communication mode can be obtained based on the second data length, the sending cycle and the bus baud rate, and the unfilled bus load rate and the maximum filled bus load rate can be summarized to obtain multiple bus load rates. Secondly, the average of the unfilled bus load rate and the maximum filled bus load rate can be obtained, that is, the target bus load rate corresponding to the target communication mode can be obtained. In an optional embodiment, when there are multiple communication data, firstly, based on multiple data lengths corresponding to the multiple communication data, the number of communication data, the transmission cycle and the bus baud rate, multiple bus load rates of the vehicle corresponding to the target communication mode can be calculated, wherein the multiple bus load rates include: unfilled bus load rate and maximum filled bus load rate. Finally, the average of the unfilled bus load rate and the maximum filled bus load rate can be obtained, that is, the target bus load rate corresponding to the target communication mode can be obtained.

[0066] Optionally, based on the data length, the amount of communication data, the sending cycle and the bus baud rate, multiple bus load rates of the vehicle corresponding to the target communication mode are calculated, including: based on the data length, respectively calculating the first data length of the communication data when unfilled and the second data length after filling; based on the first data length, the amount of communication data, the sending cycle and the bus baud rate, obtaining the unfilled bus load rate corresponding to the target communication mode, and at the same time based on the second data length, the sending cycle and the bus baud rate, obtaining the maximum filled bus load rate corresponding to the target communication mode; summarizing the unfilled bus load rate and the maximum filled bus load rate to obtain multiple bus load rates.

[0067] In an optional embodiment, when there is only one communication data, first, the first data length of the communication data when unfilled and the second data length after filling can be calculated respectively. Secondly, based on the first data length, the amount of communication data, the sending cycle and the bus baud rate, the unfilled bus load rate corresponding to the target communication mode can be obtained. At the same time, based on the second data length, the sending cycle and the bus baud rate, the maximum filled bus load rate corresponding to the target communication mode can be obtained. Finally, the unfilled bus load rate and the maximum filled bus load rate can be summarized to obtain multiple bus load rates.

[0068] In another optional embodiment, in the case that there are multiple communication data, firstly, multiple first data lengths of the multiple communication data when unfilled and multiple second data lengths after filling can be calculated respectively. Secondly, based on the multiple first data lengths, the number of communication data, the sending cycle and the bus baud rate, multiple unfilled load rates corresponding to the target communication mode can be obtained. By obtaining multiple unfilled load rates, the unfilled bus load rate can be obtained. At the same time, based on the multiple second data lengths, the sending cycle and the bus baud rate, multiple maximum filled load rates corresponding to the target communication mode can be obtained. Then, multiple maximum filled load rates can be obtained to obtain the maximum filled bus load rate. Finally, the unfilled bus load rate and the maximum filled bus load rate can be summarized to obtain multiple bus load rates.

[0069] Optionally, based on the data length, a first data length of the communication data before filling and a second data length after filling are calculated respectively, including: determining the data length to be the first data length; removing the frame start length, the response segment length, the frame end length and the interval segment length in the data length to obtain the second preset data length; obtaining the quotient of the second preset data length and the bus baud rate to obtain the filling bit; obtaining the sum of the data length and the filling bit to obtain the second data length.

[0070] In an optional embodiment, first, the acquired original data length may be determined to be the first data length. The original data length may be obtained by the following formula:

[0071] .

[0072] in, is the first data length, and the unit of the data length is bit.

[0073] The second data length can be obtained by the following formula: :

[0074] ;

[0075] in, is the second preset data length, 1 and 4 are constants and are fixed values. The padding bit is the length unit of the padding bit. When the maximum padding is considered, 1 bit of opposite polarity data is padded after 5 consecutive bits of the same polarity. The padded bit and the following 4 bits form 5 bits of consecutive data of the same polarity. In this way, N bits of data are sent, and the number of padding bits is bit, where N is the number of communication data. Considering the most extreme case, the maximum padding condition must be met from the start of the frame to the end of the check segment, so as to calculate the length of each communication data and the maximum padding load rate.

[0076] Optionally, based on the first data length, the amount of communication data, the sending cycle and the bus baud rate, the unfilled bus load rate corresponding to the target communication mode is obtained, and based on the second data length, the sending cycle and the bus baud rate, the maximum filled bus load rate corresponding to the target communication mode is obtained, including: obtaining the product of the sending cycle and the bus baud rate to obtain a first product; obtaining the quotient of the first data length and the first product to obtain the unfilled load rate of the communication data, and obtaining the quotient of the second data length and the first product to obtain the maximum filled load rate of the communication data; based on the amount of communication data, obtaining the sum of the unfilled load rates of multiple communication data to obtain the unfilled bus load rate, and based on the amount of communication data, obtaining the sum of the maximum filled load rates of multiple communication data to obtain the maximum filled bus load rate.

[0077] In an optional embodiment, the product of the transmission period T and the bus baud rate B can be first obtained to obtain a first product, and then the quotient values ​​of multiple first data lengths and the first product can be obtained to obtain multiple unfilled load rates of multiple communication data. ,in, represents the first data length of the i-th communication data, i represents the i-th communication data among N communication data, Indicates the sending period of the i-th communication data. At the same time, multiple quotients of the second data length and the first product can be obtained to obtain multiple maximum filling load rates of multiple communication data. ,in, represents the second data length of the h-th communication data, h represents the h-th communication data among the N communication data, Indicates the sending period of the hth communication data. Finally, based on the number of communication data, the sum of the unfilled load rates of multiple communication data can be obtained to obtain the unfilled bus load rate, and based on the number of communication data, the sum of the maximum filled load rates of multiple communication data can be obtained to obtain the maximum filled bus load rate.

[0078] Among them, the unfilled bus load rate can be obtained by the following formula :

[0079] .

[0080] Among them, the maximum fill bus load rate can also be obtained by the following formula: :

[0081] .

[0082] Optionally, after acquiring the communication information of the vehicle from the local database, the method further includes: displaying the communication information on the display interface in response to a fourth operation instruction acting on the display interface.

[0083] In an optional embodiment, after receiving an operation on the fourth component in the display interface, for example, Figure 2 As shown, when a click operation, a press operation, a slide operation or a drag operation is performed on the "display detailed statistical information of communication data" component in the display interface, a fourth operation instruction may be generated in response to the operation, and the software program may display the detailed statistical information of the communication data in the communication information in the display area of ​​the display interface based on the fourth operation instruction.

[0084] Figure 3 is a flow chart of an optional method for calculating a vehicle bus load rate according to an embodiment of the present invention, which is applied to a vehicle bus load rate calculation system, such as Figure 3 As shown, the method may include the following steps:

[0085] Step S301, importing the CAN database file;

[0086] Step S302, extracting communication information;

[0087] Step S303, determining whether the user has set the target communication mode, if yes, proceeding to step S304, if no, proceeding to step S306;

[0088] Step S304, determining whether the set target communication mode is the CAN communication mode, if so, proceeding to step S307, if not, proceeding to step S305;

[0089] Step S305, set the arbitration field and control field to the CAN bus baud rate, and the data field to the CAN-FD load rate, and proceed to step S308;

[0090] Step S306, determine whether the data length is greater than 8 bytes and whether the baud rate of the CAN database is greater than 500Kbps, if so, return to step S305, if not, proceed to step S307;

[0091] Step S307, setting the arbitration field, control field, and data field to the CAN bus baud rate;

[0092] Step S308, calculating the maximum filled and unfilled bus load rates;

[0093] Step S309, calculating the average bus load rate as the final result;

[0094] Step S310, end.

[0095] Take the calculation of the load rate of a standard CAN frame with a cycle of 10ms as an example:

[0096] Standard CAN frame message length

[0097] Message length after maximum padding

[0098] The unfilled load rate is

[0099] The maximum fill load rate is

[0100] The load rate of such a CAN standard frame with a period of 10ms is about 2.46%.

[0101] According to an embodiment of the present invention, a system embodiment for calculating a vehicle bus load rate is provided. It should be noted that the system can be used to execute the above-mentioned method for calculating a vehicle bus load rate.

[0102] Figure 4 FIG. 1 is a schematic diagram of a vehicle bus load rate calculation system according to an embodiment of the present invention. Figure 4 As shown, the vehicle bus load rate calculation system 41 includes: a display interface 21 and a software program 42 .

[0103] Among them, the display interface is used to display the target bus load rate of the vehicle, and the display interface at least includes: a display area, the display area is used to display the target bus load rate; the software program is used to obtain the vehicle's communication information from a local database, and based on the vehicle's target communication mode, determine the bus baud rate corresponding to the target communication mode, and based on the data length in the communication information, the amount of communication data in the communication information, the sending cycle and the bus baud rate, determine the target bus load rate corresponding to the target communication mode.

[0104] Among them, the calculation system allows users to select each CAN database that has been made locally, and then set the communication method according to the actual design situation. Finally, click the calculation button to calculate the load rate and number of messages of this link. Finally, click the display statistics button to intuitively see the current message length, period and number of messages in each length period on the entire link, providing a reference for function expansion and adding new messages.

[0105] Optionally, the display interface also includes: a first component, wherein the first component is used to obtain communication information of the vehicle; a second component, wherein the second component is used to determine a target bus load rate corresponding to a target communication mode; a third component, wherein the third component is used to determine a target communication mode of the vehicle; and a fourth component, wherein the fourth component is used to display communication information.

[0106] In an optional embodiment, the display interface further includes: a first component, a second component, a third component and a fourth component. The first component is used to obtain the communication information of the vehicle, the second component is used to determine the target bus load rate corresponding to the target communication mode, the third component is used to determine the target communication mode of the vehicle, and the fourth component is used to display the communication information.

[0107] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.

[0108] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.

[0109] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.

[0110] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.

[0111] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.

[0112] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0113] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0115] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.

[0117] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for calculating a vehicle bus load rate, characterized in that: include: In response to a first operation instruction acting on the display interface, acquiring communication information of the vehicle from a local database, wherein the communication information is communication information between multiple controllers inside the vehicle, and the communication information at least includes: at least one communication data between the multiple controllers, the data length of the communication data, the communication baud rate of the communication data, the sending period of the multiple controllers sending the communication data, and the amount of the communication data; Based on the target communication mode of the vehicle, determining a bus baud rate corresponding to the target communication mode, wherein the target communication mode includes one of the following: a controller area network communication mode, or a controller area network-flexible data rate communication mode, and the bus baud rate includes: a first baud rate of an arbitration segment and a second baud rate of a data segment; In response to a second operation instruction acting on the display interface, determining a target bus load rate corresponding to the target communication mode based on the data length, the amount of the communication data, the sending cycle and the bus baud rate; The target bus load rate is displayed in the display interface.

2. The method according to claim 1, characterized in that The method further comprises one of the following: In response to a third operation instruction in the display interface, determining that a communication mode corresponding to the third operation instruction is a target communication mode of the vehicle; The target communication mode of the vehicle is determined based on the communication baud rate or the data length.

3. The method according to claim 2, characterized in that Determining a target communication mode of the vehicle based on the communication baud rate or the data length includes: In response to the determination strategy corresponding to the communication baud rate being stored in the local database, determining the target communication mode based on the determination strategy and the communication baud rate; In response to the determination strategy not being stored in the local data, the target communication mode is determined based on the data length.

4. The method according to claim 3, characterized in that Determining the target communication mode based on the determination strategy and the communication baud rate includes: In response to the communication baud rate matching a threshold in the determination strategy, determining that the target communication mode is a controller area network communication mode; In response to the communication baud rate not matching the threshold, the target communication mode is determined to be a CAN-Flexible Data Rate communication mode.

5. The method according to claim 3, characterized in that: Determining the target communication mode based on the data length includes: In response to the data length being greater than a preset length, determining that the target communication mode is a controller area network-flexible data rate communication mode; In response to the data length being less than or equal to the preset length, determining that the target communication mode is a controller area network communication mode.

6. The method according to claim 1, characterized in that Determining a bus baud rate corresponding to the target communication mode includes: In response to the target communication mode being a controller area network communication mode, determining the first baud rate and the second baud rate to be first preset values; In response to the target communication mode being a CAN-Flexible Data Rate communication mode, the first baud rate is determined to be the first preset value, and the second baud rate is determined to be a second preset value, wherein the second preset value is greater than the first preset value.

7. The method according to claim 1, characterized in that Determining a target bus load rate corresponding to the target communication mode based on the data length, the amount of the communication data, the sending cycle, and the bus baud rate includes: Based on the data length, the amount of the communication data, the sending cycle and the bus baud rate, a plurality of bus load rates of the vehicle corresponding to the target communication mode are calculated, wherein the plurality of bus load rates include: an unfilled bus load rate and a maximum filled bus load rate; An average of the unfilled bus load rate and the maximum filled bus load rate is obtained to obtain the target bus load rate corresponding to the target communication mode.

8. The method according to claim 7, characterized in that Based on the data length, the amount of the communication data, the sending cycle and the bus baud rate, a plurality of bus load rates of the vehicle corresponding to the target communication mode are calculated, including: Based on the data length, respectively calculating a first data length of the communication data when it is not filled and a second data length of the communication data after filling; Based on the first data length, the amount of the communication data, the sending cycle and the bus baud rate, the unfilled bus load rate corresponding to the target communication mode is obtained, and based on the second data length, the sending cycle and the bus baud rate, the maximum filled bus load rate corresponding to the target communication mode is obtained; The unfilled bus load rate and the maximum filled bus load rate are summed up to obtain the multiple bus load rates.

9. The method according to claim 8, characterized in that Based on the data length, respectively calculating a first data length of the communication data when it is not filled and a second data length after filling, including: Determine that the data length is the first data length; Remove the frame start length, the response segment length, the frame end length and the interval segment length from the data length to obtain a second preset data length; Obtaining a quotient of the second preset data length and the bus baud rate to obtain a padding bit; Obtain the sum of the data length and the padding bit to obtain the second data length.

10. The method according to claim 8, characterized in that The method further comprises: obtaining the unfilled bus load rate corresponding to the target communication mode based on the first data length, the amount of the communication data, the sending cycle, and the bus baud rate, and obtaining the maximum filled bus load rate corresponding to the target communication mode based on the second data length, the sending cycle, and the bus baud rate, including: Obtaining the product of the sending period and the bus baud rate to obtain a first product; Obtaining a quotient of the first data length and the first product to obtain an unfilled load rate of the communication data, and simultaneously obtaining a quotient of the second data length and the first product to obtain a maximum filled load rate of the communication data; Based on the amount of the communication data, the sum of the unfilled load rates of multiple communication data is obtained to obtain the unfilled bus load rate. At the same time, based on the amount of the communication data, the sum of the maximum filled load rates of multiple communication data is obtained to obtain the maximum filled bus load rate.

11. The method according to claim 1, characterized in that: After acquiring the communication information of the vehicle from the local database, the method further includes: In response to a fourth operation instruction acting on the display interface, the communication information is displayed on the display interface.

12. A vehicle bus load rate calculation system, characterized in that: include: A display interface, used to display the target bus load rate of the vehicle, wherein the display interface at least includes: a display area, the display area is used to display the target bus load rate; A software program for obtaining the communication information of the vehicle from a local database, and determining the bus baud rate corresponding to the target communication mode based on the target communication mode of the vehicle, and determining the target bus load rate corresponding to the target communication mode based on the data length in the communication information, the amount of communication data in the communication information, the sending cycle and the bus baud rate.

13. The system according to claim 12, characterized in that The display interface also includes: A first component, wherein the first component is used to obtain communication information of the vehicle; A second component, wherein the second component is used to determine a target bus load rate corresponding to the target communication mode A third component, wherein the third component is used to determine a target communication mode of the vehicle; A fourth component, wherein the fourth component is used to display the communication information.

14. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 10 when running.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 10.

16. A computer program product, characterized in that It comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Engineering machinery and network optimization method and device thereof

    CN112769714A

  • CANFD bus load rate calculation method

    CN114500155A

  • Message processing method and device and related equipment

    CN114598752A

  • Frame collision rate calculation method for frame on can bus, and can bus resource minimization method

    WO2023226905A1