Data processing device and data processing system
By designing a data processing device that includes a host computer interface and multiple device interfaces, data transmission is achieved using interface identification and forwarding information, the problem of single functions and inconvenient use of existing interface cards is solved, and flexible data transmission and support for multiple application scenarios is realized.
Patent Information
- Application Number
- CN202411215669.2
- 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
The existing interface card has a single function, and users need to frequently replace or combine multiple interface cards, which leads to inconvenience in the development and testing of on-board electronic systems.
A data processing device is designed, including a computer interface and multiple device interfaces. By receiving computer data and interface identifiers, the transmission interface is determined to perform data transmission, and data transmission between data transmission and reception devices is realized through pre-configured forwarding information.
It realizes flexible data transmission between the upper computer and the data transceiver and receive equipment, supports multiple application scenarios, making it more convenient for users to use, and reduces the need for replacement and combination of interface cards.
Smart Images

Figure CN119520327A_ABST
Abstract
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] 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 in the vehicle electronic system, and data interaction between the electronic equipment used in the vehicle electronic system.
[0003] 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 interaction between the host computer and electronic devices. Common interface cards include Ethernet interface cards, CAN interface cards, LIN interface cards, Flexray interface cards, etc. However, current interface cards have single functions and few application scenarios. Users need to frequently replace interface cards or combine multiple interface cards for use, which brings inconvenience to users' testing. Summary of the invention
[0004] The embodiments of the present application provide a data processing device and system, which can realize data transmission from a host computer to a data transceiver device, and realize data transmission from a data transceiver device to a host computer and transmission between data transceiver devices through the configuration of forwarding information. The data processing device can realize different data transmissions and can be used in a variety of application scenarios, making it more convenient for users to use.
[0005] An embodiment of the present application provides a data processing device, including a host computer interface and multiple device interfaces, and the data processing device is configured to: when receiving host computer data and a sending interface identifier through the host computer interface, determine at least one sending interface in the device interface according to the sending interface identifier, and send the host computer data as data to be sent through the sending interface; and / or, when receiving device data transmitted by a data transceiver device through the device interface, determine at least one sending interface among the host computer interface and multiple device interfaces according to forwarding information pre-configured in the device interface, and send the device data as data to be sent through the sending interface.
[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 device is connected to a data transceiver device.
[0007] In some embodiments, at least one synchronization interface is further included, and the synchronization interface is used to connect a timing device or a data processing device. The data processing device is configured to: transmit time synchronization messages between the connected timing device or data processing through the synchronization interface, so that the data processing device and the connected timing device or data processing are synchronized through a time synchronization protocol.
[0008] In some embodiments, the device interface is pre-configured with a type of working mode, and the different types of working modes include at least two of the following: a first type of working mode, a second type of working mode, and a third type of working mode; in the first type of working mode, the data processing device determines the host computer interface as a sending interface; in the second type of working mode, the data processing device determines at least one device interface as a sending interface based on forwarding information; in the third type of working mode, the data processing device determines the host computer interface as a sending interface, and determines at least one device interface as a sending interface based on the forwarding information.
[0009] In some embodiments, the data processing device determines at least one device interface as a sending interface using at least one of the following determination methods: a first determination method, a second determination method; the first determination method: determining the default interface of the device interface as the sending interface, wherein the device interface is pre-configured with at least one default interface; the second determination method: determining the device interface corresponding to the VLAN number of the device data as the sending interface, wherein the device data carries a VLAN number, and at least one device interface of the data processing device has at least one corresponding VLAN number.
[0010] In some embodiments, the data processing apparatus is configured to: obtain a configuration instruction, and configure a working mode for at least one device interface according to the configuration instruction.
[0011] In some embodiments, sending the data to be sent through the sending interface includes: when the data to be sent meets the data receiving requirements of the sending interface, sending the data to be sent through the sending interface; when the data to be sent does not meet the data receiving requirements of the sending interface, adjusting the data to be sent to meet the data receiving requirements of the sending interface and then sending it through the sending interface, wherein the data receiving requirements of the sending interface are the data receiving requirements of the host computer or data transceiver device to which the sending interface is connected.
[0012] In some embodiments, if the sending interface is a host computer interface, before sending the device data as the data to be sent through the sending interface, it also includes: filtering the device data according to preset data upload conditions to obtain the data to be sent, and the considerations of the data upload conditions include at least one of the following: the device interface for receiving the device data; the message type of the device data; the data content of the device data; the timestamp information of the device data.
[0013] In some embodiments, if the sending interface is a device interface, before sending the data to be sent through the sending interface, it also includes: obtaining a fault injection instruction, modifying the data to be sent according to the fault injection instruction, and / or modifying the sending time of the data to be sent according to the fault injection instruction, and the fault injection instruction is at least used to indicate at least one of the following: sending the data to be sent in advance; delaying the sending of the data to be sent; modifying the data content of the data to be sent.
[0014] In some embodiments, the fault injection instruction is applied to at least one transmitting interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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 are 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: Figure 1 is a schematic diagram of bus connection of a data processing device provided in an embodiment of the present application; Figure 2 is a schematic diagram of a bus provided in an embodiment of the present application connecting multiple devices; Figure 3 is a structural schematic diagram of a data processing device provided in an embodiment of the present application; Figure 4 is an application schematic diagram of a data processing device provided in an embodiment of the present application; Figure 5 is an application schematic diagram of a data processing device provided in an embodiment of the present application; Figure 6 is an application schematic diagram of a data processing device provided in an embodiment of the present application; Figure 7 is a schematic diagram of a cascade of multiple data processing devices provided in an embodiment of the present application; Figure 8 It is a schematic diagram of multiple data processing devices provided in an embodiment of the present application being cascaded and connected to a timing device; Fig. 9 is a schematic diagram of connection between a terminal device and a data processing device provided in an embodiment of the present application; Fig.10 It is a connection diagram between a terminal device and a data processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] 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.
[0017] An embodiment of the present application provides a data processing device 100 for developing and testing an in-vehicle electronic system. The data processing device 100 includes a host computer interface and multiple device interfaces. The data processing device 100 is configured to: when receiving host computer data and a sending interface identifier through the host computer interface, determine at least one sending interface in the device interface according to the sending interface identifier, and send the host computer data as data to be sent through the sending interface; and / or, when receiving device data transmitted by a data transceiver device 300 through the device interface, determine at least one sending interface among the host computer interface and multiple device interfaces according to forwarding information pre-configured in the device interface, and send the device data as data to be sent through the sending interface.
[0018] like Figure 1 As shown, the data processing device 100 includes multiple interfaces, which are divided into a host computer interface and a device interface. The host computer interface is an interface in the data processing device 100 for transmitting data with the host computer 200, and the device interface is an interface in the data processing device 100 for transmitting data with the data transceiver device 300. The number of host computer interfaces can be one or more, and the number of device interfaces can be multiple. The interface can be connected to a bus, and the bus can be any bus, for example, it can be a USB bus, a PCIE bus, a CAN bus, a LIN bus, a Flexray bus, an Ethernet bus, a DSI3 bus, a PSI5 bus, etc., and the Ethernet bus can be an in-vehicle Ethernet bus or an ordinary Ethernet bus. The data processing device 100 includes multiple types of interfaces, and the number of one type of interface can be one or more, and different types of interfaces can be connected to different types of buses. For example, the type of an interface can be any one of a USB interface, a PCIE interface, a CAN interface, a LIN interface, a Flexray interface, an Ethernet interface, a DSI3 interface, and a PSI5 interface, and the Ethernet interface can be an in-vehicle Ethernet interface or an ordinary Ethernet interface. One interface can be connected to one bus, and multiple interfaces of the same type can be connected to one or more buses. As Figure 2As shown, a bus can be connected to multiple devices, such as a host computer 200, a data transceiver device 300, and a data processing device 100. For example, the USB interface of the data processing device 100 is connected to the USB bus, and the USB interface of the host computer 200 is connected to the USB bus. For example, the CAN bus is connected to the data transceiver device 300 such as ECU, sensor, test bench, etc., and the CAN interface of the data processing device 100 is connected to the CAN bus, and the data from the ECU, sensor, and test bench are received through the CAN interface. One or more data processing devices 100 can be connected to a bus, such as an ECU and multiple data processing devices 100 are connected to the CAN bus, and multiple data processing devices 100 all send and receive data on the CAN bus. In addition, the data processing device 100 may also include input and output interfaces such as an audio interface, an HDMI interface, and RS232 to achieve more diverse connections.
[0019] For example, Figure 3 As shown, the data processing device 100 may include a controller and a plurality of interface modules, the interface module may connect the controller and the physical interface, the interface module may be, for example, a USB module, a CAN module, a LIN module, a Flexray module, an in-vehicle Ethernet module, a common Ethernet module, etc., each interface module may include, for example, a transceiver chip of a corresponding communication protocol, such as a USB transceiver chip, a CAN transceiver chip, a LIN transceiver chip, a Flexray transceiver chip, an in-vehicle Ethernet transceiver chip, a common Ethernet transceiver chip, etc. The physical interface may be, for example, a USB interface, a CAN interface, a LIN interface, a Flexray interface, an in-vehicle Ethernet interface, a common Ethernet interface, etc. The transceiver chip receives the digital signal provided by the controller, converts it into a level signal, and then sends it out through the physical interface, and the receiving chip receives the level signal, converts it into a digital signal, and then sends it to the controller.
[0020] In one example, the controller includes a processor and an FPGA. The processor and the FPGA are connected via a PCIE bus or an Ethernet bus. The interface module is set on the FPGA. The processor can run an embedded operating system, such as a Linux system. The FPGA is used to realize communication between the processor and each interface module.
[0021] Exemplarily, the host computer 200 is a computer such as a computer or an industrial computer connected to the data processing device 100, and can support one or more communication protocols such as USB, ordinary Ethernet protocol, PCEI protocol, etc. The data processing device 100 can be connected to the host computer 200 via a USB cable, or via a network cable. In addition, the possibility of connecting the host computer 200 via other communication means such as optical fiber and wireless communication is not excluded. The host computer 200 can receive device data transmitted by the data transceiver device 300, can directly store device data, can continue to send device data to other devices, such as to a cloud server or storage device, and can also display device data, analyze device data, etc., such as displaying device data content, timestamp, etc., so as to analyze device data.
[0022] Exemplarily, the data transceiver device 300 is an electronic device used in an on-board electronic system, which can only receive data, can only send data, or can both receive and send data. It should be noted that the electronic device used in the on-board electronic system here is not limited to the electronic device mounted on the vehicle, but also includes any electronic device used in the development and testing process of the on-board electronic system. The electronic device can be in the development process or already developed, and can include electronic devices that can be installed in the vehicle after development and form an on-board electronic system with other electronic devices, and can include a test bench, and the test bench is equipped with a simulation model, wherein the simulation model can be used to simulate one or more electronic devices. The data transceiver device 300 is, for example, a sensor (such as a lidar sensor), a vehicle electronic control unit (such as an ECU), a clock source, etc.
[0023] The data transceiver device 300 can support one or more communication protocols and communicate with other devices through the communication protocols, such as CAN, CANFD communication protocol, LIN, FastLIN communication protocol, Flexray communication protocol, Ethernet communication protocol, DSI3 communication protocol, PSI5 communication protocol, etc. The Ethernet communication protocol is, for example, the vehicle Ethernet communication protocol and the ordinary Ethernet communication protocol. The data transceiver device 300 has ports corresponding to the one or more protocols supported, such as CAN port, LIN port, Flexray port, ordinary Ethernet port, vehicle Ethernet port, DSI3 port, PSI5 port, etc. The data processing device 100 and the data transceiver device 300 can be connected through one bus or multiple buses. For example, the data transceiver device 300 is an ECU, and the ECU is connected to the data processing device 100 through the vehicle Ethernet bus, CAN bus, LIN bus, and Flexray bus respectively.
[0024] Each interface of the data processing device 100 may have a unique interface identifier, so that the interface can be determined according to the interface identifier. For example, the interface identifier may include a type and a serial number, such as USB_0, CAN_0, CAN_1, LIN_0, LIN_1, etc.
[0025] According to the communication protocol supported by the host computer 200, interfaces such as USB interface, ordinary Ethernet interface, PCIE interface, etc. can be used as host computer interfaces to connect to the host computer 200. According to the protocol supported by the data transceiver device 300, interfaces such as CAN interface, LIN interface, Flexray interface, Ethernet interface, DSI3 interface, PSI5 interface, etc. can be used as device interfaces to connect to the data transceiver device 300. In one example, the data processing device 100 is connected to the host computer 200 through multiple host computer interfaces. For example, when the amount of data is small, data is transmitted through the USB interface, and when the amount of data is large, data is transmitted through the ordinary Ethernet interface.
[0026] Exemplarily, the host computer interface and the device interface are fixed interfaces, for example, the USB interface is the host computer interface, the PCIE interface is the host computer interface, the common Ethernet interface with a communication rate of 10G is the host computer interface, and the remaining interfaces are device interfaces. Exemplarily, the host computer interface and the device interface are not fixed interfaces, one interface is used as a host computer interface when connected to the host computer 200, and is used as a device interface when connected to the data transceiver device 300, for example, the interface is configured by the user as a host computer interface or a device interface, for example, the data processing device 100 is connected to the host computer 200 and the data transceiver device 300, and the connected device is identified through a driver, a handshake mechanism, etc., and whether the device connected to the interface is the host computer 200 is detected, thereby identifying the host computer interface and the device interface, for example, according to the type of the connected device, according to the hardware number of the connected device, according to the data content sent by the connected device to the data processing device 100, etc., whether the device connected to the interface is the host computer 200 is detected.
[0027] A usage scenario of the data processing device 100 is as follows: Figure 4 , Figure 5 As shown, the data processing device 100 can be connected to the host computer 200 and at least one data transceiver device 300 to realize data interaction between the host computer 200 and the data transceiver device 300. When multiple data transceiver devices 300 are connected, data interaction between the data transceiver devices 300 can be realized. Another use scenario of the data processing device 100 is as follows Figure 6As shown, the data processing device 100 can be connected to multiple data transceiver devices 300 to realize data interaction between the data transceiver devices 300. The data interaction between the host computer 200 and the data transceiver device 300 may include: the host computer 200 sends data to the data transceiver device 300; the data transceiver device 300 sends data to the host computer 200. The data interaction between the data transceiver devices 300 may be: one data transceiver device 300 sends data to one or more data transceiver devices 300.
[0028] In one example, the data processing device may be configured to: when receiving host computer data and a sending interface identifier through a host computer interface, determine at least one sending interface among multiple device interfaces of the data processing device according to the sending interface identifier, and send the host computer data as data to be sent through the sending interface. In this way, for a data processing device connected to the data processing device, the data processing device can realize data transmission from the host computer to the data transceiver device, and send the host computer data of the host computer to the data transceiver device.
[0029] For the host computer, the data it sends will be transmitted to the data transceiver device. The host computer can send the host computer data and the sending interface identifier corresponding to the host computer data to the data processing device. When the data processing device receives the host computer data transmitted by the host computer through the host computer interface, it determines at least one sending interface according to the sending interface identifier. The sending interface identifier can be sent to the data processing device together with the host computer data, and can be sent to the data processing device before or after the host computer data.
[0030] Among them, the sending interface identifier is used to indicate the device interface for sending host computer data among multiple device interfaces of the data device. For example, the sending interface identifier includes the interface identifier of one or more device interfaces, indicating that the data processing device sends the host computer data through the one or more device interfaces as the sending interface, that is, the host computer data will be sent to the data transceiver device connected to each sending interface through the sending interface. If a piece of host computer data can be sent to a data transceiver device, the sending interface identifier includes the interface identifier of a device interface, and if a piece of host computer data can be sent to multiple data transceiver devices, the sending interface identifier includes the identifiers of multiple device interfaces. In addition, multiple host computer data can use the same sending interface identifier, indicating that these multiple host computer data are transmitted to the same data transceiver device.
[0031] Exemplarily, in different scenarios, the host computer data may be data for different purposes, and at least one of testing, calibration, diagnosis, and control of the data transceiver device may be performed. For example, in a test scenario, the data transceiver device needs to be tested, and the host computer data includes test data, and the host computer data is used to simulate signals, such as simulated vehicle sensor signals, simulated electronic control unit signals, etc., to test the data transceiver device; for example, the host computer data is a control signal to control the data transceiver device; in addition, the data transceiver device may also be calibrated and diagnosed through the host computer data.
[0032] In one example, the data processing device may be configured to: when receiving device data transmitted by a data transceiver device through a device interface, determine at least one sending interface among a host computer interface and a plurality of device interfaces according to the forwarding information preconfigured in the device interface, and send the device data as data to be sent through the sending interface. In this way, for a data processing device connected to the data processing device, the data processing device can realize data transmission from a data transceiver device to a host computer and / or other data transceiver devices, and send the device data of the data transceiver device to a host computer and / or other data transceiver devices. For example, the host computer interface is used as a sending interface, and the device data is sent to the host computer to realize data transmission from the data transceiver device to the host computer; for example, at least one sending interface is determined among a plurality of device interfaces, and the device data is sent to other data transceiver devices to realize data transmission from the data transceiver device to other data transceiver devices; for example, the host computer interface is used as a sending interface, and at least one sending interface is determined among a plurality of device interfaces, and the device data is sent to the host computer and other data transceiver devices to realize data transmission from the data transceiver device to the host computer and other data transceiver devices.
[0033] The device interface is pre-configured with forwarding information, and the forwarding information is used to indicate that at least one sending interface is determined from a host computer interface and multiple device interfaces, wherein both the host computer interface and the device interface are interfaces of a data processing device. Exemplarily, the forwarding information may include a sending interface identifier, indicating that the data processing device determines the sending interface according to the sending interface identifier. Exemplarily, the forwarding information may include a determination rule for the sending interface, indicating that the data processing device determines at least one sending interface from multiple interfaces according to the determination rule.
[0034] By configuring the forwarding information, you can control which devices the device data received by each device interface is sent to, such as a host computer or a data transceiver device. The forwarding information of each device interface can be the same or different, and different forwarding information determines different sending interfaces, so that the same or different data transmission can be achieved for different data transceiver devices. In this way, users can flexibly control the data transmission of each data transceiver device by configuring the forwarding information to meet the needs of different application scenarios.
[0035] Exemplarily, device data is data output by a data transceiver device, which can be data collected and measured by the data transceiver device, such as sensor data, or a signal generated by the data transceiver device, such as an ECU signal. In different scenarios, device data can be data for different purposes. For example, in a data acquisition scenario, it is necessary to obtain device data and transmit it to a host computer. The device data may be data collected by a data transceiver device, and the device data may be sent to a host computer. For example, in a data acquisition scenario, it is necessary to obtain device data and transmit it to a host computer. The device data may be data collected by a data transceiver device, or may be a signal generated by a data transceiver device, and the device data may be sent to a host computer and other data transceiver devices, that is, while maintaining data transmission between data transceiver devices, the host computer monitors the device data transmitted between data transceiver devices. For example, in a test scenario, it is necessary to test the data transceiver device, and the device data may be sent to a host computer. The device data may be a signal generated by a data transceiver device, or may be generated after receiving test data or simulation signals sent by a host computer or other data transceiver devices. For example, in an interface conversion scenario, it is necessary to implement interface conversion between two data transceiver devices, such as vehicle Ethernet to ordinary Ethernet, such as CAN to vehicle Ethernet, such as CAN to LIN, etc. The device data may be data collected by a data transceiver device, or may be a signal generated by a data transceiver device, and the data transceiver device may be sent to other data transceiver devices.
[0036] In one example, the data processing device can be configured as follows: when receiving host computer data and a sending interface identifier through a host computer interface, at least one sending interface is determined in the device interface according to the sending interface identifier, and the host computer data is sent as data to be sent through the sending interface; when receiving device data transmitted by a data transceiver device through a device interface, at least one sending interface is determined in the host computer interface and multiple device interfaces according to the forwarding information pre-configured in the device interface, and the device data is sent as data to be sent through the sending interface.
[0037] Exemplarily, the data processing device may be connected to a host computer and a plurality of data transceiver devices. For each connected data transceiver device, the data processing device may implement one or more data transmissions from the host computer to the data transceiver device, from the data transceiver device to the host computer, from the data transceiver device to other data transceiver devices, from the data transceiver device to the host computer and other data transceiver devices. For different data transceiver devices, the data transmissions implemented by the data processing device may be the same or different. For example, for data transceiver device A, the data processing device implements data transmission from the host computer to the data transceiver device A, and data transmission from the data transceiver device A to the host computer. For data transceiver device B, the data processing device implements data transmission from the data transceiver device B to the host computer and the data transceiver device C, and data transmission from the data transceiver device B to the data transceiver device D and the data transceiver device E.
[0038] For example, in one test scenario, an open-loop test is performed on a data transceiver device. For the device under test, the host computer can send data to the device under test for testing; other data transceivers can send data to the device under test for testing, and the host computer receives the data sent by the device under test. In one test scenario, a closed-loop test is performed on a data transceiver device. For the device under test, the host computer can send data to the device under test, and the host computer receives the data sent by the device under test.
[0039] The functions of existing interface cards are limited, and they only support communication between a host computer and a data transceiver device, or only support communication between data transceiver devices. The data processing device provided in the present application can realize different data transmission for each data transceiver device, control the transmission direction of host computer data and device data, and thus realize a variety of data processing functions through the data processing device. It can be used in a variety of application scenarios, making it more convenient for users to use.
[0040] When a single data processing device is not sufficient to meet the use requirements, multiple data processing devices can be used to achieve data collection, testing, calibration, diagnosis and other functions. Multiple data processing devices may or may not have a mechanism for mutual communication, and the mechanism for mutual communication is, for example, cascading multiple data processing devices through network cables, optical fibers, and coaxial cables.
[0041] 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 data is one or a group of messages of the simulation node, and the sending interface identifier is the interface 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 data, 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 device interfaces of the data processing device, establishes a mapping relationship between the logical port and the device interface, for example, one logical port corresponds to one device interface; the host computer obtains the simulation node, establishes a mapping relationship between the simulation node and the logical port, thereby establishing a mapping relationship between the simulation node and the device interface, for example, one simulation node corresponds to one logical interface. When sending the message of the simulation node, the host computer determines the device interface corresponding to the simulation node, and sends the message of the simulation node and the interface identifier of the device interface corresponding to the simulation node to the data processing device.
[0042] The mapping of logical ports and device interfaces 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.
[0043] In one example, the data processing device also includes at least one synchronization interface, which is used to connect to a timing device or a data processing device. The data processing device is configured to: transmit time synchronization messages between the connected timing device or data processing device through the synchronization interface, so that the data processing device and the connected timing device or data processing are synchronized through a time synchronization protocol.
[0044] Exemplarily, the time synchronization protocol is a time synchronization protocol such as the PTP protocol (Precision Time Protocol), the gPTP protocol (Generalized Precision Time Protocol), etc., which can achieve high-precision time synchronization. The synchronization interface can be a common Ethernet interface, that is, the common Ethernet interface can be used as a device interface or a synchronization interface. When used as a device interface, it is connected to a data transceiver device, and when used as a synchronization interface, it is connected to a timing device or a synchronization interface of another data processing device. Time synchronization can be performed between a timing device and a data processing device, and between data processing devices, through a time synchronization protocol.
[0045] In an example, Figure 7As shown, multiple data processing devices are cascaded, that is, connected in sequence, and time synchronization messages are transmitted between multiple data processing devices to achieve time synchronization. Each data processing device can be connected to one or more data transceiver devices respectively, and some or all of the data processing devices in the cascaded multiple data processing can be connected to the host computer. Multiple data processing devices connected to the host computer are synchronized through a time synchronization protocol. When these data processing devices send device data to the host computer and send host computer data to the data transceiver device, they can be performed in the same time coordinate system, avoiding the problem of inconsistent clocks. For example, during data collection, the data processing device adds a timestamp when receiving device data. If time synchronization is not performed, each data processing device adds a timestamp according to its own clock. Since the clocks of each data processing device are fast or slow, the host computer cannot accurately determine the time when each device data is received by the data processing device. For example, during testing, calibration, and diagnosis, the data processing device sends the host computer data to the data transceiver device. If the host computer data needs to be sent regularly or at a specified time, the clocks of each data processing device are fast or slow, and the clock accuracy is different, which will affect the transmission of the host computer data. For example, the device interface of the data processing device is configured with different forwarding information in different time periods. The start and end time of the time period is determined according to its own clock. The clocks of each data processing device are fast or slow, and the start and end time of the time period needs to be determined according to the clock information of each data processing device. Therefore, when using multiple data processing devices, it is crucial to use a time synchronization protocol to allow multiple data processing devices to work with reference to the same time reference for data collection, processing, transmission, and control of the data processing device.
[0046] Furthermore, if Figure 8 As shown, among the multiple cascaded data processing devices, one data processing device is connected to the timing device 500, for example, the data processing device at the head or tail position is connected to the timing device 500. The timing device 500 can provide standard time, so that the data processing devices can achieve time synchronization with the timing device 500, that is, the data processing devices all work with reference to the clock of the timing device 500. On the one hand, when the clock accuracy of the data processing device itself is not high enough, the timing device 500 can provide higher time accuracy. On the other hand, the time provided by the timing device 500 can be Coordinated Universal Time (UTC). When the data processing device needs to add a timestamp to the device data, the timestamp under UTC can be obtained, which is convenient for subsequent analysis and processing of the data.
[0047] Among them, the timing device 500 can be a clock source such as an RTK / GPS device, or a computer. In one example, the timing device 500 is a host computer connected to a data processing device, that is, the host computer can synchronize time with the data processing device through a time synchronization protocol through a common Ethernet interface. At the same time, the host computer can transmit host computer data and device data to the data processing device through a USB interface, and can also configure the sending timing so that the host computer transmits host computer data and device data through a common Ethernet interface.
[0048] In one example, the data processing device can configure the forwarding information of the device interface based on the configuration instruction. The configuration instruction can be sent from the host computer to the data processing device, or sent from a terminal device 400 to the data processing device. In one solution, please refer to Fig. 9 , the terminal device 400 can send configuration instructions to the data processing device via the host computer. In another solution, please refer to Fig.10 , a wireless communication module is provided in the data processing device. In this case, the terminal device 400 can interact with the data processing device through the wireless communication module instead of 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 or Bluetooth. In addition, when an input module such as an operation button, a touch screen, or an input interface is provided on the data processing device, the configuration instruction can also be sent by the user to the data processing device through the input module.
[0049] The forwarding information of the device interface in different time periods may be different. For example, different forwarding information may be configured when connecting to different data transceiver devices, and different forwarding information may be configured when the connected data transceiver devices implement different data transmissions. Exemplarily, the configuration instruction may include the forwarding information of a device interface in a time period, or may include the forwarding information of multiple device interfaces in a time period. The configuration instruction includes the content of the forwarding information. Each time a new configuration instruction is received, the forwarding information of the device interface is configured according to the new configuration instruction. In addition, the configuration instruction may also include the start and end time of the time period, instructing the data processing device to configure the forwarding information for the device interface within the specified time period. Exemplarily, a configuration instruction may include forwarding information of a device interface in multiple time periods, the configuration instruction includes the forwarding information of the device interface in each time period and the start and end time of each time period, the configuration instruction may also include forwarding information of multiple device interfaces in one or more time periods, the configuration instruction includes the forwarding information of each device interface in each time period and the start and end time of each time period, wherein the number of time periods and the start and end times of different device interfaces may be the same or different, for example, the configuration command includes the forwarding information of device interface A in time periods [T1:T3] and time period [T3:T4], and the forwarding information of device interface B in time periods [T1:T2], time period [T2:T3], and time period [T3:T5], where T1-T5 are different times.
[0050] In one example, the device interface is pre-configured with a type of working mode, and the different types of working modes include at least two of the following: a first type of working mode, a second type of working mode, and a third type of working mode; in the first type of working mode, the data processing device determines the host computer interface as a sending interface; in the second type of working mode, the data processing device determines at least one device interface as a sending interface based on forwarding information; in the third type of working mode, the data processing device determines the host computer interface as a sending interface, and determines at least one device interface as a sending interface based on the forwarding information.
[0051] For a data transceiver device, the following data transmission situations can be realized through a data processing device: 1) Send data to a host computer; 2) Send data to other data transceivers; 3) Send data to a host computer and other data transceivers. The forwarding information is used to indicate that at least one sending interface is determined among the host computer interface and multiple device interfaces, and the forwarding information can be configured for the device interface according to the data transmission situation of the data transceiver device connected to the device interface. The forwarding information may include a sending interface identifier, a sending interface determination rule, etc. Configuring forwarding information for a device interface means configuring the corresponding sending interface identifier and sending interface determination rule for the device interface. The configuration content is large, the operation is cumbersome, and the configuration of the forwarding information is not concise and clear, which is not user-friendly.
[0052] In this regard, the present application takes into account that, corresponding to the three data transmission situations, the data processing device has three options when determining the sending interface, and therefore abstracts three types of working modes, the first type of working mode is the host computer direct connection mode, the second type of working mode is the device forwarding mode, and the third type of working mode is the host computer bypass monitoring mode. When configuring the working mode of the device interface, a type of working mode is selected according to the data transmission situation of the data transceiver device. When sending data to the host computer, the first type of working mode is selected. When sending data to other data transceiver devices, the second type of working mode is selected. When sending data to the host computer and other data transceiver devices, the third type of working mode is selected. Furthermore, when the device interface is configured as the first type of working mode, there is no need to configure the forwarding information additionally. When the device interface is configured as the second type of working mode or the third type of working mode, it is also necessary to configure the forwarding information, such as the sending interface identifier, determination rules, etc.
[0053] In this way, when the user configures the forwarding information of the device interface, the forwarding information can be configured according to the type of its working mode. For example, if the working mode is the first type of working mode, the host computer interface is already defaulted as the sending port. For example, if the working mode is the third type of working mode, the host computer interface is already defaulted as the sending port, and the user needs to configure the forwarding information to determine the sending interface among multiple device interfaces.
[0054] Exemplarily, the host computer is connected to the data processing device, and the type and interface identifier of each device interface of the data processing device are obtained. The user selects a device interface through the host computer, configures its working mode first, and then configures its forwarding information. By pre-configuring the working mode for the device interface, the forwarding information of the device interface can be configured more conveniently, the user operation is more intuitive, the data transmission situation can be more clearly understood, and the availability of the data processing device is higher.
[0055] Exemplarily, when the data transceiver device connected to the device interface does not need to send data to the host computer or other data transceiver devices, the device interface may not be configured with a working mode, that is, the device interface will not receive device data from the data transceiver device.
[0056] Exemplarily, the data processing device may support the first type of working mode and the second type of working mode, and the working mode preconfigured for a device interface may be the first type of working mode or the second type of working mode. Exemplarily, the data processing device may support the first type of working mode and the third type of working mode, and the working mode preconfigured for a device interface may be the first type of working mode or the third type of working mode. Exemplarily, the data processing device may support the second type of working mode and the third type of working mode, and the working mode preconfigured for a device interface may be the second type of working mode or the third type of working mode. Exemplarily, the data processing device may support the first type of working mode, the second type of working mode, and the third type of working mode, and the working mode preconfigured for a device interface may be the first type of working mode, the second type of working mode, or the third type of working mode. For example, the number and type of working modes supported by data processing devices of different models or versions may be different, and the user may configure one of the working modes for the device interface among at least two working modes supported by the data processing device.
[0057] In one example, in the second type of working mode and the third type of working mode, the data processing device uses at least one of the following determination methods to determine at least one device interface as a sending interface: a first determination method and a second determination method; the first determination method: determining the default interface of the device interface as the sending interface, wherein the device interface is pre-configured with at least one default interface; the second determination method: determining the device interface corresponding to the VLAN number of the device data as the sending interface, wherein the device data carries a VLAN number, and at least one device interface of the data processing device has at least one corresponding VLAN number.
[0058] The forwarding information pre-configured for the device interface may include a sending interface identifier. When the sending interface is determined using the first determination method, the sending interface identifier included in the forwarding information is the interface identifier of the default interface of the device interface. The forwarding information pre-configured for the device interface may include a determination rule for the sending interface. When the sending interface is determined using the second determination method, the determination rule for the sending interface included in the forwarding information is that the device interface corresponding to the VLAN number of the device data is determined as the sending interface.
[0059] One or more device interfaces of the data processing device are preconfigured with a default interface. For example, a default interface can be preconfigured for a device interface in the data processing device that receives device data of a data transceiver device. A default interface can be preconfigured for each device interface of the data processing device, so that when the device interface receives device data, the preconfigured default interface of the device interface can be determined as the sending interface. One device interface can be configured with one or more default interfaces. A configuration file, a register, etc. can be used to store the interface identifier of the default interface of each device interface.
[0060] If the device interface is an Ethernet interface, the device data is an Ethernet message, which may be an Ethernet message carrying a VLAN tag or an Ethernet message not carrying a VLAN tag. It is understandable that when the device data is not an Ethernet message or an Ethernet message not carrying a VLAN tag, the sending interface cannot be determined by the second forwarding method. One or more Ethernet interfaces of the data processing device have at least one corresponding VLAN number. For example, a corresponding VLAN number may be pre-configured for an Ethernet interface that receives an Ethernet message of a data transceiver device in the data processing device, and a corresponding VLAN number may be pre-configured for each Ethernet interface of the data processing device, so that at least one sending interface may be determined according to the VLAN number corresponding to each Ethernet interface. One Ethernet interface may be configured with one or more corresponding VLAN numbers. The data processing device may record the VLAN number corresponding to the Ethernet interface through a configuration file, a register, or the like. Among them, when the data processing device receives device data through the device interface, the Ethernet interface is used as a sending interface only when the VLAN number carried by the device data is the same as the VLAN number corresponding to the Ethernet interface. The Ethernet interface may have multiple corresponding VLAN numbers, and the Ethernet interface may be determined as a sending interface when the data processing device receives device data carrying different VLAN numbers.
[0061] The first forwarding method implements forwarding based on the default interface. When using the first forwarding method, it is necessary to pre-configure the default interface for the device interface, so that the sending interface can be determined simply and quickly. Different types of device interfaces can use the first forwarding method to determine the sending interface. The second forwarding method implements forwarding based on the VLAN tag of the device data. When using the second forwarding method, it is necessary to set a VLAN number for the Ethernet interface of the data processing device. Only the Ethernet interface can use the second forwarding method to determine the sending interface, so that the data processing device can implement VLAN processing and forwarding functions similar to those of a switch. Compared with the default interface forwarding, it is more flexible and more adaptable. For example, the VLAN number is set for the Ethernet interface according to the actual VLAN division relationship between Ethernet devices. When the Ethernet interface is connected to different Ethernet devices, there is no need to reset the VLAN number, which can reduce the user's workload. Among them, the Ethernet device is a data transceiver device that uses the Ethernet communication protocol, such as an in-vehicle Ethernet device or an ordinary Ethernet device.
[0062] In some application scenarios, Ethernet devices in vehicle-mounted electronic systems are often divided into different VLANs. When using interface cards to implement data interaction between host computers and Ethernet devices, and between Ethernet devices, a switch must be used to connect between the interface card and the Ethernet device to forward Ethernet messages, identify VLANs, add, modify, and strip, etc. However, this method makes wiring complex, occupies more space, and causes inconvenience to developers and testers. The data processing device of the present application can identify the VLAN number of Ethernet messages and implement a forwarding function based on the VLAN number.
[0063] In addition, the Ethernet interface can also use the first forwarding mode and the second forwarding mode at the same time, that is, the Ethernet interface corresponding to the VLAN number in the VLAN tag carried by the device data is determined as the sending interface, and the default interface of the device interface is used as the sending interface. By using the two forwarding modes in combination, when the Ethernet interface receives device data, it can be more flexibly controlled through which interfaces the device data is sent.
[0064] Exemplarily, if the device data carries a VLAN tag, the second forwarding mode is used to determine the sending interface, and if the device data does not carry a VLAN tag, the first forwarding mode is used to determine the sending interface. That is, for the Ethernet interface, the data processing device automatically determines the forwarding mode of the device interface, and can automatically switch to forwarding based on VLAN tags or forwarding based on the default interface according to the content of the device data. The automation level is high. When connecting different Ethernet devices, the user only needs to adjust the default interface and VLAN number of the Ethernet interface, and there is no need to configure the forwarding mode of the device interface, which is more convenient to use.
[0065] In one example, sending the data to be sent through the sending interface includes: when the data to be sent meets the data receiving requirements of the sending interface, sending the data to be sent through the sending interface; when the data to be sent does not meet the data receiving requirements of the sending interface, adjusting the data to be sent to meet the data receiving requirements of the sending interface and then sending it through the sending interface, wherein the data receiving requirements of the sending interface are the data receiving requirements of the host computer or data transceiver device to which the sending interface is connected.
[0066] In various communication protocols, the basic principle is that the sender composes the data into a message according to a certain message format and sends it, and the receiver receives the message and performs verification, analysis, etc. The message generally includes a data segment and a frame parameter. The data segment contains the actual data information. The frame parameter may include a message header to identify the beginning of the message. The frame parameter may include a check bit to verify the integrity and correctness of the message. The frame parameter may also include other fields. For example, a CAN message includes a data segment and a frame parameter. The frame parameter may include a frame start, an arbitration segment, a control segment, a CRC segment, an ACK segment, and a frame end. A LIN message includes a data segment and a frame parameter. The frame parameter may include a synchronization interval segment, a synchronization segment, a PID segment, and a checksum segment.
[0067] Exemplarily, the data receiving requirement can be used to indicate the message type corresponding to the sending interface, that is, the type of message transmitted on the bus to which the sending interface is connected. The sending interface is connected to a bus, and different types of messages are transmitted on different types of buses, and different types of messages have different message formats. For example, the message type is CAN message, CANFD message, LIN message, FastLIN message, Flexray message, Ethernet message, USB message, PCIE message, etc.
[0068] For a host computer, the host computer data sent to a data processing device may include only a data segment, may include a data segment and part of a frame parameter, or may be a complete message. For a data transceiver device, the device data sent to a data processing device may be a complete message.
[0069] If the data to be sent is not a complete message, the data processing device may supplement the frame parameters for the data to be sent to obtain a complete message whose message type is the message type corresponding to the sending interface, and then send it through the sending interface; if the message type of the data to be sent is not the message type corresponding to the sending interface, the data processing device may adjust the message type of the data to be sent to the message type corresponding to the sending interface, and then send it through the sending interface; if the data to be sent is a complete message and the message type is the message type corresponding to the sending interface, the data processing device may directly send the data to be sent through the sending interface.
[0070] Among them, adjusting the message type of the data to be sent to the message type corresponding to the sending interface can be: obtaining the actual data information in the data to be sent as the data segment, and encapsulating the data segment and the frame parameters into a complete message. It can also be: taking the entire data to be sent as the data segment, and encapsulating the data segment and the frame parameters into a complete message. For example, when converting a CAN message to an Ethernet message, the data segment carried in the CAN message can be placed in the data segment of the Ethernet message, or the entire CAN message can be written into the data segment of the Ethernet message.
[0071] When supplementing frame parameters or adjusting message types, the frame parameters may be pre-configured by the sending interface. For example, the message type corresponding to the sending interface is an Ethernet message. The frame parameters of the Ethernet message include a MAC address, a protocol type, etc. The MAC address, IP address, port and other information may be pre-configured for the sending interface and directly obtained. The frame parameters may be calculated according to a preset algorithm or rule. For example, a CAN message includes a CRC segment, and the CRC segment may be generated according to a preset algorithm, such as the CRC8 algorithm.
[0072] For example, if the sensor held by the user only supports the CAN communication protocol, and the ECU to be tested does not support connection to the CAN bus due to the model or unfinished development, resulting in the inability to continue the test, the sensor and the ECU to be tested can be connected to the data processing device, and the data processing device receives the CAN message of the sensor, adjusts the CAN message to an Ethernet message, and sends it to the ECU to be tested. For example, when testing the ECU, the sensor signal can be simulated and sent to the ECU. When testing ECUs of different models, the same data needs to simulate sensor signals of different message types and send them. When using the data processing device provided by this application, the host computer only needs to provide a copy of the host computer data, and the data processing device can automatically convert the host computer data into different message types and send them.
[0073] In one example, the data reception requirement can also be used to indicate a data transmission rate, such as a baud rate. For example, a data processing device is connected to two CAN buses, and the baud rates of the two CAN buses are different. The data processing device can receive a CAN message from one CAN bus and send the message to another CAN bus according to the baud rate of the other CAN bus.
[0074] By determining the sending port through forwarding information and adjusting the data to be sent to meet the data receiving requirements of the sending interface, it is sent through the sending interface. This can realize message forwarding between different protocols and message forwarding between different baud rates of the same protocol, and can be used in more application scenarios.
[0075] In one example, the sending interface is an Ethernet interface, and the data receiving requirement is also used to indicate whether the VLAN tag needs to be modified and how to modify the VLAN tag. Adjusting the data to be sent to meet the data receiving requirement of the sending interface and then sending it through the sending interface can be: obtaining the data to be sent whose message type is an Ethernet message, if the VLAN tag does not need to be modified, sending the Ethernet message through the Ethernet interface, and if the VLAN tag needs to be modified, modifying the VLAN tag for the Ethernet message and then sending it through the Ethernet interface. Modifying the VLAN tag for the Ethernet message can be: adding a VLAN tag to the Ethernet message, or stripping the VLAN tag from the Ethernet message, or modifying the VLAN number in the VLAN tag for the Ethernet message.
[0076] Among them, obtaining the data to be sent whose message type is an Ethernet message can be: if the data to be sent is an Ethernet message, directly obtaining the data to be sent whose message type is an Ethernet message; if the data to be sent is not an Ethernet message, adjusting the data to be sent to an Ethernet message by supplementing frame parameters or adjusting the message type, and obtaining the data to be sent adjusted to an Ethernet message.
[0077] When adding a VLAN tag and modifying a VLAN tag, a preconfigured VLAN tag is added to the Ethernet message, and the VLAN tag carried by the Ethernet message is replaced with the preconfigured VLAN tag, wherein the preconfigured VLAN tag is the VLAN tag carried in the message supported by the Ethernet device connected to the sending interface. The difference between different VLAN tags lies in the different VLAN numbers carried. For example, if the value of the VLAN number in the VLAN tag carried by the message received by the Ethernet device is 1, then the preconfigured VLAN tag is the VLAN tag carrying the VLAN number of 1. Exemplarily, some or all Ethernet interfaces of the data processing device are preconfigured with a default VLAN number. For example, a default VLAN number can be preconfigured for all Ethernet interfaces of the data processing device, or for the Ethernet interface in the data processing device that sends Ethernet messages to the Ethernet device. The value of the default VLAN number is the VLAN number of the VLAN tag carried by the Ethernet message supported by the Ethernet device connected to the Ethernet interface. When the Ethernet interface is connected to different Ethernet devices, the default VLAN number of the Ethernet interface can be adjusted. Thus, when adding or modifying a VLAN tag for an Ethernet message, the preconfigured VLAN tag is the VLAN tag required by the Ethernet device to which the sending interface is connected, and is also a VLAN tag generated according to the default VLAN number of the sending interface. The Ethernet interface has a default VLAN number, and when the sending interface is determined using the second determination method, the Ethernet interface may have at least one corresponding VLAN number.
[0078] When Ethernet messages are transmitted between Ethernet devices connected to multiple Ethernet interfaces of a data processing device, considering that Ethernet devices are often divided into different VLANs, the present application uses a data processing device to implement VLAN tag adjustment of the message, that is, the VLAN tag processing function of the switch is integrated in the data processing device, which can realize VLAN addition, stripping and modification.
[0079] When determining the sending port, the device interface corresponding to the VLAN number of the Ethernet message is determined as the sending interface through the second determination method. When the Ethernet message is sent through the sending interface, the VLAN tag of the Ethernet message can be adjusted to meet the data reception requirements, thereby realizing the function of a switch in the data processing device, which can simplify wiring, reduce space occupancy, and facilitate user operation.
[0080] In one example, if the sending interface is a host computer interface, before sending the device data as the data to be sent through the sending interface, it also includes: filtering the device data according to the preset data upload conditions to obtain the data to be sent. Among them, the data upload conditions can be sent to the data processing device through the host computer or the terminal device, and different data upload conditions can be configured for different time periods.
[0081] For example, during testing or collection, the user may be interested in some or all of the device data. In the prior art, all device data is sent to the host computer through the interface card, and the host computer screens and filters the data, and then displays, analyzes and stores the data. In the embodiment of the present application, the data processing device sends the device data to the host computer, and the device data sent to the host computer can be filtered and screened by setting data upload conditions, retaining the data of interest, avoiding unnecessary data from participating in the transmission, and reducing the data transmission pressure between the data processing device and the host computer, saving resources.
[0082] Exemplarily, the factors considered in the data upload conditions may include at least one of the following: the device interface for receiving device data; the data type of device data; the data content of device data; the timestamp information of device data. For example, device data received by one or more device interfaces may be retained or filtered according to the interface type and interface identifier of the device interface for receiving device data; device data of one or more message types may be retained or filtered according to the message type of the device data; device data whose data content falls within a preset data range may be retained or filtered according to the data content of the device data; device data whose timestamp falls within a preset time range may be retained or filtered according to the timestamp of the device data. In addition, data upload conditions may be set according to other considerations to filter and screen the device data sent to the host computer. For example, one or more Ethernet messages may be retained or filtered according to whether the Ethernet message carries a VLAN tag and the value of the VLAN number in the VLAN tag.
[0083] Exemplarily, the data upload condition may include multiple consideration factors, and the multiple consideration factors are combined through logical AND, logical OR, and logical NOT.
[0084] Among them, the device data is a complete message, and the data content is, for example, the data segment in the message, that is, the actual data information. For example, the device data is a wheel speed signal, and the data content is the wheel speed size; the data content is, for example, the frame parameters in the message, for example, the device data is a CAN message, and the data content is the message ID of the CAN message, and the data content is the frame type of the CAN message, and the frame type is, for example, a data frame, a remote frame, an error frame, etc. For example, the device data is an Ethernet message, and the data content is the target MAC address, the source MAC address, the VLAN number and the priority. Among them, the timestamp can be the timestamp of the device data itself, such as the timestamp of the radar collecting point cloud data in the point cloud data output by the radar, and the timestamp can be the timestamp added to the device data when the data processing device receives the device data, such as adding a timestamp to the image data after receiving the camera image data.
[0085] In one example, if the sending interface is a device interface, before sending the data to be sent through the sending interface, it also includes: obtaining a fault injection instruction, modifying the data to be sent according to the fault injection instruction, and / or modifying the sending time of the data to be sent according to the fault injection instruction, and the fault injection instruction is at least used to indicate at least one of the following: sending the data to be sent in advance; delaying the sending of the data to be sent; modifying the data content of the data to be sent.
[0086] In addition to realizing data interaction between the host computer and the data transceiver device and data interaction between the data transceiver devices, the data processing device can also realize fault injection. After fault injection, the data transceiver device receives a message with incorrect content, advanced or delayed time, so as to perform a fault test on the data transceiver device.
[0087] The fault injection instruction is used to indicate the faults added to the data to be sent, including adjusting the data content and / or sending time of the data to be sent. The data content of the data to be sent can be the actual data content, or it can be a frame parameter, or it can be the actual data content and frame parameter. By adjusting the data content and sending time according to the fault injection instruction, the fault of incorrect message content and incorrect sending time can be simulated. The fault injection instruction can be sent to the data processing device through the host computer or the terminal device, and the fault injection instructions for different time periods can be different.
[0088] When forwarding messages between data transceiver devices, the data processing device adds faults according to the fault injection instruction, which can simulate message content errors, delays and other faults that occur when the data transceiver devices communicate, thereby performing fault tests between the data transceiver devices without setting up a separate fault injection device.
[0089] When the data processing device sends the host computer data to the data transceiver device, it adds faults according to the fault injection instruction, which can simulate faults such as message content errors, early transmission, delayed transmission, etc., so that the data transceiver device can be fault tested without generating fault messages on the host computer or adjusting the timing of message transmission on the host computer.
[0090] Exemplarily, the message of the simulation node in the host computer is sent to the data processing device as host computer data. In order to realize fault injection, under one scheme, the message sending conditions and message content of the simulation node can be controlled so that the host computer data itself is used as a fault message, for example, the data segment of the message sent by the simulation node is an erroneous data content, such as regulating the time when the simulation node sends the host computer data to the data processing device, etc. The data processing device only needs to receive the host computer data, determine the sending interface and mode. Under another scheme, the message of the simulation node can be a message of a normally working data transceiver device, and the data processing device performs fault injection. In this way, the simulation node can directly import the message transmitted by the normal data transceiver 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.
[0091] In one example, the fault injection instruction is applied to at least one transmitting interface.
[0092] There may be multiple fault injection instructions. The fault injection instruction may be abstract, for example, the fault injection instruction is: delay the data to be sent, then the data processing device may randomly determine a delay time, or select a delay time within a predefined delay time range and execute, for example, the fault injection instruction is: modify the data content of the message, then the data processing device may randomly modify the data content. The fault injection instruction may be specific, for example, the fault injection instruction is: CAN message is sent with a delay of 10ms, for example, the fault injection instruction is: modify the data segment of the CAN message to "00000000".
[0093] A fault injection instruction can be applied to one or more device interfaces. Exemplarily, the fault injection instruction can correspond to the device interface, and one fault injection instruction corresponds to one or more device interfaces, that is, the device data and host computer data sent through the sending interface are subjected to fault injection according to the fault injection instruction corresponding to the sending interface; Exemplarily, the fault injection instruction can correspond to the message type, and one fault injection instruction corresponds to one or more device interfaces, that is, the device data and host computer data sent through the sending interface are subjected to fault injection according to the fault injection instruction corresponding to the message type.
[0094] In one example, the controller of the data processing device includes a processor and an FPGA, the processor can run a Linux operating system, the Linux operating system implements a Linux network protocol stack, a plurality of virtual network cards are provided in the data processing device, and the data processing device receives the host computer data transmitted by the host computer specifically as follows: the data processing device receives the 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 an Ethernet 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 the 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.
[0095] 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.
[0096] Exemplarily, after the host computer is connected to the data processing device, all Ethernet interfaces of the data processing device are obtained, a correspondence between the simulation node and the logical Ethernet port, a correspondence between the logical Ethernet port and the Ethernet interface, and a correspondence between the Ethernet interface and the virtual network card are established, and one Ethernet interface can correspond to one or more virtual network cards. When sending a message of a simulation node, the Ethernet interface corresponding to the simulation node is obtained, and one virtual network card is selected from one or more virtual network cards of the Ethernet interface 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 transmitted through the host computer interface, sends an interface identifier and network card corresponding information, and determines a virtual network card from one or more virtual network cards of the Ethernet interface corresponding to the simulation node according to the network card corresponding information.
[0097] A mapping relationship is established between the simulation node and the logical Ethernet port, a mapping relationship is established between the logical Ethernet port and the Ethernet interface, and a mapping relationship is established between the Ethernet interface 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 interface and the virtual network card is unified, so that the virtual network card selected when sending the message of the simulation node is the virtual network card of the Ethernet interface corresponding to the simulation node. There is no need to separately set the mapping relationship between the simulation node and the Ethernet interface, and the mapping relationship between the simulation node and the virtual network card, which is more convenient for users to use.
[0098] Through the virtual network card and network protocol stack of the data processing device, when the upper computer communicates with the Ethernet device in the vehicle-mounted electronic system, the network protocol stack of the data processing device is called to perform message encapsulation. Compared with calling the network protocol stack of the upper computer to encapsulate the message, the problem of being unable to call the network protocol stack due to insufficient user or software permissions can be avoided. The upper computer itself may be connected to some Ethernet devices configured with other IPs in the local area network. Using a virtual network card and calling the network protocol stack of the data processing device can avoid the problem of IP address conflicts.
[0099] Each module in the above data processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0100] The 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 device is connected to a data transceiver device. A data processing device can be connected only to a data transceiver device, or can be connected to both a data transceiver device and a host computer to realize different data interactions.
[0101] When the system includes multiple data processing devices, the multiple data processing devices can be cascaded together to achieve time synchronization; in addition, one of the data processing devices can also be connected to a timing device to achieve time synchronization between the multiple data processing devices and the timing device. Furthermore, the multiple data processing devices may not be connected to each other, and the timing device is connected to the multiple data processing devices to achieve time synchronization between the multiple data processing devices.
[0102] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0103] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0104] 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: Comprising a host computer interface and a plurality of device interfaces, the data processing device is configured as follows: When receiving the host computer data and the sending interface identifier through the host computer interface, determining at least one sending interface in the device interface according to the sending interface identifier, and sending the host computer data as the data to be sent through the sending interface; And / or, when receiving device data transmitted by a data transceiver device through a device interface, at least one sending interface is determined among the host computer interface and multiple device interfaces according to the forwarding information pre-configured in the device interface, and the device data is sent as data to be sent through the sending interface.
2. The data processing device according to claim 1, characterized in that It also includes at least one synchronization interface, which is used to connect a timing device or a data processing device. The data processing device is configured to transmit time synchronization messages between the connected timing device or data processing device through the synchronization interface, so that the data processing device and the connected timing device or data processing device are synchronized through a time synchronization protocol.
3. The data processing device according to claim 1, characterized in that The device interface is pre-configured with a type of working mode, and the different types of working modes include at least two of the following: a first type of working mode, a second type of working mode, and a third type of working mode; In the first type of working mode, the data processing device determines the host computer interface as the sending interface; In the second type of working mode, the data processing device determines at least one device interface as a sending interface according to the forwarding information; In the third type of working mode, the data processing device determines the host computer interface as the sending interface, and determines at least one device interface as the sending interface according to the forwarding information.
4. The data processing device according to claim 3, characterized in that The data processing device determines at least one device interface as a sending interface using at least one of the following determination methods: a first determination method, a second determination method; A first determination method: determining a default interface of a device interface as a sending interface, wherein the device interface is pre-configured with at least one default interface; The second determination method: determining the device interface corresponding to the VLAN number of the device data as the sending interface, wherein the device data carries the VLAN number, and at least one device interface of the data processing device has at least one corresponding VLAN number.
5. The data processing device according to claim 3, characterized in that The data processing device is configured to: obtain a configuration instruction, and configure a working mode for at least one device interface according to the configuration instruction.
6. The data processing device according to claim 1, characterized in that The sending of the data to be sent through the sending interface includes: when the data to be sent meets the data receiving requirements of the sending interface, sending the data to be sent through the sending interface; when the data to be sent does not meet the data receiving requirements of the sending interface, adjusting the data to be sent to meet the data receiving requirements of the sending interface and then sending it through the sending interface, wherein the data receiving requirements of the sending interface are the data receiving requirements of the host computer or data transceiver device to which the sending interface is connected.
7. The data processing device according to claim 1, characterized in that If the sending interface is a host computer interface, before sending the device data as the data to be sent through the sending interface, it also includes: The device data is filtered according to the preset data upload conditions to obtain the data to be sent, and the considerations of the data upload conditions include at least one of the following: the device interface for receiving the device data; the message type of the device data; the data content of the device data; and the timestamp information of the device data.
8. The data processing device according to claim 1, characterized in that If the sending interface is a device interface, before sending the data to be sent through the sending interface, the following steps are also included: Obtain a fault injection instruction, modify the data to be sent according to the fault injection instruction, and / or modify the sending time of the data to be sent according to the fault injection instruction, wherein the fault injection instruction is at least used to indicate at least one of the following: sending the data to be sent in advance; delaying the sending of the data to be sent; and modifying the data content of the data to be sent.
9. The data processing device according to claim 8, characterized in that The fault injection instruction is applied to at least one sending interface.
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 to 9, wherein the data processing device is connected to a data transceiver device.