A network connection diagnosis method, a control node and a storage medium
By transmitting and parsing message identification information between various control nodes in an Ethernet network, node diagnostic data is generated, solving the problem of difficult network connectivity checks under complex network configurations and achieving efficient and complete network connectivity diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING CHANGAN TECH CO LTD
- Filing Date
- 2023-07-31
- Publication Date
- 2026-07-24
AI Technical Summary
The complex configuration of in-vehicle Ethernet networks makes network connectivity checks difficult, requiring a significant amount of effort to perform network connection tests to ensure correct configuration.
By transmitting messages carrying message identification information between various control nodes in the Ethernet network, the message information is determined, and node diagnostic data is generated based on this information. Finally, the master control node determines the network connection diagnostic results, ensuring that the connectivity of all control nodes is diagnosed.
It improves the efficiency and completeness of network connectivity diagnostics, reduces data storage redundancy, and ensures rapid triggering and accuracy of network connectivity.
Smart Images

Figure CN116866223B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network connectivity technology, and specifically to a network connectivity diagnostic method, a control node, and a storage medium. Background Technology
[0002] With the rapid development of automotive electrification and communication technologies, automotive intelligence and connectivity are also rapidly becoming widespread. Ethernet, with its advantages of high bandwidth, protocol diversity, and mature applications, is being gradually adopted as the backbone of in-vehicle communication. In-vehicle Ethernet networks employ complex configurations to provide diverse network services while ensuring network reliability, such as Virtual Local Area Network (VLAN) isolation and fault redundancy mechanisms. This complex network configuration makes checking network connectivity more difficult, requiring more effort to test network connections to ensure correct configuration. Therefore, quickly diagnosing in-vehicle Ethernet network connections is particularly important. Summary of the Invention
[0003] One objective of this invention is to provide a network connectivity diagnosis method to solve the problem of difficult network connectivity checks caused by complex network configurations in the prior art; another objective is to provide a control node.
[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0005] A network connectivity diagnostic method is characterized by being applied to a control node, wherein the control node is any node in an Ethernet network. The method includes: upon receiving a first message carrying first message identifier information sent by another control node in the Ethernet network, determining the message information of the first message; wherein the other control node is a control node having a unicast or multicast relationship with the control node; determining node diagnostic data corresponding to the control node based on the message information, and sending the node diagnostic data to a master control node in the Ethernet network, so that the master control node can determine the network connectivity diagnostic result of the Ethernet network based on the node diagnostic data.
[0006] Based on the above technical means, the network connection between each control node is diagnosed by analyzing the message reception status of each control node in the Ethernet network, thereby obtaining the network connection diagnosis results of the Ethernet network and improving the efficiency of network connection diagnosis.
[0007] Furthermore, the control node is the master control node. Before determining the message information of the first message when receiving a first message carrying first message identifier information sent by other control nodes in the Ethernet network, the method further includes: when receiving a network connection diagnostic request for the Ethernet network, sending a second message carrying second message identifier information to the slave control nodes in the Ethernet network, and sending a third message carrying first message identifier information to the other control nodes.
[0008] Based on the above technical means, only the master control node sends a network connection diagnosis request for the Ethernet network, so that the master control node sends a second message to all slave control nodes in the Ethernet network to trigger the connection diagnosis of the slave control nodes. This improves the speed of network connection triggering. In addition, since it is necessary to know the network connectivity between each control node, that is, the master control node also needs to send messages to other control nodes with which it has unicast or multicast relationships to ensure the integrity of network connection diagnosis.
[0009] Furthermore, since the control node is the slave control node, before determining the message information of the first message when receiving a first message carrying first message identifier information sent by another control node in the Ethernet network, the method further includes: when receiving the third message carrying second message identifier information sent by the master control node, sending a fourth message carrying the first message identifier information to the other control nodes.
[0010] Based on the above technical means, all slave control nodes in the Ethernet network can receive a message carrying the first message identifier information, which can trigger the sending of messages to other control nodes with which they have unicast or multicast relationships, thereby ensuring that the connectivity of each control node is diagnosed.
[0011] Furthermore, the destination medium access control address carried in the first message is a unicast destination medium access control address. Determining the message information of the first message includes: determining the source medium access control address carried in the first message as first source medium access control information; determining the target medium access control address carried in the first message as first destination medium access control information; determining the mask corresponding to the virtual local area network (VLAN) identifier carried in the first message from the preset VLAN identifier-mask correspondence as VLAN mask information; and determining the first source medium access control information, the first destination medium access control information, and the VLAN mask information as the message information.
[0012] Based on the above technical means, the first message received by a control node from a control node with which it has a unicast relationship can be recorded, thus demonstrating the unidirectional connectivity between the two control nodes under the unicast relationship.
[0013] Furthermore, the destination medium access control address carried in the first message is a multicast destination medium access control address. Determining the message information of the first message includes: determining the medium access control address carried in the first message as second source medium access control information; converting the destination medium access control address carried in the first message into second destination medium access control information according to the data interface receiving the first message; determining the mask corresponding to the destination medium access control address carried in the first message from the preset multicast medium access control address-mask correspondence as multicast medium access control mask information; and determining the second source medium access control information, the second destination medium access control information, and the multicast medium access control mask information as the message information.
[0014] Based on the above technical means, the first message received by a control node from a control node with which it has a multicast relationship can be recorded, thus demonstrating the unidirectional connectivity between the two control nodes under the multicast relationship.
[0015] Furthermore, the node diagnostic data includes multiple diagnostic data entries, each of which includes source media access control (Media Access Control) bits, destination media access control (Media Access Control) bits, and virtual local area network (VLAN) mask bits. Determining the node diagnostic data corresponding to the control node based on the message information includes: if, in the case that there is first diagnostic data corresponding to the first source media access control (Media Access Control) information and the first destination media access control (Media Access Control) information included in the message information, updating the VLAN mask information stored in the VLAN mask information bits of the first diagnostic data using the VLAN mask information included in the message information.
[0016] Based on the above technical means, the control node will record the message information of each control node in the other control nodes under the unicast relationship it receives, and only one diagnostic data will be recorded for the same source medium access control information and destination medium access control information. The unidirectional connectivity of the virtual local area network identifier under unicast is judged by the virtual local area network mask information, which reduces the redundancy of data storage.
[0017] Furthermore, each diagnostic data entry also includes a multicast media access control (MACC) mask information bit. The step of determining the node diagnostic data corresponding to the control node based on the message information includes: when there is second diagnostic data corresponding to the second source MACC information and the second destination MACC information included in the message information among the multiple diagnostic data entries, updating the multicast MACC mask information stored in the multicast MACC mask information bit in the second diagnostic data using the multicast MACC mask information included in the message information.
[0018] Based on the above technical means, the control node will record the message information of each control node in the other control nodes under the unicast relationship it receives, and only one diagnostic data will be recorded for the same source medium access control information and destination medium access control information. The unidirectional connectivity under multicast is judged by the multicast medium access control mask information, which reduces the redundancy of data storage.
[0019] The beneficial effects of this invention are:
[0020] (1) The present invention diagnoses the network connection between each control node by the message reception status of each control node in the Ethernet network, so as to obtain the network connection diagnosis result of the Ethernet network, thereby improving the efficiency of network connection diagnosis.
[0021] (2) The present invention triggers network connection diagnosis of slave control nodes through master control node, which can ensure that the connectivity of each control node is diagnosed, so as to ensure the integrity of network connection diagnosis.
[0022] (3) In this invention, a diagnostic data record is used at each control node to record the unidirectional connectivity between the same source medium access control information and the destination medium access control information under unicast and multicast relationships, which reduces the redundancy of data storage and improves the efficiency of data transmission. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating a network connectivity diagnosis method provided in an embodiment of the present invention.
[0024] Figure 2 A schematic diagram of an exemplary Ethernet protocol provided for an embodiment of the present invention;
[0025] Figure 3 A schematic diagram of an exemplary process for determining message information provided in an embodiment of the present invention. Figure 1 ;
[0026] Figure 4 A schematic diagram of an exemplary process for determining message information provided in an embodiment of the present invention. Figure 2 ;
[0027] Figure 5 A flowchart illustrating an exemplary network connectivity diagnosis method provided in an embodiment of the present invention;
[0028] Figure 6 A schematic diagram of the structure of a control node provided in an embodiment of the present invention. Figure 1 ;
[0029] Figure 7 A schematic diagram of the structure of a control node provided in an embodiment of the present invention. Figure 2 . Detailed Implementation
[0030] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0031] This invention provides a network connectivity diagnostic method, implemented by a control node, which can be any node in an Ethernet network. Data transmission between control nodes in the Ethernet network is based on a preset Ethernet protocol, such as... Figure 1 As shown, the process includes the following steps S101 to S102:
[0032] Step S101: Upon receiving a first message carrying first message identifier information sent by other control nodes in the Ethernet network, determine the message information of the first message; the other control nodes are control nodes that have unicast or multicast relationships with the control node.
[0033] In embodiments of the present invention, the control node can be a controller on a vehicle. For example, the control node can be an engine controller, steering wheel controller, brake controller, headlight controller, or other vehicle-mounted controller. Data transmission between the various control nodes is based on a preset Ethernet protocol. That is, during the vehicle Ethernet network diagnostic process, an Ethernet protocol is defined. This preset Ethernet protocol type must be different from common Ethernet protocol types, such as 0x8888, and a communication data exchange format is also specified to ensure that the control nodes in the vehicle Ethernet network can correctly interpret the received message content.
[0034] For example, the default Ethernet protocol interacts based on Ethernet Layer 2, and the protocol message format is as follows: Figure 2As shown, the Ethernet protocol includes an Ethernet header and Ethernet data. The Ethernet header includes: the destination Media Access Control (MAC) address, the source MAC address, and the Ethernet protocol. The destination MAC address is the MAC address from which the data packet is sent, occupying 6 bytes; the source MAC address is the MAC address from which the data packet is sent, occupying 6 bytes; the Ethernet protocol, i.e., the Ethernet protocol type, occupies 2 bytes for packets without VLANs, and 6 bytes for packets with VLANs, including a VLAN header. This field needs to be customized according to requirements (e.g., 0x8888) and should differ from common Ethernet protocol types to facilitate custom protocol stack processing. The Ethernet data contains diagnostic protocol messages.
[0035] like Figure 2 As shown, the diagnostic protocol message includes a diagnostic protocol header and diagnostic protocol data. The diagnostic protocol header includes the destination MAC address, the Virtual LAN ID (VLAN ID), and the FLAG flag. The destination MAC address of the data packet is used for recording MAC information and occupies 6 bytes; the VLAN information transmitted in the data packet is used for recording VLAN information and occupies 2 bytes; the FLAG flag stores message flag information to tell the receiver the operation to be performed and occupies 1 byte. See Table 1 for an example of the relationship between message flag information and corresponding operations.
[0036] Table 1
[0037]
[0038] When the FLAG flag is 00 (first message flag information), it indicates that the first message is a normal message. At this time, the control node needs to record the received message MAC and VLAN information (message information), that is, determine the message information based on the first message.
[0039] It should be noted that the unicast or multicast relationships between the various control nodes within the Ethernet are all pre-configured.
[0040] Step S102: Determine the node diagnostic data corresponding to the control node based on the message information, and send the node diagnostic data to the master control node in the Ethernet network so that the master control node can determine the network connection diagnostic result of the Ethernet network based on the node diagnostic data.
[0041] In an embodiment of the present invention, after determining the message information, the control node will determine the node diagnostic data corresponding to the control node based on the message information.
[0042] In embodiments of the present invention, the diagnostic protocol data included in the diagnostic protocol message will only contain data content (node diagnostic data) in the reply message, i.e., when the flag bit in the message is 03; otherwise, it should be left empty. For example... Figure 2 As shown, the diagnostic protocol data contains multiple MAC and VLAN information, representing the different VLANs, different MAC addresses, and different multicast MAC addresses recorded by the control node.
[0043] In an embodiment of the present invention, when the control node receives a request reply message with the FLAG flag set to 02, it will send node diagnostic data to the requesting node (master control node). The master control node will determine the network connection diagnostic result of the Ethernet network based on the node diagnostic data.
[0044] Compared to existing technologies, this invention diagnoses the network connection between control nodes by analyzing the message reception status of each control node in the Ethernet network, thereby obtaining the network connection diagnosis results of the Ethernet network and improving the efficiency of network connection diagnosis.
[0045] In some embodiments, if the control node is the master control node, before executing step S101, the control node may also perform the following steps: upon receiving a network connection diagnostic request for the Ethernet network, sending a second message carrying second message identifier information to the slave control nodes in the Ethernet network, and sending a third message carrying first message identifier information to other control nodes.
[0046] In embodiments of the present invention, any control node in the Ethernet network may receive a network connection diagnostic request. However, during a single network diagnostic process, only one control node in the Ethernet network can receive the network connection diagnostic request. This control node that receives the network connection diagnostic request is the master control node. The master control node will send a second message carrying second message flag information to the slave control nodes in the Ethernet network. The second message flag information is the FLAG flag bit 01 in Table 1, indicating a second message request message. This message requires the slave control nodes that receive it to send normal messages to other control nodes to perform network connection diagnostics for the corresponding control nodes.
[0047] In an embodiment of the present invention, the master control node also needs to send a message to other control nodes with which it has a unicast or multicast relationship, carrying the first message flag information as FLAG flag bit 00 in Table 1, in order to diagnose the unidirectional connectivity of unicast or multicast from the master control node as the source MAC address to other control nodes.
[0048] In an embodiment of the present invention, the sending of a second message carrying a second message identifier information from the master control node to the slave control node in the Ethernet network is a unicast data transmission performed by the master control node based on a preset virtual local area network identifier. The preset virtual local area network identifier is a virtual local area network supported by any control node in the Ethernet network, and the data transmission is performed in a unicast manner, which can effectively prevent the slave control node's message sending action from being triggered multiple times.
[0049] In some embodiments, if the control node is a slave control node, before executing step S101, the control node may also execute the following steps: upon receiving a third message carrying second message flag information sent by the master control node, send a fourth message carrying first message flag information to other control nodes.
[0050] In an embodiment of the present invention, if the control node is a slave control node, when the Ethernet network needs to perform network connection diagnosis, the slave control node will receive a third message carrying second message flag information sent by the master control node. The second message flag information is FLAG flag bit 01 in Table 1, which triggers the slave control node to send a fourth message carrying first message flag information to other control nodes. The first message flag information is FLAG flag bit 00 in Table 1.
[0051] In some embodiments, if the destination medium access control address carried by the first message is a unicast destination medium access control address, the control node may include the following steps S301 to S304 when executing step S101:
[0052] Step S301: Determine the source media access control address carried in the first message as the first source media access control information.
[0053] In an embodiment of the present invention, the control node directly determines the source MAC address carried in the first message as the first source media access control information.
[0054] Step S302: Determine the target media access control address carried in the first message as the first destination media access control information.
[0055] In an embodiment of the present invention, if the destination medium access control address carried by the first message is a unicast destination medium access control address, it means that there is only one receiver. In this case, the destination medium access control address carried by it can be directly determined as the first destination medium access control information.
[0056] Step S303: Determine the mask corresponding to the virtual LAN identifier carried in the first message from the preset virtual LAN identifier-mask correspondence relationship as the virtual LAN mask information.
[0057] In an embodiment of the present invention, if the destination medium access control address carried by the first message is a unicast destination medium access control address, then it is only necessary to record the virtual local area network (VLAN) mask information corresponding to the VLAN identifier carried by the message to know which VLAN has unidirectional connectivity in the unicast case.
[0058] For example, the VLAN mask information uses 2 bytes to store 8 VLAN information, with each VLAN information represented by 1 bit. In this way, 2 bytes can be used to represent 8 different VLANs between two nodes. The correspondence is shown in Table 2. Here, only 8 different VLANs are shown as an example. Of course, the number of VLANs can be more or less. The specific number of VLANs needs to be determined according to the actual vehicle network configuration. In this regard, the present invention does not limit it.
[0059] Table 2
[0060] 0B00000001 0 0B00000010 1 0B00000100 2 0B00001000 3 0B00010000 4 0B00100000 5 0B01000000 6 0B10000000 7
[0061] As shown in Table 2, the VLAN MASK uses 2 bytes to store 8 VLAN information, with each VLAN information represented by 1 bit.
[0062] Step S304: Determine the first source media access control information, the first destination media access control information, and the virtual local area network mask information as message information.
[0063] In an embodiment of the present invention, the control node determines the first source medium access control information, the first destination medium access control information, and the virtual local area network mask information as message information.
[0064] In some embodiments, if the destination medium access control address carried by the first message is a multicast destination medium access control address, the control node may include the following steps S401 to S404 when executing step S101:
[0065] Step S401: Determine the media access control address carried in the first message as the second source media access control information.
[0066] In an embodiment of the present invention, the control node directly determines the source MAC address carried in the first message as the second source media access control information.
[0067] Step S402: Based on the data interface for receiving the first message, convert the destination medium access control address carried in the first message into second destination medium access control information.
[0068] In an embodiment of the present invention, if the destination medium access control address carried by the first message is a multicast destination medium access control address, it indicates that there are multiple receivers. At this time, the destination medium access control address is not the medium access control address of the current control node. It is necessary to convert the destination medium access control address carried by the first message into the second destination medium access control information according to the data interface through which the current control node receives the first message.
[0069] Step S403: Determine the mask corresponding to the destination media access control address carried in the first message from the preset multicast media access control address and mask correspondence relationship as the multicast media access control mask information.
[0070] In an embodiment of the present invention, if the destination medium access control address carried by the first message is a multicast destination medium access control address, then it is only necessary to record the multicast medium access control mask information corresponding to the multicast medium access control address carried by it to know the unidirectional connectivity of the current control node under the multicast relationship.
[0071] For example, the multicast media access control mask information MAC MASK uses 2 bytes to store 8 multicast MAC information, with each multicast MAC information represented by 1 bit. In this way, a maximum of 2 bytes can be used to represent that 8 multicast MAC addresses can be received between two nodes. The correspondence is shown in Table 3. Here, only 8 multicast MAC addresses are used as an example. Of course, the number of multicast MAC addresses can be more or less. The specific number of multicast MAC addresses needs to be determined according to the actual vehicle network configuration. In this regard, the present invention does not limit it.
[0072] Table 3
[0073] 0B00000001 01:00:11:11:00:01 0B00000010 01:00:11:11:00:02 0B00000100 01:00:11:11:00:03 0B00001000 01:00:11:11:00:04 0B00010000 01:00:11:11:00:05 0B00100000 01:00:11:11:00:06 0B01000000 01:00:11:11:00:07 0B10000000 01:00:11:11:00:08
[0074] As shown in Table 3, the multicast MAC MASK uses 2 bytes to store 8 multicast MAC addresses, with each multicast MAC address represented by 1 bit.
[0075] Step S404: Determine the second source media access control information, the second destination media access control information, and the multicast media access control mask information as message information.
[0076] In an embodiment of the present invention, the control node determines the second source media access control information, the second destination media access control information, and the multicast media access control mask information as message information.
[0077] In some embodiments, the node diagnostic data includes multiple diagnostic data entries, each of which includes source media access control information bits, destination media access control information bits, and virtual local area network (VLAN) mask information bits. When the control node determines the node diagnostic data corresponding to the control node based on the message information in the above step S102, it includes: if there is a first diagnostic data entry corresponding to the first source media access control information and the first destination media access control information included in the message information among the multiple diagnostic data entries, updating the VLAN mask information stored in the VLAN mask information bits of the first diagnostic data entry using the VLAN mask information included in the message information.
[0078] like Figure 2 As shown, the diagnostic protocol data includes multiple MAC and VLAN information entries. However, there is only one diagnostic data entry for the same source and destination media access control information. For example, if control node A receives a unicast message with VLAN identifier 5 sent by control node B, and there is already a record that control node A is the data receiver (i.e., the target media access control information is the media access control information of control node A) and control node B is the data sender (i.e., the source media access control information is the media access control information of control node A) (first diagnostic data), then it is only necessary to update the VLAN mask information stored in the VLAN mask information bit of the first diagnostic data.
[0079] In some embodiments, each diagnostic data entry further includes a multicast media access control mask information bit. When the control node determines the node diagnostic data corresponding to the control node based on the message information in the above step S102, it includes: when there is a second diagnostic data corresponding to the second source media access control information and the second destination media access control information included in the message information among multiple diagnostic data entries, updating the multicast media access control mask information stored in the multicast media access control mask information bit in the second diagnostic data using the multicast media access control mask information included in the message information.
[0080] For example, if control node A receives a multicast message sent by control node B, and there is already a record that control node A is the data receiver (i.e., the target medium access control information is the medium access control information of control node A) and control node B is the data sender (i.e., the source medium access control information is the medium access control information of control node A) (second diagnostic data), then it is only necessary to update the multicast medium access control mask information stored in the multicast medium access control mask information bit in the first diagnostic data.
[0081] In embodiments of the present invention, each time a control node receives a data packet of a preset Ethernet protocol, it parses the packet's flag. When the packet flag is 00 or 01, it records the packet information, including the destination MAC address information in the data packet header, the source MAC address information in the Ethernet header, and the VLAN MASK information converted according to the destination MAC address. If the destination MAC address information and the source MAC address information already exist, the VLAN information is converted into a VLAN MASK and then ORed with the existing VLAN MASK to generate new VLAN MASK information. When the received destination MAC is a multicast MAC, the destination MAC address information is replaced according to the interface of the received packet, and the multicast MAC is converted into a multicast MAC MASK. The converted MAC information is recorded. Simultaneously, the VLAN MASK and the multicast MAC MASK are ORed with the already recorded VLAN MASK and multicast MAC MASK and then recorded. Finally, each node (control node) records multiple structures such as... Figure 2 The information shown indicates that when a data packet with FLAG 2 is received, all recorded information is replied to using a unicast data packet with FLAG 3.
[0082] In an embodiment of the present invention, diagnostic unicast messages between the two control nodes only record the mask information corresponding to the virtual LAN identifier, and for multicast messages, only the mask information corresponding to the multicast medium access control address is recorded. Thus, only one diagnostic data point is needed to characterize the message received by control node A regarding control node B.
[0083] Figure 5 This is a schematic diagram illustrating an exemplary network connectivity diagnostic process provided in an embodiment of the present invention. Figure 5 As shown, the implementation method of network connectivity diagnosis by the control node includes the following steps S501 to S508:
[0084] Step S501: Send unicast and multicast with different VLANs, FLAG 00.
[0085] Here, after receiving the trigger command (a network connection diagnostic request for the Ethernet network), the master node (control node) begins the Ethernet diagnostic process, sending diagnostic messages of private Ethernet type (preset Ethernet protocol) with different VLAN IDs (unicast and multicast) to other control nodes. The destination MAC address in the header of the diagnostic protocol is either the unicast destination MAC address or the multicast MAC address (e.g., ...). Figure 2 As shown in the figure, the VLAN ID is the VLAN ID carried in the data. FLAG is 00, which means that the receiving node (control node) only needs to record the received message information after receiving it, and no other processing is required. The diagnostic protocol content is empty.
[0086] Step S502: Record the VLAN MAC multicast MAC information of the received packet.
[0087] Here, other slave nodes receive diagnostic messages with a 00 header FLAG, recording the destination MAC address and source MAC address. If the destination MAC address is multicast or broadcast, the destination MAC address needs to be converted according to the slave node's receiving interface, and the VLAN and multicast MAC addresses need to be converted into 2-byte VLAN MASK and multicast MAC MASK representations (see the correspondence in Tables 2 and 3), and then processed according to... Figure 2 Record it in the following way.
[0088] Step S503: Record the VLAN MAC multicast MAC information of the received packet.
[0089] Here, the master node sends a diagnostic unicast message with the specified VLAN ID X. The destination MAC address in the diagnostic protocol header is the unicast destination MAC address, the VLAN ID is the VLAN ID carried in the data, and the FLAG is 01, indicating that the receiving node needs to send the message to all nodes in the vehicular network except itself after receiving it. The diagnostic protocol content is empty. To prevent the slave node's message sending action from being triggered multiple times, it is only sent with a specified VLAN ID. The specific VLAN ID selection needs to be supported by all nodes. Both the S506 request and S507 reply messages are sent with this VLAN ID X.
[0090] Step S504: Send unicast and multicast with different VLANs, FLAG 00.
[0091] Here, the control node sends diagnostic messages of private Ethernet type with different VLAN IDs in unicast and multicast. The destination MAC address in the header of the diagnostic protocol is either the unicast destination MAC address or the multicast MAC address, the VLAN ID is the VLAN ID carried in the data, and FLAG is 00, indicating that the receiving node only needs to record the received message information after receiving it and does not need to perform any other processing. The diagnostic protocol content is empty.
[0092] Step S505: Record the VLAN MAC multicast MAC information of the received packet.
[0093] Here, all nodes (control nodes) receiving diagnostic messages with a FLAG of 00 in the header need to record the destination MAC address and source MAC address. They also need to convert the VLAN ID and multicast MAC address according to S102 before storing the record. Finally, each node will... Figure 2 The format shown records information about the node itself and other nodes (node diagnostic information).
[0094] Step S506: Send unicast data carrying VLAN X, FLAG 02.
[0095] Here, the master node sends a diagnostic message with the specified VLAN ID X diagnostic unicast. The destination MAC address in the header of the diagnostic protocol is the unicast destination MAC address, the VLAN ID is the VLAN ID carried in the data, and FLAG is 02, indicating that the receiving node needs to reply with the recorded information after receiving it. The diagnostic protocol content is empty.
[0096] Step S507: Carry the VLAN X reply record information, FLAG 03.
[0097] Here, all other slave nodes receive and send a diagnostic message with the specified VLAN ID X diagnostic unicast. The destination MAC address in the diagnostic protocol header is the unicast destination MAC address, the VLAN ID is the VLAN ID carried in the data, and FLAG 03 indicates the recorded information in the reply. The diagnostic protocol content is the MAC VLAN multicast MAC information that the current node has recorded. The content of the dispute consists of multiple... Figure 1 The data segments are composed of the format shown.
[0098] Step S508: Organize the received response messages, analyze them, and output the diagnostic results.
[0099] Here, after receiving the reply message, the master node parses the diagnostic protocol content according to the diagnostic information record format diagram and converts the VLAN MASK and multicast MAC MASK into VLAN ID and multicast MAC address, thereby obtaining the message reception status of each node for different VLANs and different multicasts, thus determining the vehicle Ethernet connection status and completing the vehicle Ethernet network diagnosis.
[0100] This invention provides a network connectivity diagnostic method. The control node is any node in an Ethernet network, and data transmission between control nodes in the Ethernet network is based on a preset Ethernet protocol. The method includes: upon receiving a first message carrying first message identifier information sent by other control nodes in the Ethernet network, determining the message information of the first message; the other control nodes are control nodes with unicast or multicast relationships to the control node; determining node diagnostic data corresponding to the control node based on the message information, and sending the node diagnostic data to the master control node in the Ethernet network, so that the master control node can determine the network connectivity diagnostic result of the Ethernet network based on the node diagnostic data. This invention diagnoses the network connectivity between control nodes by analyzing the message reception status of each control node in the Ethernet network, thereby obtaining the network connectivity diagnostic result of the Ethernet network and improving the efficiency of network connectivity diagnostics.
[0101] This invention provides a control node, which can be any node in an Ethernet network. All control nodes in the Ethernet network transmit data based on a preset Ethernet protocol, such as... Figure 6 As shown, it includes:
[0102] The determination module 601 is used to determine the message information of the first message when it receives a first message carrying first message identifier information sent by other control nodes in the Ethernet network; the other control nodes are control nodes that have a unicast or multicast relationship with the control node.
[0103] The sending module 602 is used to determine the node diagnostic data corresponding to the control node based on the message information, and send the node diagnostic data to the master control node in the Ethernet network, so that the master control node can determine the network connection diagnostic result of the Ethernet network based on the node diagnostic data.
[0104] In one embodiment of the present invention, the control node is the master control node, and the determination module 601 is further configured to, upon receiving a network connection diagnostic request for the Ethernet network, send a second message carrying second message flag information to the slave control nodes in the Ethernet network, and send a third message carrying first message flag information to other control nodes.
[0105] In one embodiment of the present invention, the control node is a slave control node, and the determination module 601 is further configured to send a fourth message carrying the first message flag information to other control nodes when it receives a third message carrying the second message flag information sent by the master control node.
[0106] In one embodiment of the present invention, the destination medium access control address carried in the first message is a unicast destination medium access control address. The determining module 601 is further configured to determine the source medium access control address carried in the first message as first source medium access control information; determine the destination medium access control address carried in the first message as first destination medium access control information; determine the mask corresponding to the virtual local area network identifier carried in the first message in the preset virtual local area network identifier-mask correspondence relationship as virtual local area network mask information; and determine the first source medium access control information, the first destination medium access control information, and the virtual local area network mask information as message information.
[0107] In one embodiment of the present invention, the destination medium access control address carried in the first message is a multicast destination medium access control address. The determining module 601 is further configured to determine the medium access control address carried in the first message as second source medium access control information; convert the destination medium access control address carried in the first message into second destination medium access control information according to the data interface for receiving the first message; determine the mask corresponding to the destination medium access control address carried in the first message in the preset multicast medium access control address and mask correspondence relationship as multicast medium access control mask information; and determine the second source medium access control information, the second destination medium access control information, and the multicast medium access control mask information as message information.
[0108] In one embodiment of the present invention, the node diagnostic data includes multiple diagnostic data, each diagnostic data including source media access control information bits, destination media access control information bits, and virtual local area network (VLAN) mask information bits. The sending module 602 is further configured to update the VLAN mask information stored in the VLAN mask information bits of the first diagnostic data using the VLAN mask information included in the message information when there is first diagnostic data corresponding to the first source media access control information and the first destination media access control information included in the message information among the multiple diagnostic data.
[0109] In one embodiment of the present invention, each diagnostic data also includes a multicast media access control mask information bit. The sending module 602 is further configured to update the multicast media access control mask information stored in the multicast media access control mask information bit in the second diagnostic data using the multicast media access control mask information included in the message information when there is second diagnostic data corresponding to the second source media access control information and the second destination media access control information included in the message information among multiple diagnostic data.
[0110] This invention provides a control node, such as... Figure 7 As shown, the control node includes: a processor 701, a memory 702, and a communication bus 703;
[0111] Communication bus 703 is used to realize the communication connection between processor 701 and memory 702;
[0112] The processor 701 is used to execute the computer program stored in the memory 702 to implement the above-described network connection diagnosis method.
[0113] This invention provides a computer-readable storage medium, characterized in that it stores one or more computer programs, which can be executed by one or more processors to implement the aforementioned network connectivity diagnostic method. The computer-readable storage medium can be volatile memory, such as random-access memory (RAM); or non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); or it can be a device including one or any combination of the above-mentioned memories, such as a mobile phone, computer, tablet device, personal digital assistant, etc.
[0114] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0115] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0118] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A network connectivity diagnostic method, characterized in that, The method is applied to control nodes, where the control node is any node in an Ethernet network, and data transmission between control nodes in the Ethernet network is based on a preset Ethernet protocol. The method includes: Upon receiving a first message carrying first message identifier information sent by another control node within the Ethernet network, the message information of the first message is determined; the other control node is a control node that has a unicast or multicast relationship with the control node; the control node is a controller on the vehicle; the control node sends a message carrying first message identifier information to the other control node; the first message identifier information represents the operation that the receiver should perform; Based on the message information, the node diagnostic data corresponding to the control node is determined, and the node diagnostic data is sent to the master control node in the Ethernet network so that the master control node can determine the network connection diagnostic result of the Ethernet network based on the node diagnostic data.
2. The method according to claim 1, characterized in that, The control node is the master control node. Before determining the message information of the first message upon receiving a first message carrying first message identifier information sent by another control node within the Ethernet network, the method further includes: Upon receiving a network connection diagnostic request for the Ethernet network, a second message carrying second message flag information is sent to the slave control nodes within the Ethernet network, and a third message carrying first message flag information is sent to the other control nodes.
3. The method according to claim 2, characterized in that, The control node is the slave control node. Before determining the message information of the first message upon receiving a first message carrying first message identifier information sent by another control node within the Ethernet network, the method further includes: Upon receiving the third message carrying the second message identifier information sent by the master control node, a fourth message carrying the first message identifier information is sent to the other control nodes.
4. The method according to any one of claims 1 to 3, characterized in that, The first message carries a destination medium access control address that is a unicast destination medium access control address. Determining the message information of the first message includes: The source media access control address carried in the first message is determined as the first source media access control information; The target media access control address carried in the first message is determined as the first destination media access control information. In the preset virtual LAN identifier and mask correspondence relationship, the mask corresponding to the virtual LAN identifier carried in the first message is determined as the virtual LAN mask information; The first source media access control information, the first destination media access control information, and the virtual local area network mask information are identified as the message information.
5. The method according to any one of claims 1 to 3, characterized in that, The first message carries a destination medium access control address that is a multicast destination medium access control address. Determining the message information of the first message includes: The media access control address carried in the first message is determined as the second source media access control information; Based on the data interface that receives the first message, the destination medium access control address carried in the first message is converted into second destination medium access control information; In the preset multicast medium access control address and mask correspondence, the mask corresponding to the destination medium access control address carried in the first message is determined as the multicast medium access control mask information. The second source media access control information, the second destination media access control information, and the multicast media access control mask information are determined as the message information.
6. The method according to claim 4, characterized in that, The node diagnostic data includes multiple diagnostic data entries, each including source media access control (Media Access Control) bits, destination media access control (Media Access Control) bits, and virtual local area network (VLAN) mask bits. Determining the node diagnostic data corresponding to the control node based on the message information includes: If, among the multiple diagnostic data, there exists first diagnostic data corresponding to the first source media access control information and the first destination media access control information included in the message information, the virtual local area network mask information stored in the virtual local area network mask information bit in the first diagnostic data is updated using the virtual local area network mask information included in the message information.
7. The method according to claim 6, characterized in that, Each diagnostic data entry also includes multicast media access control mask information bits. Determining the node diagnostic data corresponding to the control node based on the message information includes: If, among the multiple diagnostic data, there exists second diagnostic data corresponding to the second source media access control information and the second destination media access control information included in the message information, the multicast media access control mask information stored in the multicast media access control mask information bit in the second diagnostic data is updated using the multicast media access control mask information included in the message information.
8. A control node, characterized in that, The control node can be any node in an Ethernet network, and data transmission between the control nodes in the Ethernet network is based on a preset Ethernet protocol, including: The determination module is used to determine the message information of the first message when it receives a first message carrying first message identifier information sent by other control nodes in the Ethernet network; the other control nodes are control nodes that have a unicast or multicast relationship with the control node; the control node is a controller on the vehicle; the control node sends the message carrying the first message identifier information to the other control nodes; the first message identifier information represents the operation that the receiver should perform; The sending module is used to determine the node diagnostic data corresponding to the control node based on the message information, and send the node diagnostic data to the master control node in the Ethernet network, so that the master control node can determine the network connection diagnostic result of the Ethernet network based on the node diagnostic data.
9. A control node, characterized in that, include: Processor, memory, and communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is configured to execute a computer program stored in the memory to implement the network connectivity diagnostic method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more computer programs, which can be executed by one or more processors to implement the network connectivity diagnostic method as described in any one of claims 1 to 7.