Switching chip for vehicle-mounted Ethernet and data processing method of vehicle-mounted Ethernet

By integrating the time synchronization module and input processing module in the on-board Ethernet switching chip, adding a time stamp to the on-board Ethernet data, the problem of inconsistent data and time in the on-board terminal is solved and the accuracy of vehicle condition judgment is improved.

CN119865274APending Publication Date: 2025-04-22BEIJING TASSON SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510088166.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

Existing vehicle terminal products do not have the function of on-board Ethernet time synchronization, resulting in different local times of different on-board terminals, so that the same time of data cannot be determined, affecting the accuracy of vehicle condition judgment.

Method used

A switching chip for on-board Ethernet is designed, including a time synchronization module, an Ethernet interface and an input processing module. By obtaining the absolute time of on-board Ethernet, adding a time stamp to the input data, and synchronous processing of data from different on-board terminals is realized.

Benefits of technology

By adding a time stamp to the on-board Ethernet data, the problem of inconsistent data time of different on-board terminals is solved, and the accuracy of judging the vehicle condition is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119865274A_ABST
    Figure CN119865274A_ABST
Patent Text Reader

Abstract

The invention provides a switching chip for a vehicle-mounted Ethernet and a data processing method of the vehicle-mounted Ethernet, and the switching chip comprises a time synchronization module which is used for obtaining the absolute time of the vehicle-mounted Ethernet; the Ethernet interface is used for being connected to a vehicle-mounted terminal to receive input data; and the input processing module responds to the Ethernet interface to receive the input data, and the input processing module adds a timestamp to the input data based on the absolute time of the vehicle-mounted Ethernet. According to the switching chip for the vehicle-mounted Ethernet and the data processing method of the vehicle-mounted Ethernet, the input processing module obtains the absolute time of the vehicle-mounted Ethernet from the time synchronization module, receives the input data from the vehicle-mounted terminal in response to the Ethernet interface, adds the timestamp to the input data based on the absolute time, and sends the timestamp to the vehicle-mounted terminal. The input data added with the timestamps can be used for vehicle condition judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a switching chip for vehicle-mounted Ethernet and a data processing method for vehicle-mounted Ethernet. Background Art

[0002] With the continuous progress of the automotive industry, the era of in-vehicle Ethernet has begun. As a new generation of Ethernet technology, Time-Sensitive Networking (TSN) technology is one of the key technologies for in-vehicle network communication to achieve high reliability and low latency.

[0003] Currently, many vehicle-mounted terminal products have not yet been upgraded and do not have the vehicle-mounted Ethernet time synchronization function. Therefore, different vehicle-mounted terminals have different local times. The data obtained from different vehicle-mounted terminals cannot be determined as external information at the same time, resulting in inaccurate judgment of the vehicle condition. Summary of the invention

[0004] Based on this, it is necessary to provide a switching chip for vehicle-mounted Ethernet and a data processing method for vehicle-mounted Ethernet to address the problems in the above-mentioned background technology, add a timestamp to the data entering the vehicle-mounted Ethernet, and realize the synchronous processing of data from different vehicle-mounted terminals.

[0005] To achieve the above objectives and other related objectives, one aspect of the present application provides a switching chip for vehicle-mounted Ethernet, including:

[0006] Time synchronization module, used to obtain the absolute time of the vehicle Ethernet;

[0007] An Ethernet interface for connecting to an on-board terminal to receive input data;

[0008] An input processing module, in response to the Ethernet interface receiving the input data, adds a time stamp to the input data based on an absolute time of the in-vehicle Ethernet.

[0009] In one embodiment, the timestamp is determined based on an absolute time when the Ethernet interface receives the input data and a compensation time, wherein the compensation time is determined based on the type of the vehicle terminal.

[0010] In one embodiment, the switching chip includes a first Ethernet interface and a second Ethernet interface, the first Ethernet interface is connected to a first type of vehicle-mounted terminal to obtain first input data, and the second Ethernet interface is connected to a second type of vehicle-mounted terminal to obtain second input data, the input processing module performs a first time compensation on the first input data, and the input processing module performs a second time compensation on the second input data, and the first time compensation is different from the second time compensation.

[0011] In one embodiment, the switching chip further includes a processor, which acquires input data with a timestamp added thereto and processes the input data based on the timestamp.

[0012] In one embodiment, the processor acquires a first data frame and a second data frame, the first data frame includes first input data with a first timestamp added, and the second data frame includes second input data with a second timestamp added, and when the first timestamp is the same as the second timestamp or the first timestamp and the second timestamp are within the same time range, the first input data and the second input data are processed synchronously.

[0013] In one embodiment, the input data includes Ethernet protocol layer data, and adding a timestamp to the input data includes performing time data encapsulation on the last 8 bytes of the Ethernet protocol layer data in the input data.

[0014] In one embodiment, the switching chip further includes a time register, which is connected to the time synchronization module to store the absolute time of the vehicle Ethernet, and the input processing module is connected to the time register to obtain the absolute time of the vehicle Ethernet from the time register.

[0015] In one embodiment, the switching chip also includes a physical layer and a data link layer, the physical layer is connected to the Ethernet interface, the data link layer is connected to the physical layer, the time synchronization module is connected to the data link layer, and the data link layer includes the input processing module.

[0016] In one embodiment, the vehicle-mounted terminal includes at least one of a camera, a radar, a motor, and a central control screen.

[0017] Another aspect of the present application provides a data processing method for an in-vehicle Ethernet, comprising the following steps:

[0018] Get the absolute time of the vehicle Ethernet;

[0019] Receiving input data from the vehicle terminal;

[0020] In response to the Ethernet interface receiving the input data, a time stamp is added to the input data based on an absolute time of the in-vehicle Ethernet network.

[0021] According to the switching chip for vehicle-mounted Ethernet and the data processing method for vehicle-mounted Ethernet provided by the present invention, the input processing module obtains the absolute time of the vehicle-mounted Ethernet from the time synchronization module, receives input data from the vehicle-mounted terminal in response to the Ethernet interface, and adds a timestamp to the input data based on the absolute time. The input data with the timestamp can be used to judge the vehicle condition. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to better describe and illustrate the embodiments and / or examples of those applications disclosed herein, reference may be made to one or more drawings. The additional details or examples used to describe the drawings should not be considered as limiting the scope of any of the disclosed applications, the embodiments and / or examples currently described, and the best modes of these applications currently understood.

[0023] Figure 1 It is a schematic diagram of the structure of a switching chip for vehicle-mounted Ethernet provided in one embodiment;

[0024] Figure 2 is a schematic diagram of a switch chip for in-vehicle Ethernet provided in one embodiment;

[0025] Figure 3 A schematic diagram of an Ethernet frame format provided in an embodiment;

[0026] Figure 4 The present invention is a flow chart of a method for processing data of an in-vehicle Ethernet according to an embodiment of the present invention.

[0027] Description of reference numerals:

[0028] 101. Ethernet interface; 102. Physical layer; 103. Data link layer; 104. Time synchronization module; 105. Time register; 106. Input processing module; 107. Processor. DETAILED DESCRIPTION

[0029] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present application are given in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0031] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present application. When used herein, the singular forms "one", "an" and "said / the" are also intended to include plural forms, unless the context clearly indicates otherwise. It should also be understood that the terms "consisting of" and / or "comprising", when used in this specification, determine the presence of the features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0032] It should be noted that the illustrations provided in this embodiment only illustrate the basic concept of the present application in a schematic manner. Although the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation, the type, quantity and proportion of each component in actual implementation may be changed arbitrarily, and the component layout type may also be more complicated.

[0033] Currently, many vehicle-mounted terminal products have not yet been upgraded and do not have the vehicle-mounted Ethernet time synchronization function. Therefore, different vehicle-mounted terminals have different local times. The data obtained from different vehicle-mounted terminals cannot be determined as external information at the same time, resulting in inaccurate judgment of the vehicle condition.

[0034] In view of the above problems, the present invention provides a switching chip for vehicle-mounted Ethernet, such as Figure 1 As shown, it includes an Ethernet interface 101, a physical layer 102, a data link layer 103, a time synchronization module 104, a time register 105, an input processing module 106 and a processor 107. The time synchronization module 104 is used to obtain the absolute time of the vehicle Ethernet; the Ethernet interface 101 is used to connect to the vehicle terminal to receive input data; in response to the Ethernet interface receiving the input data, the input processing module 106 adds a timestamp to the input data based on the absolute time of the vehicle Ethernet.

[0035] In one embodiment, the physical layer 102 is connected to the Ethernet interface 101, the data link layer 103 is connected to the physical layer 102, the time synchronization module 104 is connected to the data link layer 103, and the data link layer 103 includes an input processing module 106. The time register 105 is connected to the time synchronization module 104 to store the absolute time of the vehicle Ethernet, and the input processing module 106 is connected to the time register 105 to obtain the absolute time of the vehicle Ethernet from the time register 105. The processor 107 is connected to the input processing module 106 to obtain the input data with the timestamp added and process the input data based on the timestamp.

[0036] In one embodiment, the switching chip for in-vehicle Ethernet includes a TSN switching chip. Time-Sensitive Networking (TSN), a family of protocols that achieve deterministic minimum time delay in non-deterministic Ethernet, is a set of protocol standards developed by the TSN working group in the IEEE 802.1 working group. It defines the time-sensitive mechanism for Ethernet data transmission, adds determinism and reliability to standard Ethernet, and ensures real-time, deterministic and reliable data transmission. As the core of network switching, the TSN switching chip is responsible for forwarding data packets between different network nodes to achieve efficient data transmission. The TSN switching chip ensures the timely transmission of key data through precise time synchronization and traffic scheduling, thereby meeting the high requirements of application scenarios such as autonomous driving and Internet of Vehicles.

[0037] In one embodiment, the switching chip for the vehicle Ethernet includes a switching chip in a device for constituting the vehicle Ethernet. Specifically, the device for constituting the vehicle Ethernet includes but is not limited to at least one of a gateway, a switch, a domain controller, etc. The vehicle Ethernet is usually composed of multiple devices, and each device in the vehicle Ethernet is first time synchronized.

[0038] In one embodiment, when the various devices in the vehicle Ethernet perform time synchronization, a master clock device is first selected, and other devices in the vehicle Ethernet perform time synchronization with the master clock device. The synchronization method can adopt the generalized precision time protocol (gPTP). The purpose of the generalized precision time protocol (gPTP) is to synchronize the clocks of various devices in the vehicle Ethernet. Because the clocks of various devices run independently of each other, and some applications require various devices to execute in unison, then the two devices must have the same clock reference. The gPTP protocol is based on a master-slave relationship, that is, all devices in a local network use the clock of the master as the reference, and the slave synchronizes its local clock with the clock of the master. Clock synchronization is progressive, and the slave device can also be used as a device in the next layer of the network.

[0039] The process of time synchronization based on the generalized time synchronization protocol (gPTP) mainly includes the selection of the best master clock, frequency deviation measurement, delay time measurement, time synchronization and other stages. In the stage of selecting the best master clock, the best master clock algorithm (BMCA) is usually used. All devices send messages to compare their own relevant field values ​​with those in other stages. The winner is the master clock device. However, the in-vehicle Ethernet is a closed network, and the devices usually do not change, so the master clock device is usually fixed. In the frequency synchronization stage, the clock frequencies of various devices in the in-vehicle network are not always completely consistent, so the clock frequency of the slave device (slave) needs to match that of the master device (master). The master device (master) continuously sends synchronization messages (Sync) and follow-up messages (Follow-up), and the slave device (slave) can measure the time when it receives the synchronization message (based on the local clock of the slave device). After each synchronization message, the master device (master) will also send a follow-up message to tell the slave device (slave) the timestamp of the previous synchronization message (based on the local clock of the master device), and the slave device (slave) can calculate the deviation between its own clock frequency and the master device. In the delay time measurement phase, in order to synchronize its own clock with the master device, the slave device needs to measure the delay time of the message transmission between itself and the master device. The slave device first sends a delay request message (PDelay_Req) ​​and obtains the first timestamp when the message leaves the physical layer of the slave device. When the master device receives the message, it obtains the second timestamp when the message arrives at the physical layer of the master device. The master device sends a delay response message (PDelay_Resp) to bring the second timestamp to the slave device. The master device also sends a delay response follow-up message (PDelay_Resp_Follow-up) to tell the slave device the third timestamp of a delay response message (PDelay_Resp). The slave device (slave) can measure the fourth timestamp of the delay response message (PDelay_Resp) it receives. The slave device calculates the delay time based on the first timestamp, the second timestamp, the third timestamp, and the fourth timestamp. After calculating the frequency difference and delay time, the slave device can synchronize its clock with the master device.

[0040] Through the above process, the devices used to constitute the automotive Ethernet achieve time synchronization, thereby determining the absolute time of the automotive Ethernet. Therefore, the switching chips in each device used to constitute the automotive Ethernet can obtain the absolute time of the automotive Ethernet through the Ethernet interface.

[0041] In one embodiment, the switching chip constituting the vehicle-mounted Ethernet includes an Ethernet interface 101, a physical layer 102, and a data link layer 103. Among them, the Ethernet interface 101 is a physical interface, and the switching chip usually includes multiple physical interfaces, and different Ethernet interfaces are connected to different vehicle-mounted terminals. The physical layer 102 is also called a physical interface transceiver (PHY), and the physical layer 102 is connected to the Ethernet interface 101. The physical layer 102 is a chip that implements the Ethernet physical layer function, which is responsible for converting digital signals into signals suitable for transmission on physical media, and performing corresponding encoding and decoding. The data link layer 103 includes a media access control (MAC) sublayer and a logical link control (LLC) sublayer. The data link layer 103 is connected to the physical layer 102. The data link layer 103 provides services to the network layer on the basis of the services provided by the physical layer 102. Its most basic service is to reliably transmit data from the network layer to the target machine network layer of the adjacent node. To achieve this goal, the data link layer must have a series of corresponding functions, mainly including: combining data into data blocks, which are called frames in the data link layer. Frames are the transmission units of the data link layer; controlling the transmission of frames on the physical channel, including handling transmission errors and adjusting the sending rate to match the receiver; and providing management of the establishment, maintenance and release of data link paths between two network entities.

[0042] In one embodiment, the vehicle-mounted terminal includes but is not limited to at least one of a camera, a radar, a motor, and a central control screen. Multiple vehicle-mounted terminals are respectively connected to one of the devices constituting the vehicle-mounted Ethernet. Specifically, the vehicle-mounted terminal is connected to the Ethernet interface of the switching chip in the device. However, since the vehicle-mounted terminal has not yet been upgraded and does not have the vehicle Ethernet time synchronization function, different vehicle-mounted terminals have different local times. For example, the vehicle-mounted terminal connected to the first Ethernet interface (interface 1) of the switching chip is a camera, and the vehicle-mounted terminal connected to the second Ethernet interface (interface 2) of the same switching chip is a radar. The camera and radar are standard Ethernet interfaces and cannot support time synchronization. During data transmission, due to the data transmission delay of the switching network, the camera data and radar data at the same time cannot be transmitted to the processor at the same time.

[0043] In one embodiment, the data link layer 103 includes an input processing module 106. The data link layer 103 is used to encapsulate the input data packets obtained from the vehicle terminal into Ethernet frame format, wherein the input processing module 106 is used to add a timestamp to the input data based on the absolute time of the vehicle Ethernet.

[0044] Reference Figure 3As shown in FIG. 1 , the Ethernet frame format includes a destination address field, a source address field, an Ethernet type field, a data field, and a check field. Specifically, the destination address field includes a 6-byte destination MAC (Media Access Control) address, which is used to indicate the receiver of the frame; the source address field includes a 6-byte source MAC address, which is used to indicate the sender of the frame; the Ethernet type field includes a 2-byte Ethernet type, which is used to indicate the protocol type of the data in the frame; the data field includes 46 bytes to 1500 bytes of data, including the data passed down by the upper layer protocol. If the frame length is less than 64 bytes after adding the data field, "padding" will be added to the data field to reach 64 bytes. The check field includes a 4-byte CRC (Cyclic Redundancy Check) check code, which is used to provide the receiving network card with a judgment on whether the transmission is wrong. If an error is found, the frame is discarded. Among them, the data field further includes a protocol field, a payload (PAYLOAD) field, and a time data (Time DATA) field. Specifically, the protocol field includes 10 bytes of IPv4 protocol data, the payload field includes 18 bytes to 1472 bytes of valid data, and the time data field includes 8 bytes of time data. The input processing module 106 is used to add a timestamp to the 8 bytes of time data in the time data field. Therefore, the input processing module 106 is used to perform time data encapsulation on the last 8 bytes of the data field in the Ethernet frame format, that is, the input processing module 106 is used to perform time data encapsulation on the last 8 bytes of the Ethernet protocol layer data.

[0045] In one embodiment, the timestamp is determined based on the absolute time when the Ethernet interface 101 receives the input data and the compensation time, wherein the compensation time is determined based on the type of the vehicle-mounted terminal.

[0046] In one embodiment, the device of the vehicle Ethernet implements time synchronization and determines the absolute time of the vehicle Ethernet. The time synchronization module 104 is connected to the Ethernet interface 101 via the data link layer 103 and the physical layer 102 to obtain the absolute time of the vehicle Ethernet. Further, the time register 105 is connected to the time synchronization module 104 to store the absolute time of the vehicle Ethernet. When the Ethernet interface 101 receives input data from the vehicle terminal, the input processing module 106 connected to the time register 105 obtains the absolute time of the vehicle Ethernet. When there is no need to consider the data transmission delay of the switching network, the absolute time when the Ethernet interface 101 receives the input data can be used as the timestamp of the input data. However, it is usually necessary to consider the data transmission delay of the switching network to compensate the input data in time. The compensation time needs to be determined according to the type of the vehicle terminal, and then the absolute time is combined with the compensation time to determine the timestamp of the input data, which is used to indicate the generation time of the input data.

[0047] In one embodiment, the switching chip includes a first Ethernet interface and a second Ethernet interface, the first Ethernet interface is connected to a first type of vehicle-mounted terminal to obtain first input data, and the second Ethernet interface is connected to a second type of vehicle-mounted terminal to obtain second input data, the input processing module performs a first time compensation on the first input data, and the input processing module performs a second time compensation on the second input data, and the first time compensation is different from the second time compensation.

[0048] In one embodiment, the vehicle-mounted terminal connected to the first Ethernet interface (interface 1) of the switching chip is a camera, and the vehicle-mounted terminal connected to the second Ethernet interface (interface 2) of the same switching chip is a radar. The vehicle-mounted Ethernet absolute time at which the first Ethernet interface (interface 1) of the switching chip receives the camera data is the first absolute time. Since the vehicle-mounted terminal connected to the first Ethernet interface (interface 1) is a camera, the time compensation of the first Ethernet interface (interface 1) by the input processing module 106 is the first compensation time. The input processing module 106 determines the first timestamp of the camera data based on the first absolute time and the first compensation time. Specifically, the generation time of the camera data can be identified as the difference between the first absolute time and the first compensation time, and the first timestamp indicates the generation time of the camera data. The vehicle-mounted Ethernet absolute time at which the second Ethernet interface (interface 2) of the switching chip receives the radar data is the second absolute time. Since the vehicle-mounted terminal connected to the second Ethernet interface (interface 2) is a radar, the time compensation of the second Ethernet interface (interface 2) by the input processing module 106 is the second compensation time. The input processing module 106 determines the second timestamp of the radar data based on the second absolute time and the second compensation time. Specifically, the generation time of the radar data may be determined as the difference between the second absolute time and the second compensation time, and the second timestamp indicates the generation time of the radar data.

[0049] In one embodiment, since the camera and the radar are different types of vehicle-mounted terminals, the first compensation time and the second compensation time are different. In this way, even if the first absolute time and the second absolute time when the first Ethernet interface (interface 1) and the second Ethernet interface (interface 2) receive the camera data and the radar data are the same, the added first timestamp and the second timestamp are different, indicating that the camera data and the radar data are generated at different times and cannot be processed as data of the same time.

[0050] In one embodiment, the switching chip further includes a processor 107, which acquires input data with a timestamp and processes the input data based on the timestamp. Specifically, the processor 107 acquires a first data frame and a second data frame, the first data frame includes first input data with a first timestamp, the second data frame includes second input data with a second timestamp, and when the first timestamp is the same as the second timestamp or the first timestamp and the second timestamp are within the same time range, the processor 107 synchronously processes the first input data and the second input data.

[0051] In one embodiment, the input processing module 106 encapsulates the first timestamp in the last 8 bytes of the Ethernet protocol layer data of the camera data to form a first data frame, and the input processing module 106 encapsulates the second timestamp in the last 8 bytes of the Ethernet protocol layer data of the radar data to form a second data frame. The processor 107 obtains the first data frame and the second data frame, the first data frame is the camera data with the first timestamp added, and the second data frame is the radar data with the second timestamp added. When the first timestamp is the same as the second timestamp or is within the same time range, the camera data and the radar data are considered to be data generated simultaneously, and the processor 107 can synchronously process the camera data and the radar data.

[0052] In one embodiment, the processed data may be sent out via the data link layer 103, the physical layer 102, and the Ethernet interface 101 in sequence. Figure 2 As shown, input data from different vehicle terminals received from the Ethernet interface (interface 0, interface 1, interface 2) enters the input processing module of the data link layer (MAC) through the physical layer (PHY). The input processing module adds a timestamp to the input data based on the absolute time of the vehicle Ethernet obtained from the time register and the time compensation of the Ethernet interface (interface 0, interface 1, interface 2). The input data with the timestamp enters the switching matrix. The processor (CPU) obtains the input data with the timestamp from the switching matrix, and synchronously processes the data at the same time according to the timestamp. The processed data enters the switching matrix and is sent from the Ethernet interface (interface 0, interface 1, interface 2) via the output processing module of the data link layer (MAC) and the physical layer (PHY).

[0053] According to the switching chip for vehicle-mounted Ethernet provided by the present invention, the input processing module obtains the absolute time of the vehicle-mounted Ethernet from the time synchronization module, receives input data from the vehicle-mounted terminal in response to the Ethernet interface, adds a timestamp to the input data based on the absolute time, and the input data with the timestamp can be used to judge the vehicle condition.

[0054] The present invention also provides a data processing method for vehicle-mounted Ethernet, such as Figure 4 As shown, the following steps are included:

[0055] Step S401: Obtaining the absolute time of the vehicle Ethernet;

[0056] Step S402: receiving input data from the vehicle-mounted terminal;

[0057] Step S403: In response to the Ethernet interface receiving the input data, adding a timestamp to the input data based on the absolute time of the in-vehicle Ethernet.

[0058] In one embodiment, the switching chip for in-vehicle Ethernet includes a switching chip used in a device constituting the in-vehicle Ethernet. The various devices constituting the in-vehicle Ethernet first perform time synchronization, and the manner in which the various devices of the in-vehicle Ethernet perform time synchronization may adopt the generalized time protocol (gPTP). No further details are given here.

[0059] First, execute step S401 to obtain the absolute time of the vehicle Ethernet. The device of the vehicle Ethernet realizes time synchronization and determines the absolute time of the vehicle Ethernet. The time synchronization module 104 is connected to the Ethernet interface 101 via the data link layer 103 and the physical layer 102 to obtain the absolute time of the vehicle Ethernet. Further, the time register 105 is connected to the time synchronization module 104 to store the absolute time of the vehicle Ethernet. When the Ethernet interface 101 receives input data from the vehicle terminal, the input processing module 106 connected to the time synchronization module 104 obtains the absolute time of the vehicle Ethernet.

[0060] Next, step S402 is executed to receive input data from the vehicle-mounted terminal. The vehicle-mounted terminal includes but is not limited to at least one of a camera, a radar, a motor, and a central control screen, and multiple vehicle-mounted terminals are respectively connected to one of the devices constituting the vehicle-mounted Ethernet. Specifically, the Ethernet interface of the switching chip is connected to the vehicle-mounted terminal to obtain input data from the vehicle-mounted terminal. For example, the vehicle-mounted terminal connected to the first Ethernet interface (interface 1) of the switching chip is a camera to obtain camera data; the vehicle-mounted terminal connected to the second Ethernet interface (interface 2) of the same switching chip is a radar to obtain radar data.

[0061] Next, step S403 is executed, in response to the Ethernet interface receiving the input data, adding a timestamp to the input data based on the absolute time of the in-vehicle Ethernet.

[0062] In one embodiment, when there is no need to consider the switching network data transmission delay, the absolute time when the Ethernet interface 101 receives the input data can be used as the timestamp of the input data. However, it is usually necessary to consider the switching network data transmission delay to compensate the input data for time, and the compensation time needs to be determined according to the type of the vehicle terminal, and then the absolute time is combined with the compensation time to determine the timestamp of the input data, and the timestamp is used to indicate the generation time of the input data.

[0063] In one embodiment, the vehicle-mounted terminal connected to the first Ethernet interface (interface 1) of the switching chip is a camera, and the vehicle-mounted terminal connected to the second Ethernet interface (interface 2) of the same switching chip is a radar. The vehicle-mounted Ethernet absolute time at which the first Ethernet interface (interface 1) of the switching chip receives the camera data is the first absolute time. Since the vehicle-mounted terminal connected to the first Ethernet interface (interface 1) is a camera, the time compensation of the first Ethernet interface (interface 1) by the input processing module 106 is the first compensation time. The input processing module 106 determines the first timestamp of the camera data based on the first absolute time and the first compensation time. Specifically, the generation time of the camera data can be identified as the difference between the first absolute time and the first compensation time, and the first timestamp indicates the generation time of the camera data. The vehicle-mounted Ethernet absolute time at which the second Ethernet interface (interface 2) of the switching chip receives the radar data is the second absolute time. Since the vehicle-mounted terminal connected to the second Ethernet interface (interface 2) is a radar, the time compensation of the second Ethernet interface (interface 2) by the input processing module 106 is the second compensation time. The input processing module 106 determines the second timestamp of the radar data based on the second absolute time and the second compensation time. Specifically, the generation time of the radar data may be determined as the difference between the second absolute time and the second compensation time, and the second timestamp indicates the generation time of the radar data.

[0064] In one embodiment, since the camera and the radar are different types of vehicle-mounted terminals, the first compensation time and the second compensation time are different. In this way, even if the first absolute time and the second absolute time when the first Ethernet interface (interface 1) and the second Ethernet interface (interface 2) receive the camera data and the radar data are the same, the added first timestamp and the second timestamp are different, indicating that the camera data and the radar data are generated at different times and cannot be processed as data of the same time.

[0065] In one embodiment, the input processing module 106 encapsulates the first timestamp in the last 8 bytes of the Ethernet protocol layer data of the camera data to form a first data frame, and the input processing module 106 encapsulates the second timestamp in the last 8 bytes of the Ethernet protocol layer data of the radar data to form a second data frame. The processor 107 is connected to the input processing module 106, and obtains the first data frame and the second data frame. The first data frame is the camera data encapsulated with the first timestamp, and the second data frame is the radar data encapsulated with the second timestamp. When the first timestamp is the same as the second timestamp or is within the same time range, the camera data and the radar data are considered to be data generated simultaneously, and the processor 107 can synchronously process the camera data and the radar data.

[0066] In one embodiment, the processed data may be sent out via the data link layer 103, the physical layer 102 and the Ethernet interface 101 in sequence, which will not be described in detail here.

[0067] According to the data processing method of the vehicle-mounted Ethernet provided by the present invention, the absolute time of the vehicle-mounted Ethernet is obtained from the time synchronization module, and in response to the Ethernet interface receiving input data from the vehicle-mounted terminal, a timestamp is added to the input data based on the absolute time. The input data with the timestamp can be used to judge the vehicle condition.

[0068] Please note that the above embodiments are for illustrative purposes only and are not intended to limit the present application.

[0069] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0070] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0071] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. A switching chip for vehicle-mounted Ethernet, characterized in that: include: Time synchronization module, used to obtain the absolute time of the vehicle Ethernet; An Ethernet interface for connecting to an on-board terminal to receive input data; An input processing module, in response to the Ethernet interface receiving the input data, adds a time stamp to the input data based on an absolute time of the in-vehicle Ethernet.

2. The switching chip according to claim 1, characterized in that: The timestamp is determined based on an absolute time when the Ethernet interface receives the input data and a compensation time, wherein the compensation time is determined based on a type of the vehicle-mounted terminal.

3. The switching chip according to claim 2, characterized in that: It includes a first Ethernet interface and a second Ethernet interface, the first Ethernet interface is connected to a first type of vehicle-mounted terminal to obtain first input data, and the second Ethernet interface is connected to a second type of vehicle-mounted terminal to obtain second input data, the input processing module performs a first time compensation on the first input data, and the input processing module performs a second time compensation on the second input data, and the first time compensation is different from the second time compensation.

4. The switching chip according to claim 1, characterized in that: Also included is a processor that obtains time-stamped input data and processes the input data based on the time stamp.

5. The switching chip according to claim 4, characterized in that: The processor acquires a first data frame and a second data frame, the first data frame includes first input data with a first timestamp added, the second data frame includes second input data with a second timestamp added, and when the first timestamp is the same as the second timestamp or the first timestamp and the second timestamp are within the same time range, the first input data and the second input data are processed synchronously.

6. The switching chip according to claim 1, characterized in that: The input data includes Ethernet protocol layer data, and adding a timestamp to the input data includes performing time data packaging on the last 8 bytes of the Ethernet protocol layer data in the input data.

7. The switching chip according to claim 1, characterized in that: It also includes a time register, which is connected to the time synchronization module to store the absolute time of the vehicle Ethernet, and the input processing module is connected to the time register to obtain the absolute time of the vehicle Ethernet from the time register.

8. The switching chip according to claim 1, characterized in that: It also includes a physical layer and a data link layer, the physical layer is connected to the Ethernet interface, the data link layer is connected to the physical layer, the time synchronization module is connected to the data link layer, and the data link layer includes the input processing module.

9. The switching chip according to claim 2, characterized in that: The vehicle-mounted terminal includes at least one of a camera, a radar, a motor, and a central control screen.

10. A data processing method for vehicle-mounted Ethernet, characterized in that: The following steps are involved: Get the absolute time of the vehicle Ethernet; Receiving input data from the vehicle terminal; In response to the Ethernet interface receiving the input data, a time stamp is added to the input data based on an absolute time of the in-vehicle Ethernet network.