CN115499372B - Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle - Google Patents

Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle Download PDF

Info

Publication number
CN115499372B
CN115499372B CN202211116933.8A CN202211116933A CN115499372B CN 115499372 B CN115499372 B CN 115499372B CN 202211116933 A CN202211116933 A CN 202211116933A CN 115499372 B CN115499372 B CN 115499372B
Authority
CN
China
Prior art keywords
message
ethernet
controller
time
gateway controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211116933.8A
Other languages
Chinese (zh)
Other versions
CN115499372A (en
Inventor
黄杰
陈德芮
王敏
侯亚飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202211116933.8A priority Critical patent/CN115499372B/en
Publication of CN115499372A publication Critical patent/CN115499372A/en
Application granted granted Critical
Publication of CN115499372B publication Critical patent/CN115499372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/18End to end
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application relates to the technical field of vehicles, in particular to a delay control method and device for an end-to-end link of a vehicle-mounted Ethernet and a vehicle, wherein the method comprises the following steps: acquiring a CAN message to be sent of any CAN controller; extracting CAN data of a CAN message to be transmitted, packaging the CAN data into an Ethernet message, and calculating first gating start time of a first gateway controller; when the first gate control opening time is reached, the first gateway controller is utilized to send an Ethernet message to the second gateway controller, and the second gate control opening time is calculated; extracting Ethernet data of the Ethernet message, packaging the Ethernet data into a CAN message, and when the second gate control opening time is reached, sending the message to the target CAN controller by the second gateway controller, so that the target CAN controller CAN delay receiving the CAN message to be sent. Therefore, the problems that the delay of a plurality of links such as CAN-Ethernet, ethernet-Ethernet and the like in a transmission link cannot be controlled in the related technology, the delay from generation to receiving of data is guaranteed and the like are solved.

Description

Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle
Technical Field
The present application relates to the field of vehicle technologies, and in particular, to a method and an apparatus for controlling delay of an end-to-end link of a vehicle ethernet, and a vehicle.
Background
Along with the change of the whole vehicle electronic and electric architecture from 'domain control' to 'central plus region', the vehicle-mounted Ethernet gradually evolves from the current auxiliary network to the vehicle-mounted network backbone network. The backbone network needs to support the interaction of the whole vehicle control information, wherein the control information interaction in the fields of power, chassis, intelligent driving and the like has high requirements on the delay of a transmission link, which is generally in the level of 1ms, and most of the backbone network is a CAN (ontroller Area Network, controller area network) controller, so that a link delay control scheme is required to be provided to realize the conversion of a CAN message into an Ethernet message, the conversion of the Ethernet message into the Ethernet message and the low delay forwarding of the Ethernet message into the CAN message.
The related art calculates the gating state in advance, and for each frame reaching the output interface of the TSN (Time-Sensitive Network, time sensitive network), the gating state calculation module determines the Time slot of packet transmission according to the input packet reaching information and Qbv Time gating table; performing queue state control, wherein a queue state control module performs enqueuing or emptying updating operation on the resource occupation state of a queue where the packet is located; and calculating the transmission time. And establishing a software calculation model according to the Qbv standard, and quickly calculating the accurate time of frame transmission by combining the constraints of queuing, absolute priority scheduling algorithm, time gating and the like in the frame processing process.
However, the related art only proposes a method for calculating the sending time of the message in the ethernet controller, which is not designed to include a plurality of links such as a CAN controller, a CAN-to-ethernet, an ethernet-to-ethernet, and the like, and cannot guarantee the delay from end to end of the whole.
Disclosure of Invention
The application provides a delay control method, a delay control device and a delay control vehicle for a vehicle-mounted Ethernet end-to-end link, and aims to solve the problems that the delay of a plurality of links such as CAN-to-Ethernet, ethernet-to-Ethernet and the like in a transmission link cannot be controlled and the delay from generation to reception of data is guaranteed only by providing calculation of the sending time of a message in an Ethernet controller in the related technology.
An embodiment of a first aspect of the present application provides a delay control method for an end-to-end link of a vehicle-mounted ethernet, including the following steps: acquiring a CAN message to be sent of any CAN controller; extracting CAN data of the CAN message to be transmitted, encapsulating the CAN data into an Ethernet message, and calculating first gating opening time of a first gateway controller according to message transmission time of any CAN controller, transmission time of the message to the first gateway controller and encapsulation time of the CAN message; when the first current time reaches the first gate opening time, the first gateway controller is utilized to send the Ethernet message to a second gateway controller, and the second gate opening time is calculated according to the first gate opening time and the time spent by the second gateway controller in sending the message to a target CAN controller; extracting Ethernet data of the Ethernet message, packaging the Ethernet data into a CAN message, and transmitting the message to the target CAN controller by using the second gateway controller when the second current time reaches the second gate opening time, so that the target CAN controller receives the CAN message to be transmitted after delaying the first gate opening time and the second gate opening time.
According to the technical means, the embodiment of the application CAN package the CAN message to be sent into the Ethernet message, and calculate the first gating start time of the first gateway controller according to the start time of the CAN controller, the period of the message sending and the time of the CAN message package. When the sending time is reached, the first gateway controller sends a message to the second gateway controller, calculates the second gate control opening time, extracts data field data of the Ethernet message, encapsulates the data field data into a CAN message, and sends the message to the CAN controller after the sending time is reached, thereby realizing delay control of CAN bus to vehicle Ethernet, vehicle-mounted Ethernet to vehicle Ethernet and vehicle-mounted Ethernet to CAN bus, and guaranteeing delay from generation to reception of the data.
Optionally, in an embodiment of the present application, the extracting CAN data of the CAN packet to be sent and encapsulating the CAN data into an ethernet packet includes: the random CAN controllers are controlled to call an Ethernet conversion module of the first gateway controller in a preset interrupt mode, and the CAN messages to be sent are converted into the Ethernet messages by the Ethernet conversion module; or, controlling the first gateway controller to call the Ethernet conversion module, and converting the CAN message to be sent into the Ethernet message by using the Ethernet conversion module.
According to the technical means, when the CAN message is received, the first gateway controller CAN call or directly call the Ethernet conversion module in an interrupt mode, CAN take the CANID of the CAN message as a mark, extract the data field data of the CAN message and package the data field data into the Ethernet message, so that delay time is increased.
Optionally, in one embodiment of the present application, before calculating the first gating open time of the first gateway controller according to the message sending time of the arbitrary CAN controller, the sending time of the message sent to the first gateway controller, and the encapsulation time of the CAN message, the method includes: the CAN bus on the transmission link and the vehicle-mounted Ethernet are subjected to time synchronization, so that each controller has the same time reference; and the preset sending time is allocated to each message, and when the current time reaches the preset sending time, the arbitrary CAN controller group is controlled to send the CAN message to be sent or the Ethernet message corresponding to the CAN message to be sent to the first gateway controller.
According to the technical means, the embodiment of the application CAN synchronize the time of the whole CAN and the time of the vehicle-mounted Ethernet in the unified clock domain, the sending time of the message is regulated based on the message sending period, and the CAN controller sends the CAN message according to the sending time, so that the problem of beeping delay caused by simultaneous sending of a plurality of CAN messages is avoided.
Optionally, in an embodiment of the present application, the extracting ethernet data of the ethernet packet encapsulates the ethernet data into a CAN packet, including: the target CAN controller is controlled to call a CAN conversion module of the second gateway controller in a preset interrupt mode, and the CAN conversion module is used for converting the Ethernet message into the CAN message; or, controlling the second gateway controller to call the CAN conversion module, and converting the Ethernet message into the CAN message by using the CAN conversion module.
According to the technical means, when the Ethernet message is received, the second gateway controller CAN call or directly call the CAN conversion module in an interrupt mode, extract the data field data of the Ethernet message and package the data field data into the CAN message, so that the delay time is increased.
Optionally, in an embodiment of the present application, the sending, by the second gateway controller, a message to the target CAN controller includes: and sending the Ethernet message or the CAN message to the target CAN controller by using the second gateway controller.
According to the technical means, after the second gateway controller of the embodiment of the application finishes packaging, the CAN sending module CAN be called to send a CAN message to the CAN controller, and the delay of the CAN-to-Ethernet and Ethernet-to-CAN link is utilized to ensure the delay of the whole end-to-end.
An embodiment of a second aspect of the present application provides a delay control device for an end-to-end link of a vehicle-mounted ethernet, including: the acquisition module is used for acquiring the CAN message to be sent of any CAN controller; the first calculation module is used for extracting CAN data of the CAN message to be sent, packaging the CAN data into an Ethernet message, and calculating first gating opening time of the first gateway controller according to message sending time of any CAN controller, sending time of the message to the first gateway controller and packaging time of the CAN message; the second calculation module is used for sending the Ethernet message to a second gateway controller by using the first gateway controller when the first current time reaches the first gate opening time, and calculating the second gate opening time according to the first gate opening time and the time spent by the second gateway controller in sending the message to a target CAN controller; and the control module is used for extracting the Ethernet data of the Ethernet message, packaging the Ethernet data into a CAN message, and transmitting the message to the target CAN controller by using the second gateway controller when the second current time reaches the second gating start time, so that the target CAN controller receives the CAN message to be transmitted after delaying the first gating start time and the second gating start time.
Optionally, in an embodiment of the present application, the first computing module is further configured to control the arbitrary CAN controller to invoke an ethernet conversion module of the first gateway controller by using a preset interrupt mode, and convert the CAN message to be sent into the ethernet message by using the ethernet conversion module; or, controlling the first gateway controller to call the Ethernet conversion module, and converting the CAN message to be sent into the Ethernet message by using the Ethernet conversion module.
Optionally, in one embodiment of the present application, the method includes: the synchronization module is used for performing time synchronization on the CAN bus and the vehicle-mounted Ethernet on a transmission link before calculating the first gating start time of the first gateway controller according to the message sending time of any CAN controller, the sending time of the message to the first gateway controller and the packaging time of the CAN message, so that each controller has the same time reference; and the sending module is used for assigning preset sending time to each message, and controlling the arbitrary CAN controller group to send the CAN message to be sent or the Ethernet message corresponding to the CAN message to be sent to the first gateway controller when the current time reaches the preset sending time.
Optionally, in an embodiment of the present application, the control module is further configured to control the target CAN controller to invoke a CAN conversion module of the second gateway controller by using a preset interrupt mode, and convert the ethernet packet into the CAN packet by using the CAN conversion module; or, controlling the second gateway controller to call the CAN conversion module, and converting the Ethernet message into the CAN message by using the CAN conversion module.
Optionally, in an embodiment of the present application, the control module is further configured to send the ethernet packet or the CAN packet to the target CAN controller by using the second gateway controller.
An embodiment of a third aspect of the present application provides a vehicle including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to realize the delay control method of the vehicle-mounted Ethernet end-to-end link.
An embodiment of a fourth aspect of the present application provides a computer-readable storage medium having stored thereon a computer program that is executed by a processor for implementing the delay control method of an on-vehicle ethernet end-to-end link as described in the above embodiment.
Therefore, the application has at least the following beneficial effects:
1. according to the embodiment of the application, the CAN message to be sent CAN be packaged into the Ethernet message, and the first gating start time of the first gateway controller is calculated according to the start time of the CAN controller, the period of sending the message and the time of packaging the CAN message. When the sending time is reached, the first gateway controller sends a message to the second gateway controller, calculates the second gate control opening time, extracts data field data of the Ethernet message, encapsulates the data field data into a CAN message, and sends the message to the CAN controller after the sending time is reached, thereby realizing delay control of CAN bus to vehicle Ethernet, vehicle-mounted Ethernet to vehicle Ethernet and vehicle-mounted Ethernet to CAN bus, and guaranteeing delay from generation to reception of the data.
2. When the embodiment of the application receives the CAN message, the first gateway controller uses the interrupt mode to call or directly call the Ethernet conversion module, and CAN extract the data field data of the CAN message by taking the CANID of the CAN message as a mark and package the data field data of the CAN message into the Ethernet message, thereby increasing the delay time.
3. The embodiment of the application CAN carry out time synchronization on the whole CAN and the vehicle-mounted Ethernet in a unified clock domain, prescribe the sending time of the message based on the message sending period, and the CAN controller sends the CAN message according to the sending time, thereby avoiding the problem of beeping delay caused by simultaneous sending of a plurality of CAN messages.
4. According to the embodiment of the application, when the Ethernet message is received, the second gateway controller uses the interrupt mode to call or directly call the CAN conversion module, so that the data field data of the Ethernet message is extracted and packaged into the CAN message, and the delay time is increased.
5. After the second gateway controller of the embodiment of the application finishes encapsulation, the CAN sending module CAN be called to send CAN messages to the CAN controller, and the delay of the CAN-to-Ethernet and the Ethernet-to-CAN links is utilized to ensure the delay of the whole end-to-end.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flowchart of a delay control method of a vehicle-mounted ethernet end-to-end link according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an end-to-end delay control method according to an embodiment of the present application;
fig. 3 is a schematic block diagram of a delay control device of an end-to-end link of a vehicle-mounted ethernet according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application.
Reference numerals illustrate: the system comprises an acquisition module-100, a first calculation module-200, a second calculation module-300 and a control module 400.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
The following describes a delay control method, a delay control device, a vehicle and a storage medium of an end-to-end link of an on-vehicle ethernet according to an embodiment of the present application with reference to the accompanying drawings. In view of the above-mentioned problems in the background art, the present application provides a delay control method for a vehicle-mounted ethernet end-to-end link, in which, by encapsulating a CAN packet to be sent into an ethernet packet, a first gate opening time of a first gateway controller is calculated according to a start time of the CAN controller, a period of sending the packet, and a time of encapsulating the CAN packet. When the sending time is reached, the first gateway controller sends a message to the second gateway controller, calculates the second gate control opening time, extracts data field data of the Ethernet message, encapsulates the data field data into a CAN message, and sends the message to the CAN controller after the sending time is reached, thereby realizing delay control of CAN bus to vehicle Ethernet, vehicle-mounted Ethernet to vehicle Ethernet and vehicle-mounted Ethernet to CAN bus, and guaranteeing delay from generation to reception of the data. Therefore, the problems that the delay of a plurality of links such as CAN-Ethernet conversion, ethernet-Ethernet conversion and the like in a transmission link cannot be controlled only by providing calculation of the sending time of a message in an Ethernet controller in the related art are solved.
Specifically, fig. 1 is a schematic flow chart of a delay control method of an end-to-end link of a vehicle-mounted ethernet according to an embodiment of the present application.
As shown in fig. 1, the delay control method of the vehicle-mounted ethernet end-to-end link includes the following steps:
in step S101, a CAN message to be sent of any CAN controller is acquired.
The vehicle-mounted Ethernet needs to support the interaction of the whole vehicle control information, wherein the control information interaction in the fields of power, chassis, intelligent driving and the like has high requirements on transmission link delay, and most of the control information is a CAN controller.
In step S102, the CAN data of the CAN message to be sent is extracted, and the CAN data is encapsulated into an ethernet message, and the first gate opening time of the first gateway controller is calculated according to the message sending time of any CAN controller, the sending time of the message to the first gateway controller, and the encapsulation time of the CAN message.
Specifically, the embodiment of the application CAN calculate the time consumption of each step of CAN transmission, CAN-to-Ethernet and Ethernet-to-Ethernet according to the priority requirement of the message based on the TSN_Qbv protocol, classify the message and distribute the message to the gating list of the Qbv protocol, and set the opening time for each gating. And (3) carrying out estimation and experimental analysis on the conversion time consumption of the CAN-Ethernet message to obtain time consumption. Assuming that the time point of the message sent by the CAN controller is T0, the time consumption of the sending of the CAN message on the bus is T1, and the time consumption of the CAN-to-ethernet message is T2, the first gating start time of the ethernet Qbv should be set as follows: t3=t0+t1+t2.
In one embodiment of the present application, extracting CAN data of a CAN message to be sent and encapsulating the CAN data into an ethernet message includes: the method comprises the steps of controlling any CAN controller to call an Ethernet conversion module of a first gateway controller in a preset interrupt mode, and converting a CAN message to be sent into an Ethernet message by using the Ethernet conversion module; or controlling the first gateway controller to call an Ethernet conversion module, and converting the CAN message to be sent into an Ethernet message by using the Ethernet conversion module.
It may be understood that, as shown in fig. 2, after acquiring a CAN packet to be sent by any CAN controller, the embodiment of the present application may call an ethernet conversion module of the first gateway controller in an interrupt manner, where the conversion module may use a CAN id of the CAN packet as a flag, extract data field data of the CAN packet, and thus encapsulate the CAN packet to be sent into an ethernet packet. Or, in the embodiment of the application, when the first gateway controller receives the CAN message, CAN data CAN be stored in a cache of the controller; the Ethernet conversion module of the first gateway controller is used for dispatching according to periodic tasks, the dispatching cycle CAN be adjusted according to system resources and delay requirements, and when the time of each dispatching cycle timer is up, the Ethernet conversion module is used for acquiring stored CAN data from the cache, so that CAN messages to be sent are packaged into Ethernet messages.
Furthermore, the embodiment of the application can divide the encapsulated Ethernet message encapsulation format into DDS, SOME/IP or custom encapsulation formats, call the Ethernet sending module after encapsulation is completed, and send out the Ethernet message.
In step S103, when the first current time reaches the first gate opening time, the first gateway controller is used to send an ethernet message to the second gateway controller, and the second gate opening time is calculated according to the first gate opening time and the time consumed by the second gateway controller to send the message to the target CAN controller.
On the basis of the first gating open time calculated in the above embodiment, when the current time reaches the first gating open time T3, the embodiment of the present application may send the encapsulated ethernet packet from the second gateway controller to the next switch, and assuming that the sending time of the ethernet on the bus is T4, the Qbv second gating open time of the next switch is: t5=t3+t4.
In step S104, the ethernet data of the ethernet packet is extracted, the ethernet data is encapsulated into a CAN packet, and when the second current time reaches the second gate-on time, the second gateway controller is used to send the packet to the target CAN controller, so that the target CAN controller receives the CAN packet to be sent after delaying the first gate-on time and the second gate-on time.
In the actual implementation process, the embodiment of the application CAN send the Ethernet message or the CAN message to the target CAN controller by using the second gateway controller.
Specifically, when the current time reaches the second gate-control opening time, the embodiment of the application CAN convert the Ethernet message received by the CAN conversion module of the gateway controller into the CAN message by using an interrupt task or a periodic task, call the CAN message sending module and send the CAN message, thereby delaying the time of receiving and sending the CAN message by the target CAN controller, ensuring the delay of CAN-to-Ethernet, ethernet-to-Ethernet and Ethernet-to-CAN links, and further ensuring the delay of the whole end-to-end.
In one embodiment of the present application, extracting ethernet data of an ethernet packet, and encapsulating the ethernet data into a CAN packet includes: the control target CAN controller calls a CAN conversion module of the second gateway controller by using a preset interrupt mode, and converts the Ethernet message into a CAN message by using the CAN conversion module; or, controlling the second gateway controller to call the CAN conversion module, and converting the Ethernet message into the CAN message by using the CAN conversion module.
When the second gateway controller receives the ethernet message, the embodiment of the present application may call the CAN conversion module by using an interrupt manner, where the conversion module may use a Service ID/Method ID of the SOME/IP message as a flag, or use a Topic of the DDS message as a flag, or use a specific flag bit of other custom messages as a flag, where the flag needs to have a characteristic of a fixed position in the ethernet message, and extract data field data of the ethernet message, so that the ethernet message is packaged as a CAN message. Or when the second gateway controller receives the Ethernet message, storing the Ethernet data in a cache of the controller; the CAN conversion module of the gateway controller is used for dispatching according to periodic tasks, the dispatching cycle CAN be adjusted according to the dispatching cycle, the system resource and the delay requirement, and when the time of each dispatching cycle timer is up, the CAN conversion module acquires stored Ethernet data from the cache, so that the Ethernet message is packaged into a CAN message.
Further, the embodiment of the application CAN call the CAN sending module to send the CAN message after the second gateway controller finishes packaging.
In one embodiment of the present application, before calculating the first gating open time of the first gateway controller according to the message transmission time of any CAN controller, the transmission time of the message to the first gateway controller, and the encapsulation time of the CAN message, the method includes: the CAN bus on the transmission link and the vehicle-mounted Ethernet are subjected to time synchronization, so that each controller has the same time reference; and (3) assigning preset sending time to each message, and controlling any CAN controller group to send the CAN message to be sent or the Ethernet message corresponding to the CAN message to be sent to the first gateway controller when the current time reaches the preset sending time.
It CAN be understood that in the embodiment of the present application, by performing time synchronization on the CAN bus on the transmission link and the vehicle-mounted ethernet, each controller has the same time reference, where the CAN bus may use an AUTOSAR CAN time synchronization standard, and the vehicle-mounted ethernet may use an IEEE 802.1AS ethernet time synchronization standard. And the number of message sending controllers on the bus, the number of messages sent by each controller, the period of sending the messages and the starting time information of the controllers are analyzed, and a sending time is allocated for each message, so that arbitration caused by CAN message sending conflict is avoided, and after time synchronization initialization is completed, corresponding messages are sent to the first gateway controller according to the pre-allocated sending time based on a clock after the time synchronization.
According to the delay control method of the vehicle-mounted Ethernet end-to-end link, the CAN message to be sent is packaged into the Ethernet message, and the first gate control opening time of the first gateway controller is calculated according to the starting time of the CAN controller, the period of the message sending and the time of the CAN message packaging. When the sending time is reached, the first gateway controller sends a message to the second gateway controller, calculates the second gate control opening time, extracts data field data of the Ethernet message, encapsulates the data field data into a CAN message, and sends the message to the CAN controller after the sending time is reached, thereby realizing delay control of CAN bus to vehicle Ethernet, vehicle-mounted Ethernet to vehicle Ethernet and vehicle-mounted Ethernet to CAN bus, and guaranteeing delay from generation to reception of the data. Therefore, the problems that the delay of a plurality of links such as CAN-Ethernet conversion, ethernet-Ethernet conversion and the like in a transmission link cannot be controlled only by providing calculation of the sending time of a message in an Ethernet controller in the related art are solved.
Next, a delay control device for an end-to-end link of a vehicle-mounted ethernet according to an embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 3 is a schematic block diagram of a delay control device for an end-to-end link of a vehicle-mounted ethernet according to an embodiment of the present application.
As shown in fig. 3, the delay control device 10 of the vehicle-mounted ethernet end-to-end link includes: the system comprises an acquisition module 100, a first calculation module 200, a second calculation module 300 and a control module 400.
The acquiring module 100 is configured to acquire a CAN message to be sent by any CAN controller; the first calculating module 200 is configured to extract CAN data of a CAN packet to be sent, encapsulate the CAN data into an ethernet packet, and calculate a first gate opening time of the first gateway controller according to a packet sending time of any CAN controller, a sending time of the packet to the first gateway controller, and an encapsulation time of the CAN packet; the second calculating module 300 is configured to send an ethernet message to the second gateway controller by using the first gateway controller when the first current time reaches the first gate opening time, and calculate the second gate opening time according to the first gate opening time and the time consumed by the second gateway controller to send the message to the target CAN controller; the control module 400 is configured to extract ethernet data of the ethernet packet, encapsulate the ethernet data into a CAN packet, and send the packet to the target CAN controller by using the second gateway controller when the second current time reaches the second gate-on time, so that the target CAN controller receives the CAN packet to be sent after delaying the first gate-on time and the second gate-on time.
In one embodiment of the present application, the first computing module 200 is further configured to control any CAN controller to invoke an ethernet conversion module of the first gateway controller by using a preset interrupt mode, and convert a CAN message to be sent into an ethernet message by using the ethernet conversion module; or controlling the first gateway controller to call an Ethernet conversion module, and converting the CAN message to be sent into an Ethernet message by using the Ethernet conversion module.
In one embodiment of the present application, the apparatus 10 of the embodiment of the present application further comprises: a synchronization module and a transmission module.
The synchronous module is used for carrying out time synchronization on the CAN bus and the vehicle-mounted Ethernet on the transmission link before calculating the first gate control opening time of the first gateway controller according to the message sending time of any CAN controller, the sending time of the message to the first gateway controller and the packaging time of the CAN message, so that each controller has the same time reference; the sending module is used for assigning preset sending time to each message, and controlling any CAN controller group to send the CAN message to be sent or the Ethernet message corresponding to the CAN message to be sent to the first gateway controller when the current time reaches the preset sending time.
In one embodiment of the present application, the control module 400 is further configured to control the target CAN controller to invoke the CAN conversion module of the second gateway controller by using a preset interrupt mode, and convert the ethernet message into a CAN message by using the CAN conversion module; or, controlling the second gateway controller to call the CAN conversion module, and converting the Ethernet message into the CAN message by using the CAN conversion module.
In one embodiment of the present application, the control module 400 is further configured to send an ethernet message or a CAN message to the target CAN controller using the second gateway controller.
It should be noted that the foregoing explanation of the embodiment of the delay control method for the vehicle-mounted ethernet end-to-end link is also applicable to the delay control device for the vehicle-mounted ethernet end-to-end link of this embodiment, and will not be repeated here.
According to the delay control device of the vehicle-mounted Ethernet end-to-end link, which is provided by the embodiment of the application, the CAN message to be sent is packaged into the Ethernet message, and the first gate control opening time of the first gateway controller is calculated according to the starting time of the CAN controller, the period of the message sending and the time of the CAN message packaging. When the sending time is reached, the first gateway controller sends a message to the second gateway controller, calculates the second gate control opening time, extracts data field data of the Ethernet message, encapsulates the data field data into a CAN message, and sends the message to the CAN controller after the sending time is reached, thereby realizing delay control of CAN bus to vehicle Ethernet, vehicle-mounted Ethernet to vehicle Ethernet and vehicle-mounted Ethernet to CAN bus, and guaranteeing delay from generation to reception of the data. Therefore, the problems that the delay of a plurality of links such as CAN-Ethernet conversion, ethernet-Ethernet conversion and the like in a transmission link cannot be controlled only by providing calculation of the sending time of a message in an Ethernet controller in the related art are solved.
Fig. 4 is a schematic structural diagram of a vehicle according to an embodiment of the present application. The vehicle may include:
memory 401, processor 402, and a computer program stored on memory 401 and executable on processor 402.
The processor 402 implements the delay control method of the on-vehicle ethernet end-to-end link provided in the above embodiment when executing the program.
Further, the vehicle further includes:
a communication interface 403 for communication between the memory 401 and the processor 402.
A memory 401 for storing a computer program executable on the processor 402.
The memory 401 may include high speed RAM (Random Access Memory ) memory, and may also include non-volatile memory, such as at least one disk memory.
If the memory 401, the processor 402, and the communication interface 403 are implemented independently, the communication interface 403, the memory 401, and the processor 402 may be connected to each other by a bus and perform communication with each other. The bus may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component, external device interconnect) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 401, the processor 402, and the communication interface 403 are integrated on a chip, the memory 401, the processor 402, and the communication interface 403 may perform communication with each other through internal interfaces.
The processor 402 may be a CPU (Central Processing Unit ) or ASIC (Application Specific Integrated Circuit, application specific integrated circuit) or one or more integrated circuits configured to implement embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the delay control method of the vehicle-mounted Ethernet end-to-end link as above.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable gate arrays, field programmable gate arrays, and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (9)

1. The delay control method of the vehicle-mounted Ethernet end-to-end link is characterized by comprising the following steps:
acquiring a CAN message to be sent of any CAN controller;
extracting CAN data of the CAN message to be sent, packaging the CAN data into an Ethernet message, and performing time synchronization on a CAN bus on a transmission link and a vehicle-mounted Ethernet so that each controller has the same time reference; the method comprises the steps that preset sending time is allocated to each message, and when the current time reaches the preset sending time, the arbitrary CAN controller group is controlled to send the CAN message to be sent or the Ethernet message corresponding to the CAN message to be sent to a first gateway controller; calculating a first gate opening time of the first gateway controller according to the message sending time of any CAN controller, the sending time of the message to the first gateway controller and the packaging time of the CAN message;
when the first current time reaches the first gate opening time, the first gateway controller is utilized to send the Ethernet message to a second gateway controller, and the second gate opening time is calculated according to the first gate opening time and the time spent by the second gateway controller in sending the message to a target CAN controller;
extracting Ethernet data of the Ethernet message, packaging the Ethernet data into a CAN message, and transmitting the message to the target CAN controller by using the second gateway controller when the second current time reaches the second gate opening time, so that the target CAN controller receives the CAN message to be transmitted after delaying the first gate opening time and the second gate opening time.
2. The method of claim 1, wherein the extracting CAN data of the CAN message to be sent and encapsulating the CAN data into an ethernet message comprises:
the random CAN controllers are controlled to call an Ethernet conversion module of the first gateway controller in a preset interrupt mode, and the CAN messages to be sent are converted into the Ethernet messages by the Ethernet conversion module;
or, controlling the first gateway controller to call the Ethernet conversion module, and converting the CAN message to be sent into the Ethernet message by using the Ethernet conversion module.
3. The method of claim 1, wherein extracting ethernet data of the ethernet packet, encapsulating the ethernet data into a CAN packet, comprises:
the target CAN controller is controlled to call a CAN conversion module of the second gateway controller in a preset interrupt mode, and the CAN conversion module is used for converting the Ethernet message into the CAN message;
or, controlling the second gateway controller to call the CAN conversion module, and converting the Ethernet message into the CAN message by using the CAN conversion module.
4. The method of claim 3, wherein the sending, with the second gateway controller, a message to the target CAN controller comprises:
and sending the Ethernet message or the CAN message to the target CAN controller by using the second gateway controller.
5. A delay control device for a vehicle-mounted ethernet end-to-end link, comprising:
the acquisition module is used for acquiring the CAN message to be sent of any CAN controller;
the first calculation module is used for extracting CAN data of the CAN message to be sent, packaging the CAN data into an Ethernet message, and performing time synchronization on a CAN bus on a transmission link and a vehicle-mounted Ethernet so that each controller has the same time reference; the method comprises the steps that preset sending time is allocated to each message, and when the current time reaches the preset sending time, the arbitrary CAN controller group is controlled to send the CAN message to be sent or the Ethernet message corresponding to the CAN message to be sent to a first gateway controller; calculating a first gate opening time of the first gateway controller according to the message sending time of any CAN controller, the sending time of the message to the first gateway controller and the packaging time of the CAN message;
the second calculation module is used for sending the Ethernet message to a second gateway controller by using the first gateway controller when the first current time reaches the first gate opening time, and calculating the second gate opening time according to the first gate opening time and the time spent by the second gateway controller in sending the message to a target CAN controller;
and the control module is used for extracting the Ethernet data of the Ethernet message, packaging the Ethernet data into a CAN message, and transmitting the message to the target CAN controller by using the second gateway controller when the second current time reaches the second gating start time, so that the target CAN controller receives the CAN message to be transmitted after delaying the first gating start time and the second gating start time.
6. The apparatus of claim 5, wherein the first computing module is further to:
the random CAN controllers are controlled to call an Ethernet conversion module of the first gateway controller in a preset interrupt mode, and the CAN messages to be sent are converted into the Ethernet messages by the Ethernet conversion module;
or, controlling the first gateway controller to call the Ethernet conversion module, and converting the CAN message to be sent into the Ethernet message by using the Ethernet conversion module.
7. The apparatus of claim 5, wherein the control module is further configured to:
the target CAN controller is controlled to call a CAN conversion module of the second gateway controller in a preset interrupt mode, and the CAN conversion module is used for converting the Ethernet message into the CAN message;
or, controlling the second gateway controller to call the CAN conversion module, and converting the Ethernet message into the CAN message by using the CAN conversion module.
8. A vehicle, characterized by comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the method of delay control of an on-board ethernet end-to-end link as claimed in any one of claims 1 to 4.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that the program is executed by a processor for implementing the delay control method of an on-board ethernet end-to-end link according to any of claims 1-4.
CN202211116933.8A 2022-09-14 2022-09-14 Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle Active CN115499372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211116933.8A CN115499372B (en) 2022-09-14 2022-09-14 Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211116933.8A CN115499372B (en) 2022-09-14 2022-09-14 Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle

Publications (2)

Publication Number Publication Date
CN115499372A CN115499372A (en) 2022-12-20
CN115499372B true CN115499372B (en) 2023-09-12

Family

ID=84469168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211116933.8A Active CN115499372B (en) 2022-09-14 2022-09-14 Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle

Country Status (1)

Country Link
CN (1) CN115499372B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009092208A1 (en) * 2008-01-22 2009-07-30 Zte Corporation Home gateway policy control method and system
CN102546364A (en) * 2010-12-22 2012-07-04 深圳市恒扬科技有限公司 Network data distribution method and device
CN111464409A (en) * 2020-03-25 2020-07-28 浙江中控研究院有限公司 Data exchange device and network with CAN bus incorporated into time-sensitive network
CN113542157A (en) * 2020-04-13 2021-10-22 华为技术有限公司 Method for controlling door state in time-sensitive network and related equipment
CN113824614A (en) * 2021-09-23 2021-12-21 北京理工大学 Method and system for determining message loop time delay of vehicle-mounted network communication system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7103788B2 (en) * 2017-12-28 2022-07-20 トヨタ自動車株式会社 In-vehicle systems, gateways, programs, information processing methods, information processing systems, and vehicles

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009092208A1 (en) * 2008-01-22 2009-07-30 Zte Corporation Home gateway policy control method and system
CN102546364A (en) * 2010-12-22 2012-07-04 深圳市恒扬科技有限公司 Network data distribution method and device
CN111464409A (en) * 2020-03-25 2020-07-28 浙江中控研究院有限公司 Data exchange device and network with CAN bus incorporated into time-sensitive network
CN113542157A (en) * 2020-04-13 2021-10-22 华为技术有限公司 Method for controlling door state in time-sensitive network and related equipment
CN113824614A (en) * 2021-09-23 2021-12-21 北京理工大学 Method and system for determining message loop time delay of vehicle-mounted network communication system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
控制系统中的网络传输延迟预估控制;索格罗,阳宪惠;《清华大学学报》;536-539 *

Also Published As

Publication number Publication date
CN115499372A (en) 2022-12-20

Similar Documents

Publication Publication Date Title
CN110545152B (en) Upper computer with real-time transmission function in Ethernet and Ethernet system
RU2415511C2 (en) Gateway for automatically routing messages between buses
CN112860612B (en) Interface system for interconnecting bare core and MPU and communication method thereof
US20070140294A1 (en) Communication message conversion apparatus and communication message conversion method
US20190227971A1 (en) Architecture for consolidating multiple sources of low-bandwidth data over a serial bus
JP6076480B2 (en) Service processing method and apparatus
US20170329632A1 (en) Device scheduling method, task manager and storage medium
CN114268666A (en) Universal domain controller, vehicle and interactive system supporting service oriented architecture SOA
CN114424507A (en) Method for transmitting data packets and device for carrying out said method
CN115499372B (en) Delay control method and device for vehicle-mounted Ethernet end-to-end link and vehicle
JP2017118407A (en) Communication system
CN112889256A (en) Techniques to provide status information related to wireless data transmission for industrial process control
CN109361653B (en) POWERLINK main station
CN113282040B (en) Method and device for reducing frame loss in forwarding of finished automobile gateway
Berisa et al. Investigating and Analyzing CAN-to-TSN Gateway Forwarding Techniques
CN110545163B (en) Message processing method, message processing device and vehicle-mounted control system
Kaiser et al. A real-time event channel model for the CAN-Bus
Jang et al. Software reprogramming performance analysis of CAN FD and FlexRay protocols
Ishigooka et al. Message packing algorithm for CAN-based legacy control systems mixed with CAN and FlexRay
CN114024916B (en) Data transmission method, data transmission device, computer readable storage medium and processor
Fonseca et al. Using a planning scheduler in the CAN network
JP7446517B2 (en) Electronic device and communication control method
Shokry et al. Hardware EDF scheduler implementation on controller area network controller
CN113810167B (en) Time sequence control and synchronization method of distributed system
CN114785474B (en) In-vehicle SOME/IP transmission method and device based on TSN time-sensitive network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant