Message conversion method, first gateway, second gateway, vehicle and related equipment

By designing message conversion methods and gateway equipment, data communication between different types of bus network protocols in the vehicle is realized, which solves the complexity of the collaborative work of multiple bus network protocols in the vehicle network and improves the bandwidth and data transmission efficiency of the vehicle network.

CN119766901APending Publication Date: 2025-04-04BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410869232.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

How to realize data communication between different types of bus network protocols in the car, and solve the complexity of the collaborative work of multiple bus network protocols in the on-board network.

Method used

By designing a packet conversion method and gateway equipment, which are the first gateway and the second gateway respectively, the conversion of data of different types of bus protocols in the vehicle is realized. The first gateway receives messages from the first communication network and converts them into a protocol of the second communication network, and the second gateway receives messages from a plurality of third communication networks and converts them into a protocol of the fourth communication network.

Benefits of technology

Data communication between different types of bus network protocols is realized, the complexity problem of the collaborative work of multiple bus network protocols in the vehicle is solved, and the bandwidth and data transmission efficiency of the on-board network are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766901A_ABST
    Figure CN119766901A_ABST
Patent Text Reader

Abstract

The invention discloses a message conversion method, a first gateway, a second gateway, a vehicle and related equipment. The method is used for a vehicle-mounted communication network, the vehicle-mounted communication network comprises a first communication network and a second communication network, and the method comprises the following steps: a first gateway receives a first message from the first communication network; the first gateway sends a second message to the second communication network, the second message comprises first indication information, the first indication information indicates an identifier ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network; the first communication network is different from the second communication network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a message conversion method, a first gateway, a second gateway, a vehicle and related equipment. Background Art

[0002] As vehicles become more intelligent and automated, and application scenarios become more complex, the requirements for vehicle network bandwidth are getting higher and higher. The future trend is for in-vehicle networks to transform from traditional bus network protocols to multiple bus network protocols working together to achieve in-vehicle communication. Therefore, how to achieve the coexistence of multiple bus network protocols in the vehicle and enable data communication between different bus network protocols is an urgent problem to be solved. Summary of the invention

[0003] The present application provides a message conversion method, a first gateway, a second gateway, a vehicle and related equipment, which converts data of different types of bus protocols in the vehicle to achieve data communication between different types of bus protocols.

[0004] In a first aspect, the present application provides a message conversion method for a vehicle-mounted communication network, the vehicle-mounted communication network including a first communication network and a second communication network, the method comprising:

[0005] The first gateway receives a first message from the first communication network;

[0006] The first gateway sends a second message to the second communication network, wherein the second message includes first indication information, the first indication information indicates an identification ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network, and the first communication network and the second communication network are different.

[0007] In a second aspect, the present application provides a message conversion method for a vehicle-mounted communication network, wherein the vehicle-mounted communication network includes one or more third communication networks and a fourth communication network, and the method includes:

[0008] The second gateway receives a plurality of third messages from one or more third communication networks;

[0009] The second gateway sends a fourth message to the fourth communication network, wherein the fourth message includes fourth indication information, and the fourth indication information is used to indicate an identification ID of each third message. The fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, and each third communication network is different from the fourth communication network.

[0010] In a third aspect, the present application provides a first gateway for an in-vehicle communication network, the in-vehicle communication network including a first communication network and a second communication network, the first gateway including: a first transceiver module and a second transceiver module;

[0011] The first transceiver module is used to receive a first message from the first communication network;

[0012] The second transceiver module is used to send a second message to the second communication network, wherein the second message includes first indication information, the first indication information indicates an identification ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network, and the first communication network and the second communication network are different.

[0013] In a fourth aspect, the present application provides a second gateway for an in-vehicle communication network, wherein the in-vehicle communication network includes one or more third communication networks and a fourth communication network, and the second gateway includes: a third transceiver module and a fourth transceiver module;

[0014] The third transceiver module is used to receive multiple third messages from one or more third communication networks;

[0015] The fourth transceiver module is used to send a fourth message to the fourth communication network, wherein the fourth message includes fourth indication information, and the fourth indication information is used to indicate the identification ID of each third message. The fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, and each third communication network is different from the fourth communication network.

[0016] In a fifth aspect, the present application provides an electronic device, comprising: a processor and a memory, the processor being connected to the memory, the memory being used to store a computer program, and the processor being used to execute the computer program stored in the memory, so that the electronic device executes the method of the first aspect or the second aspect.

[0017] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program enables a computer to execute the method of the first aspect or the second aspect.

[0018] In a seventh aspect, the present application provides a vehicle, which includes the gateway in the third aspect or the fourth aspect or the electronic device in the fifth aspect.

[0019] In an eighth aspect, the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and is computer-operable to cause the computer to execute the method of the first aspect or the second aspect.

[0020] Implementing this application has the following beneficial effects:

[0021] First, the first gateway receives a first message from the first communication network; then the first gateway sends a second message to the second communication network, wherein the second message includes first indication information, the first indication information indicates an identification ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network, and the first communication network and the second communication network are different; similarly, the second gateway receives multiple third messages from one or more third communication networks, and then the second gateway sends a fourth message to the fourth communication network, wherein the fourth message includes fourth indication information, and the fourth indication information is used to indicate an identification ID of each third message, and the fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, and each third communication network is different from the fourth communication network. That is to say, the gateway converts data of different types of bus network protocols in the vehicle, thereby realizing data communication between different types of bus network protocols. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 A schematic diagram of a message conversion system provided in an embodiment of the present application;

[0024] Figure 2 A schematic diagram of another message conversion system provided in an embodiment of the present application;

[0025] Figure 3 A schematic diagram of a new message conversion system provided in an embodiment of the present application;

[0026] Figure 4 A schematic diagram of another message conversion system provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of another message conversion system provided in an embodiment of the present application;

[0028] Figure 6 A schematic diagram of yet another message conversion system provided in an embodiment of the present application;

[0029] Figure 7 A flowchart of a message conversion method provided in an embodiment of the present application;

[0030] Figure 8 A schematic diagram of converting a first message into a second message when the first communication network is not Ethernet provided in an embodiment of the present application;

[0031] Fig. 9 A schematic diagram of a scenario of message reverse conversion provided in an embodiment of the present application;

[0032] Fig.10 An interactive schematic diagram of a message conversion method provided in an embodiment of the present application;

[0033] Fig.11 A flowchart of another message conversion method provided in an embodiment of the present application;

[0034] Fig.12 A schematic diagram of performing frame conversion on multiple third messages to obtain a fourth message when the third communication network is non-Ethernet provided in an embodiment of the present application;

[0035] Fig.13 A schematic diagram of another scenario of message inverse conversion provided in an embodiment of the present application;

[0036] Fig.14 A block diagram of the functional units of a first gateway provided in an embodiment of the present application;

[0037] Fig.15 A block diagram of the functional units of a second gateway provided in an embodiment of the present application;

[0038] Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] The terms "first", "second", "third" and "fourth" etc. in the specification, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0041] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0042] See also Figure 1 , Figure 1 A schematic diagram of a message conversion system provided in an embodiment of the present application.

[0043] Figure 1 The message conversion system shown includes a first gateway, a first sending node, a first receiving node, a first communication network, and a second communication network; wherein the number of the first sending node and the first receiving node can be one or more, which is not limited in this application. Figure 1 The embodiments are all illustrated by taking one as an example; the first sending node communicates with the first gateway through the first communication network, and the first receiving node communicates with the first gateway through the second communication network; the first communication network is different from the second communication network, the first communication network communicates based on a first protocol, and the second communication network communicates based on a second protocol, the first protocol and the second protocol are different, or the types of the first communication network and the second communication network are different, for example, one of the first communication network and the second communication network is Ethernet (such as an in-vehicle Ethernet bus), and the other is any communication network other than Ethernet (hereinafter referred to as "non-Ethernet"), non-Ethernet includes but is not limited to: Controller Area Network (CAN), extended CAN, Controller Area Network with Flexible Data Rate (CAN-FD), extended CAN-FD, Local Interconnect Network (LIN), FlexRay network, etc., which are not specifically limited in this application.

[0044] First, a first sending node sends a first message to a first gateway through a first communication network, wherein the first message includes first indication information, and the first indication information is used to indicate an identification ID of the first message, and the identification ID can be used to determine a first receiving node of the first message; then the first gateway converts the first message into a second message corresponding to the second communication network; optionally, it can also be understood that after receiving the first message from the first communication network, the first gateway determines the first receiving node corresponding to the first indication information carried by the first message from a communication matrix preset by the first gateway based on the first indication information carried by the first message, and then the first gateway determines that the first message needs to be converted into a second message corresponding to the second communication network through the type of the communication network corresponding to the first receiving node (i.e., the type of the second communication network); further, the first gateway sends the second message to the first receiving node through the second communication network, and at this time, the second message also includes the first indication information in the first message, thereby realizing data communication between different types of bus networks.

[0045] For further information, see Figure 2 , Figure 2 A schematic diagram of another message conversion system provided in an embodiment of the present application.

[0046] Figure 2 The message conversion system shown includes a first gateway, a first sending node, a first receiving node, a first communication network, and a second communication network; the first gateway includes a first transceiver module and a second transceiver module, wherein one of the first transceiver module and the second transceiver module is a protocol transceiver module corresponding to the first communication network, and the other is a protocol transceiver module corresponding to the second communication network, that is, one of the first transceiver module and the second transceiver module can be an Ethernet transceiver module, and the other can be a non-Ethernet transceiver module, wherein the non-Ethernet transceiver module includes but is not limited to: CAN transceiver module, extended CAN transceiver module, CAN-FD transceiver module, extended CAN-FD transceiver module, LIN transceiver module, FlexRay transceiver module, etc., which are not specifically limited in this application; it should be noted that Figure 2 The embodiment is mainly described by taking the first transceiver module being a protocol transceiver module corresponding to the first communication network and the second transceiver module being a protocol transceiver module corresponding to the second communication network as an example, specifically:

[0047] The first transceiver module receives a first message from a first sending node through a first communication network, and then the second transceiver module sends a second message to a second communication network, and then the first receiving node receives the second message from the second communication network, thereby realizing data communication between different types of bus networks.

[0048] It should be stated that Figure 2For other relevant descriptions of the first gateway, the first sending node, the first receiving node, the first communication network, the second communication network, etc. in the embodiment, refer to Figure 1 The corresponding description of the embodiments will not be repeated here.

[0049] based on Figure 2 For example, see Figure 3 , Figure 3 A schematic diagram of a new message conversion system provided in an embodiment of the present application.

[0050] Figure 3 The message conversion system shown includes a first gateway, a first sending node, a first receiving node, a first communication network, and a second communication network; the first gateway includes a first control module, a first transceiver module, and a second transceiver module. Figure 3 The embodiment is mainly described by taking as an example that the first transceiver module is a protocol transceiver module corresponding to the first communication network and the second transceiver module is a protocol transceiver module corresponding to the second communication network.

[0051] The first transceiver module receives a first message from the first sending node through the first communication network, and then the first transceiver module sends the first message to the first control module. Exemplarily, when the first sending node sends the first message to the first transceiver module through the first communication network, the first transceiver module correspondingly receives a first analog signal from the first communication network, and then the first transceiver module digitally converts the first analog signal to obtain a first message (i.e., a digital signal), and then the first transceiver module sends the first message to the first control module; then the first control module converts the first message into a second message; then the second transceiver module sends the second message to the second communication network, and then the first receiving node receives the second message from the second communication network, thereby realizing data communication between different types of bus networks.

[0052] It should be stated that Figure 3 For other relevant descriptions of the first gateway, the first sending node, the first receiving node, the first communication network, the second communication network, etc. in the embodiment, refer to Figure 1 and Figure 2 The corresponding description of the embodiments will not be repeated here.

[0053] See also Figure 4 , Figure 4 A schematic diagram of another message conversion system provided in an embodiment of the present application.

[0054] Figure 3 The message conversion system shown includes a second gateway, a plurality of second sending nodes (i.e. Figure 4The second sending node 1, the second sending node 2, the second sending node 3 shown), and the second receiving node corresponding to the plurality of second sending nodes; wherein each second sending node communicates with the second gateway through a third communication network, such as Figure 4 The second sending node 1 and the second sending node 2 shown communicate through a third communication network, and the second sending node 3 communicates through another third communication network, that is, the number of third communication networks is multiple at this time. Of course, the data of the third communication network can also be one, that is, the second sending node 1, the second sending node 2, and the second sending node 3 all communicate with the second gateway through the same third communication network ( Figure 4 Not shown), the second receiving node communicates with the second gateway through a fourth communication network; similar to the first communication network and the second communication network in the above embodiments, the third communication network is different from the fourth communication network, the third communication network communicates based on a third protocol, the fourth communication network communicates based on a fourth protocol, the third protocol is different from the fourth protocol, or the third communication network and the fourth communication network are of different types, for example, one of the third communication network and the fourth communication network is Ethernet, and the other is non-Ethernet, which is not specifically limited in the present application. It should be noted that the second gateway and the first gateway may be the same or different, which is not specifically limited in the present application.

[0055] First, the second sending node 1, the second sending node 2, and the second sending node 3 send corresponding third messages to the second gateway through the corresponding third communication network, wherein each third message includes fourth indication information, and each fourth indication information is used to indicate an identification ID of each third message, and each identification ID can determine the second receiving node of each third message; then the second gateway performs frame conversion on multiple third messages to obtain a fourth message, wherein the fourth message includes the second data and fourth indication information carried by each third message; and then the second gateway sends the fourth message to the second receiving node through the fourth communication network, thereby realizing data communication between different types of bus networks.

[0056] For further information, see Figure 5 , Figure 5 A schematic diagram of another message conversion system provided in an embodiment of the present application.

[0057] Figure 5 The message conversion system shown includes a second gateway, a plurality of second sending nodes (i.e. Figure 5 The second sending node 1, the second sending node 2, the second sending node 3 shown), and the second receiving node corresponding to each second sending node; the second receiving node corresponding to each second sending node may be the same or different ( Figure 4 The same is used as an example for illustration), and the second receiving nodes corresponding to each second sending node are located in the same bus network.

[0058] The second gateway includes a third transceiver module and a fourth transceiver module, wherein the third transceiver module and the fourth transceiver module are similar to the first transceiver module and the second transceiver module, one of the third transceiver module and the fourth transceiver module is a protocol transceiver module corresponding to the third communication network, and the other is a protocol transceiver module corresponding to the fourth communication network, that is, one of the third transceiver module and the fourth transceiver module can be an Ethernet transceiver module, and the other is a non-Ethernet transceiver module, which will not be repeated here. Exemplarily, assuming that the third transceiver module is a protocol transceiver module corresponding to the third communication network, and the protocol transceiver module corresponding to the third communication network is a non-Ethernet transceiver module, if at this time multiple second sending nodes all communicate with the second gateway through the same communication network in the non-Ethernet network (such as a LIN network), then the number of third transceiver modules is one, that is, the LIN network transceiver module; similarly, if at this time the type of the third communication network involved when the multiple second sending nodes communicate with the second gateway includes multiple types in the non-Ethernet network (such as a CAN network, a LIN network), then the number of third transceiver modules is multiple, that is, including a CAN network transceiver module and a LIN network transceiver module; it should be noted that the fourth transceiver module is the same as the third transceiver module, and all possible implementation methods are not listed here one by one.

[0059] It should be stated that Figure 5 The embodiment mainly takes the third transceiver module as a protocol transceiver module corresponding to the third communication network and a protocol transceiver module corresponding to the fourth communication network, and the type of the third communication network involved when multiple second sending nodes communicate with the second gateway includes multiple different types, that is, the second sending node 1 and the second sending node 2 correspond to one type of third communication network, and the second sending node 3 corresponds to another type of third communication network. The third transceiver module corresponds to the third transceiver module 1 and the third transceiver module 2. For example, it is described specifically:

[0060] The third transceiver module 1 receives corresponding third messages from the second sending node 1 and the second sending node 2 respectively through a third communication network, and the third transceiver module 2 receives the corresponding third message from the second sending node 3 through a third communication network, and then the fourth transceiver module sends a fourth message to the second receiving node through a fourth communication network, wherein the fourth message is obtained by framing and converting the corresponding third messages received from the second sending node 1 and the second sending node 2 and the corresponding third message received from the second sending node 3, and accordingly, the second receiving node receives the fourth message from the fourth communication network, thereby realizing data communication between different types of bus networks.

[0061] It should be stated that Figure 5 For other relevant descriptions of the second gateway, the second sending node, and the second receiving node in the embodiment, refer to Figure 4The corresponding description of the embodiments will not be repeated here.

[0062] based on Figure 5 For example, see Figure 6 , Figure 6 A schematic diagram of yet another message conversion system provided in an embodiment of the present application.

[0063] Figure 6 The message conversion system shown includes a second gateway, a plurality of second sending nodes (i.e. Figure 6 The second sending node 1, the second sending node 2, the second sending node 3 shown), and the second receiving node corresponding to each second sending node; the second receiving node corresponding to each second sending node may be the same or different ( Figure 6 Taking the same as an example for illustration), and the second receiving node corresponding to each second sending node is located in the same bus network; the second gateway includes a second control module, a third transceiver module and a fourth transceiver module, and it should be explained that, Figure 6 For other relevant descriptions of the second gateway, the second sending node, and the second receiving node in the embodiment, refer to Figure 5 The corresponding description of the embodiments will not be repeated here.

[0064] The third transceiver module 1 receives corresponding third messages from the second sending node 1 and the second sending node 2 respectively through a third communication network, and then the third transceiver module 1 sends the third messages corresponding to the second sending node 1 and the second sending node 2 to the second control module respectively, and the third transceiver module 2 receives the corresponding third message from the second sending node 3 through a third communication network, and then the third transceiver module 2 sends the third message corresponding to the second sending node 3 to the second control module; then the second control module frames the three third messages to obtain a fourth message; then the second control module sends the fourth message to the fourth transceiver module, so as to send the fourth message to the fourth communication network through the fourth transceiver module, and accordingly, the second receiving node receives the fourth message from the fourth communication network, thereby realizing data communication between different types of bus networks.

[0065] See also Figure 7 , Figure 7 A flowchart of a message conversion method provided in an embodiment of the present application. Figure 7 The method shown is applied to the first gateway, and the method includes but is not limited to the following steps S701-S702:

[0066] S701. A first gateway receives a first message from a first communication network.

[0067] In an embodiment of the present application, a first sending node sends a first message to a first communication network, and then a first gateway receives the first message from the first communication network, the first message including first indication information, the first indication information being used to indicate an identification ID of the first message, the identification ID being used to determine a first receiving node of the first message, that is, the first gateway pre-writes a communication matrix, the communication matrix recording the correspondence between the indication information and the receiving node, and therefore the first gateway can determine the next receiving point corresponding to the first indication information, i.e., the first receiving node, from the communication matrix based on the first indication information of the first message.

[0068] S702: The first gateway sends a second message to the second communication network.

[0069] In an embodiment of the present application, the second message also includes the above-mentioned first indication information, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network. The first communication network and the second communication network are different. The first communication network communicates based on a first protocol, and the second communication network communicates based on a second protocol. The first protocol and the second protocol are different, or the types of the first communication network and the second communication network are different. For example, one of the first communication network and the second communication network is Ethernet, and the other is any communication network other than Ethernet, that is, non-Ethernet, which is not specifically limited in this application; after the first gateway sends the second message to the second communication network, the first receiving node receives the second message from the second communication network, that is, the first receiving node communicates with the first gateway through the second communication network.

[0070] In an optional embodiment, if the first communication network is any one other than Ethernet, that is, any one of non-Ethernet (no further explanation here), and the corresponding second communication network is Ethernet, then the first target field of the second message includes the first indication information and the first data carried by the first message. At this time, the second message is the target Ethernet message format corresponding to Ethernet (not explained here, and will be explained in detail below). Optionally, the first target field also includes at least one of the following information: the second indication information for indicating the first communication network and the third indication information for indicating the length of the first data, wherein the second indication information indicates the type of bus network for collecting the first message, such as CAN type, or LIN type, etc., which is not specifically limited in this application, and the third indication information indicates the length of the first data carried by the first message. Optionally, the first target field is the load field of the second message, that is, the first target field is the load field in the Ethernet message. Optionally, the second message may also include a first field, a second field, a third field, and a fourth field, wherein the first field is a header (i.e., an Ethernet header), the second field is an IP (Internet Protocol) protocol header, the third field is a TCP (Transmission Control Protocol) protocol header or a UDP (User Datagram Protocol) protocol header, and the fourth field is a check field (such as CRC check, etc., which is not specifically limited in this application).

[0071] It should be noted that when the first communication network is non-Ethernet, converting the first message to obtain the second message is equivalent to converting any message other than the Ethernet message (hereinafter referred to as "non-Ethernet message") into an Ethernet message. At this time, the first target field (i.e., the load field) of the Ethernet message, i.e., the second message, is customized and modified, and the first indication information, the first data, and the third indication information obtained from the analysis of the first message are encapsulated to obtain the first target field in the second message. Of course, the second indication information corresponding to the first message can also be added to the first target field. Since the second indication information indicates that the bus network of the acquisition source message, i.e., the first message, is the first communication network, it is convenient for the subsequent recipient or data collector to know through which type of bus network the first message is transmitted, and then it can verify whether itself (i.e., the recipient or data collector) has received or collected correctly, etc.

[0072] For easier understanding, see Figure 8 , Figure 8 A schematic diagram of converting a first message into a second message when the first communication network is not Ethernet is provided in an embodiment of the present application.

[0073] Figure 8The embodiment is described by taking the first communication network as a CAN network in a non-Ethernet network as an example, then the corresponding first message is a CAN message, and the converted second message is an Ethernet message. Figure 8 The format of the second message shown is an example of the above-mentioned target Ethernet message format. Figure 8 The structure of the CAN message shown includes a header, an arbitration section, a control end, a data section, a check section and a trailer in sequence, wherein the arbitration section may include the first indication information (such as ID) carried by the first message, the data section may include the first data carried by the first message, and the control section may include the third indication information for indicating the length of the first data; then the control module of the first gateway, i.e., the first control module, parses the first message to obtain the first valid data, wherein the first valid data includes the first data, the first indication information and the third indication information carried by the first message, and then the first control module encapsulates the first valid data to obtain the second message, at this time Figure 8 The second message shown includes an Ethernet header, an IP header, a TCP / UDP header, a first target field (i.e., a payload field of the Ethernet message), and a check field, wherein the first target field includes the second indication information, the third indication information, the first indication information, and the first data corresponding to the first message. It should be noted that the embodiment of the present application does not specifically limit the arrangement order of the various fields included in the first target field. Figure 8 This is just an example.

[0074] In an optional embodiment, if the first communication network is Ethernet and the corresponding second communication network is non-Ethernet, it is equivalent to that the first message is an Ethernet message and the second message is a message in a protocol format corresponding to the second communication network, such as a CAN message, a LIN message and other non-Ethernet messages. In this case, the format of the first message is the standard format of the Ethernet message. For example, the first message includes the above-mentioned first field (i.e., the Ethernet header), the second field (which may include the first indication information), the third field, the load field (which may include one or more of the first data, the third indication information for indicating the length of the first data, etc., which is not limited in this application), and the fourth field; then the first gateway follows the Ethernet protocol The first message is parsed according to the format standard to obtain valid data in the first message (such as one or more of the first data, first indication information, and third indication information carried by the first message), and then the first gateway encapsulates the valid data according to the protocol format standard corresponding to the second communication network to obtain the second message. At this time, the second message includes one or more of the first data, first indication information, and third indication information carried by the first message. For example, if the second message is in the CAN message format, the first data carried by the first message can correspond to the data segment of the second message, the first indication information can correspond to the arbitration segment of the second message, and the third indication information can correspond to the control segment of the second message.

[0075] In an optional embodiment, the second message may also include a first preset port number, wherein the first preset port number included in the second message is used to indicate that the second message is an Ethernet message obtained by converting a message of a protocol format standard corresponding to the first communication network. At this time, the first message is the source message. The reason why the first preset port number needs to be set for the second message is to distinguish it from other messages that have not been converted, so that when a subsequent recipient receives the second message, it can respond to the first preset port number and know the parsing rules for the second message, such as Figure 8 For the second message shown, the receiver can know based on the first preset port number that the second message is converted based on a source message, namely the first message, and the format of the second message should be the converted target Ethernet message format, and then the receiver can parse the second message based on the target Ethernet message format.

[0076] Further, when the second message includes the first preset port number, if the first gateway sends the second message to the second communication network, after the first receiving node receives the second message from the second communication network, the first receiving node can determine the next receiving node (i.e., the third receiving node) from the communication matrix that is also pre-stored locally at the first receiving node based on the first indication information in the second message. At this time, the communication network connected to the third receiving node is the type of the first communication network or the type of the second communication network, and then the first receiving node can reversely convert the second message to obtain a fifth message corresponding to the type of the first communication network or the type of the second communication network, and then the first receiving node can send the fifth message to the third receiving node. It should be noted that at this time, the first receiving node and the third receiving node can be gateways and other related equipment in the vehicle (such as vehicle controllers, battery management systems, advanced driver assistance systems, etc., which are not specifically limited in this application). Exemplarily, based on Figure 8 In an embodiment, that is, if the first message is a CAN message, the second message converted from the first message is an Ethernet message, and the format is the target Ethernet format mentioned above. When the first receiving node receives the second message from the first gateway, the first receiving node, in response to the first preset port number of the second message, parses it according to the parsing rule corresponding to the first preset port number. If, based on the first indication information obtained by the parsing, it is determined from the locally stored communication matrix that there is a corresponding third receiving node, the first receiving node encapsulates the valid data after the second message is parsed to obtain a fifth message corresponding to the first type of bus. At this time, the fifth message includes the first data, the first indication information, and the third indication information corresponding to the first message. For example, at this time, the fifth message is a non-Ethernet message (such as a CAN message, a LIN message, etc.).

[0077] For example, see Fig. 9 , Fig. 9 A schematic diagram of a scenario of message reverse conversion provided in an embodiment of the present application. Figure 8 Based on the embodiment, it is assumed that the first message sent by the first sending node to the first gateway through the first communication network is Figure 8 The CAN message shown, and then the first gateway converts the first message to obtain Figure 8 The second message (that is, the Ethernet message) shown, the first message and the second message are not repeated here; then the first gateway sends the second message to the first receiving node (for example, another gateway) through the second communication network, and then the first receiving node determines the next receiving node, that is, the third receiving node, based on the first indication information in the second message. At this time, if the third receiving node and the first receiving node communicate with each other through a bus network of the corresponding type of the first communication network, such as a CAN bus network, the first receiving node responds to the port number of the second message, parses the second message, obtains valid data from the second message, and then encapsulates the valid data according to the CAN bus protocol format standard to obtain a fifth message, and then the first receiving node sends the fifth message to the third receiving node through the CAN bus. At this time, the fifth message is a CAN message, and it should be explained that Fig. 9 The structure of the fifth message shown is similar to that of the first message and will not be elaborated here. Of course, the bus network type for communication between the third receiving node and the first receiving node can also be other types, such as LIN bus network, extended CAN bus network, etc. The corresponding second message type is LIN message, extended CAN message, which will not be elaborated here one by one.

[0078] Of course, before the first gateway sends the second message to the second communication network, the first gateway first converts the first message into the second message. That is to say, after determining the first receiving node corresponding to the first message based on the first indication information, it can then determine the need to convert the first message into the second message corresponding to the second type of bus based on the bus where the first receiving node is located, that is, the second type of bus. For example: if the first message does not include the first preset port number, the first gateway obtains valid data from the first message based on the protocol format standard corresponding to the first communication network. For example, if the first communication network is Ethernet, the first gateway obtains valid data from the first message based on the protocol format standard of Ethernet; if the first message includes the first preset port number, the first gateway obtains valid data from the first message in response to the first preset port number; then the first gateway encapsulates the valid data to obtain the second message. The following is mainly explained with the first communication network being Ethernet, as follows:

[0079] When the first communication network is Ethernet, that is, the type of the first message is an Ethernet message, if the first message does not include the above-mentioned first preset port number, that is, if the first message is an Ethernet message in a standard format, it means that the first message is a source message at this time. At this time, the first gateway directly obtains valid data from the first message based on the protocol format standard corresponding to Ethernet, and then the first gateway encapsulates the valid data based on the protocol format standard of the second communication network to obtain the second message. That is to say, when the first message belongs to a source message and is of Ethernet message type, the first message may include one or more of the first data, first indication information, third indication information, etc. carried by the first message itself, and then the first gateway parses the first message based on the Ethernet protocol format standard to obtain corresponding valid data (for example, one or more of the first data, first indication information, third indication information, etc. carried by the above-mentioned first message, which is not specifically limited in this application), and then the first gateway encapsulates the valid data according to the protocol format standard corresponding to the second communication network to obtain a second message. At this time, the second message is a non-Ethernet message, such as a CAN message, a LIN message, etc. For example, at this time, the second message may include the second indication information, one or more of the first data, first indication information, third indication information, etc. carried by the first message, which is not specifically limited in this application.

[0080] Similarly, when the first communication network is Ethernet, that is, the type of the first message is an Ethernet message, if the first message includes a first preset port number (wherein the first preset port number included in the first message is used to indicate that the first message is obtained by converting the first source message, and the first source message is a message of the protocol format standard corresponding to the second communication network), it means that the first message is not a source message at this time, but is converted based on a source message (the type belongs to a non-Ethernet message, that is, the source message is transmitted through non-Ethernet). At this time, the first gateway responds to the first preset port number and obtains valid data from the first message. Then the first gateway encapsulates the valid data based on the protocol format standard corresponding to the second communication network to obtain the second message. In other words, when the first message is not a source message and is of Ethernet message type, assuming that the first message is converted based on a whole frame of the first source message, then the first message includes one or more of the first indication information carried by the first source message, the first data carried by the first source message, the third indication information used to indicate the length of the first data carried by the first source message, and the indication information used to indicate the second type of bus (for example, the format of the first message is similar to Figure 6The format of the second message shown is not repeated here), wherein the first indication information carried by the first source message is used to determine that the receiving node of the first source message is the first gateway, and then the first gateway responds to the first preset port number, and parses the first message based on the parsing rule corresponding to the first preset port number to obtain corresponding valid data (such as the first indication information carried by the above-mentioned first source message, the first data carried by the first source message, and the third indication information used to indicate the length of the first data carried by the first source message, etc., which is not specifically limited in this application), and then encapsulates the valid data, that is, encapsulates it based on the protocol format standard corresponding to the second communication network to obtain a second message. At this time, the second message is a non-Ethernet message, such as a CAN message, a LIN message, etc. For example, at this time, the second message may include the first indication information carried by the above-mentioned first source message, the first data carried by the first source message, and the third indication information used to indicate the length of the first data carried by the first source message, etc., which is not specifically limited in this application.

[0081] That is to say, when the first message does not include the first preset port number, that is, it is a source message, the first gateway directly parses the first message according to the protocol format standard corresponding to the second communication network, obtains the valid data in the first message, and then encapsulates the valid data to obtain the second message corresponding to the second communication network; when the first message includes the first preset port number, that is, it is not a source message, the first gateway responds to the first preset port number, parses according to the parsing rules corresponding to the first preset port number, obtains the valid data in the first message, and then encapsulates the valid data to obtain the second message corresponding to the second type of bus. At this time, the process from the first message including the first preset port number → the second message can be understood as a reverse conversion process, and the principle is similar to the above-mentioned second message → the fifth message. At this time, the first gateway is equivalent to the above-mentioned third receiving node.

[0082] In an optional embodiment, when the first communication network is Ethernet, if the first message includes a second preset port number, wherein the second preset port number in the first message is used to indicate that the first message is obtained by framing and converting multiple second source messages, and each second source message is a message of the protocol format standard corresponding to the second communication network, then during the specific conversion, the first gateway responds to the second preset port number and obtains valid data corresponding to each source message from the first message; then the first gateway encapsulates the valid data corresponding to each source message based on the protocol format standard corresponding to the second communication network to obtain a second message corresponding to each second source message. That is to say, it is equivalent to that the first message is a framed message at this time, and multiple second messages corresponding to multiple source messages are obtained by deframing the first message. The following mainly takes the first type of bus as an Ethernet bus as an example for explanation, that is, the bus network type corresponding to each source message is the second communication network (non-Ethernet at this time), as follows:

[0083] When the first communication network is Ethernet, that is, the type of the first message is an Ethernet message, and the type of each second source message is a non-Ethernet message, then the first message may include one or more of the first indication information carried by each second source message, the first data carried by each second source message, the third indication information for indicating the length of the first data carried by each second source message, the indication information for determining the receiving time of each second source message, the indication information for indicating the bus network for collecting each second source message, etc., wherein the first indication information carried by each second source message is used to determine that the receiving node of each second source message is the first gateway, and then the first gateway responds to the second preset port number and parses the second message based on the parsing rule corresponding to the second preset port number to obtain valid data corresponding to each second source message (for example, each of the above The first gateway encapsulates the valid data corresponding to each second source message, that is, encapsulates based on the protocol format standard corresponding to each second source message to obtain multiple second messages. At this time, each second message is a non-Ethernet message. For example, the types of these multiple second messages include CAN messages, CAN-FD messages, LIN messages, etc. For example, at this time, each second message may include one or more of the first indication information carried by each second source message, the first data carried by each second source message, and the third indication information used to indicate the length of the first data carried by each second source message, etc., which is not specifically limited in this application.

[0084] In an optional embodiment, the indication information used to determine the receiving time of the first second source message is the absolute time of receiving the first second source message; the indication information used to determine the receiving time of the i-th second source message is the relative time of receiving the i-th second source message and receiving the i-1-th second source message (that is, the difference between the absolute time of receiving the i-th second source message and the absolute time of receiving the i-1-th second source message), where i>1.

[0085] In an optional embodiment, the target information corresponding to each second source message is arranged in the first message in the order of the absolute time of receiving each second source message, wherein the target information corresponding to each second source message includes one or more of the first indication information carried by each second source message, the first data carried by each second source message, the third indication information for indicating the length of the first data carried by each second source message, the indication information for determining the receiving time of each second source message, the indication information for indicating the bus network for collecting each second source message, etc., and the present application does not make specific limitations.

[0086] See also Fig.10 , Fig.10 An interactive schematic diagram of a message conversion method provided in an embodiment of the present application. Fig.10 The method shown includes but is not limited to the following steps S1001-S1005:

[0087] S1001. A first sending node sends a first message to a first communication network.

[0088] The first sending node is connected to or located in the first communication network.

[0089] S1002: The first gateway receives a first message from a first communication network.

[0090] S1003: The first gateway converts the first message into a second message corresponding to the second communication network.

[0091] The first receiving node is connected to or located in the second communication network.

[0092] S1004. The first gateway sends a second message to the second communication network.

[0093] S1005. The first receiving node receives a second message from a second communication network.

[0094] It should be noted that the principles of steps S1001-S1005 can refer to the corresponding explanations of the above embodiments and will not be repeated here.

[0095] In an embodiment of the present application, since the first sending node and the first receiving node use different bus network types to communicate with external node devices, the first sending node and the first receiving node cannot directly communicate data. Therefore, in the above embodiment of the present application, the first gateway performs whole-frame conversion on the first message received from the first sending node to obtain a second message, and then the first gateway sends the second message to the first receiving node, that is, the first gateway first performs data conversion on the first message corresponding to the first communication network to obtain the second message corresponding to the second communication network, and then the first gateway forwards the second message to the first receiving node. This not only enables data communication between different types of bus network protocols in the vehicle, but also has good application prospects for in-vehicle data interaction forwarding with high real-time requirements. That is, when the first gateway receives a message from the sending node, it is necessary to immediately convert the message and forward it to the next receiving node. Of course, for in-vehicle data interaction with lower real-time requirements, for example, data forwarding can be allowed to be completed within a preset time period, then the gateway can convert and forward multiple messages received in the preset time period every preset time period, or when collecting data from the entire vehicle, since there will be multiple sending nodes, the gateway will receive multiple messages accordingly. At this time, the gateway also needs to convert and forward the multiple messages. Therefore, for the two situations listed above, how the gateway converts and forwards the multiple messages received can be specifically referred to the relevant description of the following embodiment, as follows:

[0096] See also Fig.11 , Fig.11 A flowchart of another message conversion method provided in an embodiment of the present application. Fig.11 The method shown is applied to the second gateway, and the method includes but is not limited to the following steps S1101-S1102:

[0097] S1101. A second gateway receives multiple third messages from one or more third communication networks.

[0098] In an embodiment of the present application, based on the explanation of the above embodiment, multiple third messages may be received from a third communication network, or multiple third messages may be received from multiple third communication networks. For example, the multiple third messages in S901 include one or more third messages received by the second gateway from the third communication network a, and the second gateway receives one or more third messages from the third communication network b. Of course, there are other possible mapping relationships here, which are not listed here one by one. Each third message includes fourth indication information, and each fourth indication information is used to indicate the identification ID of each third message. The identification ID of each third message can determine the second receiving node of each third message. It should be noted that the fourth indication information is similar to the above-mentioned first indication information, and it will not be repeated here. Before the second gateway receives multiple third messages from one or more third communication networks, one or more second sending nodes send the above-mentioned multiple third messages to the third communication network, that is, each second sending node can send one or more third messages to the third communication network, thereby obtaining multiple third messages in S901, and each second sending node communicates with the second gateway through a third communication bus. It should be noted that each third message is similar to the above-mentioned first message, and it will not be repeated here.

[0099] S1102. The second gateway sends a fourth message to the fourth communication network.

[0100] In an embodiment of the present application, the fourth message also includes the above-mentioned fourth indication information, and the fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, each third communication network is different from the fourth communication network, the third communication network communicates based on the third protocol, and the fourth communication network communicates based on the fourth protocol, and the fourth protocol is different from the fourth protocol, or the types of the first communication network and the second communication network are different, for example, one of the third communication network and the fourth communication network is Ethernet and the other is non-Ethernet, which is not specifically limited in this application; after the second gateway sends the fourth message to the fourth communication network, the second receiving node corresponding to each third message receives the fourth message from the fourth communication network, and each second receiving node communicates with the second gateway through the fourth communication network, wherein the number of fourth communication networks can be one or more, which is not specifically limited in this application.

[0101] In an embodiment of the present application, the fourth message includes the second data and the fourth indication information carried by each third message. When the second receiving nodes corresponding to the plurality of third messages are located on the same bus network, the plurality of third messages can be framed and converted, and the corresponding valid data is obtained from each third message. Then, the valid data corresponding to each third message is assembled to obtain the fourth message, and then the second gateway can send the fourth message to the same bus network, thereby speeding up the forwarding efficiency. Of course, if the second receiving nodes corresponding to some of the plurality of third messages are not located on the same bus network, the part of the message is framed according to the above. Figure 7 The entire frame conversion corresponding to the embodiment can be processed and will not be described in detail here.

[0102] In an optional embodiment, if the third communication network is any communication network other than Ethernet, that is, non-Ethernet, the second target field of the fourth message includes at least one or more of fifth indication information for determining the reception time of each third message, sixth indication information for indicating the bus network for collecting each third message, and seventh indication information for indicating the length of the second data carried by each third message, and the present application does not make specific limitations.

[0103] It should be explained that since the number of the third communication network and the fourth communication network in the vehicle is one or more, for example, the number of Ethernets involved in the entire vehicle is one or more, and the number of non-Ethernet networks such as CAN network, extended CAN network, LIN network, CAN-FD network, etc. is one or more, especially when there are multiple, although multiple third messages are communicated with the second gateway through the third communication network, for example, they are all communicated with the second gateway through the CAN network, but for the receiver, it is only known that the multiple third messages are collected by the same type of bus network, and these multiple third messages cannot be distinguished. Therefore, by setting the sixth indication information of the collection network of each third message, it is convenient for the receiver or the data collector to know which network the multiple third messages come from, and then facilitate subsequent application processing.

[0104] In an optional embodiment, the fifth indication information corresponding to the first third message in the fourth message is used to indicate the absolute time when the second gateway receives the first third message, and the fifth indication information corresponding to the i-th third message is used to indicate the relative time when the second gateway receives the i-th third message and receives the i-1-th third message. For example, the relative time when the i-th third message is received and the i-1-th third message is received may be the difference between the absolute time when the i-th third message is received and the absolute time when the i-1-th third message is received, where i>1. It should be noted that since the byte resources occupied by the absolute time are larger than the byte resources occupied by the relative time, the fifth indication information corresponding to the first third message in the fourth message is set as the absolute time when the second gateway receives the first third message, and the fifth indication information corresponding to the remaining third messages are all absolute times. By using the absolute time when the first third message is received and the relative time when the remaining third messages are received, not only the absolute time when each third message is received can be derived, but also the occupying resources can be saved.

[0105] In an optional embodiment, the target information corresponding to each third message is arranged in the fourth message in the order of the absolute time of receiving each third message, and the target information corresponding to each third message includes one or more of the second data, fourth indication information, fifth indication information, sixth indication information, seventh indication information, etc. corresponding to each third message, which is not specifically limited in this application.

[0106] In an optional embodiment, when the fourth communication network is Ethernet, the second target field is the payload field of the fourth message, that is, the payload field in the Ethernet message.

[0107] For ease of understanding, the following is an example in which the third messages are non-Ethernet messages and the fourth message is an Ethernet message. Fig.12 , Fig.12 A schematic diagram of an embodiment of the present application for performing frame conversion on multiple third messages to obtain a fourth message when the third communication network is not Ethernet. Fig.12 As shown, assuming that the plurality of third messages include Fig.10The CAN message and LIN message shown are both non-Ethernet messages, wherein the CAN message includes a header, an arbitration segment (including the fourth indication information 1), a control segment (including the seventh indication information 1 for indicating the length of the second data 1 carried by the message), a data segment (including the second data 1 carried by the message), a check segment and a tail, etc., and the LIN message includes an interval field, a synchronization field, an identifier field (including the fourth indication information 2), a data field (including the second data 2 carried by the message, and the seventh indication information 2 for indicating the length of the second data 2), a check field, etc.; then the second gateway extracts valid information from the CAN message and the LIN message, and then the second gateway encapsulates the valid information corresponding to the CAN message and the LIN message based on the order of the reception time of the CAN message and the LIN message, and obtains Fig.12 The fourth message shown in the embodiment includes an Ethernet header, an IP header, a TCP / UDP header, a second target field, a check field, etc. The second target field includes the fifth indication information 1 corresponding to the CAN message, the collection information of the CAN message, the fifth indication information 2 corresponding to the LIN message, and the collection information of the LIN message. The collection information of the CAN message includes the sixth indication information 1 corresponding to the CAN message, the seventh indication information 1, the fourth indication information 1, and the second data 1. The collection information of the LIN message includes the sixth indication information 2 corresponding to the LIN message, the seventh indication information 2, the fourth indication information 2, and the second data 2. It should be noted that the messages shown in the embodiments of the present application are all examples, and the arrangement order between the field information related to each message is also an example, and the present application does not make specific limitations.

[0108] In an optional embodiment, the fourth message may also include a second preset port number, wherein the second preset port number is used to indicate that the fourth message is obtained by framing and converting a message of a protocol format standard corresponding to one or more third communication networks, or the second preset port number is used to indicate that the fourth message is obtained based on framing and conversion of multiple source messages, that is, the fourth message is obtained based on framing and conversion of multiple third messages, and each third message is a source message of the protocol format standard corresponding to the corresponding third communication network.

[0109] Furthermore, if the second receiving nodes corresponding to multiple third messages are all located on the fourth communication network, the second gateway sends a fourth message to the fourth communication network so that the second receiving node corresponding to each third message receives the fourth message from the fourth communication network, and then the second receiving node responds to the second preset port number and parses the fourth message based on the parsing rule corresponding to the second preset port number. Of course, if the second receiving node corresponding to each third message is the same (for example, another third gateway), after receiving the fourth message, the third gateway determines the next receiving node corresponding to each third message, that is, the fourth receiving node, based on the fourth indication information of each third message in the fourth message. At this time, the fourth receiving node corresponding to each third message may be located on the same bus network or may not be located on the same bus network. Therefore, at this time, the third gateway responds to the second preset port number to deframe the fourth message and obtain valid data corresponding to each third message (for example, including the second data carried by each third message, the fourth indication information carried by each third message, and the fourth receiving node used to indicate each third message). One or more of the seventh indication information of the length of the second data carried by the third message, etc., are not specifically limited in this application), and then the third gateway encapsulates the valid data corresponding to each third message according to the bus network protocol format standard where the fourth receiving node corresponding to each third message is located, to obtain multiple sixth messages corresponding to the multiple third messages, and then the third gateway sends each sixth network to the bus network where the fourth receiving node corresponding to each sixth message is located, that is, firstly, multiple third messages are framed and converted to obtain the fourth message, and then the fourth message is deframed to obtain multiple sixth messages corresponding to the multiple third messages, which is generally understood as a process of forward conversion and then reverse conversion.

[0110] For example, see Fig.13 , Fig.13 A schematic diagram of another scenario of message reverse conversion provided in an embodiment of the present application. Fig.13 As shown, the second sending node 1 communicates with the second gateway through the CAN network 1, and the second sending node 2 communicates with the second gateway through the LIN network 1, that is, at this time, both second sending nodes communicate with the second gateway through non-Ethernet; first, the second sending node 1 sends a CAN message to the second gateway through the CAN network 1 (with Fig.12 The CAN message in the embodiment is similar and will not be described here), and the second sending node 2 sends a LIN message to the second gateway through the LIN network 1 (similar to Fig.12 The LIN message in the embodiment is similar and will not be described here again); then the second gateway performs frame conversion on the CAN message and the LIN message to obtain a fourth message (similar to Fig.12 The LIN message in the embodiment is similar and will not be described here); if the second receiving node corresponding to the CAN message and the LIN message is located on the same bus network (ie Fig.13 Ethernet shown), Fig.13 Taking the example that the second receiving nodes corresponding to the CAN message and the LIN message are both the third gateway, the second gateway sends the fourth message to the third gateway; accordingly, if the third gateway determines the next receiving node corresponding to the fourth indication information 1, that is, the fourth receiving node 1, and the next receiving node corresponding to the fourth indication information 2, that is, the fourth receiving node 2, from the local communication matrix based on the fourth indication information 1 and the fourth indication information 2 in the fourth message, at this time, the fourth receiving node 1 communicates with the third gateway through the CAN network 2, and the fourth receiving node 2 communicates with the third gateway through the LIN network 2, then the third gateway deframes the fourth message to obtain valid data corresponding to the CAN message (for example, including the fourth indication information 1, the seventh indication information 1, and the second data 1) and the valid data corresponding to the LIN message (for example, including the fourth indication information 2, the seventh indication information 2, and the second data 2), and then the third gateway sends the fourth message according to the CA. The N network protocol format standard and the LIN network protocol format standard encapsulate the valid data corresponding to the CAN message and the valid data corresponding to the LIN message, respectively, and obtain the corresponding sixth message 1 and the sixth message 2, respectively, wherein the type of the sixth message 1 is a CAN message, and the type of the sixth message 2 is a LIN message, the sixth message 1 includes a header, an arbitration segment (including the fourth indication information 1), a control segment (including the seventh indication information 1 for indicating the length of the second data 1 carried by the message), a data segment (including the second data 1 carried by the message), a check segment and a tail, etc., and the sixth message 2 includes an interval field, a synchronization field, an identifier field (including the fourth indication information 2), a data field (including the second data 2 carried by the message, and the seventh indication information 2 for indicating the length of the second data 2), a check field, etc.; then the third gateway sends the corresponding sixth message 1 to the fourth receiving node, and sends the corresponding sixth message 2 to the fourth receiving node.

[0111] It should be noted that in the embodiments of the present application, when it is necessary to collect data of the entire vehicle at the same time in actual demand, or when the real-time requirements for data forwarding interaction within the vehicle are low, for multiple messages received through a third type of bus, such as a non-Ethernet bus, and the bus type and network of the receiving nodes corresponding to the multiple messages are the same, such as Ethernet buses, the gateway can perform frame conversion on the multiple messages and then forward them to the receiving node, which not only speeds up the forwarding efficiency, but also can perform data conversion on different types of bus protocols in the vehicle, thereby realizing data forwarding communication between different types of bus protocols.

[0112] See also Fig.14 , Fig.14 A functional unit composition block diagram of a first gateway provided in an embodiment of the present application. The first gateway 1400 includes: a first transceiver module 1401, a second transceiver module 1402;

[0113] A first transceiver module 1401, configured to receive a first message from the first communication network;

[0114] The second transceiver module 1402 is used to send a second message to the second communication network, wherein the second message includes first indication information, the first indication information indicates an identification ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network, and the first communication network and the second communication network are different.

[0115] In a specific implementation, the first transceiver module 1401 and the second transceiver module 1402 described in the embodiment of the present invention may also execute other implementation methods described in the embodiment of the message conversion method provided in the embodiment of the present invention, which will not be repeated here.

[0116] See also Fig.15 , Fig.15 A block diagram of the functional units of a second gateway provided in an embodiment of the present application. The second gateway 1500 includes: a third transceiver module 1501, a fourth transceiver module 1502;

[0117] The third transceiver module 1501 is used to receive multiple third messages from one or more third communication networks;

[0118] The fourth transceiver module 1502 is used to send a fourth message to the fourth communication network, wherein the fourth message includes fourth indication information, and the fourth indication information is used to indicate the identification ID of each third message. The fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, and each third communication network is different from the fourth communication network.

[0119] In a specific implementation, the third transceiver module 1501 and the fourth transceiver module 1502 described in the embodiment of the present invention may also execute other implementation methods described in the embodiment of the message conversion method provided in the embodiment of the present invention, which will not be repeated here.

[0120] See also Fig.16 , Fig.16 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.16 As shown, the electronic device 1600 includes a transceiver 1601, a processor 1602, and a memory 1603. They are connected via a bus 1604. The memory 1603 is used to store computer programs and data, and can transmit the data stored in the memory 1603 to the processor 1602.

[0121] The electronic device may be the above Fig.14 The first gateway and Fig.15 The second gateway shown in the embodiment;

[0122] When electronic equipment is Fig.14 In the first gateway shown in the embodiment, the processor 1602 is used to read the computer program in the memory 1603 and perform the following operations:

[0123] Control the transceiver 1601 to receive a first message from the first communication network;

[0124] Control transceiver 1601 to send a second message to the second communication network, wherein the second message includes first indication information, the first indication information indicates an identification ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network, and the first communication network and the second communication network are different.

[0125] In a specific implementation, the transceiver 1601, processor 1602 and memory 1603 described in the embodiment of the present invention may also execute other implementation methods described in the embodiment of the message conversion method provided in the embodiment of the present invention, which will not be repeated here.

[0126] When electronic equipment is Fig.15 In the second gateway shown in the embodiment, the processor 1602 is used to read the computer program in the memory 1603 and perform the following operations:

[0127] Control the transceiver 1601 to receive a plurality of third messages from one or more third communication networks;

[0128] Control transceiver 1601 to send a fourth message to the fourth communication network, wherein the fourth message includes fourth indication information, and the fourth indication information is used to indicate the identification ID of each third message, and the fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, and each third communication network is different from the fourth communication network.

[0129] In a specific implementation, the transceiver 1601, processor 1602 and memory 1603 described in the embodiment of the present invention may also execute other implementation methods described in the embodiment of the message conversion method provided in the embodiment of the present invention, which will not be repeated here.

[0130] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement part or all of the steps of any message conversion method recorded in the above method embodiments.

[0131] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any message conversion method recorded in the above method embodiments.

[0132] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.

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

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

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

[0136] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software program module.

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

[0138] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.

[0139] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A message conversion method for a vehicle communication network, characterized in that: The vehicle-mounted communication network includes a first communication network and a second communication network, and the method includes: The first gateway receives a first message from the first communication network; The first gateway sends a second message to the second communication network, wherein the second message includes first indication information, the first indication information indicates an identification ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network, and the first communication network and the second communication network are different.

2. The method according to claim 1, characterized in that When the second communication network is Ethernet, the first target field of the second message includes the first indication information and the first data carried by the first message.

3. The method according to claim 2, characterized in that The first target field also includes at least one of the following information: second indication information used to indicate the first communication network; The third indication information is used to indicate the length of the first data.

4. The method according to claim 2 or 3, characterized in that: The first target field is the payload field of the second message.

5. The method according to any one of claims 2 to 4, characterized in that: The second message also includes a first preset port number, wherein the first preset port number of the second message is used to indicate that the second message is obtained by converting a message of a protocol format standard corresponding to the first communication network.

6. The method according to any one of claims 2 to 5, characterized in that: The first communication network is one of a controller area network CAN, a variable rate controller area network CAN-FD, and a local interconnect network LIN.

7. The method according to any one of claims 1 to 6, characterized in that: When the first communication network is Ethernet, and the first message includes a first preset port number, the first preset port number included in the first message is used to indicate that the first message is obtained by converting a first source message, the first source message is a message of a protocol format standard corresponding to the second communication network, and the first message includes at least one of the following information: The first indication information carried by the first source message, the first data carried by the first source message, the third indication information used to indicate the length of the first data carried by the first source message, and the indication information used to indicate the second communication network, wherein the first indication information carried by the first source message is used to determine that the receiving node of the first source message is the first gateway.

8. The method according to any one of claims 1 to 7, characterized in that: When the first communication network is Ethernet, and the first message includes a second preset port number, wherein the second preset port number included in the first message is used to indicate that the first message is obtained by framing and converting multiple second source messages, each second source message is a message of a protocol format standard corresponding to the second communication network, and the first message includes at least one of the following information: The first indication information carried by each second source message, the first data carried by each second source message, the third indication information used to indicate the length of the first data carried by each second source message, the indication information used to determine the receiving time of each second source message, and the indication information used to indicate the bus network for collecting each second source message, wherein the first indication information carried by each second source message is used to determine that the receiving node of each second source message is the first gateway.

9. The method according to claim 8, characterized in that The indication information used to determine the reception time of the first second source message is the absolute time of receiving the first second source message; The indication information used to determine the reception time of the i-th second source message is the relative time of receiving the i-th second source message and receiving the (i-1)-th second source message, where i>1.

10. The method according to claim 9, characterized in that The target information corresponding to each second source message is arranged in the first message in the order of the absolute time of receiving each second source message, wherein the target information corresponding to each second source message includes at least one of the following information: First indication information carried by each second source message, first data carried by each second source message, third indication information used to indicate the length of the first data carried by each second source message, indication information used to determine the receiving time of each second source message, and indication information used to indicate the bus network for collecting each second source message.

11. A message conversion method for a vehicle communication network, characterized in that: The vehicle-mounted communication network includes one or more third communication networks and a fourth communication network, and the method includes: The second gateway receives a plurality of third messages from one or more third communication networks; The second gateway sends a fourth message to the fourth communication network, wherein the fourth message includes fourth indication information, and the fourth indication information is used to indicate an identification ID of each third message. The fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, and each third communication network is different from the fourth communication network.

12. The method according to claim 11, characterized in that When the fourth communication network is Ethernet, the second destination field of the fourth message includes at least one of the following information: fifth indication information used to determine a reception time of each third message; Sixth indication information used to indicate a bus network for collecting each third message; The seventh indication information is used to indicate the length of the second data carried by each third message.

13. The method according to claim 12, characterized in that The fifth indication information corresponding to the first third message among the multiple third messages is used to indicate the absolute time of receiving the first third message; The fifth indication information corresponding to the i-th third message is used to indicate the relative time of receiving the i-th third message and receiving the (i-1)-th third message, where i>1.

14. The method according to claim 13, characterized in that The target information corresponding to each third message is arranged in the fourth message in the order of the absolute time of receiving each third message, wherein the target information corresponding to each third message includes at least one of the following information: The second data carried by each third message, the fourth indication information of each third message, the fifth indication information of each third message, the sixth indication information of each third message, and the seventh indication information of each third message.

15. The method according to any one of claims 12 to 14, characterized in that: The second target field is the payload field of the fourth message.

16. The method according to any one of claims 11 to 15, characterized in that: The fourth message also includes a second preset port number, wherein the second preset port number included in the fourth message is used to indicate that the fourth message is obtained by framing and converting messages of protocol format standards corresponding to one or more third communication networks.

17. A first gateway, used in a vehicle communication network, characterized in that: The vehicle-mounted communication network includes a first communication network and a second communication network, and the first gateway includes: a first transceiver module and a second transceiver module; The first transceiver module is used to receive a first message from the first communication network; The second transceiver module is used to send a second message to the second communication network, wherein the second message includes first indication information, the first indication information indicates an identification ID of the first message, and the second message is obtained by converting the first message into a protocol corresponding to the second communication network, and the first communication network and the second communication network are different.

18. A second gateway, used in a vehicle communication network, characterized in that: The vehicle communication network includes one or more third communication networks and a fourth communication network, and the second gateway includes: a third transceiver module and a fourth transceiver module; The third transceiver module is used to receive multiple third messages from one or more third communication networks; The fourth transceiver module is used to send a fourth message to the fourth communication network, wherein the fourth message includes fourth indication information, and the fourth indication information is used to indicate the identification ID of each third message. The fourth message is obtained by converting the multiple third message frames into a protocol corresponding to the fourth communication network, and each third communication network is different from the fourth communication network.

19. An electronic device, characterized in that: include: A processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method as described in any one of claims 1 to 10.

20. An electronic device, characterized in that: include: A processor and a memory, the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method as described in any one of claims 11-16.

21. A vehicle communication system, characterized in that: The device comprises the electronic device described in claim 19 and the electronic device described in claim 20; or comprises the first gateway described in claim 17 and the second gateway described in claim 18.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 16.

23. A vehicle, characterized in that: The vehicle comprises the first gateway as claimed in claim 17; or comprises the second gateway as claimed in claim 18; or comprises the electronic device as claimed in claim 19; or comprises the electronic device as claimed in claim 20, or comprises the in-vehicle communication system as claimed in claim 21.