Universal CAN bus multi-frame transmission method, apparatus and device, and storage medium

Through the general CAN bus multi-frame transmission method, the problem that the SAEJ1939-21 standard protocol only applies to the SAEJ1939 standard in the prior art is solved, and multi-frame transmission suitable for the ISO11898 standard is realized, which simplifies the process and improves the transmission efficiency.

CN119420595APending Publication Date: 2025-02-11DONGFENG AUTOMOBILE COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411532438.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-30
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The existing broadcast multi-frame protocol of the SAEJ1939-21 standard only applies to the SAEJ1939 standard. The process is complex and limited to the defined PGN parameter group and cannot be applied to the ISO11898 standard CAN protocol.

Method used

Provide a general-purpose CAN bus multi-frame transmission method, by obtaining the required bytes and required frames corresponding to the required signal, generate the encoded target data, and adjust each frame message and DBC file according to the preset definition rules. , generate the message to be sent for transmission.

Benefits of technology

It realizes multi-frame packet transmission without occupies the load rate of the CAN bus. The load rate is the same as that of a single-frame packet, avoids complex request and response rules, simplifies the implementation process, and improves the speed of multi-frame transmission of the general-purpose CAN bus and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420595A_ABST
    Figure CN119420595A_ABST
Patent Text Reader

Abstract

The invention discloses a universal CAN bus multi-frame transmission method, apparatus and device, and a storage medium. The method comprises the steps of obtaining a required byte and a required frame number corresponding to a required signal; generating coded target data according to the required bytes and the required frame number; the method comprises the following steps: receiving target data, re-adjusting each frame of message and a DBC file according to a preset definition rule, generating a to-be-sent message according to the target data, the adjusted each frame of message and the DBC file, and transmitting the to-be-sent message, so that a CAN bus load rate is not occupied, the load rate of a multi-frame message is completely the same as that of a single-frame message, and the transmission efficiency of the to-be-sent message is improved. And complicated request and response rules do not need to be adopted, so that the method is simple and practical, is easy to implement, can conveniently send and receive, and improves the multi-frame transmission speed and efficiency of the universal CAN bus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automotive electronic technology testing and verification technology, and in particular to a universal CAN bus multi-frame transmission method, device, equipment and storage medium. Background Art

[0002] As vehicle network technology has become popular, almost all controllers on a car use network bus communication, and the Controller Area Network (CAN) bus technology has become the most commonly used vehicle network communication technology. There are currently two CAN bus protocols, SAEJ1939 and ISO11898. SAEJ1939 is generally used for buses and trucks, while ISO11898 is generally used for passenger cars. The CAN bus data link layer stipulates that the data to be sent is a single frame of 8 bytes. For CAN data with more than 8 bytes, the CAN bus multi-frame protocol needs to be used. Although there is a broadcast multi-frame protocol in the SAEJ1939-21 standard, this protocol is only applicable to the SAEJ1939 standard. The process is relatively complicated and limited to the defined PGN parameter group, and it is not applicable to the ISO11898 standard CAN protocol. Summary of the invention

[0003] The main purpose of the present invention is to provide a universal CAN bus multi-frame transmission method, device, equipment and storage medium, aiming to solve the technical problems in the prior art that although the existing SAEJ1939-21 standard has a broadcast multi-frame protocol, the protocol is only applicable to the SAEJ1939 standard, the process is relatively complicated and limited to the defined PGN parameter group, and it is not applicable to the ISO11898 standard CAN protocol.

[0004] In a first aspect, the present invention provides a universal CAN bus multi-frame transmission method, the universal CAN bus multi-frame transmission method comprising the following steps:

[0005] Obtain the required bytes and the required number of frames corresponding to the required signal;

[0006] Generate encoded target data according to the required bytes and the required number of frames;

[0007] Each frame message and the DBC file are readjusted according to a preset definition rule, a message to be sent is generated according to the target data, the adjusted each frame message and the DBC file, and the message to be sent is transmitted.

[0008] Optionally, obtaining required bytes and required number of frames corresponding to the required signal includes:

[0009] Obtaining a signal type of a desired signal, and determining a desired byte corresponding to the desired signal according to the signal type;

[0010] The required number of frames is determined according to the required bytes.

[0011] Optionally, determining the required number of frames according to the required bytes includes:

[0012] Dividing the number of bytes required by 7, and when the result is an integer, determining the required number of frames as the quotient;

[0013] When the result is not an integer, the required number of frames is determined to be the quotient plus 1.

[0014] Optionally, generating the encoded target data according to the required bytes and the required number of frames includes:

[0015] The required signal is encoded according to the required bytes and the required number of frames to obtain encoded target data.

[0016] Optionally, the re-adjusting each frame message and the DBC file according to a preset definition rule, generating a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmitting the message to be sent includes:

[0017] Redefine each frame message according to a preset definition rule to obtain the redefined each frame message;

[0018] Redefine the sub-ID of each frame message according to the preset definition rule, perform DBC design according to the redefined sub-ID, and obtain the redefined DBC file;

[0019] Generate a message to be sent according to the target data, the adjusted message per frame and the DBC file, and transmit the message to be sent.

[0020] Optionally, generating a message to be sent according to the target data, the adjusted message per frame and the DBC file, and transmitting the message to be sent includes:

[0021] Encapsulating the target data according to the redefined and adjusted message per frame and the DBC file to obtain a message to be sent;

[0022] The message to be sent is transmitted.

[0023] Optionally, the transmitting the message to be sent includes:

[0024] The message to be sent is sent by a sending node according to a communication protocol rule, and the message to be sent is received by a receiving node according to the communication protocol rule.

[0025] In a second aspect, in order to achieve the above-mentioned object, the present invention further proposes a universal CAN bus multi-frame transmission device, the universal CAN bus multi-frame transmission device comprising:

[0026] A byte frame number acquisition module is used to obtain the required bytes and required frame number corresponding to the required signal;

[0027] An encoding module, used for generating encoded target data according to the required bytes and the required number of frames;

[0028] The transmission module is used to readjust each frame message and the DBC file according to a preset definition rule, generate a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmit the message to be sent.

[0029] In the third aspect, to achieve the above-mentioned purpose, the present invention also proposes a universal CAN bus multi-frame transmission device, which includes: a memory, a processor, and a universal CAN bus multi-frame transmission program stored in the memory and executable on the processor, and the universal CAN bus multi-frame transmission program is configured to implement the steps of the universal CAN bus multi-frame transmission method as described above.

[0030] In a fourth aspect, in order to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a universal CAN bus multi-frame transmission program is stored, and when the universal CAN bus multi-frame transmission program is executed by a processor, the steps of the universal CAN bus multi-frame transmission method as described above are implemented.

[0031] The universal CAN bus multi-frame transmission method proposed in the present invention obtains the required bytes and the required number of frames corresponding to the required signal; generates encoded target data according to the required bytes and the required number of frames; readjusts each frame message and the DBC file according to a preset definition rule, generates a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmits the message to be sent, which can avoid occupying the CAN bus load rate, the multi-frame message load rate is exactly the same as that of the single-frame message, and there is no need to adopt complex request and response rules. The method is simple, practical, easy to implement, can be easily sent and received, and improves the speed and efficiency of the universal CAN bus multi-frame transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0033] Figure 2It is a flowchart of a first embodiment of a universal CAN bus multi-frame transmission method of the present invention;

[0034] Figure 3 It is a flow chart of a second embodiment of a universal CAN bus multi-frame transmission method of the present invention;

[0035] Figure 4 It is a flowchart of a third embodiment of a universal CAN bus multi-frame transmission method of the present invention;

[0036] Figure 5 It is a flowchart of a fourth embodiment of a universal CAN bus multi-frame transmission method of the present invention;

[0037] Figure 6 A schematic diagram of a multi-frame protocol transmission specification in a universal CAN bus multi-frame transmission method of the present invention;

[0038] Figure 7 It is a functional module diagram of the first embodiment of the universal CAN bus multi-frame transmission device of the present invention.

[0039] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0040] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0041] The solution of the embodiment of the present invention is mainly: by obtaining the required bytes and the required number of frames corresponding to the required signal; generating the encoded target data according to the required bytes and the required number of frames; readjusting each frame message and the DBC file according to the preset definition rules, generating the message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmitting the message to be sent, which can not occupy the CAN bus load rate, the multi-frame message load rate is exactly the same as the single-frame message, and there is no need to adopt complex request and response rules. It is simple and practical, easy to implement, and can be sent and received very conveniently, thereby improving the speed and efficiency of the general CAN bus multi-frame transmission, and solving the technical problems in the prior art that although the existing SAEJ1939-21 standard has a broadcast multi-frame protocol, the protocol is only applicable to the SAEJ1939 standard, the process is relatively complicated and limited to the defined PGN parameter group, and it is not applicable to the ISO11898 standard CAN protocol.

[0042] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0043] like Figure 1As shown, the device may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 1005 may be a high-speed RAM memory, or it may be a stable memory (Non-Volatile Memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

[0044] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0045] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating device, a network communication module, a user interface module, and a universal CAN bus multi-frame transmission program.

[0046] The device of the present invention calls the universal CAN bus multi-frame transmission program stored in the memory 1005 through the processor 1001, and performs the following operations:

[0047] Obtain the required bytes and the required number of frames corresponding to the required signal;

[0048] Generate encoded target data according to the required bytes and the required number of frames;

[0049] Each frame message and the DBC file are readjusted according to a preset definition rule, a message to be sent is generated according to the target data, the adjusted each frame message and the DBC file, and the message to be sent is transmitted.

[0050] The device of the present invention calls the universal CAN bus multi-frame transmission program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0051] Obtaining a signal type of a desired signal, and determining a desired byte corresponding to the desired signal according to the signal type;

[0052] The required number of frames is determined according to the required bytes.

[0053] The device of the present invention calls the universal CAN bus multi-frame transmission program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0054] Dividing the number of bytes required by 7, and when the result is an integer, determining the required number of frames as the quotient;

[0055] When the result is not an integer, the required number of frames is determined to be the quotient plus 1.

[0056] The device of the present invention calls the universal CAN bus multi-frame transmission program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0057] The required signal is encoded according to the required bytes and the required number of frames to obtain encoded target data.

[0058] The device of the present invention calls the universal CAN bus multi-frame transmission program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0059] Redefine each frame message according to a preset definition rule to obtain the redefined each frame message;

[0060] Redefine the sub-ID of each frame message according to the preset definition rule, perform DBC design according to the redefined sub-ID, and obtain the redefined DBC file;

[0061] Generate a message to be sent according to the target data, the adjusted message per frame and the DBC file, and transmit the message to be sent.

[0062] The device of the present invention calls the universal CAN bus multi-frame transmission program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0063] Encapsulating the target data according to the redefined and adjusted message per frame and the DBC file to obtain a message to be sent;

[0064] The message to be sent is transmitted.

[0065] The device of the present invention calls the universal CAN bus multi-frame transmission program stored in the memory 1005 through the processor 1001, and also performs the following operations:

[0066] The message to be sent is sent by a sending node according to a communication protocol rule, and the message to be sent is received by a receiving node according to the communication protocol rule.

[0067] This embodiment adopts the above scheme to obtain the required bytes and the required number of frames corresponding to the required signal; generate the encoded target data according to the required bytes and the required number of frames; readjust each frame message and the DBC file according to the preset definition rules, generate the message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmit the message to be sent, which can not occupy the CAN bus load rate, the multi-frame message load rate is exactly the same as the single-frame message, and there is no need to adopt complex request and response rules. It is simple, practical, easy to implement, and can be easily sent and received, thereby improving the speed and efficiency of multi-frame transmission of the universal CAN bus.

[0068] Based on the above hardware structure, an embodiment of a universal CAN bus multi-frame transmission method of the present invention is proposed.

[0069] Reference Figure 2 , Figure 2 It is a flowchart diagram of the first embodiment of the universal CAN bus multi-frame transmission method of the present invention.

[0070] In a first embodiment, the universal CAN bus multi-frame transmission method comprises the following steps:

[0071] Step S10: Obtain the required bytes and the required number of frames corresponding to the required signal.

[0072] It should be noted that the required signal is a signal required for data transmission, and different required signals correspond to different required bytes and required numbers of frames.

[0073] Step S20: Generate encoded target data according to the required bytes and the required number of frames.

[0074] It should be understood that the re-encoded data may be generated as the target data according to the required bytes and the required number of frames.

[0075] Step S30: readjust each frame message and the DBC file according to a preset definition rule, generate a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmit the message to be sent.

[0076] It can be understood that each frame message and CAN database file (Data Base CAN, DBC) file can be readjusted according to the preset preset definition rules, and the message to be sent can be generated according to the target data, the adjusted each frame message and the DBC file, and then the message to be sent can be transmitted.

[0077] This embodiment adopts the above scheme to obtain the required bytes and the required number of frames corresponding to the required signal; generate the encoded target data according to the required bytes and the required number of frames; readjust each frame message and the DBC file according to the preset definition rules, generate the message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmit the message to be sent, which can not occupy the CAN bus load rate, the multi-frame message load rate is exactly the same as the single-frame message, and there is no need to adopt complex request and response rules. It is simple, practical, easy to implement, and can be easily sent and received, thereby improving the speed and efficiency of multi-frame transmission of the universal CAN bus.

[0078] Further, Figure 3 FIG. 1 is a flow chart of a second embodiment of a universal CAN bus multi-frame transmission method according to the present invention. Figure 3 As shown, based on the first embodiment, a second embodiment of the universal CAN bus multi-frame transmission method of the present invention is proposed. In this embodiment, step S10 specifically includes the following steps:

[0079] Step S11: Obtain the signal type of the required signal, and determine the required bytes corresponding to the required signal according to the signal type.

[0080] It should be noted that different required signals correspond to different signal types, and the required bytes corresponding to the required signals can be determined according to the signal types.

[0081] Step S12: Determine the required number of frames according to the required bytes.

[0082] It can be understood that the required number of frames can be determined according to the required bytes.

[0083] Furthermore, the step S12 specifically includes the following steps:

[0084] Dividing the number of bytes required by 7, and when the result is an integer, determining the required number of frames as the quotient;

[0085] When the result is not an integer, the required number of frames is determined to be the quotient plus 1.

[0086] In the specific implementation, determine how many bytes are required for the required signal. For example, for the vehicle VIN code, the required number of bytes is 17. Determine the required number of frames and divide the required number of bytes by 7. If the result is an integer, the required number of frames is the quotient. If the result is a decimal, the required number of bytes is the quotient + 1.

[0087] Through the above scheme, this embodiment obtains the signal type of the required signal, determines the required bytes corresponding to the required signal according to the signal type; determines the required number of frames according to the required bytes, and can quickly obtain the required bytes and the required number of frames, thereby improving the speed and efficiency of multi-frame transmission of the universal CAN bus.

[0088] Further, Figure 4 FIG. 1 is a flow chart of a third embodiment of a universal CAN bus multi-frame transmission method according to the present invention. Figure 4 As shown, a third embodiment of the universal CAN bus multi-frame transmission method of the present invention is proposed based on the second embodiment. In this embodiment, step S20 specifically includes the following steps:

[0089] Step S21: Encode the required signal according to the required bytes and the required number of frames to obtain encoded target data.

[0090] It should be noted that after encoding the required signal according to the required bytes and the required number of frames, the encoded target data can be obtained, and the required number of bytes can be encoded, such as using ASCII code or 8421 code.

[0091] Through the above scheme, this embodiment encodes the required signal according to the required bytes and the required number of frames to obtain the encoded target data, so that the encoded target data can be obtained quickly, thereby improving the speed and efficiency of multi-frame transmission of the universal CAN bus.

[0092] Further, Figure 5 FIG. 4 is a flow chart of a fourth embodiment of a universal CAN bus multi-frame transmission method according to the present invention. Figure 5 As shown, a fourth embodiment of the universal CAN bus multi-frame transmission method of the present invention is proposed based on the first embodiment. In this embodiment, step S30 specifically includes the following steps:

[0093] Step S31: redefine each frame message according to a preset definition rule to obtain the redefined each frame message.

[0094] It should be noted that each frame message can be redefined according to the preset definition rule, so as to obtain the redefined each frame message.

[0095] Step S32: redefine the sub-ID of each frame message according to the preset definition rule, perform DBC design according to the redefined sub-ID, and obtain the redefined DBC file.

[0096] It is understandable that the sub-ID of each frame message can be redefined according to the preset definition rule, and then the DBC design is performed according to the sub-ID to obtain the redefined DBC file.

[0097] In a specific implementation, each frame message can be defined. For example, for the entire vehicle VIN code, the first frame message sends VIN1-7, the second frame message is VIN8-14, and the third frame message is VIN15-17. The remaining bytes are filled with 0xFF.

[0098] Step S33: Generate a message to be sent according to the target data, the adjusted message per frame and the DBC file, and transmit the message to be sent.

[0099] It should be understood that a message to be sent may be generated according to the target data, the adjusted message per frame and the DBC file, and then the message to be sent may be transmitted.

[0100] Furthermore, the step S33 further includes the following steps:

[0101] Encapsulating the target data according to the redefined and adjusted message per frame and the DBC file to obtain a message to be sent;

[0102] The message to be sent is transmitted.

[0103] It can be understood that the target data can be encapsulated according to the redefined and adjusted each frame message and DBC file, thereby obtaining the message to be sent, and transmitting the message to be sent.

[0104] Furthermore, the step of transmitting the message to be sent includes the following steps:

[0105] The message to be sent is sent by a sending node according to a communication protocol rule, and the message to be sent is received by a receiving node according to the communication protocol rule.

[0106] It should be understood that since the first byte is the frame number, the DBC file cannot be designed according to the commonly used method. Therefore, in the CANoe software, it is necessary to define the sub-ID for DBC design; the sending node sends the message according to the communication protocol rules; Step 7: The receiving node sends the message according to the communication protocol rules.

[0107] In the specific implementation, see Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a multi-frame protocol sending specification in a universal CAN bus multi-frame transmission method of the present invention, such as Figure 6 As shown, for example, the VIN code of a car is LWVAA1540CA003362. According to the ASCII encoding rules, the three frames of messages sent are:

[0108] For standard frames, if the communication protocol determines that the message identifier is 0x123

[0109] The first frame data:

[0110] 0x123 00 4C 56 41 41 30 35 34

[0111] The second frame data:

[0112] 0x123 01 34 30 43 41 30 30 33

[0113] The third frame data:

[0114] 0x123 02 33 36 32FF FFFFFF

[0115] Similarly, for extended frames, if the communication protocol determines that the message identifier is 0x18FF0001:

[0116] The first frame data:

[0117] 0x18FF0001 00 4C 56 41 41 30 35 34

[0118] The second frame data:

[0119] 0x18FF0001 01 34 30 43 41 30 30 33

[0120] The third frame data:

[0121] 0x18FF0001 02 33 36 32FF FFFFFF

[0122] It should be understood that the universal CAN bus multi-frame protocol of this embodiment can be used for both the SAE J1939 network platform and the ISO 11898 network platform, which is simple, practical and easy to implement. With the development of automobile intelligence and networking, many signal bytes are longer than 8 bytes, and these signals need to be received by different controllers. For example, for the VIN code signal of the whole vehicle, the data length is 17 bytes. Controllers such as EDR time recorder, BMS battery management system and on-board charger may need this signal. If the signal is obtained by diagnostic request, bus conflict error will occur and it cannot be obtained in real time. If it is sent by a controller in a broadcasting manner, this problem will not occur. The purpose of this embodiment is to propose a simple, practical, universal, broadcast multi-frame transmission protocol for the shortcomings of the above-mentioned technology, which can be used for both ISO11898 protocol and SAEJ1939 protocol.

[0123] Through the above scheme, this embodiment redefines each frame message through preset definition rules to obtain a redefined each frame message; redefines the sub-ID of each frame message according to the preset definition rules, performs DBC design according to the redefined sub-ID, and obtains a redefined DBC file; generates a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmits the message to be sent; it can not occupy the CAN bus load rate, the multi-frame message load rate is exactly the same as the single-frame message, and there is no need to adopt complex request and response rules. It is simple, practical, easy to implement, and can be easily sent and received, thereby improving the speed and efficiency of multi-frame transmission of the universal CAN bus.

[0124] Correspondingly, the present invention further provides a universal CAN bus multi-frame transmission device.

[0125] Reference Figure 7 , Figure 7 It is a functional module diagram of the first embodiment of the universal CAN bus multi-frame transmission device of the present invention.

[0126] In a first embodiment of the universal CAN bus multi-frame transmission device of the present invention, the universal CAN bus multi-frame transmission device comprises:

[0127] The byte frame number acquisition module 10 is used to obtain the required bytes and the required frame number corresponding to the required signal.

[0128] The encoding module 20 is used to generate encoded target data according to the required bytes and the required number of frames.

[0129] The transmission module 30 is used to readjust each frame message and the DBC file according to a preset definition rule, generate a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmit the message to be sent.

[0130] The byte frame number acquisition module 10 is also used to obtain the signal type of the required signal, determine the required bytes corresponding to the required signal according to the signal type; and determine the required number of frames according to the required bytes.

[0131] The byte frame number acquisition module 10 is further used to divide the number of bytes of the required bytes by 7, and when the result is an integer, determine the required number of frames as the quotient; when the result is not an integer, determine the required number of frames as the quotient plus 1.

[0132] The encoding module 20 is further used to encode the required signal according to the required bytes and the required number of frames to obtain encoded target data.

[0133] The transmission module 30 is also used to redefine each frame message according to the preset definition rules to obtain the redefined each frame message; redefine the sub-ID of each frame message according to the preset definition rules, perform DBC design according to the redefined sub-ID, and obtain the redefined DBC file; generate a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmit the message to be sent.

[0134] The transmission module 30 is further used to encapsulate the target data according to the redefined and adjusted each frame message and the DBC file to obtain the message to be sent; and transmit the message to be sent.

[0135] The transmission module 30 is further configured to send the message to be sent through a sending node according to a communication protocol rule, and receive the message to be sent through a receiving node according to the communication protocol rule.

[0136] Among them, the steps implemented by each functional module of the universal CAN bus multi-frame transmission device can refer to the various embodiments of the universal CAN bus multi-frame transmission method of the present invention, and will not be repeated here.

[0137] In addition, an embodiment of the present invention further provides a storage medium, on which a universal CAN bus multi-frame transmission program is stored. When the universal CAN bus multi-frame transmission program is executed by a processor, the following operations are implemented:

[0138] Obtain the required bytes and the required number of frames corresponding to the required signal;

[0139] Generate encoded target data according to the required bytes and the required number of frames;

[0140] Each frame message and the DBC file are readjusted according to a preset definition rule, a message to be sent is generated according to the target data, the adjusted each frame message and the DBC file, and the message to be sent is transmitted.

[0141] Furthermore, when the universal CAN bus multi-frame transmission program is executed by the processor, the following operations are also implemented:

[0142] Obtaining a signal type of a desired signal, and determining a desired byte corresponding to the desired signal according to the signal type;

[0143] The required number of frames is determined according to the required bytes.

[0144] Furthermore, when the universal CAN bus multi-frame transmission program is executed by the processor, the following operations are also implemented:

[0145] Dividing the number of bytes required by 7, and when the result is an integer, determining the required number of frames as the quotient;

[0146] When the result is not an integer, the required number of frames is determined to be the quotient plus 1.

[0147] Furthermore, when the universal CAN bus multi-frame transmission program is executed by the processor, the following operations are also implemented:

[0148] The required signal is encoded according to the required bytes and the required number of frames to obtain encoded target data.

[0149] Furthermore, when the universal CAN bus multi-frame transmission program is executed by the processor, the following operations are also implemented:

[0150] Redefine each frame message according to a preset definition rule to obtain the redefined each frame message;

[0151] Redefine the sub-ID of each frame message according to the preset definition rule, perform DBC design according to the redefined sub-ID, and obtain the redefined DBC file;

[0152] Generate a message to be sent according to the target data, the adjusted message per frame and the DBC file, and transmit the message to be sent.

[0153] Furthermore, when the universal CAN bus multi-frame transmission program is executed by the processor, the following operations are also implemented:

[0154] Encapsulating the target data according to the redefined and adjusted message per frame and the DBC file to obtain a message to be sent;

[0155] The message to be sent is transmitted.

[0156] Furthermore, when the universal CAN bus multi-frame transmission program is executed by the processor, the following operations are also implemented:

[0157] The message to be sent is sent by a sending node according to a communication protocol rule, and the message to be sent is received by a receiving node according to the communication protocol rule.

[0158] Those skilled in the art will appreciate that all or part of the steps in the above-mentioned implementation method can be accomplished by instructing related hardware through a program, and the program is stored in a storage medium, including a number of instructions for enabling a device (which may be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each implementation method of the present application; and the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0159] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0160] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0161] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A universal CAN bus multi-frame transmission method, characterized in that: The universal CAN bus multi-frame transmission method comprises: Obtain the required bytes and the required number of frames corresponding to the required signal; Generate encoded target data according to the required bytes and the required number of frames; Each frame message and the DBC file are readjusted according to a preset definition rule, a message to be sent is generated according to the target data, the adjusted each frame message and the DBC file, and the message to be sent is transmitted.

2. The universal CAN bus multi-frame transmission method according to claim 1, characterized in that: The obtaining of the required bytes and the required number of frames corresponding to the required signal includes: Obtaining a signal type of a desired signal, and determining a desired byte corresponding to the desired signal according to the signal type; The required number of frames is determined according to the required bytes.

3. The universal CAN bus multi-frame transmission method as claimed in claim 2, characterized in that: The step of determining the required number of frames according to the required bytes comprises: Dividing the number of bytes required by 7, and when the result is an integer, determining the required number of frames as the quotient; When the result is not an integer, the required number of frames is determined to be the quotient plus 1.

4. The universal CAN bus multi-frame transmission method according to claim 1, characterized in that: The step of generating the encoded target data according to the required bytes and the required number of frames includes: The required signal is encoded according to the required bytes and the required number of frames to obtain encoded target data.

5. The universal CAN bus multi-frame transmission method according to claim 1, characterized in that: The step of re-adjusting each frame message and the DBC file according to a preset definition rule, generating a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmitting the message to be sent includes: Redefine each frame message according to a preset definition rule to obtain the redefined each frame message; Redefine the sub-ID of each frame message according to the preset definition rule, perform DBC design according to the redefined sub-ID, and obtain the redefined DBC file; Generate a message to be sent according to the target data, the adjusted message per frame and the DBC file, and transmit the message to be sent.

6. The universal CAN bus multi-frame transmission method as claimed in claim 5, characterized in that: The step of generating a message to be sent according to the target data, the adjusted message per frame and the DBC file, and transmitting the message to be sent includes: Encapsulating the target data according to the redefined and adjusted message per frame and the DBC file to obtain a message to be sent; The message to be sent is transmitted.

7. The universal CAN bus multi-frame transmission method according to claim 6, characterized in that: The transmitting of the message to be sent includes: The message to be sent is sent by a sending node according to a communication protocol rule, and the message to be sent is received by a receiving node according to the communication protocol rule.

8. A universal CAN bus multi-frame transmission device, characterized in that: The universal CAN bus multi-frame transmission device comprises: A byte frame number acquisition module is used to obtain the required bytes and required frame number corresponding to the required signal; An encoding module, used for generating encoded target data according to the required bytes and the required number of frames; The transmission module is used to readjust each frame message and the DBC file according to a preset definition rule, generate a message to be sent according to the target data, the adjusted each frame message and the DBC file, and transmit the message to be sent.

9. A universal CAN bus multi-frame transmission device, characterized in that: The universal CAN bus multi-frame transmission device includes: a memory, a processor, and a universal CAN bus multi-frame transmission program stored in the memory and executable on the processor, wherein the universal CAN bus multi-frame transmission program is configured to implement the steps of the universal CAN bus multi-frame transmission method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium stores a universal CAN bus multi-frame transmission program, and when the universal CAN bus multi-frame transmission program is executed by the processor, the steps of the universal CAN bus multi-frame transmission method as described in any one of claims 1 to 7 are implemented.