Ring network communication redundancy control method and device, electronic equipment and readable storage medium
By using Ethernet link abnormality detection and CAN communication broadcast switching control packets in the vehicle ring network system, redundant link switching of vehicle ring network communication is realized, and the problem of high hardware resource consumption in the prior art is solved. , improves communication reliability and availability.
Patent Information
- Application Number
- CN202411213490.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The existing vehicle-mounted ring network communication redundant control scheme has high requirements for node hardware resources and cannot effectively solve the redundant control problem in vehicle-mounted ring network communication.
By introducing an Ethernet link abnormality detection mechanism and a forwarding table flushing mechanism in the vehicle ring system, the master control node determines whether to perform redundant link switching based on the link abnormality status, and switches the packets through CAN communication and broadcasts the switch and adjusts the message The node port is set to form a new ring link to realize redundant switching of the link.
It improves the communication reliability of the vehicle ring network system, reduces the requirements for node hardware resources, and makes the solution simpler and more usable and has higher availability.
Smart Images

Figure CN119135474A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle-mounted communications, and in particular to a ring network communication redundancy control method, device, electronic equipment and readable storage medium. Background Art
[0002] The rapid advancement of automobile electrification and intelligent development has put forward higher requirements on the capabilities of vehicle systems. With the realization of high-computing computing centers, the automotive electronic and electrical architecture has gradually evolved to a "central + regional" form. The central computing center is mainly used for computing and decision-making, and the regional controller is mainly used to transmit body and sensor-related data to the central computing center and execute the control instructions of the central computing center. In order to ensure the bandwidth and reliability of data interaction between the central and regional controllers, the central and regional controllers are usually networked in a ring network based on Ethernet links to achieve mutual redundancy of communication.
[0003] The core of the ring network communication redundancy control solution is to achieve redundant switching in the event of abnormal communication links through the collaboration of each node in the ring network. At present, in order to achieve communication redundancy control in the vehicle field, some solutions integrate frame replication, frame elimination and other functions in each node of the ring network based on TSN technology to ensure that there is a correct message in any link situation. However, this method has high requirements on the hardware resources of the nodes and cannot effectively solve the redundancy control problem in vehicle ring network communication. Summary of the invention
[0004] One of the purposes of the present invention is to provide a ring network communication redundancy control method, device, electronic device and readable storage medium to solve the redundancy control problem in vehicle ring network communication.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A ring network communication redundancy control method is applied to a vehicle-mounted ring network system, wherein the vehicle-mounted ring network system includes a plurality of nodes, the plurality of nodes are connected via an Ethernet link to form a ring network link, the plurality of nodes include a master control node, and the ring network communication redundancy control method includes:
[0007] The node responds to detecting an Ethernet link abnormality by broadcasting a link abnormality status of the Ethernet link based on a control area network CAN communication;
[0008] The master control node determines whether redundant link switching is required according to the acquired abnormal link status, and when redundant link switching is required, broadcasts a redundant switching control message based on CAN communication;
[0009] The node adjusts its own port settings according to the redundant switching control message, so as to form a new ring network link according to the adjusted port settings.
[0010] According to the above technical means, the Ethernet link anomaly detection mechanism and Ethernet forwarding table flushing mechanism are utilized so that in the event of link anomaly, Ethernet communication can be switched to the backup Ethernet link communication to ensure normal communication between associated nodes.
[0011] Further, the master control node determines whether redundant link switching is required according to the acquired abnormal link status, including:
[0012] The master control node integrates the acquired link abnormal status to obtain the global link status of the vehicle-mounted ring network system;
[0013] The master control node determines whether redundant link switching is required according to the global link status.
[0014] Further, the master control node determines whether redundant link switching is required according to the global link status, including:
[0015] In response to the global link state remaining unchanged within a preset first period of time, comparing the global link state with the global link state recorded during the last determination to see whether they are consistent;
[0016] If they are consistent, there is no need to switch the redundant link;
[0017] If they are inconsistent, redundant link switching is required.
[0018] Further, the redundant switching control message carries the global link state, and the node adjusts the port setting of the node itself according to the redundant switching control message, including:
[0019] The node determines the port parameter corresponding to the global link state according to the global link state and a preset mapping relationship;
[0020] The node adjusts the port setting corresponding to the node according to the port parameter.
[0021] Further, the port parameter includes a target node corresponding to the current node, and adjusting the port setting corresponding to the node according to the port parameter includes:
[0022] According to the data flow direction between the current node and the faulty node, blocking the message sending and receiving of the switch corresponding to the current node, wherein the faulty node is a node with abnormal link communication with the current node;
[0023] The port corresponding to the media access control address MAC address of the failed node is modified to the port corresponding to the MAC address of the target node.
[0024] Further, the redundant switching control message carries the redundant link to be switched, and the node adjusts the port setting of the node itself according to the redundant switching control message, including:
[0025] The node adjusts its own port settings according to the redundant link to be switched.
[0026] Furthermore, the redundant switching control message includes a switching instruction and a global link status.
[0027] Further, the node detecting that the Ethernet link is abnormal includes: the node detecting that the directly connected Ethernet link is abnormal.
[0028] Furthermore, the ring network communication redundancy control method further includes:
[0029] The node periodically detects whether the Ethernet link is abnormal;
[0030] Accordingly, the node responds to detecting the Ethernet link abnormality and broadcasts the link abnormality state of the Ethernet link based on CAN communication, including:
[0031] The node responds to detecting the same Ethernet link abnormality in multiple consecutive detection cycles and broadcasts the link abnormality status of the Ethernet link based on CAN communication.
[0032] A ring network communication redundancy control method is applied to a first node in a vehicle-mounted ring network system, wherein the vehicle-mounted ring network system includes the first node and a plurality of second nodes connected via Ethernet links, wherein the first node communicates with the second node based on a control area network (CAN), and the ring network communication redundancy control method includes:
[0033] Acquire a link status message broadcast by the second node based on CAN communication, wherein the link status message represents a status of an Ethernet link detected by the second node;
[0034] Determine whether the vehicle-mounted ring network system needs to perform redundant link switching based on the status of the Ethernet link in the link status message. If necessary, broadcast a redundant switching control message based on CAN communication, and the redundant switching control message is used to instruct the second node to perform a link switching operation.
[0035] Further, the determining whether the vehicle-mounted ring network system needs to perform redundant link switching according to the state of the Ethernet link in the link state message includes:
[0036] Integrate the states of the Ethernet links detected by the plurality of second nodes to obtain a global link state;
[0037] Whether redundant link switching is required is determined according to the global link status.
[0038] Further, judging whether redundant link switching is required according to the global link status includes:
[0039] Comparing the global link state with a preset reference link state to see whether they are consistent;
[0040] If they are consistent, it is determined that redundant link switching is not necessary;
[0041] If they are inconsistent, it is determined that redundant link switching is required, and the global link status after switching is obtained and recorded.
[0042] Furthermore, the reference link state is the global link state recorded when it was last determined that redundant link switching was required.
[0043] Furthermore, the message data field of the redundant switching control message includes a flag bit for representing the global link state.
[0044] Further, the first node and the second node are connected via an Ethernet link, and the ring network communication redundancy control method further includes:
[0045] Detect the status of the connected Ethernet link;
[0046] The determining whether the vehicle-mounted ring network system needs to perform redundant link switching according to the state of the Ethernet link in the link state message includes:
[0047] Whether the vehicle-mounted ring network system needs to perform redundant link switching is determined according to the detected state of the Ethernet link and the state of the Ethernet link in the link state message.
[0048] Furthermore, it also includes:
[0049] In response to determining that redundant link switching is required, determining whether a link switching operation needs to be performed according to the global link status, and performing the link switching operation when necessary.
[0050] A ring network communication redundancy control method is applied to a second node in a vehicle-mounted ring network system, wherein the second node has a plurality of nodes and different second nodes are connected via Ethernet links, and the vehicle-mounted ring network system further comprises a first node that communicates with the second node based on a control area network (CAN). The ring network communication redundancy control method comprises:
[0051] Detect the status of the connected Ethernet link;
[0052] In response to determining that the state of the Ethernet link meets a preset abnormal condition, broadcasting a link state message based on CAN communication, wherein the link state message represents the state of the Ethernet link;
[0053] Receiving a redundant switching control message broadcast by the first node based on CAN communication;
[0054] Determine whether a link switching operation needs to be performed according to the redundant switching control message, and if necessary, perform the link switching operation.
[0055] Further, the detecting the state of the connected Ethernet link includes:
[0056] Periodically check the status of the connected Ethernet link;
[0057] Accordingly, in response to determining that the state of the Ethernet link satisfies a preset abnormal condition, broadcasting a link state message based on CAN communication includes:
[0058] Determine whether the state of the Ethernet link is detected as an abnormal state in multiple consecutive detection cycles, and if so, broadcast a link state message based on CAN communication.
[0059] Furthermore, the message data field of the link status message includes a node flag bit and a status flag bit, the node flag bit represents the identity information of the node that sends the link status message, and the status flag bit represents the status of the Ethernet link.
[0060] Further, the redundant switching control message includes a global link state, and the global link state includes states of Ethernet links corresponding to multiple second nodes in the vehicle-mounted ring network system. The determining whether to perform a link switching operation according to the redundant switching control message includes:
[0061] Determine a target link to be connected according to the global link state and a preset mapping relationship, wherein the target link is determined based on an Ethernet link connecting the current second node and other second nodes;
[0062] If the target link is inconsistent with the Ethernet link currently connected to the second node, a link switching operation needs to be performed;
[0063] If the target link is consistent with the Ethernet link to which the second node is currently connected, there is no need to perform a link switching operation.
[0064] Further, the performing the link switching operation includes:
[0065] Determine the target node to be connected according to the target link;
[0066] The port corresponding to the target node is modified to be the port where the target link is located.
[0067] A ring network communication redundancy control device is applied to a vehicle-mounted ring network system, wherein the vehicle-mounted ring network system includes a plurality of nodes, the plurality of nodes are connected via an Ethernet link to form a ring network link, the plurality of nodes include a master control node, and the ring network communication redundancy control device includes:
[0068] A node detection module, used for controlling the node to respond to detecting an abnormality in the Ethernet link, and broadcasting the abnormal link status of the Ethernet link based on the control area network CAN communication;
[0069] A master control management module, used to control the master control node to determine whether redundant link switching is required according to the acquired link abnormality status, and broadcast redundant switching control messages based on CAN communication when redundant link switching is required;
[0070] The switching module is used to control the node to adjust the port settings of the node itself according to the redundant switching control message, so as to form a new ring network link according to the adjusted port settings.
[0071] An electronic device comprises: a processor, and a memory communicatively connected to the processor;
[0072] The memory stores computer-executable instructions;
[0073] The processor executes the computer-executable instructions stored in the memory to implement the ring network communication redundancy control method as described in any one of the above items.
[0074] A computer-readable storage medium comprises: the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to implement the ring network communication redundancy control method as described in any one of the above when executed by a processor.
[0075] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the ring network communication redundancy control method as described in any one of the above items is implemented.
[0076] Beneficial effects of the present invention:
[0077] (1) In the present invention, the Ethernet link detection and the coordination of link switching between different nodes are realized through CAN communication. The high reliability of CAN communication can be used to ensure that the status of all Ethernet links can be synchronized to the corresponding nodes when any Ethernet link is abnormal, thereby improving the reliability of the overall communication of the vehicle ring network system;
[0078] (2) The Ethernet link detection and redundant link switching control in the present invention can be implemented based on Ethernet communication itself. By integrating the functions of judging whether to switch the link according to the abnormal status of the link and broadcasting the switching control message in the master control node, the requirements for other nodes other than the master control node are relatively low, thereby reducing the requirements of the vehicle-mounted ring network communication redundant control scheme on the node hardware resources. Compared with the existing control scheme, it is simpler and easier to implement and has higher availability. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 A schematic diagram of an application scenario of a ring network communication redundancy control method provided by an embodiment of the present invention;
[0080] Figure 2 A flow chart of a ring network communication redundancy control method provided by an embodiment of the present invention;
[0081] Figure 3a A schematic diagram of a vehicle-mounted ring network system communication architecture provided by an embodiment of the present invention;
[0082] Figure 3b for Figure 3a The schematic diagram of redundant switching when a link abnormality occurs in the ring network system is shown;
[0083] Figure 4 A schematic diagram of a flow chart of a link switching determination method provided by an embodiment of the present invention;
[0084] Figure 5 A schematic diagram of a flow chart of a method for adjusting a node port provided by an embodiment of the present invention;
[0085] Figure 6 A schematic diagram of node function module deployment provided by an embodiment of the present invention;
[0086] Figure 7 A schematic flow chart of another ring network communication redundancy control method provided by an embodiment of the present invention;
[0087] Figure 8 A schematic diagram of a redundant control process provided by an embodiment of the present invention;
[0088] Fig. 9 A schematic flow chart of another ring network communication redundancy control method provided by an embodiment of the present invention;
[0089] Fig.10 A schematic flow chart of another ring network communication redundancy control method provided by an embodiment of the present invention;
[0090] Fig.11 A schematic diagram of the structure of a ring network communication redundancy control device provided by one embodiment of the present invention;
[0091] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention.
[0092] Through the above drawings, clear embodiments of the present invention have been shown, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present invention in any way, but to illustrate the concept of the present invention for those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0093] The following will describe the embodiments of the present invention 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 contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways 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, not for limiting the scope of protection of the present invention.
[0094] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0095] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0096] The terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, product or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of further restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to indicate names, they do not indicate any particular order.
[0097] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1As shown, the overall architecture of the vehicle system can include a central computing center and regional controllers. The central computing center can be used for calculations and decision-making; the regional controller can be used to transmit vehicle body and sensor-related data to the central computing center, execute control instructions from the central computing center, and perform some basic calculations. In order to ensure the bandwidth and reliability of data exchange between the central and regional controllers, the central and regional controllers are usually networked in a ring network based on Ethernet links to achieve mutual redundancy of communication. For example, Figure 1 The central computing center and two regional controllers in the system can form an Ethernet ring network based on links a, b and c. The central computing center can be a cockpit integrated central control system deployed on the vehicle side (referred to as "cockpit integrated system"), and the regional controller can be a vehicle control system such as intelligent driving and intelligent control deployed on the vehicle side.
[0098] The present invention can be applied to Figure 1 The vehicle-mounted ring network system including the scenario shown can meet the requirements of the vehicle-side intelligent driving, intelligent control and other vehicle control systems for the vehicle communication system. The vehicle-mounted ring network system can include at least three nodes, and there is a master control node among these at least three nodes. In some application scenarios, the nodes can use Ethernet as the communication medium to form an Ethernet ring network communication system in pairs. In some application scenarios, the Ethernet ring network communication system can also be composed of other vehicle-mounted systems with Ethernet ring networking capabilities, and each vehicle-mounted system uses an independent Ethernet switch as a network connection intermediary. In the present invention, a single node in the vehicle-mounted ring network system can correspond to the vehicle-side cockpit integrated system, or it can correspond to any vehicle control system such as intelligent driving, intelligent control, etc. The master control node can be a cockpit integrated system or any vehicle control system.
[0099] The application scenarios mentioned above are only some examples. Those skilled in the art can expand the application to specific business scenarios, and the embodiments of this application do not impose specific limitations on this. Figure 1 For application scenarios, refer to Figures 2 to 6 A ring network communication redundancy control method provided according to the first aspect of the present invention is described below.
[0100] Figure 2 FIG. 1 is a flow chart of a ring network communication redundancy control method provided by an embodiment of the present invention. Figure 2 As shown, the method may include:
[0101] Step S201 , in response to detecting an Ethernet link abnormality, the node broadcasts the link abnormality status of the Ethernet link based on the control area network CAN communication.
[0102] The ring network communication redundancy control method of this embodiment can be applied to a vehicle-mounted ring network system. The vehicle-mounted ring network system includes multiple nodes. The multiple nodes are connected through Ethernet links to form a ring network link. The multiple nodes include a master control node.
[0103] CAN (Controller Area Network) is a serial communication network that can support distributed control systems. CAN communication can include communication via a bus based on a controller area network such as the CAN protocol and the CANFD (CAN with Flexible Datarate) protocol.
[0104] Specifically, the nodes in the vehicle ring network system can be connected through the CAN bus. Each node in the ring network system can detect the status of the adjacent Ethernet link. If the node detects that the adjacent link status is abnormal, the abnormal link status information can be encapsulated into a message and sent to the bus for broadcast notification based on the CAN protocol. The node detecting the abnormality of the adjacent Ethernet link can mean that the node detects the abnormality of the directly connected Ethernet link. For example, Figure 1 The regional controller 1 and the regional controller 2 are directly connected through the link b. Both the regional controller 1 and the regional controller 2 can detect whether the link b is abnormal through the underlying link status judgment mechanism.
[0105] In some possible implementations, the node periodically detects whether the Ethernet link is abnormal. Accordingly, the node responds to detecting the Ethernet link abnormality and broadcasts the link abnormality state of the Ethernet link based on CAN communication, including: the node responds to detecting the same Ethernet link abnormality in multiple consecutive detection cycles and broadcasts the link abnormality state of the Ethernet link based on CAN communication. For example, the node can detect whether the direct link is abnormal with a period of 10ms. If the direct link is abnormal for three consecutive periods, the link state can be encapsulated into a preset abnormal message format and broadcasted to the outside through CAN at a period of 10ms.
[0106] In step S202, the master control node determines whether redundant link switching is required according to the acquired abnormal link status, and broadcasts a redundant link switching control message based on CAN communication when redundant link switching is required.
[0107] The master control node may be a node selected in advance from the nodes of the ring network system. The redundant switching control message may be generated by the master control node according to the abnormal link state, or may be a preset message obtained by the master control node from an internal storage module or an external storage module according to the abnormal link state.
[0108] Specifically, a node can obtain the link abnormality status provided by other nodes through broadcasting. The master control node can determine whether the ring network system needs to perform redundant link switching through an internal decision module based on the link abnormality status detected by itself and / or the link abnormality status provided by other nodes. If necessary, a redundant switching control message can be broadcast through the CAN bus. The decision module inside the master control node can be used to execute the algorithm corresponding to the preset decision rule. The decision rule can be based on the current link abnormality status to determine whether there are nodes in the ring network system that cannot communicate normally.
[0109] It is understandable that each node in the ring network system can communicate with different nodes through multiple direct links. Even if the direct link between a node and another node is abnormal, the two nodes may still communicate indirectly through links between other nodes.
[0110] Step S203: the node adjusts its own port settings according to the redundant switching control message, so as to form a new ring network link according to the adjusted port settings.
[0111] Specifically, the redundant switching control message can carry the redundant links to be switched by all nodes. After the CAN bus broadcasts the redundant switching control message, each node can use the Ethernet forwarding table flushing mechanism to adjust its own switch port settings according to the redundant links in the redundant switching control message, disable abnormal links and switch to redundant links for communication. The ring network system will form a new ring network link based on the adjusted redundant links of each node and the combination of links that are not involved in the adjustment.
[0112] In the above embodiment, the nodes in the vehicle ring network system can detect the abnormal state of the Ethernet link and broadcast the abnormal state based on the CAN communication. The master control node can judge whether to switch the redundant link according to the abnormal state of the link related to each node. If switching is required, the switching control message is broadcast based on the CAN communication, and each node can adjust the port setting according to the switching control message. In this method, the Ethernet link detection and the judgment of the switching link between different nodes are realized through CAN communication. The high reliability of CAN communication can be used to ensure that the status of all Ethernet links can be synchronized to the corresponding node in the case of any Ethernet link abnormality; Ethernet link detection and redundant link switching control can be realized based on Ethernet communication itself, and the Ethernet link abnormality detection mechanism and Ethernet forwarding table writing mechanism of Ethernet can be used to make Ethernet communication switch to the backup Ethernet link communication in the case of link abnormality, ensuring normal communication between associated nodes, which can not only improve the reliability of Ethernet communication, but also only need to integrate the function of judging whether to switch the link according to the abnormal state of the link and broadcasting the switching control message in the master control node, and the requirements for other nodes other than the master control node are relatively low, so that the requirements of the vehicle ring network communication redundant control scheme on the node hardware resources can be reduced, which is simpler and easier to implement than the existing control scheme, and has stronger availability.
[0113] Figure 3a A schematic diagram of a vehicle-mounted ring network system communication architecture provided by an embodiment of the present invention. Figure 3a As shown, the entire vehicle-mounted ring network system includes vehicle control system 1, vehicle control system 2, vehicle control system 3 and cockpit integrated central control system, each system includes a switch for communication, vehicle control system 1 is directly connected to vehicle control system 2 through link 1, vehicle control system 1 is directly connected to cockpit integrated central control system through link 2, vehicle control system 2 is directly connected to cockpit integrated central control system through link 3, vehicle control system 2 is directly connected to vehicle control system 3 through link 4, and vehicle control system 1 is directly connected to vehicle control system 3 through link 5. Vehicle control system 1, vehicle control system 2 and cockpit integrated central control system can form a ring network link (ring 1), and vehicle control system 1, vehicle control system 2 and vehicle control system 3 can form a ring network link (ring 2).
[0114] Figure 3b for Figure 3a The following is a schematic diagram of redundant switching when a link in the ring network system is abnormal. Figure 3bAs shown, link 1 and link 5 in the Ethernet link of the ring network system are abnormal. Vehicle control system 1 and vehicle control system 2 detect the abnormality of link 1 through the underlying link status judgment mechanism. Similarly, vehicle control system 1 and vehicle control system 3 detect the abnormality of link 5 through the underlying link status judgment mechanism. After detecting the abnormality, vehicle control system 1, vehicle control system 2 and vehicle control system 3 broadcast the abnormal status through CAN communication. After summarizing the abnormal status, vehicle control system 1 determines that it is necessary to switch the redundant link and broadcasts the redundant switching control instruction through CAN communication. Vehicle control system 1, vehicle control system 2 and vehicle control system 3 adjust the port settings based on the redundant switching control instruction to switch to the standby redundant link.
[0115] In one embodiment, Figure 4 As shown, the master control node determines whether redundant link switching is required according to the acquired link abnormal status, including:
[0116] Step S401: The master control node integrates the acquired link abnormal status to obtain the global link status of the vehicle-mounted ring network system.
[0117] Specifically, after detecting that the state of the direct link is abnormal, the node can periodically broadcast a message indicating the abnormal state through CAN communication, and the master control node can summarize and integrate the abnormal link states related to each node, and obtain the global link state of the ring network system after integration. For example, the message broadcast by each node can include the node number and link mask information, and the link mask information can indicate that there is abnormal link information (such as link number) in the ring network system.
[0118] Step S402: The master control node determines whether redundant link switching is required according to the global link status.
[0119] Specifically, in response to the global link state remaining unchanged within a preset first time period, the global link state is compared with the global link state recorded during the last judgment to see if they are consistent; if they are consistent, redundant link switching is not required; if they are inconsistent, redundant link switching is required.
[0120] In some possible implementations, the master control node can compare the global link status summarized this time with the global link status when it last determined whether to perform redundant link switching. If the two are consistent, the decision this time is not to perform redundant link switching. If the two are inconsistent, the decision is to perform redundant link switching.
[0121] In some possible implementations, the master control node can integrate the global link status corresponding to each period based on the link abnormality status periodically broadcast by each node. If the global link status integrated for multiple consecutive periods is inconsistent, it is not necessary to determine whether to perform redundant link switching; if the global link status integrated for multiple consecutive periods is consistent, it is determined whether redundant link switching is required based on the global link status.
[0122] In one embodiment, the nodes and links in the ring network system may be numbered in advance, and the message format of the CAN communication may be set based on the node number and link number. Figure 3a and Figure 3b Taking the illustrated embodiment as an example, the node codes are vehicle control system 1 code 001, vehicle control system 2 code 010, vehicle control system 3 code 011, and cockpit integrated central control system code 100. There are 5 links in the system. The 5 bits in the message from bit0 to bit4 represent link 1 to link 5 respectively. The corresponding bit position 0 represents a normal link, and 1 represents an abnormal link.
[0123] like Figure 3b ,After detecting a link abnormality, the node can record the link number, and encapsulate the link abnormality ,status information into the message according to the message structure shown in Table 1, and send the link status to the CAN bus via CAN ,messages at a 10ms period.
[0124]
[0125] Table 1
[0126] After the vehicle control system 1 (master control node) determines the status of the adjacent links link1, link2 and link5, it can record the link status inside the vehicle control system 1. After receiving the link status of the vehicle control system 2, vehicle control system 3 and cockpit integrated central control system, it integrates the link status of the whole vehicle to obtain the global link status. The integration method is to perform an OR operation on the received link status notification message. Figure 3b Taking the system as an example, the link status calculation result is 10001, which means that link 1 and link 5 in the global link status are abnormal, and the other link statuses are normal. Optionally, each node periodically sends a message containing abnormal status information to the bus. If the global link status integrated by the master node for three consecutive cycles is consistent, the global link status can be compared with the global link status when the master node last judged it. If the comparison results are inconsistent, link switching is required.
[0127] In one embodiment, the redundant switching control message carries the redundant link to be switched, and the node adjusts its own port settings according to the redundant switching control message, including: the node adjusts its own port settings according to the redundant link to be switched.
[0128] In one embodiment, the redundant switching control message carries the global link status, such as Figure 5 As shown, the node adjusts its own port settings according to the redundant switching control message, including:
[0129] Step S501: The node determines the port parameters corresponding to the global link state according to the global link state and a preset mapping relationship.
[0130] Specifically, each node can obtain the global link state through the redundant switching control message broadcast by the master node to the bus, and can determine the port parameters corresponding to the global link state according to the preset mapping relationship. The port parameters may include the target link after switching, the blocked port, the target FDB (Forwarding DataBase) table entry of the corresponding switch port, and the VLAN (Virtual Local Area Network) state table entry, etc.
[0131] Step S502: The node adjusts the port settings corresponding to the node according to the port parameters.
[0132] In some possible implementations, the port parameters may include a target node corresponding to the current node, the current node being a node that receives redundant switching control messages and is ready to adjust port settings, and the target node being a node that communicates through a direct link after the current node switches. The current node may block the sending and receiving of messages to the switch corresponding to the current node according to the data flow direction with the faulty node, and may modify the port corresponding to the media access control address MAC address of the first node to the port corresponding to the MAC address of the target node. The faulty node is a node with a link anomaly with the current node. Modifying the port corresponding to the MAC address may be achieved by flushing the forwarding database FDB table on the switch corresponding to the current node, or may be achieved in other ways.
[0133] In some possible implementations, the redundant switching control message includes a switching instruction and a global link status.
[0134] If the master control node determines that link switching is required based on the global link status, the master control node can encapsulate whether to switch and the global link status into a redundant switching control message according to the message structure shown in Table 2, and send it to the CAN bus via a CAN message interval of 10ms.
[0135]
[0136] Table 2
[0137] Each node can obtain the global link status based on the redundant switching control message. Each node can query the mapping table of the global link status and the switching target set inside the node, and first block the abnormal link port based on the found switching target. The blocking method can be to perform VLAN control on the port corresponding to the switching target through the switch control interface, and block the sending and receiving of messages in the port inbound and outbound directions based on the VLAN Disable operation. This blocking can avoid the possible Ethernet network storm risk after the link communication is restored. After the port blocking is completed, the FDB table can be flushed through the operation interface of the switch FDB table based on the found switching target. This flushing can switch the switch route of the abnormal link to the redundant link to ensure that the nodes can still communicate normally when the link is abnormal.
[0138] by Figure 3a and Figure 3b Taking the shown embodiment as an example, when link 1 and link 5 are abnormal, vehicle control system 1, vehicle control system 2, and vehicle control system 3 first close the VLAN of the ports corresponding to link 1 and link 5, and then vehicle control system 1 switches vehicle control system 2, vehicle control system 3, and cockpit integrated central control system according to the FDB table rules shown in Table 3 and Table 4. After the switching is completed, the nodes can continue to communicate normally through redundant links.
[0139]
[0140] Table 3
[0141]
[0142] Table 4
[0143] Figure 6 A schematic diagram of node function module deployment provided by an embodiment of the present invention. Figure 6 As shown, the terminal as a node includes a link status detection module, a communication redundancy switching control module and a link status table. The link status detection module of the master control node is additionally provided with a link status integration function, and the link redundancy switching module is additionally provided with a redundant switching decision function. After the node is powered on, the link status detection module can periodically detect the node direct link status. If the direct link abnormality is detected for multiple consecutive cycles, the abnormal state can be recorded and the abnormal state recorded this time can be compared with the state recorded last time. If the comparison result is that the state is consistent, no processing is performed. If the comparison result is inconsistent, the abnormal state is encapsulated into a message and broadcasted through CAN communication. The communication redundancy switching control module can match the redundant switching control message broadcast by the master control node and the global link state in the link status table, and switch the backup link according to the matching result.
[0144] In this embodiment, each Ethernet node has a mapping relationship table of link status, target switching VLAN and FDB table. The master control node in the link integrates the abnormal status of each node and notifies the global link status to all nodes through CAN messages. Each node performs link redundancy switching based on the mapping relationship table of link status, target switching VLAN and FDB table. In this way, all nodes can receive the global link status of the whole vehicle. Therefore, when one Ethernet link, two Ethernet links or even three or more Ethernet links are abnormal, as long as the redundant switching target when the link is abnormal is agreed upon, each Ethernet node can switch based on the status table after receiving the Ethernet link status of the whole vehicle. The judgment logic is relatively simple and easy, without other complex precondition judgments, and redundant processing can be achieved when the link is abnormal in all scenarios.
[0145] According to a second aspect of the present invention, a ring network communication redundancy control method is provided, which can be applied to a first node in a vehicle-mounted ring network system, wherein the vehicle-mounted ring network system includes the first node and a plurality of second nodes connected via an Ethernet link, and the first node and the second node communicate based on a control area network CAN. The first node and the second node can both be vehicle control systems with data processing and communication functions. For example, the first node can be the master control node in each embodiment of the ring network communication redundancy control method of the first aspect, and the second node can be other nodes in the vehicle-mounted ring network system except the master control node.
[0146] In one embodiment, Figure 7 As shown, the method applied to the first node may include:
[0147] S701, obtaining a link status message broadcast by the second node based on CAN communication.
[0148] The link status message represents the status of the Ethernet link detected by the second node.
[0149] S702, determining whether the vehicle-mounted ring network system needs to perform redundant link switching according to the status of the Ethernet link in the link status message, and if necessary, broadcasting a redundant switching control message based on CAN communication.
[0150] The redundant switching control message is used to instruct the second node to perform a link switching operation.
[0151] In some possible implementations, the first node may integrate the states of Ethernet links detected by multiple second nodes to obtain a global link state, and then determine whether redundant link switching is required based on the global link state.
[0152] In some possible implementations, whether redundant link switching is required is determined based on the global link status, including: comparing the global link status with a preset reference link status to see if they are consistent; if they are consistent, determining that redundant link switching is not required; if they are inconsistent, determining that redundant link switching is required, and obtaining and recording the global link status after the switch.
[0153] In some possible implementations, the reference link state is the global link state recorded when it was last determined that redundant link switching was required.
[0154] In some possible implementations, the message data field of the redundant switching control message includes a flag bit for characterizing the global link state. For example, multiple binary bits may be used in the message to represent the states of different links.
[0155] In this embodiment, the first node may be connected to the second node via an Ethernet link, or may not be connected to the second node via an Ethernet link. It should be noted that the first node and the second node are connected at least via a CAN bus.
[0156] Figure 8 A schematic diagram of a redundant control process provided by an embodiment of the present invention. Figure 8 As shown, in this embodiment, the vehicle-mounted ring network system includes a first node and three second nodes (node A, node B and node C), and the first node, node A, node B and node C are connected through a CAN bus. Node A, node B and node C are connected to each other through an Ethernet link, wherein link AC is an initialized blocked link, and link AB and link BC are connected links. The data of node A can be transmitted to node B through link AB, and can also be transmitted to node C through link AB and link AC.
[0157] against Figure 8A redundant control process corresponding to the illustrated embodiment may include: S1. Each second node detects whether the directly connected link is in a connected state. S2. If both link AC and link BC are in a disconnected state, each second node broadcasts the detected state. S3. The first node may obtain the message broadcast by each second node based on the CAN bus. According to the state detected by each second node in the message, the first node may determine that node A and node B can still exchange data, but node C cannot exchange data with node A or node B. S4. The first node determines that redundant link switching is required and broadcasts a redundant switching control message. S5. Each second node obtains the message broadcast by the first node based on the CAN bus, and performs a redundant link switching operation based on the message. For example, when node A sends data to node C, it originally needs to send the data to node B through link AB for forwarding, and after switching, it is directly sent to node C through link AC. For another example, when node B sends data to node C, it originally sends the data to node C directly through link BC, and after switching, it needs to send the data to node A through link AB, and then node A forwards the data to node C through link AC. The link switching can be performed by modifying the FDB table in the switch, etc. For example, in the correspondence of the FDB table of the switch of node A, the port corresponding to the MAC address of node C is the port where link AB is located. The correspondence of the FDB table can be modified to change the port corresponding to the MAC address of node C to the port where link AC is located, and enable link AC.
[0158] In another embodiment, the first node and the second node are connected via an Ethernet link, such as Fig. 9 As shown, the method applied to the first node may also include:
[0159] S901, detecting the status of the connected Ethernet link.
[0160] Determine whether the vehicle ring network system needs to perform redundant link switching according to the status of the Ethernet link in the link status message, including:
[0161] S902: Determine whether the vehicle-mounted ring network system needs to perform redundant link switching according to the detected state of the Ethernet link and the state of the Ethernet link in the link state message.
[0162] Specifically, when the first node is connected to the second node via an Ethernet link, the first node can also detect the status of its directly connected Ethernet link, and can integrate the status with the status of the Ethernet link in the link status message broadcast by the second node to obtain a global link status, and can determine whether the vehicle-mounted ring network system needs to perform redundant link switching based on the global link status.
[0163] In some possible implementations, the method further includes: in response to determining that redundant link switching is required, determining whether a link switching operation needs to be performed according to a global link state, and performing the link switching operation when required.
[0164] In this embodiment, the first node can be Figure 3a and Figure 3b In the vehicle control system 1, the second node can be Figure 3a and Figure 3b Vehicle control system 2, vehicle control system 3 and cockpit integrated central control system.
[0165] According to a third aspect of the present invention, a ring network communication redundancy control method is provided, which can be applied to a second node in a vehicle-mounted ring network system, wherein there are multiple second nodes, and different second nodes are connected via Ethernet links, and the vehicle-mounted ring network system also includes a first node that communicates with the second node based on a control area network CAN. Among them, both the first node and the second node can be a vehicle control system with data processing and communication functions. For example, the first node can be the master control node in each embodiment related to the ring network communication redundancy control method of the first aspect above, and the second node can be other nodes in the vehicle-mounted ring network system except the master control node.
[0166] In one embodiment, Fig.10 As shown, the method applied to the second node may include:
[0167] S1001, detecting the status of the connected Ethernet link.
[0168] S1002: In response to determining that the state of the Ethernet link meets a preset abnormal condition, broadcast a link state message based on CAN communication.
[0169] The link status message indicates the status of the Ethernet link.
[0170] In some possible implementations, detecting the state of the connected Ethernet link includes: periodically detecting the state of the connected Ethernet link. Accordingly, in response to determining that the state of the Ethernet link meets a preset abnormal condition, broadcasting a link state message based on CAN communication includes: determining whether the state of the Ethernet link is detected as an abnormal state in a plurality of consecutive detection cycles, and if so, broadcasting a link state message based on CAN communication.
[0171] For example, the second node can be set to detect the status of the directly connected Ethernet link with a period of 10ms. If it is detected that the Ethernet link is disconnected for three consecutive periods, the Ethernet link can be determined to be abnormal, and the abnormality can be written into the link status message and broadcast according to the corresponding message data field format.
[0172] In some possible implementations, the message data field of the link status message includes a node flag bit and a status flag bit, the node flag bit represents the identity information of the node that sends the link status message, and the status flag bit represents the status of the Ethernet link.
[0173] The message data field of the link state message can refer to the embodiment related to Table 1 in the first aspect above. For example, when the second node is Figure 3a When any system in the link state message is used, the message data field of the link state message can set 3 binary bits as node flag bits indicating the identity of the second node, and can also set 5 binary bits as status flag bits. Each of these 5 binary bits can represent Figure 3a The status of any link in the
[0174] S1003, receiving a redundant switching control message broadcast by the first node based on CAN communication.
[0175] S1004: Determine whether a link switching operation needs to be performed according to the redundant switching control message, and if necessary, perform the link switching operation.
[0176] The redundant switching control message may include a switching instruction, and the second node may determine whether to perform a link switching operation by parsing the switching instruction in the redundant switching control message. In addition, the redundant switching control message may also include a global link state and / or a target node to which each node needs to be connected, and the global link state may represent the connectivity state of all Ethernet links in the vehicle-mounted ring network system.
[0177] Exemplarily, the message data field of the redundant switching control message can refer to Table 2 in the first aspect above, and the switching instruction can be a preset binary bit. When the binary bit is 0, the second node determines that there is no need to perform a link switching operation; when the binary bit is 1, the second node can determine that a link switching operation needs to be performed based on the global link status or the target node to be connected.
[0178] If the second node determines that a link switching operation needs to be performed, the target link to be switched can be determined based on the global link state in the redundant switching control message, and the target link can be switched by adjusting the port settings. Alternatively, the second node can determine the target link to be switched based on the target node to be connected in the redundant switching control message, and switch to the target link by adjusting the port settings.
[0179] In some possible implementations, the redundant switching control message includes a global link state, the global link state includes states of Ethernet links corresponding to a plurality of second nodes in the vehicle ring network system, and determining whether a link switching operation needs to be performed according to the redundant switching control message includes:
[0180] S10041, determining a target link to be connected according to the global link state and a preset mapping relationship.
[0181] The target link is determined based on the Ethernet link connecting the current second node and other second nodes.
[0182] S10042: If the target link is inconsistent with the Ethernet link to which the second node is currently connected, a link switching operation needs to be performed.
[0183] Exemplarily, executing the link switching operation includes: determining a target node to be connected according to the target link; and modifying a port corresponding to the target node to be a port where the target link is located.
[0184] S10043: If the target link is consistent with the Ethernet link to which the second node is currently connected, there is no need to perform a link switching operation.
[0185] In some possible implementations, the redundant switching control message may include a target node to which the second node needs to connect. After the second node parses the redundant switching control message to obtain the target node, it can determine whether the Ethernet link between the second node and the target node is in a connected state. If it is in a connected state, there is no need to perform a link switching operation. If it is not connected, it is necessary to perform a link switching operation to connect the current second node to the target node.
[0186] by Figure 8 For example, the redundant switching control message may include the target node that each second node needs to connect to. For example, link AB and link BC are originally connected links. Even if link AC is not connected, node A can still exchange data with node C. At this time, the target node that node A needs to connect to is only node B. When link BC is not connected, the target nodes that node A needs to connect to become nodes B and C. After node A receives the message containing the target nodes (node B and node C), it can enable link AC and switch the data communication link between node C and node C to link AC.
[0187] Fig.11 The structure diagram of a ring network communication redundancy control device provided by an exemplary embodiment of the present invention is shown in FIG. Fig.11 As shown, the ring network communication redundancy control device 1100 may include:
[0188] The node detection module 1101 is used to control the node to respond to the detection of Ethernet link abnormality and broadcast the link abnormality status of the Ethernet link based on the control area network CAN communication.
[0189] The master control management module 1102 is used to control the master control node to determine whether redundant link switching is required according to the acquired link abnormal state, and broadcast redundant switching control messages based on CAN communication when redundant link switching is required.
[0190] The switching module 1103 is used to control the node to adjust its own port settings according to the redundant switching control message, so as to form a new ring network link according to the adjusted port settings.
[0191] In one embodiment, the master management module 1102 may include:
[0192] The integration unit is used to control the master control node to integrate the acquired link abnormal status to obtain the global link status of the vehicle-mounted ring network system.
[0193] The switching judgment unit is used to control the master control node to judge whether redundant link switching is required according to the global link status.
[0194] In one embodiment, the switching determination unit may include:
[0195] The state comparison unit is used to control the master control node to respond that the global link state remains unchanged within a preset first period of time, and compare whether the global link state is consistent with the global link state recorded during the last judgment. If they are consistent, redundant link switching is not required; if they are inconsistent, redundant link switching is required.
[0196] In one embodiment, the switching module 1103 may include:
[0197] The parameter determination unit is used to control the node to determine the port parameter corresponding to the global link state according to the global link state and a preset mapping relationship.
[0198] The adjustment unit is used to control the node to adjust the port setting corresponding to the node according to the port parameter.
[0199] In one embodiment, the adjustment unit is further used to block the sending and receiving of messages on the switch corresponding to the current node according to the data flow direction between the current node and the first node, where the first node is a node with a link abnormality with the current node; and to flush the forwarding database FDB table on the switch corresponding to the current node according to the target node.
[0200] In one embodiment, the switching module 1103 is further configured to control the node to adjust the port settings of the node itself according to the redundant link to be switched.
[0201] In one embodiment, the redundant switching control message includes a switching instruction and a global link status.
[0202] In one embodiment, the node detection module 1101 is also used to control the node to detect that the direct Ethernet link is abnormal.
[0203] In one embodiment, the node detection module 1101 is also used to control the node to periodically detect whether the Ethernet link is abnormal; it is also used to control the node to respond to detecting the same Ethernet link abnormality in multiple consecutive detection cycles, and broadcast the link abnormality status of the Ethernet link based on CAN communication.
[0204] It should be understood that the above device embodiments are only illustrative, and the device of the present invention can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0205] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present invention may be integrated into one unit / module, or each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0206] Fig.12 FIG. 1 is a schematic diagram of a structure of an electronic device provided by an exemplary embodiment of the present invention. Fig.12 As shown, the electronic device 120 includes:
[0207] Processor 121, memory 122, and communication interface 123;
[0208] The memory 122 is used to store executable instructions of the processor 121; the executable instructions may be computer-executable instructions;
[0209] The processor 121 is configured to execute the technical solution in any of the aforementioned method embodiments by executing the executable instructions.
[0210] Optionally, the memory 122 may be independent or integrated with the processor 121 .
[0211] Optionally, when the memory 122 is a device independent of the processor 121, the electronic device 120 may further include:
[0212] The bus 124 , the memory 122 and the communication interface 123 are connected to the processor 121 via the bus 124 and communicate with each other. The communication interface 123 is used to communicate with other devices.
[0213] Optionally, the communication interface 123 may be implemented by a transceiver. The communication interface is used to implement communication between the database access device and other devices (such as a client, a read-write library, and a read-only library). The memory may include a random access memory (RAM) and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0214] The bus 124 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0215] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0216] The electronic device is used to execute the technical solution in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.
[0217] An embodiment of the present invention further provides a readable storage medium, which may be a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the technical solution provided by any of the aforementioned method embodiments is implemented.
[0218] An embodiment of the present invention further provides a computer program product, including a computer program, which is used to implement the technical solution provided by any of the aforementioned method embodiments when executed by a processor.
[0219] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0220] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0221] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention is indicated by the following claims.
[0222] The above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.
Claims
1. A ring network communication redundancy control method, characterized in that: Applied to a vehicle-mounted ring network system, the vehicle-mounted ring network system includes a plurality of nodes, the plurality of nodes are connected via an Ethernet link to form a ring network link, the plurality of nodes include a master control node, and the ring network communication redundancy control method includes: The node responds to detecting an Ethernet link abnormality by broadcasting a link abnormality status of the Ethernet link based on a control area network CAN communication; The master control node determines whether redundant link switching is required according to the acquired abnormal link status, and when redundant link switching is required, broadcasts a redundant switching control message based on CAN communication; The node adjusts its own port settings according to the redundant switching control message, so as to form a new ring network link according to the adjusted port settings.
2. The ring network communication redundancy control method according to claim 1, characterized in that: The master control node determines whether redundant link switching is required according to the acquired link abnormal state, including: The master control node integrates the acquired link abnormal status to obtain the global link status of the vehicle-mounted ring network system; The master control node determines whether redundant link switching is required according to the global link status.
3. The ring network communication redundancy control method according to claim 2, characterized in that: The master control node determines whether redundant link switching is required according to the global link status, including: In response to the global link state remaining unchanged within a preset first period of time, comparing the global link state with the global link state recorded during the last determination to see whether they are consistent; If they are consistent, there is no need to switch the redundant link; If they are inconsistent, redundant link switching is required.
4. The ring network communication redundancy control method according to claim 2 or 3, characterized in that: The redundant switching control message carries the global link state, and the node adjusts the port setting of the node itself according to the redundant switching control message, including: The node determines the port parameter corresponding to the global link state according to the global link state and a preset mapping relationship; The node adjusts the port setting corresponding to the node according to the port parameter.
5. The ring network communication redundancy control method according to claim 4, characterized in that: The port parameters include a target node corresponding to the current node, and adjusting the port settings corresponding to the node according to the port parameters includes: blocking the sending and receiving of messages to the switch corresponding to the current node according to the data flow direction between the current node and the faulty node, wherein the faulty node is a node with abnormal link communication with the current node; The port corresponding to the media access control address MAC address of the failed node is modified to the port corresponding to the MAC address of the target node.
6. The ring network communication redundancy control method according to any one of claims 1 to 3, characterized in that: The redundant switching control message carries the redundant link to be switched, and the node adjusts the port setting of the node itself according to the redundant switching control message, including: The node adjusts its own port settings according to the redundant link to be switched.
7. The ring network communication redundancy control method according to any one of claims 1 to 3, characterized in that: The redundant switching control message includes a switching instruction and a global link status.
8. The ring network communication redundancy control method according to any one of claims 1 to 3, characterized in that: The node detecting that the Ethernet link is abnormal includes: the node detecting that the directly connected Ethernet link is abnormal.
9. The ring network communication redundancy control method according to any one of claims 1 to 3, characterized in that: Also includes: The node periodically detects whether the Ethernet link is abnormal; Accordingly, the node responds to detecting the Ethernet link abnormality and broadcasts the link abnormality state of the Ethernet link based on CAN communication, including: The node responds to detecting the same Ethernet link abnormality in multiple consecutive detection cycles and broadcasts the link abnormality status of the Ethernet link based on CAN communication.
10. A ring network communication redundancy control method, characterized in that: The invention is applied to a first node in a vehicle-mounted ring network system, wherein the vehicle-mounted ring network system includes the first node and a plurality of second nodes connected via an Ethernet link, wherein the first node communicates with the second node based on a control area network (CAN), and the ring network communication redundancy control method includes: Acquire a link status message broadcast by the second node based on CAN communication, wherein the link status message represents a status of an Ethernet link detected by the second node; Determine whether the vehicle-mounted ring network system needs to perform redundant link switching based on the status of the Ethernet link in the link status message. If necessary, broadcast a redundant switching control message based on CAN communication, and the redundant switching control message is used to instruct the second node to perform a link switching operation.
11. The ring network communication redundancy control method according to claim 10, characterized in that: The determining whether the vehicle-mounted ring network system needs to perform redundant link switching according to the state of the Ethernet link in the link state message includes: Integrate the states of the Ethernet links detected by the plurality of second nodes to obtain a global link state; Whether redundant link switching is required is determined according to the global link status.
12. The ring network communication redundancy control method according to claim 11, characterized in that: The determining whether redundant link switching is required according to the global link status includes: Comparing the global link state with a preset reference link state to see whether they are consistent; If they are consistent, it is determined that redundant link switching is not necessary; If they are inconsistent, it is determined that redundant link switching is required, and the global link status after switching is obtained and recorded.
13. The ring network communication redundancy control method according to claim 12, characterized in that: The reference link state is the global link state recorded when it was last determined that redundant link switching was required.
14. The ring network communication redundancy control method according to any one of claims 11 to 13, characterized in that: The message data field of the redundant switching control message includes a flag bit for representing the global link state.
15. The ring network communication redundancy control method according to any one of claims 11 to 13, characterized in that: The first node is connected to the second node via an Ethernet link, and the ring network communication redundancy control method further includes: Detect the status of the connected Ethernet link; The determining whether the vehicle-mounted ring network system needs to perform redundant link switching according to the state of the Ethernet link in the link state message includes: Whether the vehicle-mounted ring network system needs to perform redundant link switching is determined according to the detected state of the Ethernet link and the state of the Ethernet link in the link state message.
16. The ring network communication redundancy control method according to claim 15, characterized in that: Also includes: In response to determining that redundant link switching is required, determining whether a link switching operation needs to be performed according to the global link status, and performing the link switching operation when necessary.
17. A ring network communication redundancy control method, characterized in that: The second node is applied to a vehicle-mounted ring network system, wherein there are multiple second nodes, and different second nodes are connected via Ethernet links. The vehicle-mounted ring network system also includes a first node that communicates with the second node based on a control area network CAN. The ring network communication redundancy control method includes: Detect the status of the connected Ethernet link; In response to determining that the state of the Ethernet link meets a preset abnormal condition, broadcasting a link state message based on CAN communication, wherein the link state message represents the state of the Ethernet link; Receiving a redundant switching control message broadcast by the first node based on CAN communication; Determine whether a link switching operation needs to be performed according to the redundant switching control message, and if necessary, perform the link switching operation.
18. The ring network communication redundancy control method according to claim 17, characterized in that: The detecting the state of the connected Ethernet link comprises: Periodically check the status of the connected Ethernet link; Accordingly, in response to determining that the state of the Ethernet link satisfies a preset abnormal condition, broadcasting a link state message based on CAN communication includes: Determine whether the state of the Ethernet link is detected as an abnormal state in multiple consecutive detection cycles, and if so, broadcast a link state message based on CAN communication.
19. The ring network communication redundancy control method according to claim 17 or 18, characterized in that: The message data field of the link status message includes a node flag bit and a status flag bit. The node flag bit represents the identity information of the node that sends the link status message, and the status flag bit represents the status of the Ethernet link.
20. The ring network communication redundancy control method according to claim 17 or 18, characterized in that: The redundant switching control message includes a global link state, and the global link state includes states of Ethernet links corresponding to a plurality of second nodes in the vehicle-mounted ring network system. The determining whether a link switching operation needs to be performed according to the redundant switching control message includes: Determine a target link to be connected according to the global link state and a preset mapping relationship, wherein the target link is determined based on an Ethernet link connecting the current second node and other second nodes; If the target link is inconsistent with the Ethernet link currently connected to the second node, a link switching operation needs to be performed; If the target link is consistent with the Ethernet link to which the second node is currently connected, there is no need to perform a link switching operation.
21. The ring network communication redundancy control method according to claim 20, characterized in that: The performing of the link switching operation includes: Determine the target node to be connected according to the target link; The port corresponding to the target node is modified to be the port where the target link is located.
22. A ring network communication redundant control device, characterized in that: Applied to a vehicle-mounted ring network system, the vehicle-mounted ring network system includes a plurality of nodes, the plurality of nodes are connected via an Ethernet link to form a ring network link, the plurality of nodes include a master control node, and the ring network communication redundancy control device includes: A node detection module, used for controlling the node to respond to detecting an abnormality in the Ethernet link, and broadcasting the abnormal link status of the Ethernet link based on the control area network CAN communication; A master control management module, used to control the master control node to determine whether redundant link switching is required according to the acquired link abnormality status, and broadcast redundant switching control messages based on CAN communication when redundant link switching is required; The switching module is used to control the node to adjust the port settings of the node itself according to the redundant switching control message, so as to form a new ring network link according to the adjusted port settings.
23. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 21.
24. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 21 when executed by a processor.
25. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 21 when being executed by a processor.
Citation Information
Patent Citations
Non-inductive switching redundancy communication implementation method and system based on bus
CN113572673A
Redundant link switching method based on vehicle-mounted Ethernet ring network and readable storage medium
CN114500161A
Message forwarding method, device and system
CN115567342A
Active safety system for ethernet-based vehicle through duplexing of backbone switch
KR101506228B1
Cited By
Vehicle-mounted network communication device and method based on CAN and Ethernet redundancy
CN121418434A
Ring-network communication redundancy control method and apparatus, and electronic device and readable storage medium
WO2026045441A1
