CN110311992B - Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet - Google Patents
Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet Download PDFInfo
- Publication number
- CN110311992B CN110311992B CN201910468802.8A CN201910468802A CN110311992B CN 110311992 B CN110311992 B CN 110311992B CN 201910468802 A CN201910468802 A CN 201910468802A CN 110311992 B CN110311992 B CN 110311992B
- Authority
- CN
- China
- Prior art keywords
- server
- address
- diagnosis
- external test
- communication
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 238000004891 communication Methods 0.000 claims abstract description 73
- 238000012360 testing method Methods 0.000 claims abstract description 62
- 238000012545 processing Methods 0.000 claims abstract description 30
- 238000013507 mapping Methods 0.000 claims abstract description 25
- 238000003745 diagnosis Methods 0.000 claims description 41
- 230000004913 activation Effects 0.000 claims description 14
- 125000000524 functional group Chemical group 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 239000003999 initiator Substances 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5069—Address allocation for group communication, multicast communication or broadcast communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5084—Providing for device mobility
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Abstract
本发明揭示了一种基于汽车以太网的UDS功能寻址方法,其特征在于,包括如下步骤:将功能寻址地址与IP组播地址做映射,建立映射表并内置于用于以太网诊断功能的节点上;根据映射表,完成服务器对外部测试设备访问权限的控制;发送功能寻址通信模式的诊断通信给服务器;服务器接收功能寻址诊断报文后,进行诊断处理。采用了本发明的技术方案,客户端在处理功能寻址发送时,只需要处理一次,发送一份数据包即可,外部测试设备的处理时间、整体通信的时间、以及系统带宽的占用都得到很好地改善。
The invention discloses a UDS function addressing method based on automotive Ethernet, which is characterized by comprising the following steps: mapping the function addressing address and the IP multicast address, establishing a mapping table and building it into the Ethernet diagnostic function According to the mapping table, the control of the access authority of the external test equipment by the server is completed; the diagnostic communication in the functional addressing communication mode is sent to the server; after receiving the functional addressing diagnostic message, the server performs diagnostic processing. By adopting the technical scheme of the present invention, when processing function addressing and sending, the client only needs to process it once and send a data packet, and the processing time of the external test equipment, the time of the overall communication, and the occupation of the system bandwidth are all obtained. Nicely improved.
Description
技术领域technical field
本发明属于汽车以太网的诊断通信领域,尤其是一种基于汽车以太网的UDS(Unified Diagnostic Service)功能寻址方法。The invention belongs to the field of diagnostic communication of automobile Ethernet, in particular to a UDS (Unified Diagnostic Service) function addressing method based on automobile Ethernet.
背景技术Background technique
在汽车以太网技术中,诊断的高层数据(UDS)是承载在DoIP(DiagnosticCommunication over Internet Protocol)之上的。具体是承载在DoIP协议中负载类型0x8001的诊断数据报文之上的。在当前版本的DoIP协议中,明确指出0x8001的诊断报文承载在TCP(Transmission Control Protocol)之上。也就是说基于DoIP的诊断通信只具备点对点通信的能力。In the automotive Ethernet technology, the upper layer data (UDS) of diagnosis is carried on top of DoIP (Diagnostic Communication over Internet Protocol). Specifically, it is carried on the diagnostic data packet of the payload type 0x8001 in the DoIP protocol. In the current version of the DoIP protocol, it is clearly pointed out that the diagnostic packet of 0x8001 is carried on the TCP (Transmission Control Protocol). That is to say, the diagnostic communication based on DoIP only has the capability of point-to-point communication.
而诊断通信实际上支持两种通信模式,即物理寻址和功能寻址。物理寻址就是点对点通信,功能寻址就是一对多通信。在当前汽车以太网诊断的实现方案上,如果需要功能寻址的通信方式,在DoIP层需要对每个需要通信的节点单独发送数据包,即用多次单点通信的方式完成一对多通信。The diagnostic communication actually supports two communication modes, namely physical addressing and functional addressing. Physical addressing is point-to-point communication, and functional addressing is one-to-many communication. In the current implementation scheme of automotive Ethernet diagnosis, if a functional addressing communication method is required, a data packet needs to be sent separately to each node that needs to communicate at the DoIP layer, that is, one-to-many communication is completed by multiple single-point communication. .
传统的汽车通信总线是CAN(Controller Area Network)总线,诊断通信在CAN总线上实施时,当需要使用功能寻址时,外部测试设备只需要发送一次报文,相应的所有服务器就能收到对应的功能寻址的报文。The traditional automotive communication bus is the CAN (Controller Area Network) bus. When the diagnostic communication is implemented on the CAN bus, when functional addressing is required, the external test equipment only needs to send a message once, and all the corresponding servers can receive the corresponding message. function-addressable messages.
传统的以太网中,一对多通信也有成熟的解决方案,即基于IP的广播和组播。然而,目前汽车以太网技术还在初始发展阶段,将以太网技术和原有诊断通讯需求结合的过程,在功能寻址的实现,显得非常笨拙。用多次单点通信的方式来替代一对多通信,增加了诊断通信发起方的软件处理复杂度,且随着功能寻址对象的增加,单次功能寻址通信所需要发送的数据包也随之增加,响应的处理时间和总线带宽都被无谓的浪费掉了。而简单的直接使用以太网组播/广播来传送功能寻址报文,又对汽车诊断业务而已,不够安全。In traditional Ethernet, there are mature solutions for one-to-many communication, namely IP-based broadcast and multicast. However, the current automotive Ethernet technology is still in the initial stage of development, and the process of combining the Ethernet technology with the original diagnostic communication requirements is very clumsy in the realization of functional addressing. Replacing one-to-many communication with multiple single-point communication increases the software processing complexity of the diagnostic communication initiator, and with the increase of function-addressed objects, the data packets that need to be sent for a single function-addressed communication also increase. With this increase, the processing time of the response and the bus bandwidth are wasted unnecessarily. The simple direct use of Ethernet multicast/broadcast to transmit function-addressed packets is not safe enough for automotive diagnostic services.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种基于汽车以太网的UDS功能寻址方法,从而有效地减少了通信发起方的软件处理复杂度,提高了响应的处理时间和总线带宽的利用率。The invention provides a UDS function addressing method based on automotive Ethernet, thereby effectively reducing the software processing complexity of the communication initiator, and improving the response processing time and the utilization rate of the bus bandwidth.
依据上述目的,实施本发明的一种基于汽车以太网的统一诊断服务的功能寻址方法,其特征在于,包括如下步骤:According to the above purpose, a functional addressing method for implementing a unified diagnostic service based on automotive Ethernet of the present invention is characterized in that, it includes the following steps:
步骤S1,建立功能组地址与IP组播地址之间的映射表;Step S1, establishing a mapping table between functional group addresses and IP multicast addresses;
步骤S2,完成服务器对外部测试设备访问权限的控制,根据所述映射表将服务器加入IP组播组;Step S2, completes the control of the access authority of the external test equipment by the server, and adds the server to the IP multicast group according to the mapping table;
步骤S3,发送功能寻址通信模式的诊断报文给IP组播组中的服务器,所述诊断报文中包含有IP组播地址;Step S3, sending the diagnostic message of the function-addressed communication mode to the server in the IP multicast group, where the diagnostic message includes an IP multicast address;
步骤S4,根据功能寻址模式的诊断报文,进行诊断处理;Step S4, performing diagnostic processing according to the diagnostic message of the functional addressing mode;
其中,所述服务器具有功能组地址和IP地址,所述IP组播地址由IP地址组成。Wherein, the server has a functional group address and an IP address, and the IP multicast address consists of an IP address.
可选的,所述步骤S2包括:Optionally, the step S2 includes:
步骤S21,寻找服务器的IP地址;Step S21, looking for the IP address of the server;
步骤S22,与服务器设备建立TCP连接;Step S22, establishing a TCP connection with the server device;
步骤S23,发送路由激活的请求报文,请求报文中包含有外部测试设备的逻辑地址;Step S23, sending a request message for routing activation, and the request message includes the logical address of the external test equipment;
步骤S24,根据逻辑地址判断能否进行诊断通信,如果能够进行诊断通信,则将当前TCP连接标记为激活,执行步骤S25;否则,执行步骤S26;Step S24, according to the logical address to determine whether the diagnostic communication can be carried out, if the diagnostic communication can be carried out, the current TCP connection is marked as active, and step S25 is executed; otherwise, step S26 is executed;
步骤S25,根据映射表,查找出与服务器的功能组地址相对应的IP组播地址,将服务器加入IP组播组中,逻辑地址标记为激活;Step S25, according to the mapping table, find out the IP multicast address corresponding to the functional group address of the server, add the server to the IP multicast group, and mark the logical address as active;
步骤S26,断开当前的TCP连接,如果此时外部测试设备与服务器没有其它连接,则服务器退出IP组播组。Step S26, disconnect the current TCP connection, if there is no other connection between the external test device and the server at this time, the server exits the IP multicast group.
可选的,所述步骤S3中,根据所述诊断报文中的IP组播地址,外部测试设备将功能寻址通信模式的诊断报文发送给IP组播组中的服务器,其中所述IP组播地址的数据包按照用户数据包协议封装。Optionally, in the step S3, according to the IP multicast address in the diagnostic message, the external test device sends the diagnostic message in the functionally addressed communication mode to the server in the IP multicast group, wherein the IP The data packets of the multicast address are encapsulated according to the user data packet protocol.
可选的,所述步骤S4包括:Optionally, the step S4 includes:
步骤S41,检测外部测试设备的逻辑地址是否已激活,如果是,执行下一步;否则,发送失败响应码给外部测试设备,关闭当前TCP连接;Step S41, detect whether the logical address of the external test equipment has been activated, if so, execute the next step; otherwise, send a failure response code to the external test equipment, and close the current TCP connection;
步骤S42,判断服务器是否支持与诊断报文中的IP组播地址对应的功能组地址,如果是,执行下一步;否则,发送失败响应码给外部测试设备并丢弃所述诊断报文;Step S42, judging whether the server supports the function group address corresponding to the IP multicast address in the diagnostic message, if so, execute the next step; otherwise, send a failure response code to the external test equipment and discard the diagnostic message;
步骤S43,发送成功响应码给外部测试设备,将诊断报文上报给服务器内的诊断处理模块,开始诊断处理。In step S43, a successful response code is sent to the external testing device, and the diagnostic message is reported to the diagnostic processing module in the server to start the diagnostic processing.
依据上述目的,实施本发明的一种外部测试设备,用于在汽车以太网上实现统一诊断服务的功能寻址,其特征在于,According to the above-mentioned purpose, an external test device of the present invention is implemented to realize the functional addressing of the unified diagnosis service on the automotive Ethernet, and is characterized in that:
所述外部测试设备发送路由激活的请求报文给服务器,路由激活后根据功能组地址与IP组播地址之间的映射表将服务器加入IP组播组,诊断通信时同时发送功能寻址通信模式的诊断报文给IP组播组中的服务器进行诊断处理;The external test equipment sends a request message for routing activation to the server, and after routing activation, the server is added to the IP multicast group according to the mapping table between the function group address and the IP multicast address, and the function-addressed communication mode is sent simultaneously when diagnosing communication. The diagnostic message is sent to the server in the IP multicast group for diagnostic processing;
其中,所述服务器具有功能组地址和IP地址,所述诊断报文中包含有IP组播地址。Wherein, the server has a functional group address and an IP address, and the diagnostic message includes an IP multicast address.
可选的,所述请求报文中包含有外部测试设备的逻辑地址信息,用于服务器判断外部测试设备是否有权限进行诊断通信。Optionally, the request message includes logical address information of the external test device, which is used by the server to determine whether the external test device has the authority to perform diagnostic communication.
依据上述目的,实施本发明的一种车载网络系统,用于在汽车以太网上实现统一诊断服务的功能寻址,包括网关和服务器,所述网关用于基于IP网络的诊断通信,其特征在于,According to the above purpose, an in-vehicle network system of the present invention is implemented, which is used for realizing the functional addressing of a unified diagnosis service on the automotive Ethernet, including a gateway and a server, and the gateway is used for diagnosis communication based on an IP network, and is characterized in that:
所述网关,用于在外部测试设备与服务器之间建立TCP连接,将功能组地址与IP组播地址之间的映射表内置于其内部与诊断功能相关的节点上;The gateway is used to establish a TCP connection between the external test equipment and the server, and the mapping table between the function group address and the IP multicast address is built into its internal node related to the diagnostic function;
所述服务器,接收外部测试设备发送的路由激活的请求报文并判断外部测试设备是否有权限进行诊断通信;诊断通信时接收功能寻址通信模式的诊断报文并进行诊断处理。The server receives the request message for routing activation sent by the external test equipment and judges whether the external test equipment has the authority to perform diagnostic communication; when diagnosing communication, receives the diagnostic message in the functional addressing communication mode and performs diagnostic processing.
可选的,所述请求报文中包含外部测试设备的逻辑地址信息,所述服务器根据所述逻辑地址信息判断外部测试设备是否有权限进行诊断通信。Optionally, the request message includes logical address information of the external test device, and the server determines whether the external test device has the authority to perform diagnostic communication according to the logical address information.
可选的,所述服务器内部包含有诊断处理模块,能够根据诊断报文进行诊断处理。Optionally, the server includes a diagnosis processing module, which can perform diagnosis processing according to the diagnosis message.
可选的,外部测试设备与服务器的通信连接方式包括无线通信、有线通信;Optionally, the communication connection mode between the external test equipment and the server includes wireless communication and wired communication;
所述无线通信包括但不限于Wifi、4G、5G、蓝牙。The wireless communication includes, but is not limited to, Wifi, 4G, 5G, and Bluetooth.
采用了本发明的技术方案,针对现有技术的不足,通过采用功能地址与IP地址映射表,并利用TCP与路由激活的限制权限访问机制以及改进的以太网组播机制,采用改进的组播模式,客户端在处理功能寻址发送时,只需要处理一次,发送一份数据包即可,外部测试设备的处理时间、整体通信的时间、以及系统带宽的占用都得到很好地改善。The technical scheme of the present invention is adopted, aiming at the deficiencies of the prior art, by adopting the function address and IP address mapping table, using the restricted authority access mechanism activated by TCP and routing, and the improved Ethernet multicast mechanism, the improved multicast is adopted. In this mode, the client only needs to process once and send a data packet when processing the function addressing transmission. The processing time of the external test equipment, the overall communication time, and the occupation of the system bandwidth are all well improved.
附图说明Description of drawings
图1是:功能寻址模式访问控制的流程图;Figure 1 is a flow chart of access control in functional addressing mode;
图2是:功能寻址模式下单播方式诊断报文的结构图;Figure 2 is: the structure diagram of the unicast diagnostic message in the functional addressing mode;
图3是:功能寻址模式下组播方式诊断报文的结构图;Figure 3 is: the structure diagram of the multicast diagnostic message in the functional addressing mode;
图4是:IP数据负载的结构示意图;Fig. 4 is: the structural representation of IP data load;
图5是:TCP数据负载的结构示意图;Fig. 5 is: the structural representation of TCP data load;
图6是:UDP头的结构示意图;Fig. 6 is: the structural representation of UDP header;
图7是:单播方式示意图;Figure 7 is a schematic diagram of a unicast mode;
图8是:组播方式示意图;Figure 8 is a schematic diagram of a multicast mode;
图9是:功能寻址模式下诊断报文接收处理的流程图。FIG. 9 is a flowchart of receiving and processing a diagnostic message in the functional addressing mode.
具体实施方式Detailed ways
下面结合附图和实施例进一步说明本发明的技术方案。本发明中基于汽车以太网的UDS功能寻址方法的具体实施步骤为:The technical solutions of the present invention are further described below with reference to the accompanying drawings and embodiments. The specific implementation steps of the UDS function addressing method based on automotive Ethernet in the present invention are:
首先,功能寻址地址与IP组播地址建立映射表。First, a mapping table is established between functional addressing addresses and IP multicast addresses.
按照DoIP协议标准,功能寻址地址规定如下:According to the DoIP protocol standard, the functional addressing address is defined as follows:
表1功能寻址组地址定义Table 1 Functional addressing group address definition
而IP协议把224.0.0.0~239.255.255.255之间的IP地址都用做IP组播地址,其中224.0.2.0~238.255.255.255为用户可用的组播地址。The IP protocol uses the IP addresses between 224.0.0.0 to 239.255.255.255 as IP multicast addresses, of which 224.0.2.0 to 238.255.255.255 are multicast addresses available to users.
在实际使用时,首先将功能组地址(功能寻址地址)与IP组播地址做一一映射,并将映射表内置于汽车以太网诊断功能相关节点上。In actual use, the function group address (functional addressing address) and the IP multicast address are firstly mapped one by one, and the mapping table is built into the relevant nodes of the automotive Ethernet diagnostic function.
一个实施例中,功能组地址与IP组播地址映射表,可以如下所示:In one embodiment, the function group address and IP multicast address mapping table may be as follows:
表2功能组地址与IP组播映射表Table 2 Function group address and IP multicast mapping table
需要说明的是,映射表是汽车以太网诊断服务功能寻址方式能够承载在IP组播方式上所必须的,但是映射表内容并不限定于上述表2所示的范围。It should be noted that the mapping table is necessary for the addressing mode of the automotive Ethernet diagnostic service function to be carried in the IP multicast mode, but the content of the mapping table is not limited to the scope shown in Table 2 above.
其次,采用TCP与路由激活的限制权限访问机制对IP组播的进行适配,完成功能寻址模式的服务器对外部测试设备访问权限的控制和管理。Secondly, the limited access mechanism of TCP and routing activation is used to adapt the IP multicast, and the server in the functional addressing mode can control and manage the access rights of the external test equipment.
如图2所示,主要步骤如下:As shown in Figure 2, the main steps are as follows:
(a)外部测试设备发起DoIP设备发现流程,找到服务器(ECU)的设备信息,例如如IP地址等;(a) The external test equipment initiates the DoIP device discovery process to find the device information of the server (ECU), such as IP address, etc.;
(b)外部测试设备主动向服务器(ECU)发起并成功建立TCP连接;(b) The external test equipment actively initiates and successfully establishes a TCP connection to the server (ECU);
(c)外部测试设备在建立的TCP通道上发起路由激活请求,请求报文中带有外部测试设备的逻辑地址信息;(c) The external test equipment initiates a routing activation request on the established TCP channel, and the request message contains the logical address information of the external test equipment;
(d)服务器(ECU)根据外部测试设备的逻辑地址信息,判断外部测试设备是否有权限进行后续的诊断通信;(d) The server (ECU) judges whether the external test equipment has the authority to carry out subsequent diagnostic communication according to the logical address information of the external test equipment;
(e)如果服务器(ECU)判断外部测试设备有权进行后续诊断通信,则将当前通信的TCP连接标记为有效;同时根据服务器(ECU)自己的功能组地址,查找功能组地址与IP组播映射表,将服务器(ECU)加入对应的IP组播组中;服务器(ECU)将外部测试设备的逻辑地址标记为激活,并对当前的TCP连接进行绑定;(e) If the server (ECU) judges that the external test equipment has the right to carry out subsequent diagnostic communication, it will mark the TCP connection of the current communication as valid; at the same time, according to the server (ECU) own function group address, find the function group address and IP multicast Mapping table, add the server (ECU) to the corresponding IP multicast group; the server (ECU) marks the logical address of the external test equipment as active, and binds the current TCP connection;
(f)如果服务器(ECU)判断外部测试设备无权进行后续诊断通信,则断开当前的TCP连接,如果此时已经没有外部测试设备连接到服务器端(ECU)上,则服务器端(ECU)退出IP组播组。(f) If the server (ECU) determines that the external test equipment is not authorized to carry out subsequent diagnostic communication, the current TCP connection is disconnected. If there is no external test equipment connected to the server side (ECU) at this time, the server side (ECU) Exit the IP multicast group.
逻辑地址可以是外部测试设备的IP地址、身份标识号码(ID,Identity)或者其它标记等信息,可以预先定义、设置于服务器(ECU)中。The logical address can be information such as an IP address of an external test device, an identification number (ID, Identity) or other marks, and can be pre-defined and set in a server (ECU).
本发明在原有的DoIP路由激活机制上增加适配组播通信的流程,在激活成功情况下,服务器需要在已知本身功能组地址的情况下,查找功能组地址映射表(即表2)后,加入对应的IP组播组。而在激活失败的情况下,如果确认所有客户端都已经断开,则服务器需要退出对应的IP组播组。The present invention adds the process of adapting multicast communication to the original DoIP route activation mechanism. In the case of successful activation, the server needs to look up the function group address mapping table (namely Table 2) after knowing the address of its own function group. to join the corresponding IP multicast group. In the case of activation failure, if it is confirmed that all clients have been disconnected, the server needs to exit the corresponding IP multicast group.
再其次,外部测试设备发送功能寻址通信模式的诊断报文给服务器。Thirdly, the external test equipment sends a diagnostic message in the functionally addressed communication mode to the server.
在外部测试设备需要发起功能寻址模式诊断通信时,应查询内置的功能组地址映射表(即表2),将诊断报文中的目的功能组地址转换成IP组播地址。When the external test equipment needs to initiate diagnostic communication in functional addressing mode, it should query the built-in functional group address mapping table (ie, Table 2), and convert the destination functional group address in the diagnostic message into an IP multicast address.
一个实施例中,约定功能寻址通信模式使用的端口号为13401。In one embodiment, the port number used by the convention function addressing communication mode is 13401.
如图2、3所示,采用功能寻址模式走IP组播方式后,数据包格式在DoIP以上层同原有走TCP方式维持不变,为了能够走组播方式,传输层承载在了UDP上,IP层的目标IP地址为IP组播地址。上层诊断处理逻辑都保持不变,最大化兼容了原有的处理机制。As shown in Figures 2 and 3, after the IP multicast mode is adopted in the functional addressing mode, the data packet format remains the same as the original TCP mode above the DoIP layer. In order to be able to use the multicast mode, the transport layer is carried in the UDP The target IP address of the IP layer is an IP multicast address. The upper-level diagnostic processing logic remains unchanged, maximizing compatibility with the original processing mechanism.
IP头(IP Header)一般为20个字节组成,特殊情况下还会有可选(Option)字段,IP头之后是IP数据负载(data)。如图4所示为IP数据负载的结构示意图,其中目的地址(Destination Address),在使用TCP进行单点一对一通信时,填写服务器(ECU)的IP地址;在使用UDP组播时,查询功能组地址与IP组播映射表,填写服务器(ECU)功能组地址对应的组播IP地址。其他IP头字段,在两种通信方式时,填写内容都是一样的。The IP header (IP Header) is generally composed of 20 bytes. In special cases, there will be an optional (Option) field. After the IP header is the IP data payload (data). Figure 4 is a schematic diagram of the structure of IP data load, in which the destination address (Destination Address), when using TCP for one-to-one communication, fill in the IP address of the server (ECU); when using UDP multicast, query Function group address and IP multicast mapping table, fill in the multicast IP address corresponding to the server (ECU) function group address. For other IP header fields, the filling content is the same in the two communication methods.
TCP头(TCP Header)部字段一般由20个字节组成,特殊情况下还会有可选(Option)字段,TCP头之后是TCP数据负载(data),如图5所示为TCP数据负载的结构示意图。在DoIP现有协议约定中,无论是单点的一对一通信,还是一对多的通信,都统一使用TCP方式进行。The TCP header (TCP Header) field is generally composed of 20 bytes. In special cases, there will be an optional (Option) field. After the TCP header is the TCP data payload (data), as shown in Figure 5. The TCP data payload Schematic. In the existing protocol convention of DoIP, whether it is single-point one-to-one communication or one-to-many communication, TCP is used uniformly.
UDP头(UDP Header)由固定8字节组成,其结构如图6所示。由于TCP协议本身就是为一对一通信设计的,不支持组播方式;而UDP支持组播方式。因此在使用组播方式进行一对多的通信时,需要使用UDP,按照UDP头的格式封装数据包。The UDP header (UDP Header) consists of fixed 8 bytes, and its structure is shown in Figure 6. Since the TCP protocol itself is designed for one-to-one communication, it does not support multicast; while UDP supports multicast. Therefore, when using multicast for one-to-many communication, it is necessary to use UDP to encapsulate data packets in the format of the UDP header.
IP层外部测试设备式由单播变为组播后,客户端在处理功能寻址发送时,只需要处理一次,发送一份数据包即可,不再需要像单播模式时,给每一个目标节点单独发送一份数据。如图7、8所示,采用组播模式后,外部测试设备的处理时间,整体通信的时间,以及系统带宽的占用都将得到改善。After the IP layer external test equipment is changed from unicast to multicast, the client only needs to process it once and send a data packet when processing function addressing transmission. The target node sends a separate copy of the data. As shown in Figures 7 and 8, after the multicast mode is adopted, the processing time of the external test equipment, the overall communication time, and the occupation of the system bandwidth will be improved.
最后,服务器接收功能寻址诊断报文后,进行诊断处理。Finally, after receiving the functional addressing diagnostic message, the server performs diagnostic processing.
如图9所示,服务器接收到功能寻址诊断报文后的处理机制如下:As shown in Figure 9, the processing mechanism after the server receives the functional addressing diagnostic message is as follows:
(a)服务器(ECU)判断诊断报文中的外部测试设备的逻辑地址信息是否注册,注册过程见图1。如果没有注册,则服务器(ECU)向外部测试设备返回失败响应码,然后关闭当前的TCP连接;如果有注册,则进入下一步。(a) The server (ECU) judges whether the logical address information of the external test equipment in the diagnostic message is registered. The registration process is shown in Figure 1. If there is no registration, the server (ECU) returns a failure response code to the external test device, and then closes the current TCP connection; if there is registration, go to the next step.
(b)服务器(ECU)判断诊断报文中的功能组地址是否是自己支持的,服务器所属的功能地址组是预先设置好的,特定的服务器只接收自己所属的功能地址组的报文。如果功能组地址未知,则服务器(ECU)向外部测试设备返回失败响应码;如果功能组地址已知,则进入下一步。(b) The server (ECU) judges whether the functional group address in the diagnostic message is supported by itself. The functional address group to which the server belongs is preset, and a specific server only receives messages from the functional address group to which it belongs. If the function group address is unknown, the server (ECU) returns a failure response code to the external test equipment; if the function group address is known, go to the next step.
(c)服务器端(ECU)向外部测试设备返回成功响应码,并将诊断的相关数据发给对应的诊断处理模块进行下一步的处理。(c) The server side (ECU) returns a successful response code to the external test equipment, and sends the relevant data of the diagnosis to the corresponding diagnosis processing module for further processing.
其中,客户端逻辑地址是在访问权限鉴权(路由激活)流程中首先被注册的。只有获得了服务器访问权限的客户端发出的功能寻址模式的组播包才会被服务器接收。The client logical address is first registered in the access authority authentication (route activation) process. Only the multicast packets in the functional addressing mode sent by the client that has access to the server will be received by the server.
服务器所属的功能地址组是预先设置好的,特定的服务器只接收自己所属的功能地址组的报文。The functional address group to which the server belongs is preset, and a specific server only receives the packets of the functional address group to which it belongs.
说明书中的缩略语主要如下所示:The abbreviations in the manual are mainly as follows:
表3缩略语Table 3 Abbreviations
本发明使用以太网IP层/MAC层组播、广播方式,实现汽车诊断通信的功能寻址模式。本发明具体通过采用功能地址与IP地址映射表,并利用TCP与路由激活的限制权限访问机制以及改进的以太网组播机制,采用组播模式,既满足了汽车诊断业务的安全需求,同时能够实现汽车以太网功能寻址模式的一对多通信模式,外部测试设备的处理时间、整体通信的时间、以及系统带宽的占用都得到很好地改善。The invention uses Ethernet IP layer/MAC layer multicast and broadcast mode to realize the function addressing mode of vehicle diagnosis communication. Specifically, the present invention adopts the function address and IP address mapping table, utilizes the restricted authority access mechanism activated by TCP and routing, and the improved Ethernet multicast mechanism, and adopts the multicast mode, which not only satisfies the safety requirements of the automobile diagnosis service, but also can Implementing the one-to-many communication mode of the automotive Ethernet function addressing mode, the processing time of external test equipment, the time of overall communication, and the occupation of system bandwidth are all well improved.
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910468802.8A CN110311992B (en) | 2019-05-31 | 2019-05-31 | Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet |
PCT/CN2020/075781 WO2020238291A1 (en) | 2019-05-31 | 2020-02-18 | Automobile ethernet-based unified diagnostic service functional addressing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910468802.8A CN110311992B (en) | 2019-05-31 | 2019-05-31 | Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110311992A CN110311992A (en) | 2019-10-08 |
CN110311992B true CN110311992B (en) | 2020-07-03 |
Family
ID=68075586
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910468802.8A Active CN110311992B (en) | 2019-05-31 | 2019-05-31 | Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110311992B (en) |
WO (1) | WO2020238291A1 (en) |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110311992B (en) * | 2019-05-31 | 2020-07-03 | 上海赫千电子科技有限公司 | Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet |
CN110913006B (en) * | 2019-11-29 | 2022-08-19 | 深圳市元征科技股份有限公司 | Remote diagnosis method and system |
CN111404794B (en) * | 2020-03-12 | 2021-11-16 | 超越科技股份有限公司 | CAN bus network sharing system and method based on virtualization |
CN111367746A (en) * | 2020-03-16 | 2020-07-03 | 纳瓦电子(上海)有限公司 | Test method of wireless whole machine |
CN112230577A (en) * | 2020-04-07 | 2021-01-15 | 张根兵 | Control delay optimization method for electric drive vehicle applying traversal cycle and electronic equipment |
CN113821534A (en) * | 2020-06-19 | 2021-12-21 | 北京新能源汽车股份有限公司 | A vehicle information query method, device and diagnostic instrument |
CN112783549A (en) * | 2021-01-08 | 2021-05-11 | 东风汽车股份有限公司 | Method for upgrading data version number of automobile electric control element |
CN112764410B (en) * | 2021-01-19 | 2023-03-31 | 广州橙行智动汽车科技有限公司 | Vehicle-mounted controller testing device, system and method |
CN113179195A (en) * | 2021-04-28 | 2021-07-27 | 重庆长安汽车股份有限公司 | CAN message embedded point detection method, system, device and computer readable storage medium |
CN113485920B (en) * | 2021-07-01 | 2024-02-02 | 中瓴智行(成都)科技有限公司 | Method and device for realizing DoIP entity, readable storage medium and electronic equipment |
CN114397871B (en) * | 2021-12-24 | 2023-10-20 | 中车大连电力牵引研发中心有限公司 | Train network communication test system based on 5G |
CN114756585B (en) * | 2022-03-23 | 2025-02-18 | 深圳市元征科技股份有限公司 | Vehicle data acquisition method, device, electronic device and storage medium |
CN114815782A (en) * | 2022-05-19 | 2022-07-29 | 深圳市元征科技股份有限公司 | Remote diagnosis method, apparatus, equipment and medium |
CN115065699B (en) * | 2022-06-08 | 2024-06-07 | 深圳市元征科技股份有限公司 | Routing activation method, device, equipment and medium based on remote diagnosis |
CN115250287B (en) * | 2022-06-23 | 2023-08-04 | 重庆长安汽车股份有限公司 | Automatic adaptation method based on DDS multiple ports |
CN115685971A (en) * | 2022-11-08 | 2023-02-03 | 上海汽车集团股份有限公司 | Vehicle diagnosis method and related device |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1668024A (en) * | 2004-03-10 | 2005-09-14 | 华为技术有限公司 | A method for data transmission between GPRS network terminal and IP network equipment |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6816479B1 (en) * | 1999-10-21 | 2004-11-09 | International Business Machines Corporation | Method and system for pre-loading in an NBBS network the local directory database of network nodes with the location of the more frequently requested resources |
DE102013217259A1 (en) * | 2013-08-29 | 2015-03-05 | Bayerische Motoren Werke Aktiengesellschaft | Mode switching of a controller between diagnostic bus and external Ethernet connection |
CN105530614B (en) * | 2014-09-30 | 2019-03-22 | 中兴通讯股份有限公司 | Group addressing processing method, device, MTC Interworking gateway and API GW |
CN107707418B (en) * | 2016-08-09 | 2021-06-15 | 上汽通用汽车有限公司 | Communication diagnosis system and communication diagnosis refreshing method |
CN106549844B (en) * | 2016-11-02 | 2019-05-14 | 中国第一汽车股份有限公司 | A kind of MOST-CAN gateway and the diagnosis packet routing method based on the gateway |
CN107370839A (en) * | 2017-06-29 | 2017-11-21 | 北京东土科技股份有限公司 | The addressing method and relevant apparatus of industrial field device, system |
KR102320043B1 (en) * | 2017-09-13 | 2021-11-01 | 현대자동차주식회사 | Failure diagnosis apparatus and method for in-vehicle control unit |
CN107765676A (en) * | 2017-11-01 | 2018-03-06 | 河北工业大学 | A kind of onboard diagnostic system and its method based on Ethernet |
CN110311992B (en) * | 2019-05-31 | 2020-07-03 | 上海赫千电子科技有限公司 | Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet |
-
2019
- 2019-05-31 CN CN201910468802.8A patent/CN110311992B/en active Active
-
2020
- 2020-02-18 WO PCT/CN2020/075781 patent/WO2020238291A1/en active Application Filing
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1668024A (en) * | 2004-03-10 | 2005-09-14 | 华为技术有限公司 | A method for data transmission between GPRS network terminal and IP network equipment |
Non-Patent Citations (1)
Title |
---|
IP Multicast over Token-Ring Local Area Networks;T. Pusateri等;《RFC 1469》;19930630;全文 * |
Also Published As
Publication number | Publication date |
---|---|
WO2020238291A1 (en) | 2020-12-03 |
CN110311992A (en) | 2019-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110311992B (en) | Functional Addressing Method for Unified Diagnostic Service of Automotive Ethernet | |
EP3526929B1 (en) | Enabling multicast for m2m service layer group operation | |
JP2022517176A (en) | Methods and equipment to support local area networks (LANs) | |
US7606227B2 (en) | Method, apparatus and system for distributing multicast data | |
CN101442502B (en) | Session monitoring method, device and system based on multicast technology | |
US20200059976A1 (en) | IoT DEVICE CONNECTIVITY, DISCOVERY, AND NETWORKING | |
CN111526553B (en) | Method for executing UE, method for executing SMF entity and SMF entity | |
WO2015003566A1 (en) | Method, device and system for transmitting packet in multicast domain name system | |
US20230106171A1 (en) | Method of and Devices for Supporting Selective Forwarding of Messages in a Network of Communicatively Coupled Communication Devices | |
CN111556539B (en) | Method for executing UE, method for executing SMF entity and SMF entity | |
US20070214241A1 (en) | Method and system for remote access to universal plug and play devices | |
JP5653912B2 (en) | Method and apparatus for multicast group management | |
JP2010527518A (en) | Wireless multicast proxy | |
US20120002583A1 (en) | Method and apparatus for generating group service flow in a mobile communication system | |
WO2009039719A1 (en) | A user identifier server, a system and method for processing the data service | |
US20140160990A1 (en) | Mechanisms for Quality of Service to Over the Top Applications for Use in Commercial Wireless Networks | |
US20200137173A1 (en) | USER BASED mDNS SERVICE DISCOVERY | |
CN114885443B (en) | Multi-mode network control system and method supporting mobile access of terminal | |
WO2015003393A1 (en) | Message processing method and device | |
CN114385314A (en) | Internet of things equipment data migration system, method and device and storage medium | |
CN101060465B (en) | Controlling method and system for multicast data transmission | |
WO2009021424A1 (en) | A device and method for handling messages | |
WO2009124444A1 (en) | Method and apparatus for processing the arp request message | |
CN104955153A (en) | Method, device and appliances for discovering resources | |
WO2013026299A1 (en) | Address resolution method and device, and information transmission method |
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 | ||
CP03 | Change of name, title or address | ||
CP03 | Change of name, title or address |
Address after: Room 403, block a, 1018 dongsanliqiao Road, Pudong New Area, Shanghai 200125 Patentee after: Heqian Automotive Technology (Shenzhen) Co.,Ltd. Country or region after: China Address before: Room 403, block a, 1018 dongsanliqiao Road, Pudong New Area, Shanghai 200125 Patentee before: SHANGHAI HINGE ELECTRONIC TECHNOLOGIES Co.,Ltd. Country or region before: China |