CN115967656A - Load rate determining method and device and computer readable storage medium - Google Patents
Load rate determining method and device and computer readable storage medium Download PDFInfo
- Publication number
- CN115967656A CN115967656A CN202211658250.5A CN202211658250A CN115967656A CN 115967656 A CN115967656 A CN 115967656A CN 202211658250 A CN202211658250 A CN 202211658250A CN 115967656 A CN115967656 A CN 115967656A
- Authority
- CN
- China
- Prior art keywords
- load rate
- bus
- message
- sending period
- rate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 238000004891 communication Methods 0.000 claims abstract description 83
- 238000012545 processing Methods 0.000 claims abstract description 46
- 230000005540 biological transmission Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 abstract description 7
- 230000006870 function Effects 0.000 description 9
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000004590 computer program Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
The embodiment of the disclosure relates to the technical field of vehicles, and discloses a load rate determining method, a device and a computer readable storage medium, wherein the load rate determining method, the device and the computer readable storage medium are used for determining the load rate by acquiring the communication rate and the message sending period of a CAN bus and the data bit information of a message transmitted on the CAN bus; determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; and determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus. By applying the technical scheme, the load rate of the CAN bus CAN be calculated more simply and rapidly, other additional processing tools are not needed, and the calculation cost is lower.
Description
Technical Field
The present disclosure relates to the field of vehicle technologies, and in particular, to a method and an apparatus for determining a load factor, and a computer-readable storage medium.
Background
When designing a control Network of a vehicle, it is generally necessary to optimize the Network design according to a bus load rate of a Controller Area Network (CAN) in the vehicle control Network.
Currently, the load rate of the CAN bus is simulated by using a tool such as CANoe. The specific simulation process is as follows: and inputting message data in the CAN bus into a dbc file generating tool, and outputting the dbc file by the dbc file generating tool. The dbc file is then input into the CANoe tool, which outputs the CAN bus load rate. The processing mode is not only complicated in flow, but also high in use cost of a dbc file generation tool and a CANoe tool. Therefore, how to determine the loading rate of the CAN bus in a simpler and low-cost manner is a problem to be solved urgently.
Disclosure of Invention
The embodiment of the disclosure provides a load rate determining method, a load rate determining device and a computer-readable storage medium, which are used for solving the problems in the prior art that: the problem of how to determine the load rate of the CAN network in a simpler and low-cost way is solved.
In order to achieve the above purpose, the embodiments of the present disclosure adopt the following technical solutions:
in a first aspect, a method for determining a load factor is provided, where the method includes: acquiring the communication rate and the message sending period of the CAN bus and the data bit information of the message transmitted on the CAN bus; determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; and determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus.
With reference to the first aspect, in a possible implementation manner, the determining a load rate corresponding to each packet according to a communication rate, a packet sending period, and data bit information of each packet transmitted on a CAN bus includes: determining the maximum load rate corresponding to each message according to the communication rate, the first sending period and the data bit information of the message; and determining the minimum load rate corresponding to each message according to the communication rate, the second sending period and the data bit information of the message.
With reference to the first aspect, in one possible implementation manner, the maximum load rate is obtained by the following formula:
the minimum load factor is obtained by the following formula:
wherein, the cycleFast is a first sending period, x is a preset coefficient, cycleNarmal is a second sending period, speed is a communication rate, and messageload is the rate of the message max The maximum load rate corresponding to the message, messageload min The minimum load rate corresponding to the message.
With reference to the first aspect, in a possible implementation manner, the data bit information of the packet includes byte information of a structure segment corresponding to the packet, and the structure segment includes a standard frame or an extended frame.
With reference to the first aspect, in a possible implementation manner, the determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus includes: determining the maximum load rate of the CAN bus according to the maximum load rate of the standard frame and the maximum load rate of the extended frame; and determining the minimum load rate of the CAN bus according to the minimum load rate of the standard frame and the minimum load rate of the extended frame.
With reference to the first aspect, in one possible implementation manner, the maximum load rate of the CAN bus is obtained by the following formula:
the minimum load rate of the CAN bus is obtained by the following formula:
wherein n is the number of messages transmitted on the CAN bus, i is the ith message transmitted on the CAN bus, messageload max (i) The maximum load rate of the ith message transmitted on the CAN bus; messageload min(i) The minimum load rate of the ith message transmitted on the CAN bus is obtained; busLoad max Is the maximum load rate of the CAN bus, busLoad min Is the minimum duty cycle of the CAN bus.
In a second aspect, the present disclosure provides a load factor determination apparatus, including: the device comprises an acquisition module and a processing module.
And the acquisition module is used for acquiring the communication rate of the CAN bus, the message sending period and the data bit information of the message transmitted on the CAN bus.
The processing module is used for determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; and the processing module is also used for determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus.
With reference to the second aspect, in a possible implementation manner, the message sending period includes a first sending period and a second sending period, the first sending period is smaller than the second sending period, the load rate corresponding to the message includes a maximum load rate and a minimum load rate, and the processing module includes: a first processing unit and a second processing unit.
And the first processing unit is used for determining the maximum load rate corresponding to each message according to the communication rate, the first sending period and the data bit information of the message.
And the second processing unit is used for determining the minimum load rate corresponding to each message according to the communication rate, the second sending period and the data bit information of the message.
With reference to the second aspect, in one possible implementation manner, the maximum load rate is obtained by the following formula:
the minimum load factor is obtained by the following formula:
wherein, the cycleFast is a first sending period, X is a preset coefficient, cycleNamal is a second sending period, speed is a communication rate, and messageload is max The maximum load rate corresponding to the message, messageload min And the minimum load rate corresponding to the message.
With reference to the second aspect, in a possible implementation manner, the data bit information of the packet includes byte information of a structure segment corresponding to the packet, and the structure segment includes a standard frame or an extended frame.
With reference to the second aspect, in a possible implementation manner, the maximum load rate corresponding to each packet includes a standard frame maximum load rate and an extended frame maximum load rate, the minimum load rate corresponding to each packet includes a standard frame minimum load rate and an extended frame minimum load rate, and the processing module further includes a third processing unit and a fourth processing unit.
And the third processing unit is used for determining the maximum load rate of the CAN bus according to the maximum load rate of the standard frame and the maximum load rate of the extended frame.
And the fourth processing unit is used for determining the minimum load rate of the CAN bus according to the minimum load rate of the standard frame and the minimum load rate of the extended frame.
With reference to the second aspect, in one possible implementation manner, the maximum load rate of the CAN bus is obtained by the following formula:
the minimum load rate of the CAN bus is obtained by the following formula:
wherein n is CAN busThe number of messages transmitted on the line, i is the ith message transmitted on the CAN bus, messageload max (i) The maximum load rate of the ith message transmitted on the CAN bus; messageload min(i) The minimum load rate of the ith message transmitted on the CAN bus; busLoad max Is the maximum load rate of the CAN bus, busLoad min Is the minimum duty cycle of the CAN bus.
In a third aspect, an electronic device is provided that includes a processor, a memory, a communication interface, and a communication bus. The processor, the memory and the communication interface are communicated with each other through a communication bus. The memory is for storing computer instructions. The computer instructions, when executed on a processor, cause the processor to perform the load rate determination method as defined in any one of the first aspects above.
In a fourth aspect, a computer-readable storage medium is provided, in which computer instructions are stored, which, when run on an electronic device, cause the electronic device to perform the load factor determination method as described in any one of the first aspects above.
In a fifth aspect, there is provided a computer program product comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the load rate determination method as defined in any one of the first aspects above.
It should be noted that the computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer readable storage medium may be packaged with or without a processor of the server, which is not limited in this disclosure.
Reference may be made to the detailed description of the first aspect for a description of the second to fifth aspects of the disclosure; in addition, for the beneficial effects described in the second aspect to the fifth aspect, reference may be made to the beneficial effect analysis of the first aspect, and details are not described here.
In the present disclosure, the names of the above-mentioned electronic devices do not limit the devices or functional modules themselves, and in actual implementation, the devices or functional modules may appear by other names. Insofar as the functions of the respective devices or functional modules are similar to those of the present disclosure, they are within the scope of the claims of the present disclosure and their equivalents.
These and other aspects of the disclosure will be more readily apparent from the following description.
Compared with the prior art, the technical scheme provided by the disclosure has the following advantages: the load rate determining method provided by the disclosure obtains the communication rate of the CAN bus, the message sending period and the data bit information of the message transmitted on the CAN bus; then determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; and finally, determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus. Therefore, the load rate of the CAN bus CAN be determined simply and quickly. Meanwhile, the calculation cost is lower without the help of additional processing tools (such as a dbc file generation tool and a CANoe tool) for replacing the other processing tools.
The foregoing is a summary of the embodiments of the present disclosure, and the following is a detailed description of the embodiments of the present disclosure in order to make the technical solutions of the embodiments of the present disclosure more clearly understood.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a first embodiment of a load factor determining method according to an embodiment of the present disclosure;
fig. 2 is a flowchart of another embodiment of a load factor determining method according to an embodiment of the present disclosure;
fig. 3 is a flowchart of a load factor determining method according to another embodiment of the disclosure;
fig. 4 is a schematic structural diagram of a load factor determining apparatus according to a first embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an embodiment of a load factor determining device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present disclosure, "a plurality" means two or more unless otherwise specified. "A and/or B" includes the following three combinations: a alone, B alone, and a combination of A and B.
Fig. 1 shows a flowchart of a first embodiment of a load rate determining method provided by the present disclosure, which is performed by a load rate determining device. As shown in fig. 1, the load factor determining method includes the steps of:
step 110: and acquiring the communication rate of the CAN bus, the CAN message sending period and the data bit information of the message transmitted on the CAN bus.
At present, the communication rate of the CAN bus CAN reach 1Mb/s at most, and the rate used by most CAN buses is 100 kbit/s-500 kbit/s. The communication rate of the CAN bus may be determined according to the length of the CAN bus. For example, the length of the CAN bus is within 40m, and the communication speed of the CAN bus CAN reach 1Mbit/s at most. The length of the CAN bus is within 40-100 m, and the highest communication rate of the CAN bus CAN reach 500kbit/s. The length of the CAN bus is within 100-500 m, and the highest communication rate of the CAN bus CAN reach 125kbit/s. The length of the CAN bus is within 500-1000 m, and the highest communication rate of the CAN bus CAN reach 50kbit/s.
In addition, the communication rate of the CAN bus CAN be determined according to the use of the CAN bus. For example, the CAN bus associated with power control typically has a rate of 250-500 kbit/s, and the CAN bus associated with vehicle comfort systems typically has a rate of 125kbit/s.
The CAN messaging period may be 10ms,20ms,50ms,100ms,200ms, etc.
The frame structure of a CAN frame transmitted on a CAN bus includes a frame start section, an arbitration section, a control section, a CRC section, a data section, a frame interval section, an acknowledgement section (ACK section), and a frame end section. And packing the frame starting segment, the arbitration segment, the control segment, the CRC segment, the data segment, the frame interval segment, the ACK segment and the frame ending segment according to a specific format, thereby obtaining the message. When the message is sent, the data transmitted by the message can be obtained only by reading the message according to the appointed format by the receiving party.
Step 120: and determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus.
After the communication rate of the CAN bus, the CAN message sending period and the data bit information of the messages transmitted on the CAN bus are obtained, the load rate corresponding to each message CAN be determined according to the communication rate, the message sending period and the data bit information corresponding to each message.
Step 130: and determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus.
Generally, there are a plurality of message data transmitted on the CAN bus, and determining the load rate of the CAN bus specifically includes determining the load rate corresponding to each message transmitted on the CAN bus, and then accumulating the load rates corresponding to each message to obtain the load rate of the CAN bus.
The load rate determining method provided by the embodiment of the disclosure obtains the communication rate and the message sending period of the CAN bus and the data bit information of the message transmitted on the CAN bus; then determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; and finally, determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus. By applying the technical scheme, the load rate of the CAN bus CAN be simply and quickly determined. Meanwhile, the method does not need to be assisted by an additional processing tool for the method, and the calculation cost is lower.
Fig. 2 shows a flowchart of another embodiment of a load rate determination method provided by the present disclosure, which is performed by a load rate determination device. As shown in fig. 2, the load factor determining method includes the steps of:
step 210: and acquiring the communication rate and the message sending period of the CAN bus and the data bit information of the message transmitted on the CAN bus.
Step 220: and determining the maximum load rate corresponding to each message according to the communication rate, the first sending period and the data bit information of the message.
The message sending period comprises a first sending period and a second sending period, the first sending period is smaller than the second sending period, and the load rate corresponding to the message comprises a maximum load rate and a minimum load rate.
Specifically, the first transmission period may be referred to as a fast transmission period. The second transmission period may be referred to as a normal transmission period.
In some embodiments, the maximum load rate corresponding to the packet may be determined according to the communication rate, the first sending period, and the data bit information of the packet. The maximum load rate can be obtained by the following equation:
wherein speed is communication speed, X is a preset coefficient, cycleFast is a first sending period, messageload max The maximum load rate corresponding to the message. Illustratively, X is 6/5.
The CAN communication protocol specifies that when 5 identical messages are continuously transmitted, 1 bit-added message needs to be transmitted, and the content of the bit-added message is opposite to that of the first 5 messages. The padding message is used for identifying the number of sent messages and has no actual meaning. Therefore, when calculating the maximum load rate, such a case of transmitting 6 messages, but actually transmitting only 5 messages, is also considered. Therefore, X is set to 6/5.
Illustratively, as seen in connection with step 110, a message includes a start of frame segment, an arbitration segment, a control segment, a CRC segment, a data segment, an inter-frame segment, an acknowledgement segment (ACK segment), and an end of frame segment. Wherein, the frame start section is composed of 1bit byte, the control section is composed of 6bit byte, the CRC check section is composed of 16bit byte, the data section is composed of 8 × dlc bit byte, the frame interval section is composed of 3bit byte, the response section is composed of 2bit byte, and the frame end section is composed of 7bit byte.
Optionally, the frame format of the message includes a standard frame or an extended frame.
When the frame format of the packet is a standard frame, the arbitration segment may be considered to be composed of 12-bit bytes corresponding to the standard frame. When the frame format of the packet is an extended frame, the arbitration segment may be considered to be composed of 32-bit bytes corresponding to the extended frame.
When the frame format of the packet is a standard frame, the data bit information of the packet may be obtained by accumulating a byte corresponding to a frame start segment, a byte corresponding to an arbitration segment (standard frame), a byte corresponding to a control segment, a byte corresponding to a CRC segment, a byte corresponding to a data segment, a byte corresponding to a frame interval segment, a byte corresponding to an acknowledgement segment (ACK segment), and a byte corresponding to a frame end segment. The data bit information of the message =1+12+6+16+8 + dlc +3+2+ 7+ 47+8 + dlc, i.e., the data bit information corresponding to the standard frame is 47+8 + dlc.
When the frame format of the packet is an extended frame, the data bit information of the packet may be obtained by accumulating a byte corresponding to a start segment of the frame, a byte corresponding to an arbitration segment (extended frame), a byte corresponding to a control segment, a byte corresponding to a CRC segment, a byte corresponding to a data segment, a byte corresponding to a frame interval segment, and an acknowledgement segment (ACK segment). The data bit information of the message =1+32+6+16+8 + dlc +3+2+ 7+ 67+8 + dlc, that is, the data bit information corresponding to the extended frame is 67+8 + dlc.
Therefore, when the frame format of the message is a standard frame, the maximum load rate corresponding to the message can be obtained by the following formula:
when the frame format of the packet is an extended frame, the maximum load rate corresponding to the packet can be obtained by the following formula:
step 230: and determining the minimum load rate corresponding to each message according to the communication rate, the second sending period and the data bit information of the message.
In some embodiments, according to the communication rate, the first transmission period, and the data bit information of the packet, the minimum load rate corresponding to each packet may be determined. The minimum load factor is obtained by the following formula:
wherein, cycleNarm is the second sending period, messageload min The minimum load rate corresponding to the message.
In conjunction with step 220, the frame format of the message includes a standard frame and an extended frame. When the frame format of the message is a standard frame, the data bit information of the message is: 47+8 dlc, the minimum load rate corresponding to the message may be obtained through the following formula:
when the frame format of the message is an extended frame, the data bit information of the message is: 67+ 8. Then, the minimum load rate corresponding to the packet may be obtained by the following formula:
step 240: and determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus.
Specifically, the maximum load rate and the minimum load rate corresponding to each message may be determined based on step 220 and step 230, and the load rate of the CAN bus may be determined according to the maximum load rate and the minimum load rate corresponding to each message transmitted on the CAN bus.
The maximum load rate of the CAN bus CAN be determined according to the maximum load rate corresponding to each message transmitted on the CAN bus. And determining the minimum load rate of the CAN bus according to the minimum load rate corresponding to each message transmitted on the CAN bus.
In the embodiment of the present disclosure, the message sending period includes a first sending period (fast sending period) and a second sending period (normal sending period). Therefore, the load rate of the corresponding calculated message based on different sending periods can be ensured, and the obtained calculation result is more accurate.
Fig. 3 shows a flowchart of another embodiment of a load rate determining method provided by the present disclosure, which is executed by a load rate determining apparatus. As shown in fig. 3, the load factor determining method includes the steps of:
step 310: and acquiring the communication rate and the message sending period of the CAN bus and the data bit information of the message transmitted on the CAN bus.
Step 320: and determining the maximum load rate of the first load rate corresponding to each message according to the communication rate, the first sending period and the data bit information of the message.
Step 330: and determining the minimum load rate corresponding to each message according to the communication rate, the second sending period and the data bit information of the message.
Step 340: and determining the maximum load rate of the CAN bus according to the maximum load rate of the standard frame and the maximum load rate of the extended frame.
The maximum load rate corresponding to each message comprises a standard frame maximum load rate and an extended frame maximum load rate. And when the frame format of the message is a standard frame, determining the maximum load rate as the maximum load rate of the standard frame. And when the frame format of the message is an extended frame, determining the maximum load rate as the maximum load rate of the extended frame.
In some embodiments, in combination with step 220, the message sending period includes a first sending period, and the maximum load rate is the load rate of the message determined when the message sending period is the first sending period.
Generally, there are multiple messages transmitted on the CAN bus, and taking the sending cycle of the multiple messages as the first sending cycle as an example, the maximum load rate corresponding to each message may be determined first. And then accumulating the maximum load rates of all messages to obtain the maximum load rate of the CAN bus.
Illustratively, when there are n messages transmitted on the CAN bus, where n is greater than or equal to 1. The maximum load rate of the CAN bus CAN be obtained by the following equation:
wherein n is the number of messages transmitted on the CAN bus, i is the ith message transmitted on the CAN bus, messageload max(i) The maximum load rate of the ith message transmitted on the CAN bus; busLoad max The maximum load rate of the CAN bus.
Step 350: and determining the minimum load rate of the CAN bus according to the minimum load rate of the standard frame and the minimum load rate of the extended frame.
The minimum load rate corresponding to each message comprises a standard frame minimum load rate and an extended frame minimum load rate. And when the frame format of the message is a standard frame, determining the minimum load rate as the minimum load rate of the standard frame. And when the frame format of the message is an extended frame, determining the minimum load rate as the minimum load rate of the extended frame.
When there are multiple messages transmitted on the CAN bus, taking the sending cycle of the multiple messages as the second sending cycle as an example, the minimum load rate corresponding to each message may be determined first. And then accumulating the minimum load rates of all the messages to obtain the minimum load rate of the CAN bus.
Illustratively, when there are n messages transmitted on the CAN bus, where n is greater than or equal to 1. The minimum duty cycle of the CAN bus CAN be obtained by the following formula:
wherein, messageload min(i) The minimum load rate of the ith message transmitted on the CAN bus is obtained; busLoad min Is the minimum duty cycle of the CAN bus.
After the minimum load rate and the maximum load rate of the CAN bus are determined, the value range of the load rate of the CAN bus CAN be determined. The load factor of the CAN bus has a value range of [ minimum load factor, maximum load factor ]. And finally, the CAN network design CAN be optimized according to the value range of the load rate of the CAN bus.
In summary, the present disclosure provides a method for determining a load factor, by obtaining a communication rate of a CAN bus, a message sending period, and data bit information of a message transmitted on the CAN bus; then determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; and finally, determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus. By applying the technical scheme, the load rate of the CAN bus CAN be simply and quickly determined. Meanwhile, the method does not need to be used by means of additional processing tools (such as a dbc file generation tool and a CANoe tool) for the method, and is lower in calculation cost.
It is understood that the electronic device includes hardware structures and/or software modules for performing the functions in order to realize the functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed in hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments.
The embodiment of the disclosure also provides a load factor determining device. Fig. 4 is a schematic structural diagram of a load factor determining apparatus 400 according to an embodiment of the disclosure. The apparatus 400 may include: an acquisition module 401 and a processing module 402.
The obtaining module 401 is configured to obtain a communication rate of the CAN bus, a message sending period, and data bit information of a message transmitted on the CAN bus.
A processing module 402, configured to determine a load rate corresponding to each packet according to a communication rate, a packet sending period, and data bit information of each packet transmitted on the CAN bus; the processing module 402 is further configured to determine a load rate of the CAN bus according to a load rate corresponding to each message transmitted on the CAN bus.
In another possible implementation manner, the message sending period includes a first sending period and a second sending period, the first sending period is smaller than the second sending period, and the load rates corresponding to the messages include a maximum load rate and a minimum load rate. The processing module 402 includes: a first processing unit and a second processing unit.
And the first processing unit is used for determining the maximum load rate corresponding to each message according to the communication rate, the first sending period and the data bit information of the message.
And the second processing unit is used for determining the minimum load rate corresponding to each message according to the communication rate, the second sending period and the data bit information of the message.
In another possible implementation, the maximum load rate is obtained by the following formula:
the minimum load factor is obtained by the following formula:
wherein, the cycleFast is a first sending period, X is a preset coefficient, cycleNamal is a second sending period, speed is a communication rate, and messageload is max The message load is the maximum load rate corresponding to the message min The minimum load rate corresponding to the message.
In another possible implementation manner, the data bit information of the packet includes byte information of a structure segment corresponding to the packet, and the structure segment includes a standard frame or an extended frame.
In another possible implementation manner, the maximum load rate corresponding to each packet includes a standard frame maximum load rate and an extended frame maximum load rate, the minimum load rate corresponding to each packet includes a standard frame minimum load rate and an extended frame minimum load rate, and the processing module further includes a third processing unit and a fourth processing unit.
The third processing unit is used for determining the maximum load rate of the CAN bus according to the maximum load rate of the standard frame and the maximum load rate of the extended frame;
and the fourth processing unit is used for determining the minimum load rate of the CAN bus according to the minimum load rate of the standard frame and the minimum load rate of the extended frame.
In another possible implementation, the maximum load rate of the CAN bus is obtained by the following formula:
the minimum load rate of the CAN bus is obtained by the following formula:
wherein, n is the number of messages transmitted on the CAN bus, i is the ith message transmitted on the CAN bus, messageload max (i) The maximum load rate of the ith message transmitted on the CAN bus; messageload min(i) The minimum load rate of the ith message transmitted on the CAN bus; busLoad max Is the maximum load rate of the CAN bus, busLoad min Is the minimum duty cycle of the CAN bus.
Of course, the load factor determination apparatus 400 provided by the embodiment of the present disclosure includes, but is not limited to, the above modules.
The present disclosure provides a load factor determining apparatus 400, first, an obtaining module 401 obtains a communication rate of a CAN bus, a message sending period, and data bit information of a message transmitted on the CAN bus. Then, the processing module 402 determines the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; finally, the processing module 402 determines the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus. By applying the technical scheme disclosed by the invention, the load rate of the CAN bus CAN be calculated more simply and rapidly, and meanwhile, other additional processing tools are not needed, so that the calculation cost is lower.
Fig. 5 illustrates a schematic structural diagram of an embodiment of the load factor determining device provided in the present disclosure, and a specific embodiment of the present disclosure does not limit a specific implementation of the determining device of the line-of-sight aggregation area.
As shown in fig. 5, the load rate determining apparatus may include: a processor (processor) 502, a Communications Interface (Communications Interface) 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may be specifically configured to execute relevant steps in the foregoing load factor determination method embodiment.
In particular, program 510 may include program code comprising computer-executable instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement embodiments of the present disclosure. The one or more processors included in the device for determining the gaze concentration area may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
A memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Specifically, the program 510 may be invoked by the processor 502 to cause the load rate determining device to perform the following operations:
acquiring the communication rate and the message sending period of the CAN bus and the data bit information of the message transmitted on the CAN bus;
determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus;
and determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus.
In an optional manner, the determining, by the message sending cycle including a first sending cycle and a second sending cycle, the first sending cycle being smaller than the second sending cycle, the load rates corresponding to the messages including a maximum load rate and a minimum load rate, the maximum load rate being greater than the minimum load rate, and according to the communication rate, the message sending cycle, and data bit information of each message transmitted on the CAN bus, the load rate corresponding to each message includes:
determining the maximum load rate corresponding to each message according to the communication rate, the first sending period and the data bit information of the message;
and determining the minimum load rate corresponding to each message according to the communication rate, the second sending period and the data bit information of the message.
In an alternative manner, the maximum load rate is obtained by the following equation:
the minimum load factor is obtained by the following formula:
wherein, the cycleFast is a first sending period, the cycleNarmal is a second sending period, the speed is a communication speed, and the messageload is max The maximum load rate corresponding to the message, messageload min The minimum load rate corresponding to the message.
In an alternative mode, the data bit information of the packet includes byte information of a structure segment corresponding to the packet, and the structure segment includes a standard frame or an extended frame.
In an optional manner, the determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus includes:
determining the maximum load rate of the CAN bus according to the maximum load rate of the standard frame and the maximum load rate of the extended frame;
and determining the minimum load rate of the CAN bus according to the minimum load rate of the standard frame and the minimum load rate of the extended frame.
In an alternative manner, the maximum load rate of the CAN bus is obtained by the following formula:
the minimum load rate of the CAN bus is obtained by the following formula:
wherein, n is the number of messages transmitted on the CAN bus, i is the ith message transmitted on the CAN bus, messageload max(i) The maximum load rate of the ith message transmitted on the CAN bus; messageload min (i) The minimum load rate of the ith message transmitted on the CAN bus; busLoad max The maximum load rate of the CAN bus; busLoad min Is the minimum duty cycle of the CAN bus.
The load rate determining device provided in the embodiment of the present disclosure is a memory 506 of the load rate determining device, and is used to store a program 510, where the program 510 may be specifically called by the processor 502 to implement: firstly, acquiring the communication rate and the message sending period of a CAN bus and the data bit information of a message transmitted on the CAN bus; then determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus; and finally, determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus. Therefore, the load rate of the CAN bus CAN be determined simply and quickly. Meanwhile, the calculation cost is lower without the help of additional processing tools (such as a dbc file generation tool and a CANoe tool) for replacing the other processing tools.
Embodiments of the present disclosure also provide a computer-readable storage medium having computer instructions stored thereon. The computer instructions, when executed on the electronic device, cause the electronic device to perform the various functions or steps performed by the electronic device in the above-described method embodiments.
For example, the computer readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.
Embodiments of the present disclosure further provide a computer program product including computer instructions, which, when run on an electronic device, cause the electronic device to perform various functions or steps performed by the electronic device in the foregoing method embodiments.
In addition, the electronic device, the computer-readable storage medium, or the computer program product provided in the embodiments of the present disclosure are all used for executing the corresponding methods provided above, and therefore, the beneficial effects achieved by the electronic device, the computer-readable storage medium, or the computer program product may refer to the beneficial effects in the corresponding methods provided above, and are not described herein again.
It can be clearly understood by those skilled in the art from the foregoing description of the embodiments that, for convenience and simplicity of description, only the division of the functional modules is used for illustration, and in practical applications, the above function allocation may be performed by different functional modules according to needs, that is, the internal structure of an apparatus (e.g., an electronic device) is divided into different functional modules to perform all or part of the functions described above. For the specific working processes of the system, the apparatus (e.g., the electronic device) and the unit described above, reference may be made to corresponding processes in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus (e.g., electronic device) and method may be implemented in other manners. For example, the above-described embodiments of an apparatus (e.g., an electronic device) are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and an actual implementation may have another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above is only a specific embodiment of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present disclosure, and shall be covered by the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims (10)
1. A method for load rate determination, the method comprising:
acquiring the communication rate and the message sending period of a CAN bus and the data bit information of a message transmitted on the CAN bus;
determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus;
and determining the load rate of the CAN bus according to the load rate corresponding to each message transmitted on the CAN bus.
2. The method according to claim 1, wherein the message sending period comprises a first sending period and a second sending period, the first sending period is smaller than the second sending period, and the load rates corresponding to the messages comprise a maximum load rate and a minimum load rate; the determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus comprises:
determining the maximum load rate corresponding to each message according to the communication rate, the first sending period and the data bit information of the message;
and determining the minimum load rate corresponding to each message according to the communication rate, the second sending period and the data bit information of the message.
3. The method of claim 2, wherein the maximum load rate is obtained by the following equation:
the minimum load rate is obtained by the following formula:
wherein the cycleFast is the first sending period, the X is a preset coefficient, the cycleNarmal is the second sending period, and the speed is the communication rate and the messageload max The maximum load rate corresponding to the message, messageload min And the minimum load rate corresponding to the message is obtained.
4. The method of claim 2, wherein the data bit information of the packet comprises byte information of a structural segment corresponding to the packet, and the structural segment comprises a standard frame or an extended frame.
5. The method according to claim 4, wherein the maximum load rate corresponding to each of the packets includes a standard frame maximum load rate and an extended frame maximum load rate, the minimum load rate corresponding to each of the packets includes a standard frame minimum load rate and an extended frame minimum load rate, and the determining the load rate of the CAN bus according to the load rate corresponding to each of the packets transmitted on the CAN bus comprises:
determining the maximum load rate of the CAN bus according to the maximum load rate of the standard frame and the maximum load rate of the extension frame;
and determining the minimum load rate of the CAN bus according to the minimum load rate of the standard frame and the minimum load rate of the extension frame.
6. The method of claim 5, wherein the maximum load rate of the CAN bus is obtained by the following equation:
the minimum load rate of the CAN bus is obtained by the following formula:
wherein n is the number of messages transmitted on the CAN bus, i is the ith message transmitted on the CAN bus, messageload max(i) The maximum load rate of the ith message transmitted on the CAN bus is obtained; messageload min (i) The minimum load rate of the ith message transmitted on the CAN bus is obtained; the busLoad max Is the maximum load rate of the CAN bus; the busLoad min Is the minimum duty cycle of the CAN bus.
7. A load factor determination device, characterized in that the load factor determination device comprises:
the CAN bus communication device comprises an acquisition module, a transmission module and a control module, wherein the acquisition module is used for acquiring the communication rate of a CAN bus, the message transmission period and the data bit information of a message transmitted on the CAN bus;
the processing module is used for determining the load rate corresponding to each message according to the communication rate, the message sending period and the data bit information of each message transmitted on the CAN bus;
the processing module is further configured to determine a load rate of the CAN bus according to a load rate corresponding to each message transmitted on the CAN bus.
8. The apparatus according to claim 7, wherein the packet sending period includes a first sending period and a second sending period, the first sending period is smaller than the second sending period, the load rates corresponding to the packets include a maximum load rate and a minimum load rate, and the processing module includes a first processing unit and a second processing unit;
the first processing unit is configured to determine the maximum load rate corresponding to the packet according to the communication rate, the first sending period, and data bit information of the packet;
and the second processing unit is configured to determine the minimum load rate corresponding to the packet according to the communication rate, the second sending period, and the data bit information of the packet.
9. A load factor determination device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is configured to store at least one executable instruction that causes the processor to perform the operations of the load rate determining method of any of claims 1-6.
10. A computer-readable storage medium, having stored therein at least one executable instruction, which when run on a determination device/arrangement of a line of sight focus zone, causes the determination device/arrangement of the line of sight focus zone to perform the operations of the load rate determination method according to any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211658250.5A CN115967656A (en) | 2022-12-22 | 2022-12-22 | Load rate determining method and device and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211658250.5A CN115967656A (en) | 2022-12-22 | 2022-12-22 | Load rate determining method and device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115967656A true CN115967656A (en) | 2023-04-14 |
Family
ID=87354392
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211658250.5A Pending CN115967656A (en) | 2022-12-22 | 2022-12-22 | Load rate determining method and device and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115967656A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117336247A (en) * | 2023-09-27 | 2024-01-02 | 三一汽车起重机械有限公司 | Communication network load rate control method, device and equipment |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106992879A (en) * | 2017-03-14 | 2017-07-28 | 中国第汽车股份有限公司 | A kind of computational methods of CAN load factor |
CN111211954A (en) * | 2019-12-04 | 2020-05-29 | 一汽解放汽车有限公司 | Method and device for determining load rate of CANFD bus |
-
2022
- 2022-12-22 CN CN202211658250.5A patent/CN115967656A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106992879A (en) * | 2017-03-14 | 2017-07-28 | 中国第汽车股份有限公司 | A kind of computational methods of CAN load factor |
CN111211954A (en) * | 2019-12-04 | 2020-05-29 | 一汽解放汽车有限公司 | Method and device for determining load rate of CANFD bus |
Non-Patent Citations (1)
Title |
---|
卫威等: "乘用车CAN总线通信负载率算法设计", 《汽车电器》, no. 12, 31 December 2017 (2017-12-31), pages 1 - 2 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117336247A (en) * | 2023-09-27 | 2024-01-02 | 三一汽车起重机械有限公司 | Communication network load rate control method, device and equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107835040B (en) | Data communication method, equipment and storage medium based on Bluetooth | |
CN114185829B (en) | Shared resources for multiple communication services | |
WO2019010686A1 (en) | Data processing method and data processing apparatus | |
CN113872967B (en) | Vehicle information transmission method and device, electronic equipment and storage medium | |
US20200382597A1 (en) | Vehicle diagnostic communication apparatus, system including the same and method thereof | |
CN115967656A (en) | Load rate determining method and device and computer readable storage medium | |
US8694879B1 (en) | Efficient use of CRC with limited data | |
CN110445615A (en) | Network request security verification method, device, medium and electronic equipment | |
CN108268420A (en) | Communication means, processor and electronic equipment between processor | |
CN115794716A (en) | Terminal self-synchronizing single bus communication method, device, equipment and storage medium | |
CN103731424B (en) | A kind of transmission method of network data, apparatus and system | |
CN109445973A (en) | Position the method and device of application crash | |
CN108200047A (en) | Data processing method, apparatus and system | |
JP2012089948A (en) | Data transmission device and data transmission method | |
JP7005201B2 (en) | Communication message converter | |
CN110048865A (en) | A kind of bus data transmission method, device, electronic equipment and storage medium | |
CN107579936A (en) | Message transmitting method, controller and storage system | |
CN111740881B (en) | Network card link detection method, system, equipment and computer storage medium | |
EP3500009A1 (en) | Transmission resource indication method, device, and data storage medium | |
US8631085B2 (en) | Method for exchanging data | |
EP1665728A1 (en) | Checksum determination | |
CN111193574B (en) | Data transmission method and data transmission system | |
CN117319214B (en) | PCIE transmission bandwidth processing method, PCIE terminal equipment and electronic equipment | |
CN104484297B (en) | Universal serial bus transmission Speed method and its device | |
CN116095042B (en) | Communication method, system, electronic device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |