Automatic protocol conversion method, control unit, network architecture and medium

By realizing automatic conversion between CANXL and Ethernet protocols in the vehicle network architecture, the problem of long development cycle caused by protocol conversion and routing scheme adjustment in the existing technology is solved, the efficiency and flexibility of network communication are improved, and rapid iteration is satisfied. need.

CN118748652APending Publication Date: 2024-10-08Z-ONE TECH CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411205479.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

When the existing in-vehicle network architecture faces complexity and increased functions, the development cycle caused by protocol conversion and routing scheme adjustment is too long, which cannot meet the requirements of rapid iterative delivery, affecting the flexibility and real-time nature of communication.

Method used

Provides a protocol automatic conversion method that implements CANXL by obtaining the parameters in the CANXL message and converting them into Ethernet parameters based on the preset mapping relationship, using the Ethernet routing relationship to synthesize the protocol data, and sending it to the target node through the socket API. Automatic recognition conversion and efficient data transmission between Ethernet protocols.

Benefits of technology

It significantly improves the flexibility and compatibility between different bus protocols, reduces the development cycle, and makes the vehicle network architecture more flexible and responsive in the face of frequent demand changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118748652A_ABST
    Figure CN118748652A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic protocol conversion method, a control unit, a network architecture and a medium, and the method comprises the steps: obtaining a CANXL message in a CAN bus, extracting a CANXL parameter in the CANXL message, and converting the CANXL parameter into a corresponding Ethernet parameter based on a preset mapping relation; based on the Ethernet parameter, according to a preset Ethernet routing relationship, obtaining a routing link corresponding to the Ethernet parameter, and synthesizing Ethernet protocol data based on the routing link; and taking the Ethernet protocol data as an Ethernet message and sending the Ethernet message to an Ethernet bus. According to the invention, automatic identification and conversion of service signals among different protocols of the vehicle-mounted Ethernet and the CANXL can be realized, and the service signals are routed to the target node, so that efficient data transmission among different protocols is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automobile communication, and in particular to a protocol automatic conversion method, a control unit, a network architecture and a medium. Background Art

[0002] In-vehicle communication mostly uses buses such as Ethernet, CAN, and CANFD. As the functions and complexity of the vehicle increase, the electronic and electrical architecture of the vehicle becomes more and more complex, the amount of data in the in-vehicle bus communication increases, and the protocol conversion between different buses brings challenges to the flexibility and real-time performance of communication.

[0003] The existing network architecture is mainly based on Ethernet, CAN, and CANFD buses. The gateway controller is used to realize the protocol conversion between vehicle-mounted Ethernet, CAN, and CANFD. During the development process, R&D personnel must first identify the signal providers and consumers in each protocol, design the corresponding routing plan based on the signal demand relationship, and complete the network configuration file. The gateway controller integrates the corresponding communication configuration file. During the project development process, due to the increase and adjustment of demand, the routing plan must also be adjusted accordingly, otherwise it will lead to functional failure. To adjust the routing plan, the gateway controller needs to develop and upgrade the software, which requires a long development and verification cycle and cannot meet the requirements of rapid iterative delivery. Summary of the invention

[0004] In response to the above technical problems, the present invention provides a protocol automatic conversion method, a control unit, a network architecture and a medium, which can realize automatic identification and conversion of service signals between different protocols such as in-vehicle Ethernet and CANXL, and route them to the target node, thereby realizing efficient data transmission between different protocols.

[0005] A first aspect of the present invention provides a method for automatic protocol conversion, comprising: Obtaining a CANXL message in a CAN bus, extracting CANXL parameters in the CANXL message and converting the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship; Based on the Ethernet parameters, according to a preset Ethernet routing relationship, a routing link corresponding to the Ethernet parameter is obtained, and Ethernet protocol data is synthesized based on the routing link; The Ethernet protocol data is sent to the Ethernet bus as an Ethernet message.

[0006] Furthermore, in the above-mentioned automatic protocol conversion method, the CANXL parameters include message priority, virtual channel identifier and CANXL data content; the Ethernet parameters include source IP address, source port information and Ethernet load data.

[0007] Furthermore, in the above-mentioned automatic protocol conversion method, the step of obtaining a CANXL message in a CAN bus, extracting CANXL parameters in the CANXL message, and converting the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship includes: Based on the mapping relationship, convert the message priority into the source IP address; Based on the mapping relationship, convert the virtual channel identifier into the source port information; Based on the mapping relationship, the CANXL data content is converted into the Ethernet load data.

[0008] Furthermore, in the above-mentioned automatic protocol conversion method, based on the Ethernet parameters, according to a preset Ethernet routing relationship, obtaining a routing link corresponding to the Ethernet parameters, and synthesizing Ethernet protocol data based on the routing link, includes: Obtain the source IP address and source port information in the Ethernet parameters; Acquire an activated routing link based on the Ethernet routing relationship by using the source IP address and the source port information; Based on the routing link, obtain the target IP address corresponding to the source IP address and the target port information corresponding to the source port information; Fill the target IP address and the source port information into the Ethernet parameters to synthesize the Ethernet protocol data.

[0009] Furthermore, in the above-mentioned automatic protocol conversion method, the routing link includes link activation information, and the link activation information realizes activation and inhibition of the routing path by changing the vehicle model configuration when the vehicle is offline.

[0010] Furthermore, in the above-mentioned automatic protocol conversion method, sending the Ethernet protocol data as an Ethernet message to the Ethernet bus includes: Use a socket API to establish a network connection to a target node corresponding to the target IP address and the target port information; When an Ethernet sending event is triggered, the Ethernet protocol data is converted into an Ethernet message and sent to the target node.

[0011] Furthermore, in the above-mentioned automatic protocol conversion method, the method further includes: Acquire an Ethernet message in the Ethernet bus, extract Ethernet parameters in the Ethernet message, and convert the Ethernet parameters into corresponding CANXL parameters based on a preset mapping relationship; A corresponding CANXL message is constructed based on the CANXL parameters.

[0012] A second aspect of the present invention provides a protocol automatic conversion control unit, comprising: A CANXL and Ethernet message conversion module, at least used to obtain a CANXL message in a CAN bus, extract CANXL parameters in the CANXL message, and convert the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship; The Ethernet routing table storage module is at least used to store Ethernet routing relations; The Ethernet message address modification module is at least used to obtain the routing link corresponding to the Ethernet parameter based on the Ethernet parameter and the preset Ethernet routing relationship, and synthesize the Ethernet protocol data based on the routing link; And, an Ethernet communication control module is at least used to send the Ethernet protocol data as an Ethernet message to the Ethernet bus.

[0013] Furthermore, in the above-mentioned automatic protocol conversion control unit, the CANXL and Ethernet message conversion module is also used to obtain the Ethernet message in the Ethernet bus, extract the Ethernet parameters in the Ethernet message and convert the Ethernet parameters into corresponding CANXL parameters based on a preset mapping relationship; and construct the corresponding CANXL message based on the CANXL parameters.

[0014] According to a third aspect of the present invention, a network architecture is provided, comprising a central computing unit and at least one domain control unit, wherein the central computing unit and the domain control unit are interconnected and communicated via an Ethernet bus, and the central computing unit and / or the domain control unit are interconnected and communicated with vehicle-mounted sensors and / or vehicle-mounted actuators via a CAN bus, and the central computing unit and the domain control unit are integrated with a protocol automatic conversion control unit as described in the second aspect above, which is used for mutual conversion between CANXL messages and Ethernet messages.

[0015] According to a third aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the automatic protocol conversion method described in any one of the first aspects is executed.

[0016] The present invention improves the flexibility and compatibility between different bus protocols by automatically converting CANXL and Ethernet protocols, significantly improves the efficiency of network communication, reduces the development cycle, and makes the vehicle network architecture more flexible and responsive when dealing with frequent changes in demand. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 The present invention is a flowchart of an embodiment of the automatic protocol conversion method of the present invention.

[0018] Figure 2This is a flowchart of another embodiment of the automatic protocol conversion method of the present invention.

[0019] Figure 3 The figure is a flow chart of an embodiment of the automatic protocol conversion method of the present invention.

[0020] Figure 4 This is a flowchart of another embodiment of the automatic protocol conversion method of the present invention.

[0021] Figure 5 A table diagram of an embodiment of the Ethernet routing relationship of the present invention.

[0022] Figure 6 The figure is a flow chart of another embodiment of the automatic protocol conversion method of the present invention.

[0023] Figure 7 The figure is a schematic diagram of the structure of an embodiment of the automatic protocol conversion control unit of the present invention.

[0024] Figure 8 It is a structural diagram of an embodiment of the network structure of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] It should be understood that the terms "first", "second", and "third" etc. in the claims, specifications, and drawings of the present disclosure are used to distinguish different objects rather than to describe a specific order. The terms "include" and "comprise" used in the specification and claims of the present disclosure indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections. It should also be understood that the terms used in this disclosure specification are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.

[0027] The in-vehicle network architecture is a communication network system used to connect and manage various electronic control units (ECUs), sensors, actuators and other devices inside the car. It uses a variety of bus technologies (such as CAN, LIN, Ethernet, etc.) to achieve data transmission and exchange of control signals between various parts of the vehicle, thereby supporting the coordinated operation of various functions, such as power system management, driving assistance, entertainment systems, etc. An efficient in-vehicle network architecture can ensure the stable operation of the vehicle in complex environments and support advanced functions such as autonomous driving and Internet of Vehicles services.

[0028] In the vehicle network architecture, the domain control unit and the central computing unit communicate through the vehicle Ethernet, and the smart sensors and smart actuators communicate with the domain control unit and the central computing unit using CANXL, and are directly connected to the central computing unit or the domain control unit according to their functions and distribution.

[0029] The central computing unit is the core processor in the vehicle network architecture, responsible for processing and managing most of the complex functions in the vehicle, such as the intelligent driving system and power control system. By integrating various sensor data and actuator instructions, the central computing unit can coordinate and control the key operations of the vehicle, ensuring the efficient operation and real-time response of the system, thereby improving the intelligence and automation level of the entire vehicle.

[0030] The domain control unit is a regional controller in the vehicle network architecture, responsible for managing vehicle information collection, data routing, and function control in a specific area. It obtains and processes environmental and status information by connecting sensors and actuators in the area, and transmits the information to the central computing unit or other domain control units as needed, and then performs corresponding control operations, thereby achieving efficient management and functional collaboration in the area.

[0031] Smart sensors are responsible for collecting various physical quantities (such as temperature, pressure, distance, etc.) in the vehicle's internal and external environment, converting these physical quantities into digital signals and sending them to the required control unit for further processing. Smart actuators perform corresponding operations according to the instructions sent by the control unit, such as adjusting the window position, controlling the engine output or activating the braking system, thereby achieving precise control and automated operation of vehicle functions.

[0032] In-vehicle Ethernet is a new local area network technology that uses Ethernet to connect electronic units in the car. Unlike traditional Ethernet that uses 4 pairs of unshielded twisted pair cables, in-vehicle Ethernet can achieve a transmission rate of 100Mbit / s or even 1Gbit / s on a single pair of unshielded twisted pair cables, while also meeting the automotive industry's requirements for high reliability, low electromagnetic radiation, low power consumption, bandwidth allocation, low latency, and synchronous real-time performance.

[0033] CANXL is a highly scalable communication technology, both in terms of bit rate and length of the data field. A maximum data field of 2048 bytes is provided, and an 11-bit priority field can be used by the network layer for addressing and indicating the contents of the data field.

[0034] Based on the above prior art, refer to Figure 1 , an embodiment of the present invention provides a method for automatic protocol conversion, comprising the following steps.

[0035] S1, obtain CANXL messages in the CAN bus, extract CANXL parameters in the CANXL messages and convert the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship; specifically, capture CANXL messages from the CAN bus in real time and extract CANXL parameters in the messages, such as Priority ID, VCID and Data. After extraction, these CANXL parameters can be converted into corresponding Ethernet parameters, such as IP address, port number and Ethernet load data, through a predefined mapping table or a dynamic mapping algorithm.

[0036] S2, based on the Ethernet parameters, according to the preset Ethernet routing relationship, obtain the routing link corresponding to the Ethernet parameters, and synthesize the Ethernet protocol data based on the routing link; specifically, after obtaining the Ethernet parameters, the routing link corresponding to these parameters can be determined through a preset static routing table or dynamic routing algorithm according to the specific requirements and configurations in the vehicle network architecture. This process can be implemented at the software level through routing protocols or routing lookup algorithms, or through hardware accelerators to speed up the selection of routing links and the forwarding of data packets. Finally, using these routing information, synthesize Ethernet protocol data containing the correct target IP address, port number and related network information to ensure that the data can be correctly and efficiently transmitted to the target node.

[0037] S3, sending the Ethernet protocol data as an Ethernet message to the Ethernet bus; specifically, after synthesizing the Ethernet protocol data, the data can be encapsulated into a standard Ethernet message through the Ethernet control module of software or hardware, and sent to the Ethernet bus through a network interface (such as a network adapter or a network processor). This process can be implemented in software using a socket API, or through a dedicated hardware accelerator to achieve efficient message processing and sending. In addition, the integrity check and error detection of the message can be performed before sending to ensure that the data will not be lost or damaged during the transmission process, thereby ensuring the reliability of the data.

[0038] Based on this, by automatically converting CANXL and Ethernet protocols, the flexibility and compatibility between different bus protocols are improved, the efficiency of network communication is significantly improved, the development cycle is shortened, and the vehicle network architecture is made more flexible and responsive when dealing with frequent changes in demand.

[0039] Further, as an implementation mode of the present invention, the CANXL parameters include message priority, virtual channel identifier and CANXL data content; the Ethernet parameters include source IP address, source port information and Ethernet load data.

[0040] Specifically, CANXL parameters refer to the key information contained in the CANXL message, including the message priority (Priority ID), which is used to determine the transmission priority of the message in the network; the virtual channel identifier (VCID), which is used to distinguish the identifiers of different logical data streams; and the CANXL data content, that is, the actual transmitted data. The corresponding Ethernet parameters include the source IP address (Source IP Address), which identifies the unique address of the device sending data in the network; the source port information (Source Port), which identifies the specific service or application to which the data is sent; and the Ethernet payload data (Ethernet payload), which is the actual data content carried in the Ethernet message. The mapping relationship between these parameters determines how to convert and transmit data between different protocols.

[0041] Further, as an embodiment of the present invention, refer to Figure 2 , step S1, obtaining a CANXL message in a CAN bus, extracting CANXL parameters in the CANXL message and converting the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship, including: S11, based on the mapping relationship, converting the message priority into the source IP address; S12, based on the mapping relationship, converting the virtual channel identifier into the source port information; S13, based on the mapping relationship, converting the CANXL data content into the Ethernet load data.

[0042] Specifically, refer to Figure 3In the CANXL message, the message priority (Priority ID) is used to determine the priority of data transmission in the network. During the conversion process, the preset mapping table will convert it into the corresponding source IP address (Source IP Address) according to different priority values. This mapping relationship can be static (fixed priority corresponds to a fixed IP address) or dynamically generated (IP address is allocated in real time according to network requirements). Through this mapping method, high-priority CANXL messages can be mapped to the corresponding IP addresses in the network to ensure their transmission efficiency on Ethernet.

[0043] The virtual channel identifier (VCID) identifies the virtual channel in the CANXL message and is used to distinguish different logical data streams. The mapping relationship converts the VCID into the source port information (Source Port) of the Ethernet. This mapping relationship ensures that the data of different virtual channels corresponds to different ports on the Ethernet, so that they can be transmitted and processed independently. The implementation method may include using a lookup table or algorithm to find the corresponding port number based on the VCID value and embed it into the source port field of the Ethernet message.

[0044] CANXL data content (Data) is the actual user data that needs to be transmitted in the message. During the mapping process, these data will be directly converted into Ethernet payload data (Ethernet payload), that is, the CANXL user data is filled into the payload part of the Ethernet message. The implementation method includes data format conversion and encapsulation to adapt to the transmission requirements of Ethernet. The converted data will be encapsulated in the payload field of the Ethernet protocol and prepared for transmission over Ethernet.

[0045] Further, as an embodiment of the present invention, refer to Figure 4 , step S2, based on the Ethernet parameters, according to the preset Ethernet routing relationship, obtaining the routing link corresponding to the Ethernet parameters, and synthesizing Ethernet protocol data based on the routing link, including: S21, obtaining the source IP address and source port information in the Ethernet parameters; S22, acquiring an activated routing link based on the Ethernet routing relationship through the source IP address and the source port information; S23, based on the routing link, obtaining the target IP address corresponding to the source IP address and the target port information corresponding to the source port information; S24, filling the target IP address and the source port information into the Ethernet parameters to synthesize the Ethernet protocol data.

[0046] Specifically, refer to Figure 5 and Figure 6 Step S21 extracts the source IP address (Source IP Address) and source port information (Source Port) from the Ethernet parameters converted in the previous step (Step S1). This information is converted from the CANXL message through a mapping relationship and represents the identifier of the sender of the data in Ethernet. Step S22 uses the source IP address and source port information to find the corresponding routing link in the routing table, such as Figure 5 As shown in the table in . This step will determine which links are active (i.e., the "Active" field is "Y") by searching for matching items. For example, if the source IP address is SA1 and the source port is SP1, then by searching, it can be found that the corresponding target IP address is DA1, the target port is DP1, and the link is active. Once the activated routing link is determined in step S23, the corresponding target IP address and target port information can be obtained. This information will be used to construct the final Ethernet message. For example, in the above example, the target IP address corresponding to SA1 and SP1 is DA1, and the target port is DP1. In step S24, the obtained target IP address (such as DA1) and target port information (such as DP1) are filled into the Ethernet protocol data structure, replacing the original source IP address and source port. After this process is completed, the Ethernet protocol data is ready and can be sent to the network as an Ethernet message.

[0047] Furthermore, as an embodiment of the present invention, the routing link includes link activation information, and the link activation information realizes activation and inhibition of the routing path by changing the vehicle model configuration when the vehicle is offline.

[0048] Specifically, the link activation information in the routing link refers to an identifier used to determine whether a routing path is in an activated state in the network configuration (such as Figure 5 This information can be controlled by changing the vehicle model configuration during vehicle production or maintenance (such as when the vehicle is offline). By adjusting the vehicle model configuration, specific routing paths can be activated or inhibited, thereby affecting the data transmission path in the network. This mechanism allows flexible management and optimization of network traffic, ensuring that vehicles of different models or configurations can dynamically adjust their network communication behaviors according to demand.

[0049] Further, as an implementation mode of the present invention, step S3, sending the Ethernet protocol data as an Ethernet message to the Ethernet bus, includes: using a socket API to establish a network connection to a target node corresponding to the target IP address and the target port information; when an Ethernet sending event is triggered, converting the Ethernet protocol data into an Ethernet message and sending it to the target node.

[0050] Specifically, first, by using the socket API, a network connection is established between the source node and the target node. This connection is based on the target IP address and target port information obtained in the previous step. Then, when the Ethernet send event is triggered, the synthesized Ethernet protocol data is encapsulated into a standard Ethernet message. Finally, this Ethernet message is sent to the target node through the previously established network connection to achieve data transmission and communication. This process ensures that the data can reach the predetermined network terminal accurately and in a timely manner.

[0051] Furthermore, as an implementation mode of the present invention, the automatic protocol conversion method described in the embodiment of the present invention also includes: obtaining the Ethernet message in the Ethernet bus, extracting the Ethernet parameters in the Ethernet message and converting the Ethernet parameters into corresponding CANXL parameters based on a preset mapping relationship; and constructing the corresponding CANXL message based on the CANXL parameters.

[0052] Specifically, Ethernet messages are obtained from the Ethernet bus, and key information, namely Ethernet parameters (such as source IP address, source port, Ethernet load, etc.) are extracted from them. These Ethernet parameters are converted into corresponding CANXL parameters (such as message priority, virtual channel identifier, CANXL data content) using the preset mapping relationship. Based on these converted CANXL parameters, a complete CANXL message is constructed so that the data can continue to be transmitted on the CAN bus.

[0053] Through the above embodiments, seamless data conversion between Ethernet and CANXL bus is achieved, ensuring that data under different communication protocols can be accurately and efficiently transmitted. By automatically extracting parameters from Ethernet messages and converting them into CANXL messages using preset mapping relationships, the entire process can maintain data consistency and integrity, significantly improving the flexibility and adaptability of the vehicle network, and meeting the needs of collaborative work between multiple protocols in complex vehicle systems.

[0054] The embodiment of the present invention also discloses a protocol automatic conversion control unit, referring to Figure 7 The protocol automatic conversion control unit includes a CANXL and Ethernet message conversion module, an Ethernet routing table storage module, an Ethernet message address modification module and an Ethernet communication control module.

[0055] The CANXL and Ethernet message conversion module is at least used to obtain CANXL messages in the CAN bus, extract CANXL parameters in the CANXL messages, and convert the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship. The CANXL and Ethernet message conversion module is also used to obtain Ethernet messages in the Ethernet bus, extract Ethernet parameters in the Ethernet messages, and convert the Ethernet parameters into corresponding CANXL parameters based on a preset mapping relationship; and construct a corresponding CANXL message based on the CANXL parameters.

[0056] Specifically, the CANXL and Ethernet message conversion module mainly realizes the function of mutual conversion between CANXL messages and Ethernet messages. The main principle is to set the conversion relationship between the CANXL protocol and the key parameters of the Ethernet protocol in the module. The key parameters involved are as follows: key information in the CANXL message: Priority ID, VCID, Data; key information in the Ethernet message: IP address, Port, VLAN, Ethernet payload. When the CANXL and Ethernet message conversion module receives the CANXL message, it extracts the Priority ID, VCID and Data information, automatically identifies and converts them into the parameters corresponding to the Ethernet protocol through the mapping relationship in the software, and constructs the Ethernet parameters with the source IP address and source port through the conversion module. Similarly, the Ethernet message to CANXL message is obtained by identifying the key parameters in the Ethernet message, identifying the corresponding CANXL parameters and constructing the CANXL message.

[0057] The Ethernet routing table storage module is at least used to store Ethernet routing relationships. Specifically, the Ethernet routing table storage module mainly completes the current relationship between the CANXL message and the Ethernet message after the conversion in the project / platform. The Ethernet routing relationship is based on the receiving controller requirements of the CANXL message in the Ethernet network in the project. According to the requirements of the vehicle functional system design specifications, the target IP address, target port information and routing link activation information of the Ethernet node that needs to receive this message after the CANXL message is converted into the Ethernet message are provided in the project. The link activation information can be activated and suppressed by changing the vehicle model configuration when the vehicle is offline to reduce invalid network communication data.

[0058] The Ethernet message address modification module is at least used for obtaining the routing link corresponding to the Ethernet parameter based on the Ethernet parameter and according to the preset Ethernet routing relationship, and synthesizing the Ethernet protocol data based on the routing link.

[0059] Specifically, the Ethernet message address modification module mainly completes the synthesis of the target address information in the Ethernet protocol data. The specific steps are as follows: 1. Obtain the source IP address and source port information from the Ethernet parameters synthesized by the CANXL and Ethernet message conversion module; 2. Obtain the activated routing link through the source IP address and source port information; 3. Based on the activated routing link, obtain the target IP address and target port information corresponding to the Ethernet protocol data; 4. Synthesize Ethernet protocol data with target address information based on the acquired target IP address and target port information.

[0060] The Ethernet communication control module is at least used to send the Ethernet protocol data as an Ethernet message to the Ethernet bus.

[0061] Specifically, the Ethernet communication control module realizes the connection and communication monitoring of Ethernet communication, and completes the task of sending and receiving Ethernet messages. It mainly completes the following tasks: Initialize the Ethernet controller: complete the settings of the controller's working mode, MAC address, IP address, and subnet mask; Network connection establishment: Use the socket API to establish a network connection to the target node. When the Ethernet send event is triggered, the Ethernet protocol data is converted into Ethernet messages and sent to the target node for reception. At the same time, Ethernet messages from other nodes are received and passed to the CANXL and Ethernet message conversion module. Realize communication monitoring: Use software to capture data packets and analyze network traffic during data transmission and reception. Record connection status, error messages, and important events in log files.

[0062] Based on the automatic protocol conversion control unit described in the above embodiment, the embodiment of the present invention further discloses a network architecture.

[0063] Reference Figure 8 The network architecture includes a central computing unit and at least one domain control unit. The central computing unit and the domain control unit are interconnected and communicated via an Ethernet bus. The central computing unit and / or the domain control unit are interconnected and communicated with vehicle-mounted sensors and / or vehicle-mounted actuators via a CAN bus. The central computing unit and the domain control unit are integrated with the protocol automatic conversion control unit described in the above embodiment, which is used for mutual conversion between CANXL messages and Ethernet messages.

[0064] Specifically, the network architecture consists of a central computing unit and domain control units 1 and 2. The central computing unit communicates with the domain control units through the Ethernet bus to achieve efficient data exchange throughout the vehicle. The central computing unit and the domain control unit are also connected to the on-board sensors and on-board actuators through the CAN bus to receive environmental data from the sensors and send control instructions to the actuators. In this architecture, both the central computing unit and the domain control unit are integrated with a protocol automatic conversion control unit, which can achieve bidirectional conversion between CANXL messages and Ethernet messages. This design ensures that data under different communication protocols can be seamlessly transmitted in the vehicle network, achieving efficient collaborative work of the entire vehicle system.

[0065] The embodiment of the present invention also discloses a readable storage medium.

[0066] A readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a protocol automatic conversion method described in any one of the above embodiments.

[0067] It can be understood that computer-readable storage media may include: any entity or device capable of carrying a computer program, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc. A computer program includes a computer program code. The computer program code may be in source code form, object code form, an executable file, or some intermediate form, etc. A computer-readable storage medium may include: any entity or device capable of carrying a computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), and a software distribution medium, etc.

[0068] In certain embodiments of the present invention, the electronic device may include a controller or a processor, and the controller is a single-chip microcomputer chip that integrates a processor, a memory, a communication module, etc. The processor may refer to a processor included in the controller. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0069] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0070] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0071] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatic protocol conversion, characterized in that: include: Obtaining a CANXL message in a CAN bus, extracting CANXL parameters in the CANXL message, and converting the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship; Based on the Ethernet parameters, according to a preset Ethernet routing relationship, a routing link corresponding to the Ethernet parameter is obtained, and Ethernet protocol data is synthesized based on the routing link; The Ethernet protocol data is sent to the Ethernet bus as an Ethernet message.

2. The automatic protocol conversion method according to claim 1, characterized in that: The CANXL parameters include message priority, virtual channel identifier and CANXL data content; the Ethernet parameters include source IP address, source port information and Ethernet load data.

3. The automatic protocol conversion method according to claim 2, characterized in that: The obtaining of a CANXL message in the CAN bus, extracting a CANXL parameter in the CANXL message and converting the CANXL parameter into a corresponding Ethernet parameter based on a preset mapping relationship includes: Based on the mapping relationship, convert the message priority into the source IP address; Based on the mapping relationship, convert the virtual channel identifier into the source port information; Based on the mapping relationship, the CANXL data content is converted into the Ethernet payload data.

4. The automatic protocol conversion method according to claim 1, characterized in that: The method of acquiring, based on the Ethernet parameters and according to a preset Ethernet routing relationship, a routing link corresponding to the Ethernet parameters, and synthesizing Ethernet protocol data based on the routing link includes: Obtain the source IP address and source port information in the Ethernet parameters; Acquire an activated routing link based on the Ethernet routing relationship by using the source IP address and the source port information; Based on the routing link, obtain the target IP address corresponding to the source IP address and the target port information corresponding to the source port information; Fill the target IP address and the source port information into the Ethernet parameters to synthesize the Ethernet protocol data.

5. The automatic protocol conversion method according to claim 1 or 4, characterized in that: The routing link includes link activation information, and the link activation information realizes activation and inhibition of the routing path by changing the vehicle model configuration when the vehicle is offline.

6. The automatic protocol conversion method according to claim 4, characterized in that: The step of sending the Ethernet protocol data as an Ethernet message to the Ethernet bus comprises: Use a socket API to establish a network connection to a target node corresponding to the target IP address and the target port information; When an Ethernet sending event is triggered, the Ethernet protocol data is converted into an Ethernet message and sent to the target node.

7. The automatic protocol conversion method according to claim 1, characterized in that: The method further comprises: Acquire an Ethernet message in the Ethernet bus, extract Ethernet parameters in the Ethernet message, and convert the Ethernet parameters into corresponding CANXL parameters based on a preset mapping relationship; A corresponding CANXL message is constructed based on the CANXL parameters.

8. A protocol automatic conversion control unit, characterized in that: include: A CANXL and Ethernet message conversion module, at least used to obtain a CANXL message in a CAN bus, extract CANXL parameters in the CANXL message, and convert the CANXL parameters into corresponding Ethernet parameters based on a preset mapping relationship; The Ethernet routing table storage module is at least used to store Ethernet routing relations; The Ethernet message address modification module is at least used to obtain the routing link corresponding to the Ethernet parameter based on the Ethernet parameter and the preset Ethernet routing relationship, and synthesize the Ethernet protocol data based on the routing link; And, an Ethernet communication control module is at least used to send the Ethernet protocol data as an Ethernet message to the Ethernet bus.

9. The automatic protocol conversion control unit according to claim 8, characterized in that: The CANXL and Ethernet message conversion module is further used to obtain the Ethernet message in the Ethernet bus, extract the Ethernet parameters in the Ethernet message and convert the Ethernet parameters into corresponding CANXL parameters based on a preset mapping relationship; and construct the corresponding CANXL message based on the CANXL parameters.

10. A network architecture, comprising a central computing unit and at least one domain control unit, wherein the central computing unit and the domain control unit are interconnected and communicated via an Ethernet bus, and the central computing unit and / or the domain control unit are interconnected and communicated with vehicle-mounted sensors and / or vehicle-mounted actuators via a CAN bus, characterized in that: The central computing unit and the domain control unit are integrated with a protocol automatic conversion control unit as described in claim 8 or 9, which is used for mutual conversion between CANXL messages and Ethernet messages.

11. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is run by a computer, the automatic protocol conversion method according to any one of claims 1 to 7 is executed.

Citation Information

Cited By

  • Data forwarding device and data forwarding system

    CN119299375A

  • Data message processing method and system, electronic equipment and storage medium

    CN119865391A

  • Method and system for processing data packet, electronic device and storage medium

    CN119865391B

  • Message forwarding method and device, computer equipment and storage medium

    CN121098658A