Data processing device and data processing system

Directly transmitting Ethernet packets through the data processing device, solving the complex problem of VLAN device communication in the on-board electronic system, and achieving the effect of simplifying wiring and improving development and testing efficiency.

CN119520328APending Publication Date: 2025-02-25KUNYI ELECTRONICS TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411215705.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

During the development and testing stage of automotive electronic systems, communication between different VLAN devices in the automotive electronic system needs to be carried out through switches, resulting in complex wiring between the upper computer and the automotive electronic system, and large space occupies during development and testing, which affects development and testing efficiency.

Method used

A data processing device and a system are provided. Through the data processing device, the Ethernet packets sent by the first Ethernet device to the second Ethernet device are directly sent to the upper computer, realizing the data monitoring and reporting function, and the packet transmission between the first Ethernet device and the second Ethernet device is realized without the need to pass through the switch.

Benefits of technology

It simplifies the wiring between the upper computer and the on-board electronic system, reduces the space occupied during development and testing, and improves the development and testing efficiency of the automotive electronic system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520328A_ABST
    Figure CN119520328A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing device and a data processing system, the data processing device is respectively connected with an upper computer and Ethernet equipment used for a vehicle-mounted electronic system, and the Ethernet equipment is connected to an Ethernet port of the data processing device. The data processing device is configured to receive a first message transmitted by a first Ethernet device through a first port, and send the first message to an upper computer; determining at least one second port based on a pre-configured forwarding mode; and sending the first message to a second Ethernet device through a second port, and / or adjusting the first message to a second message meeting the message receiving requirement of the second Ethernet device, and sending the second message to the second Ethernet device through the second port. The data processing device provided by the invention realizes data transmission of the upper computer and the vehicle-mounted electronic system under different communication requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a data processing device and a data processing system. Background Art

[0002] As the complexity of vehicle electronic systems increases, the vehicle communication network gradually introduces higher-bandwidth vehicle communication technologies, such as vehicle Ethernet, based on the traditional controller area network (CAN). The vehicle controller exchanges information through the vehicle Ethernet to meet the needs of complex data computing services. At present, related technologies can achieve physical isolation of ECUs by dividing different electronic control units (ECUs) into different virtual local area networks (VLANs) according to the service type, importance of functional services, and the level of threats faced by the vehicle functions. In order to support communication between devices in different VLANs, switches and other devices are generally set up in the vehicle electronic system to achieve communication between devices in different VLANs.

[0003] When developing and testing automotive electronic systems, data interaction between the host computer and the vehicle-mounted electronic system is involved, such as the host computer monitoring the communication between devices in the vehicle-mounted electronic system, the host computer communicating with devices in the vehicle-mounted electronic system, etc. During the development and testing phase, the vehicle-mounted electronic system has not been fully built. If it involves the interaction of devices between different VLANs, additional switches and other equipment are required to meet the communication requirements, making the wiring between the host computer and the vehicle-mounted electronic system more complicated, and taking up more space during development and testing, which is not conducive to the development and testing of automotive electronic systems. Summary of the invention

[0004] The embodiments of the present application provide a data processing device and a data processing system. The data processing device can send an Ethernet message sent by a first Ethernet device to a second Ethernet device to a host computer, thereby realizing the function of data monitoring and reporting. The data processing device can forward a first message sent by the first Ethernet device to the second Ethernet device. The data processing device implements the message forwarding operation, and the message transmission from the first Ethernet device to the second Ethernet device can be realized without going through a switch.

[0005] An embodiment of the present application provides a data processing device, which is respectively connected to a host computer and an Ethernet device for a vehicle-mounted electronic system, and the Ethernet device is connected to an Ethernet port of the data processing device. The data processing device is configured to: receive a first message transmitted by a first Ethernet device through a first port, and send the first message to the host computer; determine at least one second port based on a forwarding mode preconfigured for the first port; send the first message to the second Ethernet device through the second port, and / or adjust the first message to a second message that meets a message receiving requirement of the second Ethernet device, and send the second message to the second Ethernet device through the second port.

[0006] An embodiment of the present application provides a data processing system, including a host computer and at least one of the above-mentioned data processing devices, wherein the data processing devices are respectively connected to the host computer and an Ethernet device for a vehicle-mounted electronic system, and the Ethernet device is connected to an Ethernet port of the data processing device.

[0007] In some embodiments, the forwarding mode preconfigured in the first port includes one or more of the following forwarding modes: a first forwarding mode: determining the default port of the first port as the second port, wherein the first port is preconfigured with at least one default port; a second forwarding mode: determining the Ethernet port corresponding to the VLAN number in the VLAN tag carried by the first message as the second port, wherein at least one Ethernet port of the data processing device has at least one corresponding VLAN number.

[0008] In some embodiments, adjusting the first message to the second message includes: stripping the VLAN tag carried in the first message to obtain the second message; or replacing the VLAN tag carried by the first message with a preconfigured VLAN tag to obtain the second message; or adding the preconfigured VLAN tag to the first message to obtain the second message.

[0009] In some embodiments, sending the first message to the host computer includes: keeping the first message unchanged and sending the first message to the host computer; or stripping the VLAN tag carried by the first message and sending the first message stripped of the VLAN tag to the host computer.

[0010] In some embodiments, the data processing device is further configured to: receive a host computer message and a sending port identifier transmitted by the host computer, determine at least one third port according to the sending port identifier, send the host computer message to a third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets the message receiving requirements of the third Ethernet device, and send the third message to the third Ethernet device through the third port.

[0011] In some embodiments, the data processing device is further configured to: receive a lower computer message transmitted by a third Ethernet device through a third port, and send the lower computer message to the upper computer.

[0012] In some embodiments, adjusting the host computer message to the third message includes: stripping the VLAN tag carried in the host computer message to obtain the third message; or replacing the VLAN tag carried in the host computer message with a preconfigured VLAN tag to obtain the third message; or adding the preconfigured VLAN tag to the host computer message to obtain the third message.

[0013] In some embodiments, sending the lower machine message to the upper machine includes: keeping the lower machine message unchanged and sending the lower machine message to the upper machine; or stripping the VLAN tag carried by the lower machine message and sending the lower machine message with the VLAN tag stripped to the upper machine.

[0014] In some embodiments, when collecting data from an Ethernet device for an in-vehicle electronic system, the data processing device is configured to: receive a first message transmitted by a first Ethernet device through a first port, and send the first message to a host computer; determine at least one second port based on a forwarding mode preconfigured for the first port; send the first message to a second Ethernet device through the second port, and / or adjust the first message to a second message that meets a message receiving requirement of the second Ethernet device, and send the second message to the second Ethernet device through the second port;

[0015] When performing a first test on an Ethernet device for an in-vehicle electronic system, the data processing device is configured to: receive a host computer message and a sending port identifier transmitted by a host computer, determine at least one third port according to the sending port identifier, send the host computer message to a third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets a message receiving requirement of the third Ethernet device, and send the third message to the third Ethernet device through the third port;

[0016] When performing a second test on an Ethernet device for an in-vehicle electronic system, the data processing device is configured to: receive a host computer message and a sending port identifier transmitted by a host computer, determine at least one third port according to the sending port identifier, send the host computer message to a third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets a message receiving requirement of the third Ethernet device, and send the third message to the third Ethernet device through the third port; receive a lower computer message transmitted by the third Ethernet device through the third port, and send the lower computer message to the host computer;

[0017] When performing a first test on the Ethernet device used in the vehicle electronic system, the host computer sends an Ethernet message to the Ethernet device. When performing a second test on the Ethernet device used in the vehicle electronic system, the host computer sends an Ethernet message to the Ethernet device and receives an Ethernet message fed back by the Ethernet device.

[0018] In some embodiments, the data processing device is configured to: adjust the first message to a fault message according to a fault injection requirement, send the fault message through the second port, and / or adjust the fault message to a fault target message that meets the message receiving requirement of a second Ethernet device connected to the second port, and send the fault target message through the second port, wherein the fault injection requirement is used to indicate the fault added to the first message. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] 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 only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a schematic diagram of a scenario of a data processing device provided in an embodiment of the present application;

[0021] Figure 2 This is a schematic diagram of an Ethernet message without a VLAN tag provided in an embodiment of the present application;

[0022] Figure 3 It is a schematic diagram of an Ethernet message carrying a VLAN tag provided in an embodiment of the present application;

[0023] Figure 4 is a schematic diagram of the structure of the bus board provided in the embodiment of the present application;

[0024] Figure 5 It is a scenario diagram of the data processing system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] 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 only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application. At the same time, in the description of the embodiments of the present application, terms and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0026] The vehicle electronic system is a system composed of some or all of the electronic equipment in the vehicle, such as the engine electronic control system, automatic air conditioning system, driver assistance system and infotainment system. When developing and testing the vehicle electronic system, it involves data interaction between the host computer and the electronic equipment used for the vehicle electronic system. It should be noted that the electronic equipment used for the vehicle electronic system here is not limited to the electronic equipment mounted on the vehicle, but also includes any electronic equipment used in the development and testing process of the vehicle electronic system. The electronic equipment can be in the development process or already developed, and can include electronic equipment that can be installed in the vehicle after development and form a vehicle electronic system with other electronic equipment, and can include a test bench, and the test bench is equipped with a simulation model, in which the simulation model can be used to simulate one or more electronic equipment. Electronic equipment is, for example, a sensor (such as a lidar sensor), a vehicle electronic control unit (such as an ECU), a clock source, etc.

[0027] Electronic devices may support one or more communication protocols and communicate with other devices through communication protocols, such as CAN / CANFD communication protocol, LIN / FastLIN communication protocol, Flexray communication protocol, Ethernet communication protocol, etc. Ethernet devices are electronic devices that use Ethernet communication protocols, such as ECUs and lidars. Ethernet communication protocols include automotive Ethernet communication protocols and ordinary Ethernet communication protocols.

[0028] The data interaction between the host computer and the electronic device may include: the host computer sends data to the electronic device; collects data sent by the electronic device and sends it to the host computer. For example, when testing whether the network protocol stack of the electronic control unit complies with the Ethernet protocol standard, when testing the maximum communication capacity of the electronic control unit, the host computer sends a message to simulate one or more electronic control units sending data to the electronic control unit under test; for example, when testing the built-in control algorithm of the electronic control unit, the host computer sends data to simulate the sensor sending sensor data to the electronic control unit under test; for example, when testing whether the vehicle sensor or electronic control unit is working properly, the communication data between the vehicle sensor and the electronic control unit is monitored and uploaded to the host computer; for example, in the data collection scenario, the data output by the electronic device is monitored and uploaded to the host computer for storage; and so on.

[0029] It can be seen that in the process of vehicle-mounted electronic system development and testing, there is a large amount of data interaction between the host computer and the electronic devices used in the vehicle-mounted electronic system. Due to the limited port types and port numbers supported by the host computer, in the prior art, interface cards are generally used to achieve the interaction between the host computer and the electronic devices. In the development and testing of Ethernet devices, Ethernet interface cards have gradually become important equipment.

[0030] VLAN technology is widely used in vehicle electronic systems to enhance the security of the Internet of Vehicles system. For example, the vehicle electronic system is divided into multiple logical networks through VLAN technology, so as to achieve isolation and priority control of different network traffic. However, the Ethernet interface card has limited functions and only supports data transmission between Ethernet devices and host computers. Since the Ethernet devices of the vehicle electronic system are often divided into different VLANs, a switch is required to connect the Ethernet interface card and the Ethernet device to forward Ethernet messages, identify VLANs, add, modify, and strip them, which makes the wiring between the host computer and the Ethernet device complicated, occupies a large space during testing, and causes inconvenience to users.

[0031] In view of this, the present application embodiment provides a data processing device, see Figure 1 The data processing device provided in the embodiment of the present application can be applied in Figure 1In the scenario shown. The data processing device 10 is respectively connected to the host computer 20 and the Ethernet device (not shown in the figure) for the vehicle-mounted electronic system 30. The data processing device 10 is configured with multiple Ethernet ports to connect to the Ethernet device to realize data transmission between the data processing device 10 and the Ethernet device. In addition, the data processing device is also configured with a host computer port to connect to the host computer, and the type of the host computer port is, for example, a USB port, a common Ethernet port, a PCIE port, etc. The number of the host computer ports can be one or more, and different host computer ports can be used to communicate with the data processing device at different times. For example, when the amount of data transmitted is large, the Ethernet port is used to communicate with the host computer, and when the amount of data transmitted is small, the USB port is used to communicate with the host computer.

[0032] The data processing device is configured to: receive a first message transmitted by a first Ethernet device through a first port, and send the first message to a host computer; determine at least one second port based on a forwarding mode preconfigured for the first port; send the first message to a second Ethernet device through the second port, and / or adjust the first message to a second message that meets a message receiving requirement of the second Ethernet device, and send the second message to the second Ethernet device through the second port.

[0033] It should be noted that the first port and the second port are not fixed Ethernet ports. When an Ethernet port is connected to an Ethernet device and receives an Ethernet message transmitted by the Ethernet device, the Ethernet port is the first port. After the first port is determined, the Ethernet port determined by the forwarding method preconfigured by the first port is the second port. An Ethernet port can be used as the first port when receiving an Ethernet message, and as the second port corresponding to other Ethernet ports when sending an Ethernet message received by the data processing device from other Ethernet ports. The first Ethernet device is an Ethernet device connected to the first port, and the second Ethernet device is an Ethernet device connected to the second port. Each Ethernet port of the data processing device may have a unique port identifier, so that the Ethernet port can be determined based on the port identifier. For example, each Ethernet port can be identified by T1_0, T1_1, TX_0, TX_1, etc.

[0034] Exemplarily, the host computer is, for example, a computer such as a computer or an industrial computer connected to the data processing device. The data processing device can be connected to the host computer via a USB cable or a network cable. In addition, the possibility of connecting the host computer via other communication means such as optical fiber and wireless communication is not excluded. The host computer receives the first message, can directly store the first message, can continue to send the first message to other devices, such as to a cloud server or a storage device via Ethernet, can also display the first message, analyze the first message, etc., for example, display the source address, destination address, data, port, VLAN information, timestamp, etc. of the first message, so as to analyze the content of the first message.

[0035] The first message and the second message are both Ethernet frames, which are the basic units of Ethernet data link layer transmission and meet the Ethernet communication protocol. Depending on the application scenario, the first message can be a message with different functional purposes. For example, in a data collection scenario, the first message can be actual data collected by the first Ethernet device; in a test scenario, the first message can be a response message returned by the first Ethernet device in response to a received test message.

[0036] Exemplarily, the forwarding mode is used to determine the Ethernet port to which the target device of the first Ethernet device is connected among the multiple Ethernet ports, and the target device is all Ethernet devices that receive the Ethernet message sent by the first Ethernet device among the multiple Ethernet devices connected to the data processing device. The forwarding mode of the first port is preconfigured and can be matched with the data transmission requirement of the connected first Ethernet device to use the Ethernet port to which the target device of the first Ethernet device is connected as the second port, and the data transmission requirement of the first Ethernet device is at least used to indicate: the target device of the first Ethernet device.

[0037] Exemplarily, the data processing device can configure the forwarding mode based on the configuration information. The configuration information can be sent from the host computer to the data processing device, or it can be sent from a terminal device to the data processing device. In one solution, the terminal device can be sent to the data processing device via the host computer. In another solution, a wireless communication module is provided in the data processing device. In this case, the terminal device can interact with the data processing device via the wireless communication module without the host computer, for example, through a local area network and / or the Internet. The wireless communication module can be a wireless communication module of a mobile network such as 4G, 5G, 6G, or a wireless communication module such as Wifi, Bluetooth, etc. In addition, when the data processing device is provided with input modules such as operation buttons, a touch screen, and an input interface, the configuration information can also be sent by the user to the data processing device through the input module.

[0038] Exemplarily, for each second port, if the message format information of the first message meets the message receiving requirement of the second Ethernet device connected to the second port, the first message is sent to the second Ethernet device through the second port; otherwise, the first message is adjusted to a second message that meets the message receiving requirement of the second Ethernet device, and the second message is sent to the second Ethernet device through the second port. The message format information is used to indicate, for example, whether a VLAN tag is carried and the value of the VLAN number in the carried VLAN tag, and the message receiving requirement is used to indicate, for example, whether the received message carries a VLAN tag and the value range of the VLAN number in the VLAN tag carried by the received message. In this way, it can be ensured that the message sent through the second port meets the receiving requirement of the second Ethernet device and can be received by the second Ethernet device.

[0039] By adopting the scheme of the embodiment of the application, the Ethernet message sent by the first Ethernet device to the second Ethernet device can be sent to the host computer through the data processing device, thereby realizing the function of data monitoring and reporting. The data processing device can forward the first message sent by the first Ethernet device to the second Ethernet device and be received by the second Ethernet device, and adjust the first message to a second message that meets the message receiving format. The data processing device implements the message forwarding operation and the message adjustment operation, and the message transmission from the first Ethernet device to the second Ethernet device can be realized without going through a switch.

[0040] In some embodiments, the forwarding mode may include different types, and when the Ethernet port is used as the first port, one or more of the forwarding modes may be pre-configured, and different Ethernet ports may use the same or different forwarding modes when used as the first port. The difference between different types of forwarding modes is that different factors are considered when determining the second port, and the factors considered in the forwarding mode may include the following factors: the VLAN number carried by the first message, and the default port of the first port. For the first port, after receiving the first message, at least one Ethernet port can be determined as the second port among multiple Ethernet ports according to the forwarding mode configured therein and the corresponding considerations.

[0041] Exemplarily, one type of forwarding mode is a first forwarding mode, and determining at least one second port based on a preconfigured forwarding mode includes: determining a default port of a first port as the second port, wherein the first port is preconfigured with at least one default port.

[0042] One or more Ethernet ports of the data processing device are preconfigured with a default port. For example, a default port can be preconfigured for an Ethernet port in the data processing device that receives Ethernet messages from an Ethernet device. A default port can be preconfigured for each Ethernet port of the data processing device, so that when the Ethernet port receives an Ethernet message as a first port, the preconfigured default port of the Ethernet port can be determined as a second port. One or more default ports can be configured for an Ethernet port. A configuration file, a register, etc. can be used to store the port identifier of the default port of each Ethernet port.

[0043] Exemplarily, one type of forwarding mode is a second forwarding mode, and determining at least one second port based on a preconfigured forwarding mode includes: determining an Ethernet port corresponding to a VLAN number in a VLAN tag carried by a first message as a second port, wherein at least one Ethernet port of a data processing device has at least one corresponding VLAN number.

[0044] According to the structure of the Ethernet message, the first message may be an Ethernet message carrying a VLAN tag or an Ethernet message not carrying a VLAN tag. It is understandable that when the first message does not carry a VLAN tag, the second port cannot be determined by the second forwarding mode. Figure 2 The structure of an Ethernet packet without a VLAN tag is shown. Figure 3 The structure of an Ethernet message carrying a VLAN tag is shown. The VLAN tag includes a tag protocol identifier field, a priority field, a standard format indicator field, and a VLAN number field. Among them, the tag protocol identifier (TPID) indicates the data frame type. The priority (PRI) indicates the 802.1Q priority of the data frame, and the value range is 0-7. When the network is blocked, the data frame with a high priority will be sent first. The canonical format indicator (CFI) indicates whether the MAC address is encapsulated in a standard format in different transmission media, which is used for compatibility with Ethernet and token ring networks. The VLAN number (VLAN ID, VID) indicates the number of the VLAN to which the Ethernet message belongs. The VLAN ID value range is 0 to 4095. Since 0 and 4095 are reserved values ​​for the protocol, the valid value range of VID is 1-4094.

[0045] One or more Ethernet ports of the data processing device have at least one corresponding VLAN number. For example, a corresponding VLAN number can be pre-configured for an Ethernet port in the data processing device that receives Ethernet messages from an Ethernet device. A corresponding VLAN number can be pre-configured for each Ethernet port of the data processing device, so that at least one second port can be determined according to the VLAN number corresponding to each Ethernet port. One Ethernet port can be configured with one or more corresponding VLAN numbers. The data processing device can record the VLAN number corresponding to the Ethernet port through a configuration file, a register, etc.

[0046] When the data processing device receives the first message through the first port, the Ethernet port is used as the second port only when the VLAN number carried by the first message is the same as the VLAN number corresponding to the Ethernet port. The Ethernet port may have multiple corresponding VLAN numbers, and the Ethernet port may be determined as the second port when the data processing device receives first messages carrying different VLAN numbers.

[0047] Furthermore, the data processing device may record the VLAN number corresponding to the Ethernet port through a VLAN configuration list.

[0048] The data processing device can maintain the VLAN configuration lists of different Ethernet ports respectively, or the data processing device can aggregate the VLAN configuration lists of N Ethernet ports into a total VLAN table, as shown in Table 1 below, wherein the second column is the VLAN configuration list of Ethernet port 1, and the N+1th column is the VLAN configuration list of Ethernet port N.

[0049] Table 1

[0050]

[0051] In addition, the pre-configured forwarding mode of the Ethernet port can also include the first forwarding mode and the second forwarding mode at the same time, that is, the Ethernet port corresponding to the VLAN number in the VLAN tag carried by the first message is determined as the second port, and the default port of the first port is the second port. By using the two forwarding modes in combination, it is possible to more flexibly control which Ethernet ports the first message is sent through.

[0052] Exemplarily, if the first message carries a VLAN tag, the preconfigured forwarding mode is the second forwarding mode, and if the first message does not carry a VLAN tag, the preconfigured forwarding mode is the second forwarding mode. That is, the data processing device automatically switches to forwarding based on a VLAN tag or forwarding based on a default port according to the content of the first message, with a high degree of automation. When connecting different Ethernet devices, the user only needs to adjust the default port and VLAN number of the Ethernet port, and does not need to configure the forwarding mode of the first port, which is more convenient to use.

[0053] Exemplarily, the data processing device can record the forwarding mode configured for each Ethernet port through a configuration file, an identifier, etc. For example, at least one Ethernet port of the data processing device is configured with a receiving attribute RX_VLAN, and the receiving attribute can have different values. The value of the receiving attribute is used to indicate the forwarding mode configured for the Ethernet port. For example, the receiving attribute has 4 values, which respectively indicate that the forwarding mode pre-configured for the first port is the first forwarding mode, the second forwarding mode, the first forwarding mode and the second forwarding mode are used at the same time, and the forwarding mode is automatically determined according to whether the first message carries a VLAN tag. By setting the receiving attribute, the data processing device can quickly and easily determine the forwarding mode, and can configure and switch the forwarding mode of the first port by changing the value of the receiving attribute, which is more convenient to use.

[0054] The purpose of configuring the forwarding mode for the first port is to control which Ethernet devices receive the messages sent by the first Ethernet device. By configuring the forwarding mode, the default port, and the VLAN number, the user can control which Ethernet devices receive the messages sent by the first Ethernet device while sending the first message to the host computer. The forwarding relationship between the Ethernet ports of the data processing device is flexibly constructed, so that the data transmission path can be flexibly adjusted between multiple Ethernet devices connected to the data processing device to meet different application scenarios.

[0055] Exemplarily, the Ethernet port can be configured with different types of forwarding modes in different time periods, the Ethernet port can be configured with different default ports in different time periods, and the Ethernet port can be configured with different VLAN numbers in different time periods. The different time periods here can be understood as different time periods when the Ethernet port is connected to different Ethernet devices, or can be understood as different time periods when the Ethernet port is connected to the same Ethernet device. The type of forwarding mode of the Ethernet port can be adjusted, and the default port and VLAN number of the Ethernet port can be adjusted, so that users can build more flexible and diverse forwarding paths.

[0056] In some embodiments, the data processing device sends the first message to the host computer in a manner including: keeping the first message unchanged and sending the first message to the host computer; or stripping the VLAN tag carried by the first message and sending the first message after stripping the VLAN tag to the host computer. Among them, the manner in which the data processing device sends the first message to the host computer can be adjusted according to the data acquisition requirements of the host computer. For example, if the host computer needs to obtain the complete first message, the first message can be kept unchanged and sent to the host computer; if the host computer does not care about the VLAN tag carried by the first message, then if the first message does not carry the VLAN tag, the first message can be kept unchanged and sent to the host computer. If the first message carries the VLAN tag, the VLAN tag carried by the first message can be stripped and the first message after stripping the VLAN tag can be sent to the host computer.

[0057] Exemplarily, the data processing device sends the first message to the host computer according to the monitoring reporting method preconfigured by the first port. Some or all Ethernet ports of the data processing device may be preconfigured with a monitoring reporting method, and the monitoring reporting method is: keep the first message unchanged and send the first message to the host computer, or strip the VLAN tag carried by the first message, and send the first message after stripping the VLAN tag to the host computer. The monitoring reporting methods of each Ethernet port may be the same or different, and the monitoring reporting methods configured for the Ethernet port in different time periods and when connected to different Ethernet devices may be different. By configuring the monitoring reporting method, the data of interest to the user can be sent to the host computer, and irrelevant data is filtered, which is convenient for the user to view and analyze the data.

[0058] The types of Ethernet ports of the data processing device include vehicle-mounted Ethernet ports and common Ethernet ports, and the types of Ethernet devices connected to the data processing device include vehicle-mounted Ethernet devices and common Ethernet devices. Common Ethernet refers to traditional Ethernet technology. Vehicle-mounted Ethernet is optimized at the physical layer to meet the special requirements in the vehicle environment. Based on this, the type of the second port can be consistent with or inconsistent with the first port to achieve communication between different types of Ethernet devices.

[0059] The data processing device sends the first message to the host computer, which is used for data monitoring. It not only sends the first message received through the first port to the host computer, but also ensures that the first message sent by the first Ethernet device can be received by the target device of the first Ethernet device. On the one hand, the pre-configured forwarding mode of the first port is adapted to the data transmission requirements of the first Ethernet device, and the Ethernet port connected to the target device of the first Ethernet device can be used as the second port. On the other hand, when sending a message to the second Ethernet device, it is necessary to ensure that the sent message meets the message receiving requirements of the second Ethernet device.

[0060] In some embodiments, the data processing device is pre-set with multiple types of forwarding message adjustment modes, and the data processing device is configured to: obtain message format information of the first message, obtain message receiving requirements of the second Ethernet device connected to each second port, and for each second port, if the message format information of the first message meets the message receiving requirements of the second Ethernet device connected to the second port, send the first message to the second Ethernet device through the second port; if the message format information of the first message does not meet the message receiving requirements of the second Ethernet device connected to the second port, determine the forwarding message adjustment mode according to the difference between the message format information of the first message and the message receiving requirements of the second Ethernet device, adjust the first message to a second message that meets the message receiving requirements of the second Ethernet device based on the forwarding message adjustment mode, and send the second message to the second Ethernet device through the second port.

[0061] The message format information satisfies the message reception requirements in the following cases: 1) the first message does not carry a VLAN tag, and the second Ethernet device receives the message without a VLAN tag; 2) the first message carries a VLAN tag, and the second Ethernet device receives the message carrying a VLAN tag, and the VLAN number carried by the first message is within the value range of the VLAN number of the VLAN tag carried by the message received by the second Ethernet device. The message format information does not meet the message reception requirements in the following cases: there is a difference between the message format information of the first message and the message reception requirements of the second Ethernet device, and the difference may be a first difference, a second difference, or a third difference. The first difference is that the first message carries a VLAN tag, while the message received by the second Ethernet device does not carry a VLAN tag; the second difference is that the VLAN number carried by the first message is different from the VLAN number carried by the message received by the second Ethernet device; the third difference is that the first message does not carry a VLAN tag, while the message received by the second Ethernet device carries a VLAN tag.

[0062] In one example, multiple types of forwarding message adjustment methods may include: a first adjustment method, a second adjustment method, and a third adjustment method. Different types of forwarding message adjustment methods have different adjustment contents for the first message. Among them, the first adjustment method is: stripping the VLAN tag carried in the first message to obtain the second message; the second adjustment method is: replacing the VLAN tag carried by the first message with a preconfigured VLAN tag to obtain the second message; the third adjustment method is: adding the preconfigured VLAN tag to the first message to obtain the second message.

[0063] In the second adjustment method, the VLAN tag carried by the first message is replaced with a preconfigured VLAN tag. In the third adjustment method, the preconfigured VLAN tag is added to the first message, wherein the preconfigured VLAN tag is a VLAN tag carried in the message supported by the second Ethernet device for reception. The difference between different VLAN tags is that the VLAN numbers carried are different. For example, if the value of the VLAN number in the VLAN tag carried by the message received by the second Ethernet device is 1, then the preconfigured VLAN tag is a VLAN tag carrying a VLAN number of 1. Exemplarily, a default VLAN number is preconfigured for some or all Ethernet ports of the data processing device. For example, a default VLAN number can be preconfigured for all Ethernet ports of the data processing device or for an Ethernet port in the data processing device that sends an Ethernet message to an Ethernet device. The value of the default VLAN number is the VLAN number of the VLAN tag carried in the Ethernet message supported for reception by the Ethernet device connected to the Ethernet port. When the Ethernet port is connected to different Ethernet devices, the default VLAN number of the Ethernet port can be adjusted. Therefore, when the second message adjustment mode and the third adjustment mode are used, the preconfigured VLAN tag is the VLAN tag required by the second Ethernet device connected to the second port, and is also the VLAN tag generated according to the default VLAN number of the Ethernet port that sends the second message.

[0064] In one example, the correspondence between the different differences between the message format information of the first message and the message receiving requirement of the second Ethernet device and different types of forwarding message adjustment methods can be preset, such as the first difference corresponds to the first adjustment method, the second difference corresponds to the second adjustment method, and the third difference corresponds to the third adjustment method. Thus, for each second port, after determining the difference between the message format information of the first message and the message receiving requirement of the second Ethernet device, the forwarding message adjustment method can be determined according to the correspondence.

[0065] In one example, the message receiving requirement and the message format information may be sent to the data processing device via a host computer or a terminal device. In one example, the data processing device may parse the first message after receiving the first message to obtain the message format information of the first message.

[0066] By matching the message format information with the message receiving requirements, the data processing device can determine whether it is necessary to adjust the message sent by the Ethernet device, as well as the forwarding message adjustment method to be used, thereby ensuring that the sent Ethernet message can meet the receiving requirements of the connected Ethernet device. There is no need for the user to manually configure the forwarding message adjustment method, making it easier for users to use.

[0067] In some embodiments, the data processing device is configured to: for each second port, if the second port is not pre-configured with a forwarding message adjustment method, send the first message to the second Ethernet device through the second port; if the second port is pre-configured with a forwarding message adjustment method, use the forwarding message adjustment method pre-configured for the second port to adjust the first message to a second message that meets the message reception requirements of the second Ethernet device, and send the second message to the second Ethernet device through the second port.

[0068] Exemplarily, at least one Ethernet port of the data processing device is pre-configured with a forwarding message adjustment mode. For example, the forwarding message adjustment mode may be pre-configured for some or all Ethernet ports of the data processing device, and the forwarding message adjustment modes of different Ethernet ports may be the same or different, so that when the Ethernet port is used as the second port to send an Ethernet message, the first message may be adjusted to the second message according to the forwarding message adjustment mode pre-configured for the Ethernet port and then sent; when the Ethernet port that is not pre-configured with the forwarding message adjustment mode is used as the second port to send an Ethernet message, the first message is directly sent through the second port.

[0069] For example, the user considers whether the Ethernet port will be used as the second port and whether message adjustment is required when used as the second port to determine whether to configure the forwarding message adjustment mode for the Ethernet port. In this way, the user uniformly controls the adjustment of the received message by the data processing device, which is convenient for the user to control the data processing device according to actual needs.

[0070] Exemplarily, the forwarding message adjustment mode preconfigured by the second port may be sent to the data processing device through a host computer or a terminal device. The data processing device may record the forwarding message adjustment mode configured by the Ethernet port through a configuration file, a configuration table, etc. For example, the forwarding message adjustment mode preconfigured by the Ethernet port may be recorded through a forwarding message adjustment identifier, and the forwarding message adjustment identifier TX_TG is used to indicate whether the Ethernet port is preconfigured with a forwarding message adjustment mode and the type of the preconfigured forwarding message adjustment mode. For example, an Ethernet port may have a forwarding message adjustment identifier, and the forwarding message adjustment identifier has 4 values, which respectively indicate that the first adjustment mode is configured, the second adjustment mode is configured, the third adjustment mode is configured, and the forwarding message adjustment mode is not configured. Thus, the data processing device can quickly determine whether the second port is preconfigured with a forwarding message adjustment mode and the type of the configured forwarding message adjustment mode through the message adjustment mode, and can also quickly modify the configuration of the forwarding message adjustment mode of the Ethernet port by modifying the forwarding message adjustment identifier.

[0071] After determining the second port based on the preconfigured forwarding method, for each second port, the data processing device can keep the first message unchanged, or adjust the VLAN tag of the first message based on the forwarding message adjustment method, thereby realizing the functions of data forwarding and VLAN tag adjustment in the data processing device, thereby eliminating the need to set up a switch.

[0072] In summary, when determining the second port, the data processing device can determine the second port according to the VLAN tag carried by the first message, can determine the second port according to the default port of the first port, and when sending the first message to the second Ethernet device, can directly send the first message, can adjust the first message to the second message and then send it, so that the data processing device can realize functions such as message forwarding, VLAN addition, stripping, and replacement, that is, some switch functions are integrated in the data processing device, and Ethernet message transmission between Ethernet devices communicating through the switch can be guaranteed without using a switch. Therefore, by integrating the VLAN configuration function in the data processing device, there is no need to set up a separate switch, the wiring layout is simpler, hardware resources are saved, and space occupation is reduced.

[0073] In some embodiments, the data processing device is further configured to: receive a host computer message and a sending port identifier transmitted by the host computer, determine at least one third port according to the sending port identifier, send the host computer message to the third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets the receiving requirements of the third Ethernet device, and send the third message to the third Ethernet device through the third port.

[0074] The host computer can send a message to the Ethernet device in the vehicle electronic system through the data processing device, and adjust the host computer message sent by the host computer to a third message that meets the message receiving requirements of the third Ethernet device, so that the message transmission from the host computer to the third Ethernet device can be realized without going through a switch. Depending on the application scenario, the host computer message can be a message with different functional purposes. For example, in a test scenario, the host computer sends a test message to the Ethernet device through the data processing device.

[0075] The host computer sends the host computer message and the sending port identifier to the data processing device, wherein the sending port identifier is used to indicate an Ethernet port determined to be used to send the host computer message from a plurality of Ethernet ports. For example, the sending port identifier includes port identifiers of one or more Ethernet ports, indicating that the data processing device sends the Ethernet message through the one or more Ethernet ports. Furthermore, one or a group of host computer messages has one sending port identifier.

[0076] In one example, the host computer may include at least one simulation node, and the simulation node includes at least one message, for example, one simulation node includes a message for simulating ECU output, and one simulation node includes a message for simulating radar output. The host computer message is one or a group of messages of the simulation node, and the sending port identifier is the port identifier of the Ethernet interface corresponding to the simulation node. The message of the simulation node is sent to the data processing device as the host computer message, and the data processing device receives the message of the simulation node and sends it to the connected data transceiver device. Exemplarily, the host computer obtains all Ethernet ports of the data processing device, establishes a mapping relationship between the logical port and the Ethernet port, for example, one logical port corresponds to one Ethernet port; the host computer obtains the simulation node, establishes a mapping relationship between the simulation node and the logical port, and thus establishes a mapping relationship between the simulation node and the Ethernet port, for example, one simulation node corresponds to one logical interface. When sending the message of the simulation node, the host computer determines the Ethernet port corresponding to the simulation node, and sends the message of the simulation node and the port identifier of the Ethernet port corresponding to the simulation node to the data processing device.

[0077] The mapping of logical ports to Ethernet ports actually establishes a mapping between the application running on the host computer and the data processing device, which can realize the abstraction of resources, make the development and maintenance of applications more flexible and efficient, improve the overall scalability and maintainability of the system, and allow the data processing device to be replaced and upgraded without changing the application.

[0078] Similar to the first port and the second port, the third port is not a fixed Ethernet port of the data processing device. When the Ethernet device connected to the Ethernet port receives a message sent by the host computer, the Ethernet port is the third port. Similar to sending the first message directly through the second port and adjusting the first message to the second message and then sending it through the second port, it is necessary to ensure that the message sent by the third port can be received by the third Ethernet device.

[0079] In some embodiments, the data processing device is pre-set with multiple types of downward message adjustment methods, and the data processing device is configured to: obtain message format information of the host computer message, obtain message receiving requirements of the third Ethernet device connected to each third port, and for each third port, if the message format information of the host computer message meets the message receiving requirements of the third Ethernet device connected to the third port, then send the host computer message to the third Ethernet device through the third port; if the message format information of the host computer message does not meet the message receiving requirements of the third Ethernet device connected to the third port, then determine the downward message adjustment method according to the difference between the message format information of the host computer message and the message receiving requirements of the third Ethernet device, adjust the host computer message to a third message that meets the message receiving requirements of the third Ethernet device based on the downward message adjustment method, and send the third message to the third Ethernet device through the third port.

[0080] Among them, the message format information meets the message reception requirements as follows: 1) the host computer message does not carry a VLAN tag, and the third Ethernet device receives the message without a VLAN tag; 2) the host computer message carries a VLAN tag, and the third Ethernet device receives the message carrying a VLAN tag, and the VLAN number carried by the host computer message is within the value range of the VLAN number of the VLAN tag carried by the message received by the third Ethernet device. The message format information does not meet the message reception requirements as follows: there is a difference between the message format information of the host computer message and the message reception requirements of the third Ethernet device, and the difference can be the first difference, the second difference, or the third difference. Among them, the first difference is: the host computer message carries a VLAN tag while the message received by the third Ethernet device does not carry a VLAN tag; the second difference is: the VLAN number carried by the host computer message is different from the VLAN number carried by the message received by the third Ethernet device; the third difference is: the host computer message does not carry a VLAN tag while the message received by the third Ethernet device carries a VLAN tag.

[0081] In one example, multiple types of adjustment methods for sending messages may include: a fourth adjustment method, a fifth adjustment method, and a sixth adjustment method, wherein the fourth adjustment method is: stripping the VLAN tag carried in the upper computer message to obtain a third message; the fifth adjustment method is: replacing the VLAN tag carried in the upper computer message with a preconfigured VLAN tag to obtain a third message; the sixth adjustment method is: adding a preconfigured VLAN tag to the upper computer message to obtain a third message. The preconfigured VLAN tag is a VLAN tag carried in the message that the third Ethernet device supports receiving. The adjustment method for sending messages preconfigured by the Ethernet port may be one of the fourth adjustment method, the fifth adjustment method, and the sixth adjustment method.

[0082] In the fifth adjustment method, the VLAN tag carried by the upper computer message is replaced with a preconfigured VLAN tag. In the sixth adjustment method, the preconfigured VLAN tag is added to the upper computer message, wherein the preconfigured VLAN tag is a VLAN tag carried in the message supported by the third Ethernet device for reception. The difference between different VLAN tags is that the VLAN numbers carried are different. For example, if the VLAN number in the VLAN tag carried by the message received by the third Ethernet device is 1, then the preconfigured VLAN tag is a VLAN tag carrying a VLAN number of 1.

[0083] It can be understood that, similar to the second adjustment method and the third adjustment method, the preconfigured VLAN tag in the fifth adjustment method and the sixth adjustment method is a VLAN tag carried in the message supported by the third Ethernet device receiving the third message. In one example, at least one Ethernet port of the data processing device is configured with a default VLAN number. When the Ethernet port is used as the second port or the third port, the first message and the upper computer message are processed based on the default VLAN number when adding or replacing the VLAN tag. In another example, some or all Ethernet ports of the data processing device are preconfigured with a default opposite-end VLAN number, and its value and use are similar to the default VLAN number. When the Ethernet port is used as the second port and the second adjustment method and the third adjustment method are used, the preconfigured VLAN tag is obtained based on the default VLAN number. When the Ethernet port is used as the third port and the fifth adjustment method and the sixth adjustment method are used, the preconfigured VLAN tag is obtained based on the default opposite-end VLAN number.

[0084] In one example, the correspondence between the different differences between the message format information of the upper computer message and the message receiving requirements of the third Ethernet device and different types of message adjustment methods can be preset, such as the first difference corresponding to the fourth adjustment method, the second difference corresponding to the fifth adjustment method, and the third difference corresponding to the sixth adjustment method. Thus, after determining the difference between the message format information of the upper computer message and the message receiving requirements of the third Ethernet device, the message adjustment method can be sent according to the correspondence.

[0085] In one example, the data processing device can parse the host computer message to obtain the message format information of the host computer message after receiving the message from the host computer. After connecting to the Ethernet device, the data processing device can obtain and store the message receiving requirements of the connected Ethernet device. The message receiving requirements can be sent to the data processing device through the host computer or the terminal device.

[0086] When the data processing device realizes data transmission between the host computer and the Ethernet device, it can determine whether to use the downward message adjustment method and the type of downward message adjustment method to be used according to whether there is a difference between the message format information of the host computer message and the message receiving requirement of the third Ethernet device, so as to ensure that the Ethernet message sent can meet the receiving requirement of the connected Ethernet device.

[0087] In some embodiments, at least one Ethernet port of the data processing device is pre-configured with a downward message adjustment method, and the data processing device is configured to: for each third port, if the third port is not pre-configured with the downward message adjustment method, send the host computer message to the third Ethernet device through the third port; if the third port is pre-configured with the downward message adjustment method, use the downward message adjustment method pre-configured on the third port to adjust the host computer message to a third message that meets the message receiving requirements of the third Ethernet device, and send the third message to the third Ethernet device through the third port.

[0088] Exemplarily, at least one Ethernet port of the data processing device is pre-configured with a method for adjusting the sent messages. For example, the sent message adjustment method may be pre-configured for some or all Ethernet ports of the data processing device, and the sent message adjustment methods of different Ethernet ports may be the same or different, so that when the Ethernet port is used as a third port to send an Ethernet message, the host computer message may be adjusted to a third message and then sent according to the pre-configured sent message adjustment method of the Ethernet port; when the Ethernet port that is not configured with the sent message adjustment method is used as a third port to send an Ethernet message, the host computer message is directly sent through the third port.

[0089] For example, the user considers whether the Ethernet port will be used as the third port and whether message adjustment is required when used as the third port to determine whether to configure the forwarding message adjustment mode for the Ethernet port. In this way, the user uniformly controls the adjustment of the received message by the data processing device, which is convenient for the user to control the data processing device according to actual needs.

[0090] Exemplarily, the third port pre-configured message adjustment mode can be sent to the data processing device through a host computer or a terminal device. The data processing device can record the message adjustment mode configured by the Ethernet port through a configuration file, a configuration table, etc. In some examples, similar to the forwarding message adjustment identifier, the message adjustment mode pre-configured by the Ethernet port can be recorded by the message adjustment identifier, and the message adjustment identifier TX_TG' is used to indicate whether the Ethernet port is pre-configured with the message adjustment mode and the type of the pre-configured message adjustment mode. In some examples, the Ethernet port has a message adjustment identifier, and the message adjustment identifier is used to record the forwarding message adjustment mode and the message adjustment mode pre-configured by the Ethernet port at the same time. The message adjustment identifier has 4 values. When the Ethernet port is used as the second port, it indicates that the first adjustment mode is configured, the second adjustment mode is configured, the third adjustment mode is configured, and the forwarding message adjustment mode is not configured. When the Ethernet port is used as the third port, it indicates that the fourth adjustment mode is configured, the fifth adjustment mode is configured, the sixth adjustment mode is configured, and the message adjustment mode is not configured.

[0091] After determining the third port based on the preconfigured forwarding method, for each third port, the data processing device can keep the host computer message unchanged, or adjust the VLAN tag of the host computer message based on the downward message adjustment method, so that each third Ethernet device can receive the message from the host computer, and the functions of data forwarding and VLAN tag adjustment are realized in the data processing device, so that there is no need to set up a switch.

[0092] In some embodiments, the data processing device is configured to: receive a host computer message and a sending port identifier transmitted by the host computer, determine at least one third port according to the sending port identifier, send the host computer message to the third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets the receiving requirements of the third Ethernet device, and send the third message to the third Ethernet device through the third port; receive a lower computer message transmitted by the third Ethernet device through the third port, and send the lower computer message to the host computer.

[0093] In some scenarios, the data interaction between the host computer and the electronic device may also include: the host computer sends data to the electronic device and receives data sent to the host computer by the electronic device, on the one hand, sending the host computer message sent by the host computer to the third Ethernet device, and on the other hand, receiving the lower computer message transmitted by the third Ethernet device and sending it to the host computer. Depending on the application scenario, the host computer message and the lower computer message can be messages with different functional purposes. For example, in a test scenario, the host computer sends a test message to the Ethernet device through a data processing device. After the Ethernet device executes the test function to obtain the test data, the response message is returned to the host computer through the data processing device, so that the host computer can analyze and obtain the test results.

[0094] Further, similar to sending the first message to the host computer, sending the lower machine message to the host computer includes: keeping the lower machine message unchanged and sending the lower machine message to the host computer; or stripping the VLAN tag carried by the lower machine message, and sending the lower machine message after stripping the VLAN tag to the host computer. In the case where the Ethernet device communicates bidirectionally with the host computer through the data processing device, the method of sending the lower machine message to the host computer by the data processing device can be adjusted according to the data acquisition requirements of the host computer.

[0095] Exemplarily, the data processing device sends the lower machine message to the upper machine according to the interactive reporting mode preconfigured by the third port. Some or all Ethernet ports of the data processing device can be preconfigured with interactive reporting modes, and the interactive reporting modes are: keeping the lower machine message unchanged, sending the lower machine message to the upper machine, or stripping the VLAN tag carried by the lower machine message, and sending the lower machine message after stripping the VLAN tag to the upper machine. The interactive reporting modes of each Ethernet port can be the same or different, and the interactive reporting modes configured for the Ethernet port in different time periods and when connected to different Ethernet devices can be different.

[0096] In summary, the data processing device realizes the mutual communication of various Ethernet devices in the vehicle electronic system and the two-way communication between the host computer and the Ethernet nodes in the vehicle electronic system through port forwarding and message VLAN processing functions, simplifies the wiring method, and makes the development and testing of automotive electronic systems more convenient.

[0097] In some embodiments, when the data processing device is used to collect data from the vehicle-mounted electronic system, it is configured to execute a first working mode: receiving a first message transmitted by a first Ethernet device through a first port, and sending the first message to a host computer; determining at least one second port based on a preconfigured forwarding method of the first port; sending the first message to a second Ethernet device through a second port, and / or adjusting the first message to a second message that meets the receiving requirements of the second Ethernet device, and sending the second message to the second Ethernet device through the second port.

[0098] In some embodiments, when the data processing device is used to perform a first test on the vehicle-mounted electronic system, it is configured to execute a second working mode: receiving a host computer message and a sending port identifier transmitted by the host computer, determining at least one third port according to the sending port identifier, sending the host computer message to a third Ethernet device through the third port, and / or adjusting the host computer message to a third message that meets the receiving requirements of the third Ethernet device, and sending the third message to the third Ethernet device through the third port;

[0099] In some embodiments, when the data processing device is used to perform the second test on the vehicle-mounted electronic system, it is configured to execute the third working mode: receiving the upper computer message and the sending port identifier transmitted by the upper computer, determining at least one third port according to the sending port identifier, sending the upper computer message to the third Ethernet device through the third port, and / or adjusting the upper computer message to a third message that meets the receiving requirements of the third Ethernet device, and sending the third message to the third Ethernet device through the third port; receiving the lower computer message transmitted by the third Ethernet device through the third port, and sending the lower computer message to the upper computer;

[0100] When the vehicle electronic system is subjected to the first test, the host computer sends an Ethernet message to the vehicle electronic system. When the vehicle electronic system is subjected to the second test, the host computer sends an Ethernet message to the vehicle electronic system and receives an Ethernet message fed back by the vehicle electronic system.

[0101] Exemplarily, the first test, such as an open-loop test, such as a data injection test, is a test process that only requires sending data to the device under test. The host computer sends a message to the Ethernet device, and the changes in the Ethernet device can be observed or measured through other measuring devices. The second test, such as a closed-loop test, such as a protocol stack test, is a test process that requires sending data to the device under test and collecting feedback data from the device under test. The host computer sends a message to the Ethernet device and receives the data fed back by the Ethernet device for analysis.

[0102] In some embodiments, the data processing device is connected to multiple Ethernet devices, and when the data processing device is used to realize communication between Ethernet devices, it is configured to execute the fourth working mode: determine at least one sending port based on a preconfigured forwarding mode, send the Ethernet message received by the Ethernet port through the sending port, and / or adjust the Ethernet message received by the Ethernet port to a to-be-sent message that meets the message receiving requirements of the Ethernet device connected to the sending port, and send the to-be-sent message through the sending port. In this embodiment, the data processing device realizes communication between different Ethernet devices at both ends of the Ethernet port, for example, communication between an in-vehicle Ethernet device and a common Ethernet device, and communication between an in-vehicle Ethernet device and another in-vehicle Ethernet device.

[0103] That is, the data processing device can be applied in different application scenarios. In different application scenarios, the data acquisition device can be configured to implement different working modes and perform different data processing.

[0104] In some embodiments, the data processing device only works in one working mode. The working mode is switched by a mode configuration command, and the mode configuration command is used to instruct the data processing device to switch the working mode, so that the working mode of the data processing device changes, such as switching from the first mode to the second mode, switching from other modes to the first mode, and so on. For example, the data processing device is provided with a mode configuration button for configuring the working mode, for example, the data processing device receives the mode configuration command sent by the host computer. When collecting data from the vehicle-mounted electronic system, the data processing device is configured to the first mode, when executing the first test, the data processing device is configured to the second mode, and when executing the second test, the data processing device is configured to the third mode.

[0105] In some embodiments, the data processing device operates in at least two modes of the first mode, the second mode, the third mode, and the fourth mode, and the data processing device receives the logic configuration instruction and determines the processing logic of the Ethernet message sent by the host computer and the processing logic of the Ethernet message received by each Ethernet port based on the logic configuration instruction;

[0106] The processing logic for the Ethernet message sent by the host computer includes: a first processing logic: receiving the host computer message and the sending port identifier transmitted by the host computer, determining at least one third port according to the sending port identifier, sending the host computer message to the third Ethernet device through the third port, and / or adjusting the host computer message to a third message that meets the message receiving requirement of the third Ethernet device, and sending the third message to the third Ethernet device through the third port;

[0107] The processing logic of the Ethernet message received by the Ethernet port includes: the second processing logic: sending the Ethernet message received by the Ethernet port to the host computer, determining at least one sending port based on the preconfigured forwarding mode, sending the Ethernet message through the sending port, and / or adjusting the Ethernet message received by the Ethernet port to the message to be sent that meets the message receiving requirements of the Ethernet device connected to the sending port, and sending the message to be sent through the sending port; the third processing logic: sending the Ethernet message received by the Ethernet port to the host computer; the fourth processing logic: determining at least one sending port based on the preconfigured forwarding mode, sending the Ethernet message received by the Ethernet port through the sending port, and / or adjusting the Ethernet message received by the Ethernet port to the message to be sent that meets the message receiving requirements of the Ethernet device connected to the sending port, and sending the message to be sent through the sending port. .

[0108] Thus, the data processing device can work in different working modes at the same time by determining the processing logic of the Ethernet message sent by the host computer and the processing logic of the Ethernet message received by each Ethernet port. For example, Ethernet port A can receive Ethernet messages from the Ethernet device and send the Ethernet messages to the host computer and the sending port, and at the same time, can receive the host computer message sent by the host computer and send it to the Ethernet device. For example, Ethernet port B can receive Ethernet messages from the Ethernet device and send the Ethernet messages to the sending port.

[0109] The data processing device can execute at least two of the first processing logic, the second processing logic, the third processing logic, and the fourth processing logic according to the logic configuration instruction. Therefore, the data processing device can work in at least two modes of the first mode, the second mode, the third mode, and the fourth mode, so that multiple data processing logics can be implemented at the same time, and the application scenarios are more extensive.

[0110] In some embodiments, the data processing device is also used to perform fault injection on the connected Ethernet device, and the data processing device is configured to: adjust the first message to a fault message according to the fault injection requirement, send the fault message through the second port, and / or adjust the fault message to a fault target message that meets the message receiving requirement of the second Ethernet device connected to the second port, and send the fault target message through the second port.

[0111] The fault injection requirement is used to indicate the fault added to the first message, including adjusting the data content and / or sending time of the first message. Among them, the Ethernet message includes a data segment and a frame parameter. The frame parameter is, for example, an address, a VLAN tag, a protocol type, a checksum, a timestamp, etc. The data segment is the actual data information carried by the Ethernet message. The frame parameter is encapsulated together with the data segment into an Ethernet message that meets the Ethernet transmission protocol and is sent. Adjusting the data content of the first message includes, for example, modifying the data segment content and modifying the frame parameter content. Adjusting the first message to a fault message according to the fault injection requirement can simulate a fault of incorrect message content. In addition, the data processing device can also control the sending time of the fault message according to the fault injection requirement. For example, delaying the sending time of the first message.

[0112] Fault injection requirements can be sent to the data processing device through the host computer or terminal equipment. When forwarding messages between Ethernet devices, the data processing device adds faults according to the fault injection requirements, which can simulate message content errors, delays and other faults, thereby enabling fault testing between Ethernet devices without the need to set up a separate fault injection device, simplifying wiring.

[0113] In some embodiments, the data processing device is configured to: adjust the host computer message based on the fault injection method to obtain a faulty host computer message, send the faulty host computer message to the third Ethernet device through the third port, and / or adjust the faulty host computer message to a faulty third message that meets the message receiving requirements of the third Ethernet device, and send the faulty third message to the third Ethernet device through the third port.

[0114] Wherein, the fault injection method is used to indicate the fault added to the host computer message, including adjusting the data content and / or sending time of the host computer message. Adjusting the host computer message based on the preconfigured fault injection method includes: adjusting the data content and / or sending time of the host computer message. Wherein, adjusting the content of the host computer message, for example, includes: modifying the data segment content, modifying the frame parameters. Adjusting the sending time of the host computer message, for example, includes: delaying the sending time of the host computer message.

[0115] Exemplarily, the message of the simulation node in the host computer is sent to the data processing device as a host computer message. In order to realize fault injection, on the one hand, the sending conditions and Ethernet messages of the simulation node can be controlled so that the host computer message itself is used as a fault message, for example, the data segment of the Ethernet message sent by the simulation node is an erroneous data content, such as regulating the time when the simulation node sends the message to the data processing device. On the other hand, the message of the simulation node can be a message of a normally working Ethernet device, and the data processing device performs fault injection. In this way, the simulation node can directly import the message transmitted by the normal Ethernet device recorded by the event and send it to the data processing device according to the recorded sending interval, without the need to control the message sending time of the simulation node in the host computer and adjust the message of the simulation node. For users, the operation is simpler and more convenient.

[0116] By adjusting the data content of the message, the content of the Ethernet message can be tampered with, such as MAC address, VLAN number and priority, IP address, port number, data segment, etc. By adjusting the sending time, the message forwarding delay can be controlled. Therefore, after fault injection, the real Ethernet device receives the Ethernet message with incorrect content and delayed time, or cannot receive the Ethernet message, so as to perform fault testing on the real Ethernet device.

[0117] In some embodiments, the data processing device is further configured to: after receiving the first message transmitted by the first Ethernet device through the first port, check whether the first message meets the preset first sending condition, and send the first message to the host computer when the first message meets the preset sending condition. After receiving the lower computer message transmitted by the third Ethernet device through the third port, check whether the lower computer message meets the preset second sending condition, and send the lower computer message to the host computer when the lower computer message meets the preset second sending condition. Among them, the preset first sending condition and the second sending condition are, for example: the receiving time of the message is within the preset receiving time period, the Ethernet port is one of the preset multiple Ethernet ports, the message carries a VLAN tag, and the VLAN number of the VLAN tag carried by the message is within the preset VLAN number range. The sending condition can be designed according to the data acquisition requirements of the host computer, and the data processing device is screened once to obtain the Ethernet message that meets the data acquisition requirements and send it to the host computer, thereby reducing the communication pressure between the host computer and the data processing device.

[0118] For example, Figure 4 As shown, the data processing device may include a controller and different types of interface modules, the interface module includes a data transceiver and a port, the number of each interface module may be multiple, and the type of the interface module may be any one of a common Ethernet interface module, a vehicle-mounted Ethernet interface module, a CAN bus interface module, a LIN bus interface module, a Flexray bus interface module, and a USB interface module.

[0119] In some embodiments, the controller of the data processing device includes a processor and an FPGA, the processor can run a Linux operating system, a Linux network protocol stack is implemented in the Linux operating system, a plurality of virtual network cards are provided in the data processing device, and the data processing device receives a host computer message transmitted by the host computer specifically as follows: the data processing device receives data information and target address information transmitted by the host computer; the data processing device selects a virtual network card, calls the network protocol stack in the data processing device, and generates a host computer message that complies with the Ethernet protocol based on the selected virtual network card and the data information and target address information. The data processing device uses the address information of the virtual network card as the source address information of the Ethernet message, the MAC address, IP address, etc. of the virtual network card as the source MAC address and source IP address in the Ethernet message, and combines the data information and target address information to obtain the Ethernet message through the network protocol stack encapsulation. Different virtual network cards are selected to obtain Ethernet messages with different source address information. For the Ethernet device receiving the Ethernet message, the Ethernet messages with different source address information belong to different Ethernet devices.

[0120] The data processing device may randomly select a virtual network card, or, under the control of the host computer, select a virtual network card specified by the host computer, each of which is configured with information such as an IP address, a MAC address, and a mask. In one example, the data processing device may obtain network card corresponding information indicating the corresponding relationship between the simulation node and the virtual network card, and determine the virtual network card corresponding to the simulation node.

[0121] Exemplarily, after the host computer is connected to the data processing device, all Ethernet ports of the data processing device are obtained, a correspondence between the simulation node and the logical port, a correspondence between the logical port and the Ethernet port, and a correspondence between the Ethernet port and the virtual network card are established, and one Ethernet port can correspond to one or more virtual network cards. When sending a message of a simulation node, the Ethernet port corresponding to the simulation node is obtained, and one virtual network card is selected from one or more virtual network cards of the Ethernet port corresponding to the simulation node as the virtual network card corresponding to the simulation node, thereby determining the virtual network card corresponding to the simulation node. The data processing device receives the host computer data, sends the interface identifier and the network card corresponding information, and determines a virtual network card from one or more virtual network cards of the Ethernet port corresponding to the simulation node according to the network card corresponding information.

[0122] A mapping relationship is established between the simulation node and the logical port, a mapping relationship is established between the logical port and the Ethernet port, and a mapping relationship is established between the Ethernet port and the virtual network card. Therefore, a mapping relationship between the simulation node and the virtual network card can be established, and the mapping relationship between the simulation node, the Ethernet port and the virtual network card is unified, so that the virtual network card selected when sending a message from the simulation node is the virtual network card of the Ethernet port corresponding to the simulation node. There is no need to separately set the mapping relationship between the simulation node and the Ethernet port, and the mapping relationship between the simulation node and the virtual network card, which is more convenient for users to use.

[0123] In this way, when the host computer communicates with the Ethernet device in the vehicle-mounted electronic system, the network protocol stack of the data processing device is called to encapsulate the message. Compared with calling the network protocol stack of the host computer to encapsulate the message on the host computer, the problem of being unable to call the network protocol stack due to insufficient user or software permissions can be avoided. The host computer itself may be connected to some Ethernet devices in the local area network that are configured with other IPs. Using a virtual network card and calling the network protocol stack of the data processing device can avoid the problem of IP address conflicts.

[0124] Each module in the above-mentioned data processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules. Among them, the data processing device can be connected to the host computer through a USB interface and a common Ethernet interface, that is, the common Ethernet port of the data processing device can be connected to the host computer in addition to connecting to the Ethernet device in the vehicle-mounted electronic system. If the data processing device is in the form of a board, it can also be connected to the mainboard of the host computer through a PCIE bus or the like, thereby realizing communication with the host computer.

[0125] The present application also provides a data processing system, including a host computer and at least one of the above-mentioned data processing devices, see Figure 5 The data processing device is connected to the host computer and the Ethernet device for the vehicle electronic system respectively, and the Ethernet device is connected to the Ethernet port of the data processing device.

[0126] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. A person of ordinary skill in the art can understand that the various functions of the above embodiments can be completed by instructions, or by controlling related hardware through instructions. The instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0127] The above is a detailed introduction to a data processing device and a data processing system provided in the embodiments of the present application. Specific examples are used herein 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 technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A data processing device, characterized in that: The data processing device is connected to the host computer and the Ethernet device for the vehicle electronic system respectively, the Ethernet device is connected to the Ethernet port of the data processing device, and the data processing device is configured as follows: Receiving a first message transmitted by a first Ethernet device through a first port, and sending the first message to a host computer; Determine at least one second port based on the preconfigured forwarding mode of the first port; The first message is sent to the second Ethernet device through the second port, and / or the first message is adjusted to a second message that meets the message receiving requirement of the second Ethernet device, and the second message is sent to the second Ethernet device through the second port.

2. The data processing device according to claim 1, characterized in that The forwarding mode preconfigured on the first port includes one or more of the following forwarding modes: A first forwarding mode: determining a default port of a first port as a second port, wherein the first port is preconfigured with at least one default port; The second forwarding mode: determining the Ethernet port corresponding to the VLAN number in the VLAN tag carried by the first message as the second port, wherein at least one Ethernet port of the data processing device has at least one corresponding VLAN number.

3. The data processing device according to claim 1, characterized in that The adjusting the first message to the second message comprises: stripping the VLAN tag carried in the first message to obtain the second message; Or, replacing the VLAN tag carried by the first message with a preconfigured VLAN tag to obtain a second message; Or, a preconfigured VLAN tag is added to the first message to obtain the second message.

4. The data processing device according to claim 1, characterized in that Sending the first message to the host computer includes: Keep the first message unchanged and send the first message to the host computer; Or, the VLAN tag carried by the first message is stripped, and the first message with the VLAN tag stripped is sent to the host computer.

5. The data processing device according to claim 1, characterized in that The data processing device is further configured to: Receive a host computer message and a sending port identifier transmitted by the host computer, determine at least one third port according to the sending port identifier, send the host computer message to the third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets the message receiving requirement of the third Ethernet device, and send the third message to the third Ethernet device through the third port.

6. The data processing device according to claim 5, characterized in that The data processing device is further configured to: receive a lower computer message transmitted by a third Ethernet device through a third port, and send the lower computer message to the upper computer.

7. The data processing device according to claim 5, characterized in that The adjusting the upper computer message to the third message comprises: stripping the VLAN tag carried in the upper computer message to obtain the third message; Or, replace the VLAN tag carried by the upper computer message with a pre-configured VLAN tag to obtain a third message; Or, a preconfigured VLAN tag is added to the upper computer message to obtain a third message.

8. The data processing device according to claim 1, characterized in that When collecting data of an Ethernet device for an in-vehicle electronic system, the data processing device is configured to: receive a first message transmitted by a first Ethernet device through a first port, and send the first message to a host computer; determine at least one second port based on a forwarding mode preconfigured for the first port; send the first message to a second Ethernet device through the second port, and / or adjust the first message to a second message that meets a message receiving requirement of the second Ethernet device, and send the second message to the second Ethernet device through the second port; When performing a first test on an Ethernet device for an in-vehicle electronic system, the data processing device is configured to: receive a host computer message and a sending port identifier transmitted by a host computer, determine at least one third port according to the sending port identifier, send the host computer message to a third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets a message receiving requirement of the third Ethernet device, and send the third message to the third Ethernet device through the third port; When performing a second test on an Ethernet device for an in-vehicle electronic system, the data processing device is configured to: receive a host computer message and a sending port identifier transmitted by a host computer, determine at least one third port according to the sending port identifier, send the host computer message to a third Ethernet device through the third port, and / or adjust the host computer message to a third message that meets a message receiving requirement of the third Ethernet device, and send the third message to the third Ethernet device through the third port; receive a lower computer message transmitted by the third Ethernet device through the third port, and send the lower computer message to the host computer; When performing a first test on the Ethernet device used in the vehicle electronic system, the host computer sends an Ethernet message to the Ethernet device. When performing a second test on the Ethernet device used in the vehicle electronic system, the host computer sends an Ethernet message to the Ethernet device and receives an Ethernet message fed back by the Ethernet device.

9. The data processing device according to claim 1, characterized in that: The data processing device is configured to: adjust the first message to a fault message according to a fault injection requirement, send the fault message through the second port, and / or adjust the fault message to a fault target message that meets the message receiving requirement of a second Ethernet device connected to the second port, and send the fault target message through the second port, wherein the fault injection requirement is used to indicate the fault added to the first message.

10. A data processing system, characterized in that: It comprises a host computer and at least one data processing device as described in any one of claims 1-9, wherein the data processing device is respectively connected to the host computer and an Ethernet device for an on-board electronic system, and the Ethernet device is connected to an Ethernet port of the data processing device.