Vehicle-mounted bus data transmission method, device and equipment and storage medium

By processing and converting data frames between different types of buses in the gateway controller, the problems of low bus compatibility and large processing load in the vehicle system are solved, and more efficient data transmission is achieved.

CN119996103APending Publication Date: 2025-05-13SAIC MOTOR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311499717.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

In vehicle systems, due to the differences in the length of data frames corresponding to different types of buses, the gateway controller has a large processing load and low compatibility when performing data transmission.

Method used

The data frame in the first bus is obtained by the gateway controller, and the data frame is processed according to the number of protocol data units in the first data frame and the number of protocol data units supported by the second bus, and converted into data frames supported by the second bus, thereby reducing the processing load of the gateway controller.

Benefits of technology

It effectively reduces the processing load of the gateway controller, improves data transmission compatibility between different types of buses, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996103A_ABST
    Figure CN119996103A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle-mounted bus data transmission method and device, equipment and a storage medium, a first data frame in a first bus is obtained through a gateway controller, the first data frame comprises a first number of protocol data units, and each protocol data unit in the first number of protocol data units comprises multiple pieces of data; processing the first data frame according to the first number and a second number of protocol data units included in a data frame supported to be transmitted by a second bus to obtain a second data frame including the second number of protocol data units; and sending the second data frame to the second bus. In the application, the gateway controller processes the first data frame by taking the protocol data unit containing the plurality of data as the unit to obtain the second data frame, so that the processing load of the gateway controller can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle bus communication technology, and in particular to a vehicle bus data transmission method, device, equipment and storage medium. Background Art

[0002] As the degree of vehicle electrification increases, the point-to-point communication method used by traditional vehicles is gradually unable to meet the needs of modern vehicles. In order to meet users' needs for data transmission efficiency, cost and other aspects, many vehicles currently use a data transmission method that uses multiple types of buses.

[0003] However, the data frame lengths corresponding to different types of buses are different, resulting in low compatibility of data transmission between different types of buses. For example, when the types of the first bus and the second bus are different, in order to transmit the data in the first bus to the second bus, the data frame corresponding to the first bus can be unpacked by the gateway controller, and the multiple data obtained by unpacking can be spliced ​​to obtain the data frame supported by the second bus for transmission, and the spliced ​​data frame can be transmitted through the second bus.

[0004] When the amount of data transmitted in the vehicle system is very large, the gateway controller unpacks or splices and reassembles a large number of data frames, resulting in a large processing load on the gateway controller. Summary of the invention

[0005] The present application provides a vehicle bus data transmission method, device, equipment and storage medium, which aims to solve the problem of heavy processing load of a gateway controller.

[0006] In order to achieve the above objectives, this application adopts the following technical solutions:

[0007] In the first aspect, the present application provides a vehicle bus data transmission method, which is executed by a gateway controller, comprising:

[0008] Acquire a first data frame in a first bus, wherein the first data frame includes a first number of protocol data units, and each protocol data unit in the first number of protocol data units includes a plurality of data;

[0009] Processing the first data frame according to the first number and a second number of protocol data units included in the data frame supported for transmission by the second bus to obtain a second data frame including a second number of the protocol data units;

[0010] The second data frame is sent to the second bus.

[0011] In a possible implementation, the first number is greater than the second number, and the processing of the first data frame according to the first number and the second number of protocol data units included in the data frame supported for transmission by the second bus to obtain a second data frame including the second number of the protocol data units includes:

[0012] Decomposing the first data frame to obtain the first number of protocol data units;

[0013] Grouping the first number of protocol data units in units of a second number of protocol data units to obtain at least one group;

[0014] Processing each of the at least one group respectively to obtain a second data frame corresponding to each of the groups;

[0015] The sending the second data frame to the second bus includes:

[0016] The second data frame corresponding to each of the packets is sent to the second bus.

[0017] In a possible implementation, the type of the first bus is a controller area network bus with a variable rate CANFD, and the decomposing the first data frame to obtain the first number of protocol data units includes:

[0018] Decomposing the first data frame to obtain a protocol data unit container, wherein the protocol data unit container encapsulates a first number of protocol data units in the first data frame;

[0019] The first number of protocol data units is decomposed from the protocol data unit container.

[0020] In a possible implementation manner, the first number is smaller than the second number, and acquiring the first data frame corresponding to the first bus includes:

[0021] Acquire a plurality of first data frames corresponding to the first bus;

[0022] The processing of the first data frame according to the first number and the second number of protocol data units included in the data frame supported for transmission by the second bus to obtain a second data frame including the second number of the protocol data units comprises:

[0023] Decomposing each first data frame in the plurality of first data frames to obtain a third number of protocol data units, where the third number is the total number of protocol data units included in the plurality of first data frames;

[0024] At least one second data frame including a second number of the protocol data units is obtained according to the third number of the protocol data units.

[0025] In a possible implementation manner, the type of the second bus is CANFD, and obtaining, according to the third number of protocol data units, at least one second data frame including a second number of the protocol data units includes:

[0026] According to the third number of protocol data units, obtaining at least one protocol data unit container including the second number of protocol data units;

[0027] According to at least one of the protocol data unit containers, a second data frame corresponding to each protocol data unit container is obtained.

[0028] In a possible implementation manner, obtaining, according to the third number of protocol data units, at least one second data frame including a second number of the protocol data units includes:

[0029] Determining an arrangement order of the third number of protocol data units according to the protocol data unit headers included in the plurality of first data frames;

[0030] At least one second data frame including a second number of the protocol data units is obtained according to the third number of protocol data units and the arrangement sequence.

[0031] In a possible implementation, the type of the first bus is different from the type of the second bus, and the first bus includes: a controller area network bus CAN, CANFD, a local area network LIN, or an Ethernet bus;

[0032] The second bus includes: a controller area network bus CAN, CANFD, a local connection network LIN, or an Ethernet bus.

[0033] Second aspect: The present application provides a vehicle bus data transmission device, which is executed by a gateway controller, including:

[0034] an acquisition unit, a processing unit, and a sending unit;

[0035] The acquisition unit is used to acquire a first data frame in the first bus, wherein the first data frame includes a first number of protocol data units, and each protocol data unit in the first number of protocol data units includes multiple data;

[0036] The processing unit is configured to process the first data frame according to the first number and a second number of protocol data units included in the data frame supported for transmission by the second bus, so as to obtain a second data frame including the second number of the protocol data units;

[0037] The sending unit is used to send the second data frame to the second bus.

[0038] In a possible implementation, the first number is greater than the second number, and the processing unit includes: a first decomposition subunit, a grouping subunit, and a processing subunit;

[0039] The first decomposition subunit is used to decompose the first data frame to obtain the first number of protocol data units;

[0040] The grouping subunit is used to group the first number of protocol data units in units of a second number of protocol data units to obtain at least one group;

[0041] The processing subunit is used to process each of the at least one group respectively to obtain a second data frame corresponding to each of the groups;

[0042] The sending unit is specifically used for:

[0043] The second data frame corresponding to each of the packets is sent to the second bus.

[0044] In a possible implementation, the type of the first bus is a controller area network bus with a variable rate CANFD, and the first decomposition subunit includes:

[0045] A first data frame decomposition unit and a protocol data unit container decomposition unit;

[0046] The first data frame decomposition unit is used to decompose the first data frame to obtain a protocol data unit container, wherein the protocol data unit container encapsulates a first number of protocol data units in the first data frame;

[0047] The protocol data unit container decomposition unit is configured to decompose the first number of protocol data units from the protocol data unit container.

[0048] In a possible implementation manner, the first number is smaller than the second number, and the acquisition unit is specifically used to: acquire a plurality of first data frames corresponding to the first bus;

[0049] The processing unit comprises: a second decomposition subunit and a first obtaining subunit;

[0050] The second decomposition subunit is used to decompose each first data frame in the multiple first data frames to obtain a third number of protocol data units, where the third number is the total number of protocol data units included in the multiple first data frames;

[0051] The first obtaining subunit is used to obtain at least one second data frame including a second number of the protocol data units according to the third number of the protocol data units.

[0052] In a possible implementation, the type of the second bus is CANFD, and the first obtaining subunit includes: a second obtaining subunit and a third obtaining subunit;

[0053] The second obtaining subunit is used to obtain at least one protocol data unit container including a second number of the protocol data units according to the third number of protocol data units;

[0054] The third obtaining subunit is used to obtain, according to at least one of the protocol data unit containers, a second data frame corresponding to each protocol data unit container.

[0055] In a possible implementation, the first obtaining subunit includes:

[0056] Determine the subunit and fourth obtain the subunit;

[0057] The determining subunit is configured to determine an arrangement order of the third number of protocol data units according to the protocol data unit headers included in the plurality of first data frames;

[0058] The fourth obtaining subunit is used to obtain at least one second data frame including a second number of the protocol data units according to the third number of protocol data units and the arrangement order.

[0059] In a possible implementation, the type of the first bus is different from the type of the second bus, and the first bus includes: a controller area network bus CAN, CANFD, a local area network LIN, or an Ethernet bus;

[0060] The second bus includes: a controller area network bus CAN, CANFD, a local connection network LIN, or an Ethernet bus.

[0061] A third aspect: The present application provides a computer device, the computer device comprising: a processor and a memory;

[0062] The memory is used to store program code and transmit the program code to the processor;

[0063] The processor is used to execute the steps of the vehicle bus data transmission method as described above according to the instructions in the program code.

[0064] Fourth aspect: The present application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of a vehicle bus data transmission method as described above are implemented.

[0065] Compared with the prior art, this application has the following beneficial effects:

[0066] The present application provides a vehicle bus data transmission method, device, equipment and storage medium. In a scenario where the data transmitted in the first bus needs to be further transmitted through the second bus, the gateway controller can obtain the first data frame in the first bus, and the first data frame includes a first number of protocol data units, and each protocol data unit can include multiple data. After obtaining the first data frame, the first data frame can be converted into a second data frame supported by the second bus for transmission, and the second data frame can be further transmitted through the second bus. In a specific example, when converting the first data frame into the second data frame, the first data frame can be processed according to the first number of protocol data units included in the first data frame and the second number of protocol data units included in the data frame supported by the second bus for transmission, to obtain a second data frame including a second number of protocol data units. In other words, the gateway controller processes the first data frame in units of protocol data units containing multiple data to obtain the second data frame, which can effectively reduce the processing load of the gateway controller. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 A schematic diagram of data transmission with multiple types of vehicle buses coexisting;

[0068] Figure 2 A schematic diagram of a traditional bus data transmission provided in an embodiment of the present application;

[0069] Figure 3 A flow chart of a vehicle bus data transmission method provided in an embodiment of the present application;

[0070] Figure 4 A schematic diagram showing a comparison of data frames corresponding to the CAN bus provided in an embodiment of the present application;

[0071] Figure 5 A schematic diagram showing a comparison of data frames corresponding to the LIN bus provided in an embodiment of the present application;

[0072] Figure 6 A schematic diagram showing a comparison of data frames corresponding to the Ethernet bus provided in an embodiment of the present application;

[0073] Figure 7 A schematic diagram showing a comparison of data frames corresponding to the CANFD bus provided in an embodiment of the present application;

[0074] Figure 8 A structural schematic diagram of a vehicle bus data transmission device is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0075] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

[0076] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0077] With the improvement of the degree of electrification of vehicles, the point-to-point communication method used by traditional vehicles is gradually unable to meet the needs of modern vehicles. In order to meet the user's needs for data transmission efficiency, cost and other aspects, many vehicles currently use a data transmission method in which multiple types of buses coexist. However, there are differences in the data frame lengths corresponding to different types of buses, resulting in low compatibility of data transmission between different types of buses. For example, when the types of the first bus and the second bus are different, in order to transfer the data in the first bus to the second bus, the data frame corresponding to the first bus can be unpacked by the gateway controller, and the multiple data obtained by unpacking can be spliced ​​to obtain the data frame supported by the second bus for transmission, and the aforementioned spliced ​​data frame can be transmitted through the second bus.

[0078] like Figure 1 As shown, this figure is a schematic diagram of data transmission with multiple types of vehicle buses coexisting. Figure 1 In the vehicle, the on-board buses used in the vehicle include the commonly used controller area network bus (CAN), the controller area network bus with flexible data rate (CANFD), the local interconnect network (LIN) and the Ethernet bus. Among them, the maximum data volume supported by the data frame of the CAN bus and the LIN bus is 64 bits, the maximum data volume supported by the data frame of the CANFD bus is 512 bits, and the maximum data volume supported by the Ethernet data frame based on the user datagram protocol (UDP) transmission can reach 1400 bytes.

[0079] Specifically, controller A is connected to the gateway controller using a CAN bus, controller B is connected to the gateway controller using a LIN bus, controller C is connected to the gateway controller using a CANFD bus, and controller D is connected to the gateway controller using an Ethernet bus. When controller D transmits data to controller A, controller B, or controller C, the gateway controller needs to unpack and reassemble the data frames in the Ethernet bus to obtain data frames supported by each bus type, so that multiple data frames can be transmitted to each controller.

[0080] For example, Figure 2 As shown, Figure 2 A schematic diagram of a traditional bus data transmission provided in an embodiment of the present application. The data frames of the CAN bus and the LIN bus each contain 4 data. Specifically, the data frame of the CAN bus contains data a, data e, data g, and data d; the data frame of the LIN bus contains data b, data f, data c, and data n. The data frame of the CANFD bus contains a protocol data unit, which can encapsulate 8 data.

[0081] When the data in the CAN bus and the data in the LIN bus are transmitted through the CANFD bus, the data frames in the CAN bus and the data frames in the LIN bus can be unpacked through the gateway controller to obtain data a, data e, data g, data d, data b, data f, data c, and data n. According to the number of data supported by the data frame corresponding to the CANFD bus, the data a, data e, data g, data d, data b, data f, data c, and data n are spliced ​​and reorganized. For example, the data a, data b, data c, data d, data e, data f, data g, and data n can be arranged in the order of data a, data b, data c, data d, data e, data f, data g, and data n, and these 8 data are encapsulated to obtain the protocol data unit corresponding to the CANFD bus, and then the protocol data unit is encapsulated to obtain the data frame supported by the CANFD bus.

[0082] Similarly, when the data in the CANFD bus is transmitted through the CAN bus and the LIN bus, the gateway controller can split the data frame corresponding to the CANFD bus to obtain a protocol data unit containing 8 data, and then split the protocol data unit to obtain data a, data b, data c, data d, data e, data f, data g, and data n. According to the number of data supported by the data frames corresponding to the CAN bus and the LIN bus, the above 8 data are grouped to obtain a first group containing data a, data e, data g, and data d, and a second group containing data b, data f, data c, and data n. The first group and the second group are encapsulated respectively to obtain a data frame supported by the CAN bus and a data frame supported by the LIN bus, so that the data in the CANFD bus can be transmitted through the CAN bus and the LIN bus.

[0083] When the amount of data transmitted in the vehicle system is very large, the gateway controller needs to unpack or splice and reassemble the data frames transmitted by different types of vehicle buses based on the single data in the data frame, resulting in the current data transmission method having the disadvantage of a large processing load on the gateway controller.

[0084] Based on this, the present application provides a vehicle bus data transmission method, device, equipment and storage medium. In a scenario where the data transmitted in the first bus needs to be further transmitted through the second bus, the gateway controller can obtain the first data frame in the first bus, and the first data frame includes a first number of protocol data units, each of which can include multiple data. After obtaining the first data frame, the first data frame can be converted into a second data frame supported by the second bus for transmission, and the second data frame can be further transmitted through the second bus. In a specific example, when converting the first data frame into the second data frame, the first data frame can be processed according to the first number of protocol data units included in the first data frame and the second number of protocol data units included in the data frame supported by the second bus for transmission, to obtain a second data frame including a second number of protocol data units. In other words, the gateway controller processes the first data frame in units of protocol data units containing multiple data to obtain the second data frame, which can effectively reduce the processing load of the gateway controller.

[0085] The following is an introduction to the vehicle bus data transmission method provided by the present application.

[0086] The present application provides a vehicle bus data transmission method, which is executed by a gateway controller, such as Figure 3 As shown, the figure is a flow chart of a vehicle bus data transmission method provided in an embodiment of the present application, including S101-S103.

[0087] S101. Acquire a first data frame in a first bus.

[0088] The first data frame includes a first number of protocol data units, and each of the first number of protocol data units includes a plurality of data.

[0089] For example, Figure 4-Figure 7 As shown, they are respectively a schematic diagram for comparing data frames corresponding to the CAN bus provided in an embodiment of the present application, a schematic diagram for comparing data frames corresponding to the LIN bus provided in an embodiment of the present application, a schematic diagram for comparing data frames corresponding to the Ethernet bus provided in an embodiment of the present application, and a schematic diagram for comparing data frames corresponding to the CANFD bus provided in an embodiment of the present application.

[0090] The traditional data frame corresponding to the CAN bus consists of a frame header, a 64-bit frame data field, and a frame trailer. In the frame data field, data a, data b, data c, and data n can be encapsulated in a single data unit. Taking the first bus as an example, in this application, if the first bus is a CAN bus, the first data frame is as follows: Figure 4 As shown, different from the traditional data frame corresponding to the CAN bus, the first data frame includes 1 protocol data unit, and data a, data b, data c and data n are encapsulated in the protocol data unit.

[0091] Similarly, the traditional data frame corresponding to the LIN bus can encapsulate data a, data b, data c and data n in a single data unit. In the present application, if the first bus is a LIN bus, the first data frame is as follows: Figure 5 As shown, the first data frame includes 1 protocol data unit, and data a, data b, data c and data n are encapsulated in the protocol data unit.

[0092] In a traditional data frame corresponding to the Ethernet bus, a single data unit may be used to encapsulate data a, data b, data c, data d, data e, data f, data g, and data n. In the present application, if the first bus is an Ethernet bus, the first data frame may be as follows: Figure 6 As shown, the first data frame includes two protocol data units, namely a first protocol data unit and a second protocol data unit, data a, data b, data c and data d are encapsulated as the first protocol data unit, and data e, data f, data g, and data n are encapsulated as the second protocol data unit.

[0093] The conventional data frame corresponding to the CANFD bus encapsulates a protocol data unit, the length of which is consistent with the length of the frame data field in the conventional data frame, and the protocol data unit can encapsulate data a, data b, data c, data d, data e, data f, data g, and data n in a single data unit. In the present application, if the first bus is a CANFD bus, the first data frame is as follows: Figure 7 As shown, the first data frame includes a protocol data unit container, the length of which is consistent with the length of the frame data field corresponding to the CANFD bus. In the protocol data unit container, multiple protocol data units can be encapsulated, wherein data a, data b, data c, and data d can be encapsulated as a first protocol data unit, and data e, data f, data g, and data n can be encapsulated as a second protocol data unit.

[0094] In an embodiment of the present application, multiple data are grouped together and encapsulated into a protocol data unit, thereby facilitating subsequent processing of the first data frame in units of the protocol data unit containing multiple data, which can effectively reduce the processing load of the gateway processor.

[0095] It should be noted that the first quantity is determined by the amount of data supported by the first bus and the protocol data unit. The present application does not specifically limit the first quantity and the number of data contained in a protocol data unit.

[0096] S102: Process the first data frame according to the first number and a second number of protocol data units included in a data frame supported for transmission by a second bus to obtain a second data frame including a second number of the protocol data units.

[0097] S103. Send the second data frame to the second bus.

[0098] Specifically, the type of the first bus is different from the type of the second bus. The first bus may include a controller area network bus CAN, CANFD, a local connection network LIN, or an Ethernet bus; the second bus may include a controller area network bus CAN, CANFD, a local connection network LIN, or an Ethernet bus.

[0099] Exemplarily, in the data frame corresponding to the CANFD bus, there are n data (n is a positive integer), which are encapsulated in two protocol data units. Based on the method provided by the present application, the gateway processor only needs to process these two protocol data units. However, in the prior art, it is necessary to split n data and redistribute these n data into new data frames, that is, the method provided by the prior art needs to process at least n data. Therefore, in the embodiment of the present application, the method of using protocol data units containing multiple data as units to realize data transmission between various types of buses can reduce the processing load of the gateway processor by several times, improve the data transmission efficiency, and simplify the complexity of the vehicle's communication forwarding system.

[0100] In a possible implementation, when the first number is greater than the second number, the above S102 can be implemented in the following manner. That is, after obtaining the first data frame in the first bus, the first data frame is decomposed to obtain the first number of protocol data units. The first number of protocol data units are grouped in units of the second number of protocol data units to obtain at least one group. Each group in the at least one group is processed separately to obtain a second data frame corresponding to each group.

[0101] Specifically, after obtaining the protocol data unit in each packet, the protocol data unit in each packet may be encapsulated according to the data frame format supported for transmission by the second bus to obtain a second data frame corresponding to each packet.

[0102] Exemplarily, the first number is 4 and the second number is 2, then the two protocol data units in the first data are taken as a group to obtain two packets. For each packet, the two protocol data units in the packet are concatenated and encapsulated to obtain a second data frame corresponding to the packet.

[0103] After obtaining the second data frame corresponding to each of the packets, the second data frame corresponding to each of the packets may be sent to the second bus.

[0104] In a possible implementation, the first number is less than the second number. In this case, the above S101 is specifically to obtain multiple first data frames corresponding to the first bus. The above S102 can be implemented in the following manner. That is, each first data frame in the multiple first data frames is decomposed to obtain a third number of protocol data units, and at least one second data frame including the second number of the protocol data units is obtained according to the third number of protocol data units.

[0105] The third number is the total number of protocol data units included in the multiple first data frames, that is, the third number is an integer multiple of the first number, and the third number is the total number of protocol data units obtained by decomposing the multiple first data frames.

[0106] For example, the first number is 2 and the second number is 5. In this case, 5 first data frames can be obtained, and thus 10 protocol data units can be obtained by decomposition. By processing the 5 protocol data units, a second data frame can be obtained. Then, the 10 protocol data units can be divided into two groups, each group containing 5 protocol data units, so that two second data frames can be obtained.

[0107] In another example, if the first number is 2 and the second number is 4, in this case, 2 first data frames can be obtained, and thus 4 protocol data units can be obtained by decomposing them. And by splicing the 4 protocol data units, one second data frame can be obtained.

[0108] In a possible implementation, if the type of the first bus is a controller area network bus CANFD with a variable rate, the process of decomposing the first data frame to obtain a first number of protocol data units may be to decompose the first data frame to obtain a protocol data unit container, wherein the protocol data unit container encapsulates the first number of protocol data units in the first data frame.

[0109] After the protocol data unit container is obtained, the first number of protocol data units may be decomposed from the protocol data unit container.

[0110] like Figure 7 As shown, in the embodiment of the present application, a protocol data unit container is encapsulated in a data frame corresponding to the CANFD bus, at least one protocol data unit can be encapsulated in the protocol data unit container, and a plurality of data can be encapsulated in a protocol data unit. When the first bus is the CANFD bus, the first data frame can be first decomposed to obtain a protocol data unit container, and then the first number of protocol data units can be obtained by decomposing the protocol data unit container.

[0111] Similarly, when the type of the second bus is CANFD, when at least one second data frame including the second number of protocol data units is obtained according to the third number of protocol data units, at least one protocol data unit container including the second number of protocol data units can be obtained according to the third number of protocol data units. Then, according to the at least one protocol data unit container, a second data frame corresponding to each protocol data unit container is obtained.

[0112] In a possible implementation manner, the protocol data unit header included in the first data frame can determine the arrangement order of the third number of protocol data units according to the protocol data unit headers included in multiple first data frames.

[0113] Specifically, since there may be multiple protocol data units in the protocol data unit container, a data unit header may be added before each protocol data unit, and the corresponding protocol data unit may be identified through each data unit header, and after the corresponding protocol data unit is identified, the arrangement order of the third number of protocol data units may be determined. Further, according to the third number of protocol data units and the arrangement order, at least one second data frame including the second number of protocol data units may be obtained.

[0114] In summary, the present application provides a vehicle bus data transmission method. When converting a first data frame into a second data frame, in a specific implementation, the first data frame can be processed according to the first number of protocol data units included in the first data frame and the second number of protocol data units included in the data frame supported for transmission by the second bus, to obtain a second data frame including a second number of protocol data units. In other words, the gateway controller processes the first data frame in units of protocol data units containing multiple data to obtain the second data frame, which can effectively reduce the processing load of the gateway controller.

[0115] The present application changes the traditional way of encapsulating data in data frames, so that communication between different types of buses does not need to be based on single data units. The data are rearranged and combined, which can solve the problem of low compatibility caused by inconsistent data field lengths during the mutual transmission of data corresponding to different types of buses.

[0116] The present application provides a vehicle bus data transmission device, see Figure 8 This figure is a structural schematic diagram of a vehicle bus data transmission device provided in an embodiment of the present application. Its specific implementation method is consistent with the implementation method and the technical effect achieved in the embodiment of the above method, and some contents will not be repeated here.

[0117] The present application provides a vehicle bus data transmission device 1100, which is executed by a gateway controller and includes:

[0118] An acquiring unit 1101, a processing unit 1102 and a sending unit 1103;

[0119] The acquiring unit 1101 is configured to acquire a first data frame in a first bus, wherein the first data frame includes a first number of protocol data units, and each protocol data unit in the first number of protocol data units includes a plurality of data;

[0120] The processing unit 1102 is configured to process the first data frame according to the first number and a second number of protocol data units included in the data frame supported for transmission by the second bus, to obtain a second data frame including the second number of protocol data units;

[0121] The sending unit 1103 is used to send the second data frame to the second bus.

[0122] In a possible implementation, the first number is greater than the second number, and the processing unit includes: a first decomposition subunit, a grouping subunit, and a processing subunit;

[0123] The first decomposition subunit is used to decompose the first data frame to obtain the first number of protocol data units;

[0124] The grouping subunit is used to group the first number of protocol data units in units of a second number of protocol data units to obtain at least one group;

[0125] The processing subunit is used to process each of the at least one group respectively to obtain a second data frame corresponding to each of the groups;

[0126] The sending unit is specifically used for:

[0127] The second data frame corresponding to each of the packets is sent to the second bus.

[0128] In a possible implementation, the type of the first bus is a controller area network bus with a variable rate CANFD, and the first decomposition subunit includes:

[0129] A first data frame decomposition unit and a protocol data unit container decomposition unit;

[0130] The first data frame decomposition unit is used to decompose the first data frame to obtain a protocol data unit container, wherein the protocol data unit container encapsulates a first number of protocol data units in the first data frame;

[0131] The protocol data unit container decomposition unit is configured to decompose the first number of protocol data units from the protocol data unit container.

[0132] In a possible implementation manner, the first number is smaller than the second number, and the acquisition unit is specifically used to: acquire a plurality of first data frames corresponding to the first bus;

[0133] The processing unit comprises: a second decomposition subunit and a first obtaining subunit;

[0134] The second decomposition subunit is used to decompose each first data frame in the multiple first data frames to obtain a third number of protocol data units, where the third number is the total number of protocol data units included in the multiple first data frames;

[0135] The first obtaining subunit is used to obtain at least one second data frame including a second number of the protocol data units according to the third number of the protocol data units.

[0136] In a possible implementation, the type of the second bus is CANFD, and the first obtaining subunit includes: a second obtaining subunit and a third obtaining subunit;

[0137] The second obtaining subunit is used to obtain at least one protocol data unit container including a second number of the protocol data units according to the third number of protocol data units;

[0138] The third obtaining subunit is used to obtain, according to at least one of the protocol data unit containers, a second data frame corresponding to each protocol data unit container.

[0139] In a possible implementation, the first obtaining subunit includes:

[0140] Determine the subunit and fourth obtain the subunit;

[0141] The determining subunit is configured to determine an arrangement order of the third number of protocol data units according to the protocol data unit headers included in the plurality of first data frames;

[0142] The fourth obtaining subunit is used to obtain at least one second data frame including a second number of the protocol data units according to the third number of protocol data units and the arrangement order.

[0143] In a possible implementation, the type of the first bus is different from the type of the second bus, and the first bus includes: a controller area network bus CAN, CANFD, a local area network LIN, or an Ethernet bus;

[0144] The second bus includes: a controller area network bus CAN, CANFD, a local connection network LIN, or an Ethernet bus.

[0145] In summary, the present application provides a vehicle bus data transmission device. When converting a first data frame into a second data frame, in a specific implementation, the first data frame can be processed according to the first number of protocol data units included in the first data frame and the second number of protocol data units included in the data frame supported for transmission by the second bus, to obtain a second data frame including a second number of protocol data units. In other words, the gateway controller processes the first data frame in units of protocol data units containing multiple data to obtain the second data frame, which can effectively reduce the processing load of the gateway controller.

[0146] The present application provides a computer device, the computer device comprising: a processor and a memory;

[0147] The memory is used to store program code and transmit the program code to the processor;

[0148] The processor is used to execute the steps of the vehicle bus data transmission method as described above according to the instructions in the program code.

[0149] The present application provides a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the vehicle bus data transmission method as described above are implemented.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A vehicle bus data transmission method, characterized in that: Executed by the gateway controller, including: Acquire a first data frame in a first bus, wherein the first data frame includes a first number of protocol data units, and each protocol data unit in the first number of protocol data units includes a plurality of data; Processing the first data frame according to the first number and a second number of protocol data units included in the data frame supported for transmission by the second bus to obtain a second data frame including a second number of the protocol data units; The second data frame is sent to the second bus.

2. The method according to claim 1, characterized in that The first number is greater than the second number, and the first data frame is processed according to the first number and the second number of protocol data units included in the data frame supported for transmission by the second bus to obtain a second data frame including the second number of the protocol data units, including: Decomposing the first data frame to obtain the first number of protocol data units; Grouping the first number of protocol data units in units of a second number of protocol data units to obtain at least one group; Processing each of the at least one group respectively to obtain a second data frame corresponding to each of the groups; The sending the second data frame to the second bus includes: The second data frame corresponding to each of the packets is sent to the second bus.

3. The method according to claim 2, characterized in that The type of the first bus is a controller area network bus with a variable rate CANFD, and the decomposing the first data frame to obtain the first number of protocol data units includes: Decomposing the first data frame to obtain a protocol data unit container, wherein the protocol data unit container encapsulates a first number of protocol data units in the first data frame; The first number of protocol data units is decomposed from the protocol data unit container.

4. The method according to claim 1, characterized in that: The first number is smaller than the second number, and acquiring a first data frame corresponding to the first bus includes: Acquire a plurality of first data frames corresponding to the first bus; The processing of the first data frame according to the first number and the second number of protocol data units included in the data frame supported for transmission by the second bus to obtain a second data frame including the second number of the protocol data units comprises: Decomposing each first data frame in the plurality of first data frames to obtain a third number of protocol data units, where the third number is the total number of protocol data units included in the plurality of first data frames; At least one second data frame including a second number of the protocol data units is obtained according to the third number of the protocol data units.

5. The method according to claim 4, characterized in that The type of the second bus is CANFD, and obtaining at least one second data frame including a second number of the protocol data units according to the third number of the protocol data units includes: According to the third number of protocol data units, obtaining at least one protocol data unit container including the second number of protocol data units; According to at least one of the protocol data unit containers, a second data frame corresponding to each protocol data unit container is obtained.

6. The method according to claim 4, characterized in that The obtaining, according to the third number of protocol data units, at least one second data frame including a second number of the protocol data units comprises: Determining an arrangement order of the third number of protocol data units according to the protocol data unit headers included in the plurality of first data frames; At least one second data frame including a second number of the protocol data units is obtained according to the third number of protocol data units and the arrangement order.

7. The method according to any one of claims 1-2 or 4 or 6, characterized in that: The type of the first bus is different from the type of the second bus, and the first bus includes: a controller area network bus CAN, a CANFD, a local connection network LIN, or an Ethernet bus; The second bus includes: a controller area network bus CAN, CANFD, a local connection network LIN, or an Ethernet bus.

8. A vehicle bus data transmission device, characterized in that: Executed by the gateway controller, including: an acquisition unit, a processing unit, and a sending unit; The acquisition unit is used to acquire a first data frame in the first bus, wherein the first data frame includes a first number of protocol data units, and each protocol data unit in the first number of protocol data units includes multiple data; The processing unit is configured to process the first data frame according to the first number and a second number of protocol data units included in the data frame supported for transmission by the second bus, so as to obtain a second data frame including the second number of the protocol data units; The sending unit is used to send the second data frame to the second bus.

9. A computer device, characterized in that: The computer device comprises: a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the steps of a vehicle bus data transmission method as described in any one of claims 1 to 7 according to the instructions in the program code.

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