Method, system and electronic device for calculating vehicle bus load rate
By employing an automated method for calculating bus load rate, vehicle communication information is retrieved from a local database based on operation instructions via a display interface. The bus baud rate is then determined, and the bus load rate is calculated. This approach solves the problems of low automation and low efficiency in existing technologies, achieving a simple and efficient method for obtaining bus load rate.
Patent Information
- Application Number
- CN202411495359.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The current technology has low automation and efficiency in obtaining vehicle bus load rate, which means that the whole vehicle network architecture design needs to be repeatedly calculated, and the amount of manual calculation is large, which is time-consuming and labor-intensive.
By responding to the operation commands on the display interface, the system retrieves vehicle communication information from the local database, determines the bus baud rate based on the target communication method, and calculates the target bus load rate using the data length, the amount of communication data, and the transmission cycle, which is then automatically displayed on the display interface.
It enables automated, simple, and efficient acquisition of vehicle bus load rate, improving the degree of automation and efficiency of acquisition, and reducing errors and time consumption from manual calculation.
Smart Images

Figure CN119603200B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of vehicle communication data processing, in particular to a vehicle bus load rate calculation method, system and electronic equipment. BACKGROUND
[0002] The existing vehicle CAN, CAN-FD bus load rate calculation is mostly to calculate the bus load rate after the minimum filling and the maximum filling, so as to calculate the average load rate, and when the average load rate is higher than the threshold, an alarm is sent to provide a preliminary reference for the vehicle network communication architecture design. However, there are multiple links in the actual vehicle network architecture, and before the vehicle network architecture design, repeated load rate calculation work needs to be performed multiple times, which leads to low efficiency of obtaining the bus load rate of the vehicle.
[0003] In addition, the current vehicle network uses CAN-FD as the transmission medium, and most of them set different load rates for the arbitration field, control field and data field respectively, and then calculate manually. Different load rates increase the amount of calculation, and a large amount of calculation when calculating the bus load rate leads to time-consuming and laborious situation, which leads to low automation degree of obtaining the bus load rate of the vehicle.
[0004] At present, there is no effective solution to the above problems. SUMMARY
[0005] The embodiments of the present application provide a vehicle bus load rate calculation method, system and electronic equipment, which at least solve the technical problems of low automation degree and low efficiency in obtaining the bus load rate of the vehicle in the related art.
[0006] According to an aspect of an embodiment of the present application, a vehicle bus load rate calculation method is provided, comprising: in response to a first operation instruction acting on a display interface, obtaining communication information of a vehicle from a local database, wherein the communication information is communication information between a plurality of controllers in the vehicle, and the communication information at least includes: at least one communication data between the plurality of controllers, data length of the communication data, communication baud rate of the communication data, sending period of the plurality of controllers sending the communication data, and number of the 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: 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 number of the communication data, the sending period and the bus baud rate; and displaying the target bus load rate in the display interface.
[0007] Optionally, the method further comprises one of the following: in response to a third operation instruction acting on the display interface, determining that a communication mode corresponding to the third operation instruction is a target communication mode of the vehicle; and determining the target communication mode of the vehicle based on a communication baud rate or a data length.
[0008] Optionally, the determining the target communication mode of the vehicle based on the communication baud rate or the data length comprises: in response to the local database storing a determination strategy corresponding to the communication baud rate, determining the target communication mode based on the determination strategy and the communication baud rate; and in response to the local database not storing the determination strategy, determining the target communication mode based on the data length.
[0009] Optionally, the determining the target communication mode based on the determination strategy and the communication baud rate comprises: in response to the communication baud rate matching a threshold value in the determination strategy, determining that the target communication mode is a controller area network communication mode; and in response to the communication baud rate not matching the threshold value, determining that the target communication mode is a controller area network-flexible data rate communication mode.
[0010] Optionally, the determining the target communication mode based on the data length comprises: in response to the data length being greater than a preset length, determining that the target communication mode is the controller area network-flexible data rate communication mode; and in response to the data length being less than or equal to the preset length, determining that the target communication mode is the controller area network communication mode.
[0011] Optionally, the determining the bus baud rate corresponding to the target communication mode comprises: in response to the target communication mode being the controller area network communication mode, determining that a first baud rate and a second baud rate are first preset values; and in response to the target communication mode being the controller area network-flexible data rate communication mode, determining that the first baud rate is the 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.
[0012] Optionally, the determining the target bus load rate corresponding to the target communication mode based on the data length, the number of communication data, the transmission period, and the bus baud rate comprises: calculating a plurality of bus load rates of the vehicle corresponding to the target communication mode based on the data length, the number of communication data, the transmission period, and the bus baud rate, wherein the plurality of bus load rates comprise: an unfilled bus load rate and a maximum filled bus load rate; and obtaining a mean value of the unfilled bus load rate and the maximum filled bus load rate to obtain the target bus load rate corresponding to the target communication mode.
[0013] Optionally, the plurality of bus load rates corresponding to the target communication mode of the vehicle are calculated based on the data length, the number of communication data, the sending period and the bus baud rate, comprising: based on the data length, the first data length of the communication data when not filled and the second data length after filling are calculated respectively; based on the first data length, the number of communication data, the sending period 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 period 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 summarized to obtain the plurality of bus load rates.
[0014] Optionally, based on the data length, the first data length of the communication data when not filled and the second data length after filling are calculated respectively, comprising: determining the data length as 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 value of the second preset data length and the bus baud rate to obtain the padding bit; obtaining the sum value of the data length and the padding bit to obtain the second data length.
[0015] Optionally, based on the first data length, the number of communication data, the sending period 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 period and the bus baud rate, the maximum filled bus load rate corresponding to the target communication mode is obtained, comprising: obtaining the product of the sending period and the bus baud rate to obtain the first product; obtaining the quotient value of the first data length and the first product to obtain the unfilled load rate of the communication data, and obtaining the quotient value of the second data length and the first product to obtain the maximum filled load rate of the communication data; based on the number of communication data, the sum value of the unfilled load rates of the plurality of communication data is obtained to obtain the unfilled bus load rate, and based on the number of communication data, the sum value of the maximum filled load rates of the plurality of communication data is obtained to obtain the maximum filled bus load rate.
[0016] Optionally, after obtaining the communication information of the vehicle from the local database, the method further comprises: in response to a fourth operation instruction acting on the display interface, displaying the communication information in the display interface.
[0017] According to another aspect of the embodiments of the present application, a system for calculating a bus load rate of a vehicle is provided, comprising: a display interface configured to display a target bus load rate of the vehicle, wherein the display interface comprises at least: a display area configured to display the target bus load rate; a software program configured to obtain communication information of the vehicle from a local database, and determine a bus baud rate corresponding to a target communication mode of the vehicle based on the target communication mode of the vehicle, and determine the target bus load rate corresponding to the target communication mode based on a data length in the communication information, a number of communication data in the communication information, a transmission period, and the bus baud rate.
[0018] Optionally, the display interface further comprises: a first component, wherein the first component is configured to obtain the communication information of the vehicle; a second component, wherein the second component is configured to determine the target bus load rate corresponding to the target communication mode; a third component, wherein the third component is configured to determine the target communication mode of the vehicle; and a fourth component, wherein the fourth component is configured to display the communication information.
[0019] According to another aspect of the embodiments of the present application, an electronic device is provided, comprising: a memory storing an executable program; and a processor configured to execute the program, wherein the program, when executed, performs the method in the embodiments of the present application.
[0020] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, comprising a stored executable program, wherein the executable program, when executed, controls a device in which the computer readable storage medium is located to perform the method in the embodiments of the present application.
[0021] According to another aspect of the embodiments of the present application, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method in the embodiments of the present application.
[0022] According to another aspect of the embodiments of the present application, a computer program product is provided, comprising a non-volatile computer readable storage medium storing a computer program which, when executed by a processor, implements the method in the embodiments of the present application.
[0023] According to another aspect of the embodiments of the present application, a computer program is provided which, when executed by a processor, implements the method in the embodiments of the present application.
[0024] In the embodiment of the present application, the communication information of the vehicle is acquired 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 period and the bus baud rate in response to the second operation instruction acting on the display interface; and the target bus load rate is displayed on the display interface. It is easy to note that the communication information of the vehicle can be automatically acquired through the first operation instruction, without manual addition of the vehicle communication information, so as to achieve the purpose of automatically, simply and efficiently acquiring the communication information. In addition, the target bus load rate corresponding to the target communication mode can be automatically calculated through the second operation instruction, so as to avoid the technical problems 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 on the display interface, so that the user can intuitively see the target bus load rate, thereby achieving the purpose of automatically, simply and efficiently obtaining the bus load rate of the vehicle, so as to realize the technical effects of improving the automation degree and the acquisition efficiency of the bus load rate of the vehicle, and further solve the technical problems of low automation degree and low acquisition efficiency in the related art when the bus load rate of the vehicle is acquired. BRIEF DESCRIPTION OF DRAWINGS
[0025] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0026] Figure 1 is a flowchart of a method for calculating a bus load rate of a vehicle according to an embodiment of the present application;
[0027] Figure 2 is a schematic diagram of a display interface of an optional calculation system for a bus load rate of a vehicle according to an embodiment of the present application;
[0028] Figure 3 is a flowchart of an optional method for calculating a bus load rate of a vehicle according to an embodiment of the present application;
[0029] Figure 4 is a schematic diagram of a calculation system for a bus load rate of a vehicle according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative work should belong to the protection scope of the present application.
[0031] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above-mentioned accompanying drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in other than the order illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a list of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] According to the embodiments of the present application, a vehicle bus load rate calculation method embodiment 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 the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in a different order.
[0033] Figure 1 is a flowchart of a vehicle bus load rate calculation method according to an embodiment of the present application, as shown in Figure 1 The method comprises the following steps:
[0034] Step S102, in response to the first operation instruction acting on the display interface, obtaining the communication information of the vehicle from the local database, wherein the communication information is the communication information between the plurality of controllers inside the vehicle, and the communication information at least includes: at least one communication data between the plurality of controllers, the data length of the communication data, the communication baud rate of the communication data, the sending period of the plurality of controllers sending the communication data, and the number of the communication data.
[0035] The aforementioned vehicle can be any type of vehicle requiring bus load rate calculation; the specific type is not limited in this embodiment, and users can set it according to their actual needs. The aforementioned local database can be a local database located within the vehicle bus load rate calculation system. After reading the vehicle's communication information, the vehicle bus load rate calculation system can store the read communication information in the local database, which can also be called a Controller Area Network (CAN) database. The communication information refers to information generated by communication between multiple controllers within the vehicle, and may include, but is not limited to: at least one communication data point between multiple controllers, the data length of the communication data, the communication baud rate of the communication data, the transmission cycle of the multiple controllers sending communication data, and the quantity of communication data. The aforementioned first operation instruction is used to obtain the vehicle's communication information.
[0036] Figure 2 This is a schematic diagram of the 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 22 is used to display communication information, and the first component (such as...) Figure 2 The "Select CAN Data Configuration File (DBC)" 23-1 shown in the document is used to obtain vehicle communication information based on the first operation command. The second component (such as...) Figure 2 The "Calculation of Message Count and Load Rate" (23-2) is used to determine the different bus load rates corresponding to different communication methods of the vehicle based on the second operation command. The third component (such as...) Figure 2 The "communication mode is Controller Area Network - Flexible Data-Rate (CAN-FD)" 23-3 is used to determine the vehicle's target communication mode based on the third operating command. The fourth component (such as...) Figure 2 The “Display detailed statistics of communication data” (23-4) is used to display detailed statistics of communication data in the communication information in the display area based on the fourth operation instruction.
[0037] In an optional embodiment, to address the technical problems of low automation and low efficiency in obtaining vehicle bus load rate in the prior art, this invention provides a method for calculating vehicle bus load rate, applied to the vehicle bus load rate calculation system implemented in this invention. When it is necessary to calculate the vehicle bus load rate, the user can first operate on a first component in the display interface; for example, they can... Figure 2 The "Select DBC File" component allows for clicking, pressing, sliding, or dragging. In response to these actions, a first operation command is generated. This command retrieves vehicle communication information from the CAN database. This communication information comprises communication data between multiple controllers within the vehicle. The communication information includes at least one communication data point between the 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 the controllers, and the quantity of communication data. This calculation system eliminates the need for repeated load rate calculations, improving the efficiency of load rate calculations during initial network design. The operation is simple and convenient. Furthermore, it only requires a CAN database file (DBC file) as input to extract information from the CAN bus for calculation.
[0038] Step S104: Based on the vehicle's target communication method, determine the bus baud rate corresponding to the target communication method. The target communication method includes one of the following: Controller Area Network (CAN) communication method or CAN-Flexible Data Rate (FDR) communication method. The bus baud rate includes: the first baud rate of the arbitration segment and the second baud rate of the data segment.
[0039] In an optional embodiment, the target communication mode of the vehicle can be determined by whether a third component in the display interface receives a third operation command through a vehicle bus load rate calculation system. The third operation command is used to determine the target communication mode. For example, if the third component receives a third operation command, the communication mode corresponding to the third operation command can be determined as the target communication mode, such as CAN-FD communication. If no third operation command is received, the target communication mode of the vehicle can be further determined based on the vehicle's communication information, for example, by using the communication baud rate or data length.
[0040] In another alternative embodiment, when the target communication method is determined, the vehicle bus load rate calculation system can determine the bus baud rate corresponding to the target communication method based on a preset correspondence table using software programs within the vehicle bus load rate calculation system. For example, if the target communication method is determined to be CAN communication, 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. Similarly, if the target communication method is determined to be CAN-FD communication, 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.
[0041] Step S106: In response to the second operation command applied to the display interface, determine the target bus load rate corresponding to the target communication mode based on the data length, the amount of communication data, the transmission cycle and the bus baud rate.
[0042] The second operation instruction mentioned above is used to determine the target bus load rate corresponding to the target communication method.
[0043] In an optional embodiment, when the second component in the display interface receives a user operation (e.g., a click, press, swipe, or drag operation), for example, it can... Figure 2 The "Calculate Message Count and Load Rate" component allows for click, press, slide, or drag operations. These operations generate a second operation command, which, through the software program in the vehicle bus load rate calculation system, calculates the target bus load rate corresponding to the target communication method based on data length, the amount of communication data, the transmission cycle, and the bus baud rate. For example, multiple bus load rates corresponding to the target communication method can be calculated based on data length, the amount of communication data, the transmission cycle, and the bus baud rate. These multiple bus load rates include: the unfilled bus load rate and the maximum filled bus load rate. The average of the unfilled bus load rate and the maximum filled bus load rate can then be obtained to determine the target bus load rate corresponding to the target communication method.
[0044] It should be noted that when the second component is selected, the amount of communication data can also be counted through software programs.
[0045] In the case of a single communication data point, the unfilled bus load rate and the maximum filled bus load rate corresponding to the communication data can be obtained based on the data length, the number of communication data points, the transmission period, and the bus baud rate. Then, the average of the unfilled bus load rate and the maximum filled bus load rate corresponding to the communication data can be obtained, which gives the target bus load rate of the vehicle under the target communication mode.
[0046] Wherein, in the case of multiple communication data, the un-filled load rate and the maximum filled load rate corresponding to each of the multiple communication data can be obtained based on the data length, the number of communication data, the sending period and the bus baud rate corresponding to each of the multiple communication data, then the sum of the multiple un-filled load rates corresponding to the multiple communication data can be obtained to obtain the un-filled bus load rate, and the sum of the multiple maximum filled load rates corresponding to the multiple communication data can be obtained to obtain the maximum filled bus load rate, and finally the average of the un-filled bus load rate and the maximum filled bus load rate can be obtained, i.e. the target bus load rate of the vehicle under the target communication mode can be obtained.
[0047] In step S108, the target bus load rate is displayed in the display interface.
[0048] In another optional embodiment, in the case of obtaining the target bus load rate, the vehicle bus load rate calculation system can display the target bus load rate in the display interface. Wherein, the vehicle bus load rate calculation system of the embodiment of the present application supports automatic adjustment of load rate calculation without manual setting; can intuitively display the period and number of current bus messages, facilitating adjustment, expansion and addition of new messages according to the current load rate; integrates the basic algorithm of load rate calculation, uses the maximum filled load rate and the un-filled load rate to calculate the average load rate, and reduces the error of CAN load rate calculation.
[0049] In the embodiment of the present application, 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 period and the bus baud rate in response to the second operation instruction acting on the display interface; and the target bus load rate is displayed in the display interface. It is easy to note that the communication information of the vehicle can be automatically obtained through the first operation instruction without manual addition of vehicle communication information, achieving the purpose of automatically, simply and efficiently obtaining 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 problems 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, achieving the purpose of automatically, simply and efficiently obtaining the vehicle bus load rate, thereby realizing the technical effects of improving the automation degree and efficiency of obtaining the bus load rate of the vehicle, and further solving the technical problems of low automation degree and low efficiency in obtaining the bus load rate of the vehicle in the related art.
[0050] Optionally, the method further comprises one of the following: in response to a third operation instruction acting on the display interface, determining that a communication mode corresponding to the third operation instruction is the target communication mode of the vehicle; and determining the target communication mode of the vehicle based on a communication baud rate or a data length.
[0051] The third operation instruction described above can determine the target communication mode of the vehicle.
[0052] In an optional embodiment, in a case where a user operates a third component in the display interface, for example, in a case where a click operation, a press operation, a sliding operation or a drag operation is performed on the component "communication mode is CAN-FD", a third operation instruction can be generated at this time, and a software program in the vehicle bus load rate calculation system can determine that the communication mode corresponding to the third operation instruction is the target communication mode of the vehicle. Figure 2
[0053] In another optional embodiment, in a case where a user does not operate a third component in the display interface, the target communication mode of the vehicle can also be determined by a software program based on a communication baud rate or a data length. 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 in a case where the determination strategy is not stored in the local data, the target communication mode is 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 in a case where the communication baud rate does not meet the preset threshold, the target communication mode is 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 comprises: 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; and in response to the determination strategy not being stored in the local data, determining the target communication mode based on the data length.
[0054] The determination strategy described above can be a strategy set in advance by a user and stored in a local database, which is used to determine the communication baud rate to determine the target communication mode of the vehicle. The specific content can include but is not limited to: in a case where the communication baud rate is a threshold value, determining that the target communication mode is a CAN communication mode, and in a case where the communication baud rate is not the threshold value, determining that the target communication mode is a CAN-FD communication mode.
[0055] In an optional embodiment, in a case where the target communication mode of the vehicle is determined based on the communication baud rate or the data length, it can be first determined whether the determination strategy corresponding to the communication baud rate is stored in the local database, in a case where it is determined that the determination strategy corresponding to the communication baud rate is stored in the local database, the target communication mode can be determined based on the determination strategy. For example, the communication baud rate can be compared with the threshold value in the determination strategy, and the target communication mode is determined based on the comparison result. In a case where it is determined that the 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, and the target communication mode is determined. For example, the data length can be compared with a preset threshold value to determine the target communication mode.
[0056] Optionally, the target communication mode is determined based on the determination strategy and the communication baud rate, including: in response to the communication baud rate matching the threshold value in the determination strategy, determining that the target communication mode is the controller area network communication mode; and in response to the communication baud rate not matching the threshold value, determining that the target communication mode is the controller area network-flexible data rate communication mode.
[0057] The threshold value described above can be set in advance by a user, and is used to determine the target communication mode. In a case where the communication baud rate meets the threshold value, the target communication mode can be determined as the CAN communication mode, and in a case where the communication baud rate does not meet the threshold value, the target communication mode can be determined as the CAN-FD communication mode. The specific data of the threshold value is 500 Kbps.
[0058] In an optional embodiment, the communication baud rate can be first matched with the threshold value in the determination strategy, in a case where it is determined that the communication baud rate matches the threshold value in the determination strategy, the target communication mode can be determined as the controller area network communication mode, and in a case where it is determined that the communication baud rate does not match the threshold value, the target communication mode can be determined as the controller area network-flexible data rate communication mode.
[0059] Optionally, the target communication mode is determined based on the data length, including: in response to the data length being greater than a preset length, determining that the target communication mode is the controller area network-flexible data rate communication mode; and in response to the data length being less than or equal to the preset length, determining that the target communication mode is the controller area network communication mode.
[0060] The preset length described above can be data set in advance by a user in the local database, and is used to determine the specific target communication mode of the vehicle. The value of the preset length is 8 bytes (Byte).
[0061] In an optional embodiment, the data length can be compared with the preset length first, and in the case that the data length is greater than the preset length, the target communication mode can be determined as the controller area network-flexible data rate communication mode, and in the case that the data length is less than or equal to the preset length, the target communication mode can be determined as the controller area network communication mode. Optionally, the bus baud rate corresponding to the target communication mode is determined, including: in response to the target communication mode being the controller area network communication mode, determining the first baud rate and the second baud rate as first preset values; and in response to the target communication mode being the controller area network-flexible data rate communication mode, determining the first baud rate as the first preset value and the second baud rate as a second preset value, wherein the second preset value is greater than the first preset value.
[0062] The first preset value described above can be set in advance by a user, and in the CAN communication mode, the first baud rate value of the arbitration section is 500 Kbps. The second preset value described above can be set in advance by the user, and in the CAN-FD communication mode, the second baud rate value of the data section is 2 Mbps.
[0063] In an optional embodiment, in the case that the target communication mode is determined as the CAN communication mode, the first baud rate and the second baud rate can be determined as the first preset values, and in the case that the target communication mode is determined as the CAN-FD communication mode, the first baud rate can be determined as the first preset value and the second baud rate can be determined as the second preset value, wherein the second preset value is greater than the first preset value.
[0064] Optionally, the target bus load rate corresponding to the target communication mode is determined based on the data length, the number of communication data, the transmission period and the bus baud rate, including: calculating a plurality of bus load rates of the vehicle corresponding to the target communication mode based on the data length, the number of communication data, the transmission period and the bus baud rate, wherein the plurality of bus load rates include: an unfilled bus load rate and a maximum filled bus load rate; and obtaining a mean value of the unfilled bus load rate and the maximum filled bus load rate to obtain the target bus load rate corresponding to the target communication mode.
[0065] In an optional embodiment, in the case of one communication data, first, a plurality of 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 period, and the bus baud rate, wherein the plurality of bus load rates include: an unfilled bus load rate and a maximum filled bus load rate. For example, a first data length when the communication data is not filled and a second data length after being filled can be calculated based on the data length, respectively. Then, an 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 period, and the bus baud rate, and a maximum filled bus load rate corresponding to the target communication mode can be obtained based on the second data length, the sending period, and the bus baud rate. The unfilled bus load rate and the maximum filled bus load rate can be summarized to obtain the plurality of bus load rates. Second, the mean 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. In an optional embodiment, in the case of multiple communication data, first, a plurality of bus load rates of the vehicle corresponding to the target communication mode can be calculated based on a plurality of data lengths corresponding to the plurality of communication data, the number of communication data, the sending period, and the bus baud rate, wherein the plurality of bus load rates include: an unfilled bus load rate and a maximum filled bus load rate. Finally, the mean 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.
[0066] Optionally, the plurality of 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 period, and the bus baud rate, including: a first data length when the communication data is not filled and a second data length after being filled are calculated based on the data length, respectively; an unfilled bus load rate corresponding to the target communication mode is obtained based on the first data length, the number of communication data, the sending period, and the bus baud rate, and a maximum filled bus load rate corresponding to the target communication mode is obtained based on the second data length, the sending period, and the bus baud rate; and the unfilled bus load rate and the maximum filled bus load rate are summarized to obtain the plurality of bus load rates.
[0067] In an optional embodiment, in the case of one communication data, first, a first data length when the communication data is not filled and a second data length after being filled can be calculated, respectively. Second, an 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 period, and the bus baud rate, and a maximum filled bus load rate corresponding to the target communication mode can be obtained based on the second data length, the sending period, and the bus baud rate. Finally, the unfilled bus load rate and the maximum filled bus load rate can be summarized to obtain the plurality of bus load rates.
[0068] In another alternative embodiment, when the communication data is multiple, first, the first data length of the communication data without padding and the second data length of the communication data after padding can be calculated respectively, then the un-padded load rate corresponding to the target communication mode can be obtained based on the first data length, the number of communication data, the transmission period and the bus baud rate, and the un-padded bus load rate can be obtained by obtaining the un-padded load rate, at the same time, the maximum padding load rate corresponding to the target communication mode can be obtained based on the second data length, the transmission period and the bus baud rate, and the maximum padding bus load rate can be obtained by obtaining the maximum padding load rate, and finally the un-padded bus load rate and the maximum padding bus load rate can be summarized to obtain the bus load rate.
[0069] Optionally, based on the data length, the first data length of the communication data without padding and the second data length of the communication data after padding are calculated respectively, including: determining that the data length is 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 value of the second preset data length and the bus baud rate to obtain the padding bit; and obtaining the sum value of the data length and the padding bit to obtain the second data length.
[0070] In an alternative embodiment, the obtained original data length can be determined as the first data length. The original data length can be obtained by the following formula:
[0071] .
[0072] Wherein, The first data length is in bit (bit).
[0073] The second data length can be obtained by the following formula :
[0074] ;
[0075] Wherein, The second preset data length is a constant, and 1 and 4 are fixed values. The padding bit is in bit. Considering the maximum padding, 1 bit of opposite polarity data is filled after 5 consecutive bits of the same polarity, and the filled bit and the following 4 bits form 5 bits of the same polarity data, so that N bits of data are sent, and the number of padding bits is bit, wherein N is the number of communication data. Considering the most extreme case, from the frame start to the end of the check segment, the maximum padding condition needs to be met, and the length of each communication data is calculated to calculate the maximum padding load rate.
[0076] Optionally, based on the first data length, the number of communication data, the sending period and the bus baud rate, a target communication mode corresponding to an un-filled bus load rate is obtained, and based on the second data length, the sending period and the bus baud rate, a target communication mode corresponding to a maximum filled bus load rate is obtained, including: obtaining a product of the sending period and the bus baud rate to obtain a first product; obtaining a quotient value of the first data length and the first product to obtain an un-filled load rate of the communication data, and obtaining a quotient value of the second data length and the first product to obtain a maximum filled load rate of the communication data; based on the number of communication data, obtaining a sum value of the un-filled load rates of the plurality of communication data to obtain the un-filled bus load rate, and based on the number of communication data, obtaining a sum value of the maximum filled load rates of the plurality of communication data to obtain the maximum filled bus load rate.
[0077] In an optional embodiment, first, a product of the sending period T and the bus baud rate B is obtained to obtain a first product, and second, quotient values of a plurality of first data lengths and the first product are obtained to obtain a plurality of un-filled load rates of a plurality of communication data , wherein, represents the first data length of the i-th communication data, i represents the i-th communication data in the N communication data, represents the sending period of the i-th communication data. Meanwhile, quotient values of a plurality of second data lengths and the first product are obtained to obtain a plurality of maximum filled load rates of the plurality of communication data , wherein, represents the second data length of the h-th communication data, h represents the h-th communication data in the N communication data, represents the sending period of the h-th communication data. Finally, based on the number of communication data, a sum value of the un-filled load rates of the plurality of communication data is obtained to obtain the un-filled bus load rate, and based on the number of communication data, a sum value of the maximum filled load rates of the plurality of communication data is obtained to obtain the maximum filled bus load rate.
[0078] Wherein, the un-filled bus load rate can be obtained by the following formula :
[0079] .
[0080] Wherein, the maximum filled bus load rate can also be obtained by the following formula :
[0081] .
[0082] Optionally, after obtaining the communication information of the vehicle from the local database, the method further comprises: in response to a fourth operation instruction acting on the display interface, displaying the communication information in the display interface.
[0083] In an optional embodiment, after receiving an operation on the fourth component in the display interface, for example, as shown in Figure 2 , a click operation, a press operation, a sliding 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 can be generated in response to the operation, and the software program can display detailed statistical information of 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 flowchart of an optional vehicle bus load rate calculation method according to an embodiment of the application, which is applied to a vehicle bus load rate calculation system, as shown in Figure 3 , the method can include the following steps:
[0085] Step S301, import the CAN database file;
[0086] Step S302, extract the communication information;
[0087] Step S303, determine whether the user has set a target communication mode, if yes, go to step S304, if no, go to step S306;
[0088] Step S304, determine whether the set target communication mode is CAN communication mode, if yes, go to step S307, if no, go to step S305;
[0089] Step S305, set the arbitration field and the control field as the CAN bus baud rate, and the data field as the CAN-FD load rate, and go to step S308;
[0090] Step S306, determine whether the data length is greater than 8 bytes and the baud rate of the CAN database is greater than 500 Kbps, if yes, return to step S305, if no, go to step S307;
[0091] Step S307, set the arbitration field, the control field and the data field as the CAN bus baud rate;
[0092] Step S308, calculate the maximum filled and unfilled bus load rate;
[0093] Step S309, calculate the average bus load rate as the final result;
[0094] Step S310, end.
[0095] Take the standard CAN frame load rate of a 10ms cycle as an example for illustration:
[0096] Standard CAN frame message length
[0097] Message length after maximum padding
[0098] No padding load rate is
[0099] Maximum padding load rate is
[0100] The load rate of a 10ms cycle of a standard CAN frame is about 2.46%.
[0101] According to an embodiment of the present application, a vehicle bus load rate calculation system embodiment is provided, and it should be noted that the system can be used to execute the vehicle bus load rate calculation method described above.
[0102] Figure 4 is a schematic diagram of a vehicle bus load rate calculation system according to an embodiment of the present application. As Figure 4 shown, the vehicle bus load rate calculation system 41 includes a display interface 21 and a software program 42.
[0103] 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 for displaying the target bus load rate; the software program is used to obtain the communication information of the vehicle from a local database, and determine the bus baud rate corresponding to the target communication mode based on the target communication mode of the vehicle, and determine the target bus load rate corresponding to the target communication mode based on the data length in the communication information, the number of communication data in the communication information, the transmission cycle and the bus baud rate.
[0104] The calculation system can allow the user to select each CAN database that has been made from the local, then set the communication mode according to the actual design situation, and finally click the calculation button to calculate the link load rate and the number of messages, and finally click the display statistics button to intuitively see the message length, cycle and the number of messages under each length cycle currently existing on the entire link, providing a reference for adding new messages for function expansion.
[0105] Alternatively, the display interface further includes a first component, wherein the first component is used to obtain the communication information of the vehicle; a second component, wherein the second component is used to determine the target bus load rate corresponding to the target communication mode; a third component, wherein the third component is used to determine the target communication mode of the vehicle; and a fourth component, wherein the fourth component is used to display the communication information.
[0106] In an optional embodiment, the display interface further comprises a first component, a second component, a third component and a fourth component. The first component is configured to acquire the communication information of the vehicle, the second component is configured to determine the target bus load rate corresponding to the target communication mode, the third component is configured to determine the target communication mode of the vehicle, and the fourth component is configured to display the communication information.
[0107] Embodiments of the present application also provide an electronic device, comprising a memory storing an executable program, and a processor configured to execute the program, wherein the program is configured to execute the method in the embodiments of the present application.
[0108] Embodiments of the present application also provide a computer readable storage medium, comprising a stored executable program, wherein the executable program is configured to control a device where the computer readable storage medium is located to execute the method in the embodiments of the present application when the executable program is executed.
[0109] Embodiments of the present application also provide a computer program product, comprising a computer program, wherein the computer program is configured to implement the method in the embodiments of the present application when executed by a processor.
[0110] Embodiments of the present application also provide a computer program product, comprising a non-volatile computer readable storage medium, wherein the non-volatile computer readable storage medium is configured to store a computer program, and the computer program is configured to implement the method in the embodiments of the present application when executed by a processor.
[0111] Embodiments of the present application also provide a computer program, wherein the computer program is configured to implement the method in the embodiments of the present application when executed by a processor.
[0112] In the above embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0113] In the several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the unit described as the division in the embodiment is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.
[0114] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0115] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0116] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical scheme of the present application or the part of the present application which contributes to the prior art or the whole or part of the technical scheme can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various program code storage media.
[0117] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A method of calculating a load rate of a vehicle bus, characterized by, The method comprises: 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 a plurality of controllers inside the vehicle, and the communication information at least includes: at least one communication data between the plurality of controllers, a data length of the communication data, a communication baud rate of the communication data, a transmission period of the plurality of controllers transmitting the communication data, and a number of the communication data; determining a bus baud rate corresponding to a target communication mode of the vehicle based on the target communication mode, wherein the target communication mode includes one of: 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 number of the communication data, the transmission period and the bus baud rate; displaying the target bus load rate in the display interface; The method further comprises: in response to receiving a third operation instruction in the display interface, determining that a communication mode corresponding to the third operation instruction is the target communication mode of the vehicle; in response to not receiving a third operation instruction in the display interface, determining the target communication mode of the vehicle based on the communication baud rate or the data length; determining the target communication mode of the vehicle based on the communication baud rate or the data length comprises: in response to the local database storing a determination strategy corresponding to the communication baud rate, determining the target communication mode based on the determination strategy and the communication baud rate; in response to the local database not storing the determination strategy, determining the target communication mode based on the data length.
2. The method of claim 1, wherein, determining the target communication mode based on the determination strategy and the communication baud rate comprises: in response to the communication baud rate matching a threshold value 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 value, determining that the target communication mode is a controller area network-flexible data rate communication mode.
3. The method of claim 1, wherein, determining the target communication mode based on the data length comprises: 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.
4. The method of claim 1, wherein, determining the bus baud rate corresponding to the target communication mode comprises: in response to the target communication mode being a controller area network communication mode, determining that the first baud rate and the second baud rate are first preset values; In response to the target communication mode being a controller area network-flexible data rate communication mode, the first baud rate is determined as the first preset value, and the second baud rate is determined as a second preset value, where the second preset value is greater than the first preset value.
5. The method of claim 1, wherein, The target bus load rate corresponding to the target communication mode is determined based on the data length, the number of communication data, the transmission period, and the bus baud rate, including: A plurality of bus load rates of the vehicle corresponding to the target communication mode are calculated based on the data length, the number of communication data, the transmission period, and the bus baud rate, where 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.
6. The method of claim 5, wherein, A plurality of bus load rates of the vehicle corresponding to the target communication mode are calculated based on the data length, the number of communication data, the transmission period, and the bus baud rate, including: Based on the data length, a first data length when the communication data is unfilled and a second data length after being filled are respectively calculated. The unfilled bus load rate corresponding to the target communication mode is obtained based on the first data length, the number of communication data, the transmission period, and the bus baud rate, and the maximum filled bus load rate corresponding to the target communication mode is obtained based on the second data length, the transmission period, and the bus baud rate. The plurality of bus load rates are obtained by summarizing the unfilled bus load rate and the maximum filled bus load rate.
7. The method of claim 6, wherein, Based on the data length, a first data length when the communication data is unfilled and a second data length after being filled are respectively calculated, including: The data length is determined as the first data length. A second preset data length is obtained by removing a frame start length, a response segment length, a frame end length, and an interval segment length in the data length. A quotient value of the second preset data length and the bus baud rate is obtained to obtain a padding bit. A sum value of the data length and the padding bit is obtained to obtain the second data length.
8. The method of claim 6, wherein, The unfilled bus load rate corresponding to the target communication mode is obtained based on the first data length, the number of communication data, the transmission period, and the bus baud rate, and the maximum filled bus load rate corresponding to the target communication mode is obtained based on the second data length, the transmission period, and the bus baud rate, including: A first product is obtained by multiplying the transmission period and the bus baud rate. A quotient value of the first data length and the first product is obtained to obtain an unfilled load rate of the communication data, and a quotient value of the second data length and the first product is obtained to obtain a maximum filled load rate of the communication data. An adder is configured to obtain a sum of the unpopulated bus load rates of the plurality of communication data based on the number of the communication data, to obtain a sum of the maximum populated bus load rates of the plurality of communication data based on the number of the communication data, and to obtain the unpopulated total bus load rate and the maximum populated total bus load rate.
9. The method of claim 1, wherein, After obtaining the communication information of the vehicle from the local database, the method further comprises: In response to a fourth operation instruction acting on the display interface, the communication information is displayed in the display interface.
10. A system for calculating a vehicle bus load rate, the system comprising: Comprise: A display interface is configured to display a target bus load rate of the vehicle, wherein the display interface comprises at least a display area configured to display the target bus load rate. A software program is configured to obtain communication information of the vehicle from a local database in response to a first operation instruction acting on the display interface, wherein the communication information is communication information between a plurality of controllers inside the vehicle, the communication information comprises at least one communication data between the plurality of controllers, a data length of the communication data, a communication baud rate of the communication data, a transmission period of the plurality of controllers transmitting the communication data, and a number of the communication data; and determine a bus baud rate corresponding to a target communication mode based on the target communication mode, wherein the target communication mode comprises one of a controller area network communication mode or a controller area network-flexible data rate communication mode, the bus baud rate comprises a first baud rate of an arbitration segment and a second baud rate of a data segment; and determine a target bus load rate corresponding to the target communication mode based on the data length in the communication information, the number of the communication data in the communication information, the transmission period, and the bus baud rate in response to a second operation instruction acting on the display interface; and determine the target communication mode of the vehicle based on the communication baud rate or the data length in response to receiving a third operation instruction in the display interface or not; determine the target communication mode of the vehicle based on the communication baud rate or the data length, comprising: determining the target communication mode based on a determination strategy corresponding to the communication baud rate and the determination strategy stored in the local database in response to the determination strategy; or determining the target communication mode based on the data length in response to the determination strategy not being stored in the local database.
11. The system of claim 10, wherein, The display interface further comprises: A first component, wherein the first component is configured to obtain the communication information of the vehicle; A second component, wherein the second component is configured to determine a target bus load rate corresponding to the target communication mode; A third component, wherein the third component is configured to determine the target communication mode of the vehicle; A fourth component, wherein the fourth component is configured to display the communication information.
12. An electronic device, comprising: Comprise: A memory storing an executable program; A processor configured to execute the program, wherein the program performs the method of any one of claims 1-9 when executed.
13. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored executable program, wherein the executable program controls a device in which the storage medium is located to perform the method of any one of claims 1-9 when executed.
14. A computer program product, characterised in that, A computer program that, when executed by a processor, implements the method of any one of claims 1-9.
Citation Information
Patent Citations
Engineering machinery and network optimization method and device thereof
CN112769714A
CANFD bus load rate calculation method
CN114500155A