Ring-network communication redundancy control method and apparatus, and electronic device and readable storage medium
By introducing Ethernet link anomaly detection and CAN communication broadcasting into the vehicle-mounted ring network system, the master control node can judge and switch redundant links, solving the problem of high hardware resource requirements in the existing technology and achieving higher communication reliability and simplified redundancy control.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-05-29
- Publication Date
- 2026-03-05
AI Technical Summary
In existing technologies for vehicle-mounted ring network communication, redundancy control schemes have high requirements for node hardware resources and cannot effectively solve the reliability problem under abnormal communication link conditions.
By introducing an Ethernet link anomaly detection mechanism and CAN communication broadcast in the vehicle-mounted ring network system, the master control node judges the abnormal state of the link and broadcasts a redundancy switching control message. The node adjusts the port settings according to the message to form a new ring network link, ensuring that communication is switched to the backup link.
It improves the communication reliability of the vehicle-mounted ring network system, reduces the requirements for node hardware resources, and makes the redundancy control scheme simpler, easier to implement, and more applicable.
Smart Images

Figure CN2025098200_05032026_PF_FP_ABST
Abstract
Description
Ring network communication redundancy control methods, devices, electronic equipment and readable storage media
[0001] This application claims priority to Chinese Patent Application No. 2024112134903, filed on August 30, 2024, entitled “Ring Network Communication Redundancy Control Method, Apparatus, Electronic Equipment and Readable Storage Medium”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of vehicle-mounted communication, and in particular to a ring network communication redundancy control method, device, electronic device, and readable storage medium. Background Technology
[0003] The rapid advancement of vehicle electrification and intelligentization has placed higher demands on the capabilities of in-vehicle systems. As high-performance computing centers become more common, automotive electronic and electrical architectures are gradually evolving towards a "central + regional" architecture. The central computing center is primarily used for computation and decision-making, while the regional controllers are mainly used to transmit vehicle and sensor-related data to the central computing center and execute its control commands. To ensure bandwidth and reliability of data exchange between the central and regional controllers, they are typically networked in a ring network configuration using Ethernet links to achieve mutual redundancy.
[0004] The core of ring network communication redundancy control schemes lies in achieving redundancy switching in the event of communication link anomalies through the collaboration of nodes within the ring network. Currently, to achieve communication redundancy control in the automotive field, some solutions integrate frame duplication and frame cancellation functions into each node of the ring network based on TSN technology, ensuring that a correct message is available under any link condition. However, this approach places high demands on the hardware resources of the nodes and cannot effectively solve the redundancy control problem in vehicle ring network communication. Summary of the Invention
[0005] One of the purposes of this application is to provide a method, apparatus, electronic device, and readable storage medium for redundancy control in vehicle ring network communication, so as to solve the redundancy control problem in vehicle ring network communication.
[0006] To achieve the above objectives, the technical solution adopted in this application is as follows:
[0007] A ring network communication redundancy control method is applied to an on-board ring network system. The on-board ring network system includes multiple nodes connected via Ethernet links to form a ring network link. The multiple nodes include a master control node. The ring network communication redundancy control method includes:
[0008] The node responds to the detection of an Ethernet link anomaly by broadcasting the link anomaly status of the Ethernet link based on the CAN communication of the control area network.
[0009] The master control node determines whether redundant link switching is required based on the obtained link abnormal status, and broadcasts a redundant switching control message based on CAN communication when redundant link switching is required.
[0010] The node adjusts its own port settings according to the redundancy switching control message, so as to form a new ring network link based on the adjusted port settings.
[0011] Based on the above technical means, the Ethernet link anomaly detection mechanism and the Ethernet forwarding table flushing mechanism are used to enable Ethernet communication to switch to backup Ethernet link communication in the event of a link anomaly, thus ensuring normal communication between associated nodes.
[0012] Furthermore, the master control node determines whether redundant link switching is needed based on the acquired link anomaly status, including:
[0013] The master control node integrates the acquired link anomaly status to obtain the global link status of the vehicle-mounted ring network system.
[0014] The master control node determines whether redundant link switching is needed based on the global link status.
[0015] Furthermore, the master control node determines whether redundant link switching is needed based on the global link status, including:
[0016] If the global link state remains unchanged within a preset first time period, compare whether the global link state is consistent with the global link state recorded in the previous judgment.
[0017] If they are consistent, then there is no need to switch redundant links;
[0018] If there is a discrepancy, a redundant link switch is required.
[0019] Furthermore, the redundancy handover control message carries the global link status, and the node adjusts its own port settings according to the redundancy handover control message, including:
[0020] The node determines the port parameters corresponding to the global link state based on the global link state and the preset mapping relationship;
[0021] The node adjusts its corresponding port settings based on the port parameters.
[0022] Furthermore, the port parameters include the target node corresponding to the current node, and adjusting the port settings corresponding to the node according to the port parameters includes:
[0023] Based on the data flow direction between the current node and the faulty node, the switch corresponding to the current node is blocked from sending and receiving packets. The faulty node is a node with abnormal link communication with the current node.
[0024] Modify the port corresponding to the Media Access Control (MAC) address of the faulty node to the port corresponding to the MAC address of the target node.
[0025] Furthermore, the redundancy handover control message carries the redundant link to be handed over, and the node adjusts its own port settings according to the redundancy handover control message, including:
[0026] The node adjusts its own port settings according to the redundant link to be switched.
[0027] Furthermore, the redundancy handover control message includes a handover instruction and a global link status.
[0028] Furthermore, the node detects an Ethernet link anomaly, including: the node detects an anomaly in a directly connected Ethernet link.
[0029] Furthermore, this ring network communication redundancy control method also includes:
[0030] The node periodically checks whether the Ethernet link is abnormal;
[0031] Accordingly, the node responds to the detection of an Ethernet link anomaly by broadcasting the link anomaly status of the Ethernet link based on CAN communication, including:
[0032] The node response broadcasts the abnormal Ethernet link status based on CAN communication when it detects the same Ethernet link anomaly in multiple consecutive detection cycles.
[0033] A ring network communication redundancy control method is applied to a first node in a vehicle-mounted ring network system. The vehicle-mounted ring network system includes the first node and multiple second nodes connected via Ethernet links. The first node and the second nodes communicate based on a Control Area Network (CAN). The ring network communication redundancy control method includes:
[0034] Obtain the link status message broadcast by the second node based on CAN communication, the link status message representing the status of the Ethernet link detected by the second node;
[0035] Based on the Ethernet link status in the link status message, determine whether the vehicle ring network system needs to perform redundant link switching. If so, broadcast a redundant switching control message based on CAN communication. The redundant switching control message is used to instruct the second node to perform link switching operation.
[0036] Furthermore, determining whether the vehicular ring network system needs to perform redundant link switching based on the Ethernet link status in the link status message includes:
[0037] The states of multiple Ethernet links detected by the second node are integrated to obtain the global link state;
[0038] Determine whether redundant link switching is needed based on the global link status.
[0039] Furthermore, the step of determining whether redundant link switching is needed based on the global link status includes:
[0040] Compare the global link status with the preset reference link status to see if they are consistent;
[0041] If they match, then it is determined that no redundant link switching is required;
[0042] If there is a discrepancy, it is determined that a redundant link switch is required, and the global link status after the switch is obtained and recorded.
[0043] Furthermore, the reference link status is the global link status recorded when it was previously determined that a redundant link switch was required.
[0044] Furthermore, the message data field of the redundancy switching control message includes flag bits used to characterize the global link state.
[0045] Furthermore, the first node and the second node are connected via an Ethernet link, and the ring network communication redundancy control method further includes:
[0046] Detect the status of the connected Ethernet link;
[0047] The step of determining whether the vehicle-mounted ring network system needs to perform redundant link switching based on the Ethernet link status in the link status message includes:
[0048] The system determines whether redundant link switching is required based on the detected Ethernet link status and the Ethernet link status in the link status message.
[0049] Furthermore, it also includes:
[0050] In response to the determination that redundant link switching is required, the system determines whether a link switching operation needs to be performed based on the global link status, and performs the link switching operation when necessary.
[0051] A ring network communication redundancy control method is applied to a second node in a vehicle-mounted ring network system. Multiple second nodes are connected via Ethernet links. The vehicle-mounted ring network system also includes a first node that communicates with the second nodes via a Control Area Network (CAN). The ring network communication redundancy control method includes:
[0052] Detect the status of the connected Ethernet link;
[0053] In response to determining that the state of the Ethernet link meets a preset abnormal condition, a link status message is broadcast based on CAN communication, the link status message representing the state of the Ethernet link;
[0054] Receive the redundancy switching control message broadcast by the first node based on CAN communication;
[0055] The redundancy switching control message determines whether a link switching operation needs to be performed. If so, the link switching operation is performed.
[0056] Furthermore, the detection of the status of the connected Ethernet link includes:
[0057] Periodically check the status of the connected Ethernet link;
[0058] Accordingly, the step of responding to determining that the state of the Ethernet link meets preset abnormal conditions by broadcasting a link status message based on CAN communication includes:
[0059] Determine whether the Ethernet link is detected as being in an abnormal state in multiple consecutive detection cycles. If so, broadcast a link status message based on CAN communication.
[0060] 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.
[0061] Furthermore, the redundancy handover control message includes a global link status, which includes the status of Ethernet links corresponding to multiple second nodes in the vehicular ring network system. Determining whether a link handover operation needs to be performed based on the redundancy handover control message includes:
[0062] Based on the global link status and the preset mapping relationship, the target link to be connected is determined. The target link is determined based on the Ethernet link connecting the current second node to other second nodes.
[0063] If the target link is inconsistent with the Ethernet link that the current second node is already connected to, a link switching operation needs to be performed;
[0064] If the target link is the same as the Ethernet link that the current second node is already connected to, then no link switching operation is required.
[0065] Furthermore, the execution of the link switching operation includes:
[0066] The target nodes that need to be connected are determined based on the target link;
[0067] Modify the port corresponding to the target node to the port where the target link is located.
[0068] A ring network communication redundancy control device is applied to an on-board ring network system. The on-board ring network system includes multiple nodes connected via Ethernet links to form a ring network link. The multiple nodes include a master control node. The ring network communication redundancy control device includes:
[0069] The node detection module is used to control the node to respond to the detection of an Ethernet link anomaly and broadcast the link anomaly status of the Ethernet link based on the CAN communication of the control area network.
[0070] The main control management module is used to control the main control node to determine whether redundant link switching is needed based on the obtained link abnormal status, and broadcast a redundant switching control message based on CAN communication when redundant link switching is needed.
[0071] The switching module is used to control the node to adjust its own port settings according to the redundancy switching control message, so as to form a new ring network link according to the adjusted port settings.
[0072] An electronic device includes: a processor, and a memory communicatively connected to the processor;
[0073] The memory stores computer-executed instructions;
[0074] The processor executes computer execution instructions stored in the memory to implement the ring network communication redundancy control method as described in any of the above.
[0075] A computer-readable storage medium includes: computer-executable instructions stored in the computer-readable storage medium, which, when executed by a processor, are used to implement the ring network communication redundancy control method as described in any of the above claims.
[0076] A computer program product includes a computer program that, when executed by a processor, implements the ring network communication redundancy control method as described in any of the above.
[0077] The beneficial effects of this application are:
[0078] (1) In this application, the Ethernet link detection and judgment switching link coordination between different nodes are all achieved 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 event of any Ethernet link failure, thereby improving the overall communication reliability of the vehicle ring network system.
[0079] (2) In this application, Ethernet link detection and redundant link switching control can be implemented based on Ethernet communication itself. By integrating the function of judging whether to switch the link based on 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 low, thereby reducing the requirements of the vehicle ring network communication redundancy control scheme on node hardware resources. Compared with the existing control scheme, it is simpler and easier to implement and has stronger availability. Attached Figure Description
[0080] Figure 1 is a schematic diagram of an application scenario of a ring network communication redundancy control method provided in an embodiment of this application;
[0081] Figure 2 is a flowchart illustrating a ring network communication redundancy control method according to an embodiment of this application;
[0082] Figure 3a is a schematic diagram of a vehicle-mounted ring network system communication architecture provided in an embodiment of this application;
[0083] Figure 3b is a schematic diagram of redundancy switching when there is a link anomaly in the ring network system shown in Figure 3a.
[0084] Figure 4 is a flowchart illustrating a link switching determination method provided in an embodiment of this application;
[0085] Figure 5 is a flowchart illustrating a method for adjusting node ports according to an embodiment of this application;
[0086] Figure 6 is a schematic diagram of a node functional module deployment according to an embodiment of this application;
[0087] Figure 7 is a flowchart illustrating another ring network communication redundancy control method provided in an embodiment of this application;
[0088] Figure 8 is a schematic diagram of a redundancy control process provided in an embodiment of this application;
[0089] Figure 9 is a flowchart illustrating another ring network communication redundancy control method provided in an embodiment of this application;
[0090] Figure 10 is a flowchart illustrating another ring network communication redundancy control method provided in an embodiment of this application;
[0091] Figure 11 is a schematic diagram of a ring network communication redundancy control device provided in an embodiment of this application;
[0092] Figure 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0093] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0094] The embodiments of this application 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 this application from the content disclosed in this specification. This application 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 this application. It should be understood that the preferred embodiments are only for illustrating this application and are not intended to limit the scope of protection of this application.
[0095] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0096] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0097] The terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, product, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, product, or apparatus. Without further limitation, the presence of other identical or equivalent elements in the process, method, product, or apparatus that includes said elements is not excluded. For example, the use of terms such as "first," "second," etc., is to denote names and does not indicate any particular order.
[0098] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of this application. As shown in Figure 1, the overall architecture of the vehicle system may include a central computing center and regional controllers. The central computing center can be used for calculation and decision-making; the regional controllers can be used to transmit vehicle body and sensor-related data to the central computing center, execute control commands from the central computing center, and perform some basic calculations. 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 in communication. For example, the central computing center and the two regional controllers in Figure 1 can jointly form an Ethernet ring network based on links a, b, and c. The central computing center may be a cockpit-integrated central control system deployed in the vehicle (referred to as a "cockpit-integrated system"), and the regional controllers may be vehicle control systems such as intelligent driving and intelligent control deployed in the vehicle.
[0099] This application can be applied to in-vehicle ring network systems, including the scenario shown in Figure 1, to meet the requirements of vehicle control systems such as intelligent driving and intelligent control for vehicle communication architecture. The in-vehicle ring network system can contain at least three nodes, and a master control node is present among these at least three nodes. In some application scenarios, the nodes can form an Ethernet ring network communication system by connecting in pairs using Ethernet as the communication medium. In other application scenarios, the Ethernet ring network communication system can also be composed of other in-vehicle systems with Ethernet ring network capabilities, with each in-vehicle system using an independent Ethernet switch as the network connection intermediary. In this application, a single node in the in-vehicle ring network system can correspond to the integrated cockpit system on the vehicle side, or it can correspond to any vehicle control system such as intelligent driving or intelligent control. The master control node can be the integrated cockpit system or any vehicle control system.
[0100] The application scenarios mentioned above are only partial examples. Those skilled in the art can expand the applications to specific business scenarios, and the embodiments of this application do not impose specific limitations on them. The following describes a ring network communication redundancy control method according to the first aspect of this application, with reference to the application scenario in Figure 1 and Figures 2 to 6.
[0101] Figure 2 is a flowchart illustrating a ring network communication redundancy control method according to an embodiment of this application. As shown in Figure 2, the method may include:
[0102] In step S201, the node responds by detecting an Ethernet link anomaly and broadcasts the abnormal Ethernet link status based on the CAN communication of the control area network.
[0103] The ring network communication redundancy control method in this embodiment can be applied to a vehicle-mounted ring network system. The vehicle-mounted ring network system includes multiple nodes, which are connected by Ethernet links to form a ring network link. The multiple nodes include a master control node.
[0104] CAN (Controller Area Network) is a serial communication network that supports distributed control systems. CAN communication can include communication via CAN bus based on the CAN protocol and CANFD (CAN with Flexible Data Rate) protocol.
[0105] Specifically, nodes in the vehicle-mounted ring network system can be connected via a CAN bus. Each node in the ring network system can detect the status of adjacent Ethernet links. If a node detects an abnormality in the status of an adjacent link, it can encapsulate the abnormality information into a message and broadcast it to the bus based on the CAN protocol. A node detecting an abnormality in an adjacent Ethernet link can refer to a node detecting an abnormality in a directly connected Ethernet link. For example, in Figure 1, area controller 1 and area controller 2 are directly connected via link b. Both area controller 1 and area controller 2 can detect whether link b is abnormal through the underlying link status judgment mechanism.
[0106] In some possible implementations, nodes periodically detect whether the Ethernet link is abnormal. Accordingly, in response to detecting an Ethernet link abnormality, the node broadcasts the abnormal link status via CAN communication. This includes situations where the node detects the same Ethernet link abnormality in multiple consecutive detection cycles and broadcasts the abnormal link status via CAN communication. For example, a node can detect whether a directly connected link is abnormal at 10ms intervals. If the directly connected link is abnormal for three consecutive cycles, the node can encapsulate the link status into a preset abnormal message format and broadcast it externally via CAN at 10ms intervals.
[0107] In step S202, the master control node determines whether redundant link switching is required based on the obtained link abnormal status, and broadcasts a redundant switching control message based on CAN communication when redundant link switching is required.
[0108] The master control node can be a node pre-selected from all nodes in the ring network system. The redundancy switching control message can be generated by the master control node based on the abnormal link status, or it can be a preset message obtained by the master control node from the internal or external storage module based on the abnormal link status.
[0109] Specifically, nodes can receive link anomaly statuses from other nodes via broadcast. The master node, based on its own detected link anomaly status and / or those provided by other nodes, uses its internal decision module to determine whether redundant link switching is necessary in the ring network system. If so, it can broadcast a redundancy switching control message via the CAN bus. The decision module within the master node can execute algorithms corresponding to preset decision rules, which can be based on the current link anomaly status to determine whether there are nodes in the ring network system that cannot communicate normally.
[0110] It is understandable that each node in a ring network system can communicate with different nodes through multiple direct links. Even if the direct link between a node and another node fails, the two nodes may still communicate indirectly through links between other nodes.
[0111] In step S203, the node adjusts its own port settings according to the redundancy switching control message to form a new ring network link based on the adjusted port settings.
[0112] Specifically, the redundancy switching control message can carry the redundant links to be switched for all nodes. After the CAN bus broadcasts the redundancy switching control message, each node can adjust its own switch port settings according to the redundant links in the redundancy switching control message using the Ethernet forwarding table writing mechanism, disable abnormal links and switch to redundant links for communication. The ring network system will form a new ring network link based on the combination of the adjusted redundant links of each node and the links that have not participated in the adjustment.
[0113] In the above embodiments, nodes in the vehicle-mounted ring network system can detect abnormal Ethernet link states and broadcast these states via CAN communication. The master control node can determine whether to switch redundant links based on the abnormal link states of each node. If a switch is required, a switch control message is broadcast via CAN communication, and each node can adjust its port settings according to the switch control message. In this method, the coordination of Ethernet link detection and link switching between different nodes is achieved through CAN communication. The high reliability of CAN communication ensures that the state of all Ethernet links can be synchronized to the corresponding node in the event of any Ethernet link failure. Ethernet link detection and redundant link switching control can be implemented based on Ethernet communication itself. By utilizing the Ethernet link failure detection mechanism and Ethernet forwarding table writing mechanism, Ethernet communication can switch to backup Ethernet link communication in the event of a link failure, ensuring normal communication between associated nodes. This not only improves the reliability of Ethernet communication but also only requires the master control node to integrate the function of determining whether to switch links based on abnormal link states and broadcasting switch control messages. This places lower requirements on other nodes besides the master control node, thereby reducing the hardware resource requirements of the vehicle-mounted ring network communication redundancy control scheme. Compared to existing control schemes, this method is simpler, easier to implement, and more usable.
[0114] Figure 3a is a schematic diagram of the communication architecture of an in-vehicle ring network system provided in an embodiment of this application. As shown in Figure 3a, the entire in-vehicle ring network system includes vehicle control system 1, vehicle control system 2, vehicle control system 3, and an integrated driver's cab central control system. Each system includes a switch for communication. Vehicle control system 1 and vehicle control system 2 are directly connected via link 1, vehicle control system 1 and the integrated driver's cab central control system are directly connected via link 2, vehicle control system 2 and the integrated driver's cab central control system are directly connected via link 3, vehicle control system 2 and vehicle control system 3 are directly connected via link 4, and vehicle control system 1 and vehicle control system 3 are directly connected via link 5. Vehicle control system 1, vehicle control system 2, and the integrated driver's cab 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).
[0115] Figure 3b is a schematic diagram of redundancy switching when a link anomaly occurs in the ring network system shown in Figure 3a. As shown in Figure 3b, links 1 and 5 in the Ethernet links of the ring network system are abnormal. Vehicle control systems 1 and 2 detect the abnormality of link 1 through the underlying link status judgment mechanism. Similarly, vehicle control systems 1 and 3 detect the abnormality of link 5 through the underlying link status judgment mechanism. After detecting the abnormality, vehicle control systems 1, 2, and 3 broadcast the abnormal status via CAN communication. After summarizing the abnormal status, vehicle control system 1 determines that a redundant link needs to be switched and broadcasts a redundancy switching control command via CAN communication. Based on the redundancy switching control command, vehicle control systems 1, 2, and 3 adjust the port settings to switch to the backup redundant link.
[0116] In one embodiment, as shown in Figure 4, the master control node determines whether redundant link switching is needed based on the acquired link anomaly status, including:
[0117] Step S401: The master control node integrates the obtained link anomaly status to obtain the global link status of the vehicle ring network system.
[0118] Specifically, after a node detects an abnormality in the status of a directly connected link, it can periodically broadcast a message indicating the abnormal status via CAN communication. The master node can summarize and integrate the relevant abnormal link statuses of each node to obtain the global link status of the ring network system. For example, the message broadcast by each node can include the node number and link mask information. The link mask information can indicate the abnormal link information (such as the link number) in the ring network system.
[0119] In step S402, the master control node determines whether redundant link switching is needed based on the global link status.
[0120] Specifically, if the global link status remains unchanged within a preset first time period, the global link status is compared with the global link status recorded at the last judgment. If they are consistent, no redundant link switching is required; if they are inconsistent, redundant link switching is required.
[0121] In some possible implementations, the master node can compare the current global link status with the global link status at the time of the last decision on whether to perform redundant link switching. If the two are consistent, the current decision is not to perform redundant link switching; if the two are inconsistent, the decision is to perform redundant link switching.
[0122] In some possible implementations, the master node can integrate the link anomaly statuses broadcast periodically by each node to obtain the global link status for each period. If the global link statuses obtained from integrating multiple consecutive periods are inconsistent, it is not necessary to determine whether to perform redundant link switching. If the global link statuses obtained from integrating multiple consecutive periods are consistent, then it is necessary to determine whether to perform redundant link switching based on the global link status.
[0123] In one embodiment, the nodes and links in the ring network system can be pre-numbered, and the message format of CAN communication can be set based on the node number and link number. Taking the embodiments shown in Figures 3a and 3b as examples, 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. In the message, 5 bits from bit 0 to bit 4 represent links 1 to 5 respectively. A bit position of 0 indicates that the link is normal, and a bit position of 1 indicates that the link is abnormal.
[0124] As shown in Figure 3b, after detecting a link anomaly, the node can record the link number and encapsulate the link anomaly status information into a message according to the message structure shown in Table 1. The link status is then sent to the CAN bus via CAN messages at 10ms intervals.
[0125] Table 1
[0126] After determining the status of adjacent links (link1, link2, and link5), vehicle control system 1 (the master node) records the link status internally. Upon receiving link statuses from vehicle control systems 2, 3, and the integrated driver-cabin central control system, it integrates the overall vehicle link status to obtain the global link status. This integration is achieved by performing an OR operation on the received link status notification messages. Taking the system in Figure 3b as an example, a link status operation result of 10001 indicates that links 1 and 5 are abnormal in the global link status, while the remaining links are normal. Optionally, each node periodically sends messages containing abnormal status information to the bus. If the global link status integrated by the master node is consistent for three consecutive cycles, it can be compared with the global link status at the time of the master node's last determination. If the comparison result is inconsistent, a link switch is required.
[0127] In one embodiment, the redundancy handover control message carries the redundant link to be handed over, and the node adjusts its own port settings according to the redundancy handover control message, including: the node adjusts its own port settings according to the redundant link to be handed over.
[0128] In one embodiment, the redundancy handover control message carries the global link status, as shown in Figure 5. Based on the redundancy handover control message, the node adjusts its own port settings, including:
[0129] In step S501, the node determines the port parameters corresponding to the global link status based on the global link status and the preset mapping relationship.
[0130] Specifically, each node can obtain the global link status through the redundancy switching control message broadcast to the bus by the master node, and can determine the port parameters corresponding to the global link status according to the preset mapping relationship. The port parameters may include the target link after the switch, the blocked port, the target FDB (Forwarding Database) table entry of the corresponding switch port, and the VLAN (Virtual Local Area Network) status table entry, etc.
[0131] Step S502: The node adjusts the corresponding port settings according to the port parameters.
[0132] In some possible implementations, the port parameters may include the target node corresponding to the current node. The current node is the node receiving redundancy handover control messages and preparing to adjust port settings, while the target node is the node that the current node will communicate via a direct link after the handover. The current node can, based on the data flow with the faulty node, block the packet transmission and reception of the switch corresponding to the current node, and can modify the port corresponding to the Media Access Control (MAC) address of the first node to the port corresponding to the MAC address of the target node. The faulty node is the node with an abnormal link to the current node. Modifying the port corresponding to the MAC address can be achieved by flushing the FDB table of the switch corresponding to the current node, or by other methods.
[0133] In some possible implementations, the redundancy handover control message includes handover instructions and global link status.
[0134] If the master control node determines that a link switch 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 CAN message at 10ms intervals.
[0135] Table 2
[0136] Each node can obtain the global link status based on the redundancy handover control message. Each node can query the mapping table between the global link status and the handover target set internally. Based on the found handover target, the abnormal link port is first blocked. The blocking method can be to perform VLAN control on the port corresponding to the handover target through the switch control interface, and block the inbound and outbound packet transmission and reception of the port based on the VLAN Disable operation. This blocking can avoid the risk of Ethernet network storms 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 handover 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.
[0137] Taking the embodiments shown in Figures 3a and 3b as examples, when link 1 and link 5 are abnormal, vehicle control system 1, vehicle control system 2, and vehicle control system 3 first close the VLANs of the corresponding ports of link 1 and link 5. Then, vehicle control system 1 switches vehicle control system 2, vehicle control system 3, and the integrated cockpit central control system according to the FDB table rules shown in Tables 3 and 4. After the switch is completed, each node can continue to communicate normally through the redundant links.
[0138] Table 3
[0139] Table 4
[0140] Figure 6 is a schematic diagram of a node functional module deployment according to an embodiment of this application. As shown in Figure 6, 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 node is additionally equipped with a link status integration function, and the link redundancy switching module is additionally equipped with a redundancy switching decision function. After the node is powered on, the link status detection module can periodically detect the status of the node's directly connected links. If an abnormality is detected in the directly connected links for several consecutive cycles, the abnormal status can be recorded and compared with the previously recorded status. If the comparison result is consistent, no processing is performed; if the comparison result is inconsistent, the abnormal status is encapsulated into a message and broadcast via CAN communication. The communication redundancy switching control module can match the redundancy switching control message broadcast by the master node with the global link status in the link status table, and switch the backup link according to the matching result.
[0141] In this embodiment, each Ethernet node has a mapping table between link status, target switching VLAN, and FDB table. The master node integrates the abnormal statuses of each node and announces the global link status to all nodes via CAN messages. Each node performs link redundancy switching based on the mapping table. In this way, all nodes can receive the vehicle's global link status. Therefore, when one, two, or even three or more Ethernet links fail, as long as the redundancy switching target is agreed upon, each Ethernet node can switch based on the status lookup table after receiving the vehicle's Ethernet link status. The judgment logic is relatively simple and easy to implement, without other complex precondition judgments, enabling redundancy handling in all scenarios of link failure.
[0142] According to a second aspect of this application, a ring network communication redundancy control method is provided. This method can be applied to a first node in an on-board ring network system. The on-board ring network system includes the first node and multiple second nodes connected via Ethernet links. The first node and the second nodes communicate based on a Control Area Network (CAN). Both the first node and the second node can be vehicle control systems with data processing and communication functions. For example, the first node can be the master control node in the various embodiments of the ring network communication redundancy control method of the first aspect described above, and the second nodes can be other nodes in the on-board ring network system besides the master control node.
[0143] In one embodiment, as shown in Figure 7, the method applied to the first node may include:
[0144] S701, obtain the link status message broadcast by the second node based on CAN communication.
[0145] Among them, the link status message represents the status of the Ethernet link detected by the second node.
[0146] S702 determines whether the vehicle ring network system needs to perform redundant link switching based on the Ethernet link status in the link status message. If so, it broadcasts a redundant switching control message based on CAN communication.
[0147] Among them, the redundancy handover control message is used to instruct the second node to perform a link handover operation.
[0148] In some possible implementations, the first node can integrate the Ethernet link status detected by multiple second nodes to obtain the global link status, and then determine whether redundant link switching is needed based on the global link status.
[0149] In some possible implementations, the determination of whether redundant link switching is needed is based on the global link status, including: comparing whether the global link status is consistent with the preset reference link status; if consistent, it is determined that redundant link switching is not needed; if inconsistent, it is determined that redundant link switching is needed, and the global link status after switching is obtained and recorded.
[0150] In some possible implementations, the reference link state is the global link state recorded when the last determination was made that a redundant link switch was needed.
[0151] In some possible implementations, the message data field of the redundancy handover control message includes flag bits used to characterize the global link state. For example, multiple binary bits can be used in the message to represent the state of different links.
[0152] In this embodiment, the first node can be connected to the second node via an Ethernet link, or it can be connected without an Ethernet link. It should be noted that the first node and the second node are connected at least via a CAN bus.
[0153] Figure 8 is a schematic diagram of a redundancy control process provided in an embodiment of this application. As shown in Figure 8, in this embodiment, the vehicle-mounted ring network system includes a first node and three second nodes (node A, node B, and node C). The first node, node A, node B, and node C are connected via a CAN bus. Nodes A, B, and C are connected to each other via Ethernet links, where link AC is initially blocked, and links AB and BC are connected. Data from node A can be transmitted to node B via link AB, or to node C via links AB and AC.
[0154] A redundancy control process corresponding to the embodiment shown in Figure 8 may include: S1. Each second node detects whether its directly connected links are connected. S2. If both links AC and BC are disconnected, each second node broadcasts the detected status. S3. The first node can obtain the messages broadcast by each second node via the CAN bus. Based on the detected status of each second node in the messages, the first node can determine that node A and node B can still exchange data, but node C cannot exchange data with either node A or node B. S4. The first node determines that redundant link switching is required and broadcasts a redundancy switching control message. S5. Each second node obtains the message broadcast by the first node via the CAN bus and performs the redundant link switching operation based on the message. For example, when node A sends data to node C, it originally needed to send the data to node B via link AB for forwarding. After the switch, it sends the data directly to node C via link AC. For example, when node B sends data to node C, it originally sent the data directly to node C via link BC. After the switchover, it needs to send the data to node A via link AB, and then node A forwards the data to node C via link AC. Link switching can be performed by modifying the FDB table in the switch. For instance, in the FDB table of node A, the port corresponding to node C's MAC address is the port of link AB. The FDB table can be modified to change the port corresponding to node C's MAC address to the port of link AC, thus enabling link AC.
[0155] In another embodiment, the first node and the second node are connected via an Ethernet link, as shown in Figure 9. The method applied to the first node may further include:
[0156] S901 detects the status of the connected Ethernet link.
[0157] Determine whether the vehicular ring network system needs to perform redundant link switching based on the Ethernet link status in the link status message, including:
[0158] S902 determines whether the vehicle-mounted ring network system needs to perform redundant link switching based on the detected Ethernet link status and the Ethernet link status in the link status message.
[0159] Specifically, when the first node and the second node are connected via an Ethernet link, the first node can also detect the status of its directly connected Ethernet link, and can integrate this status with the Ethernet link status in the link status message broadcast by the second node to obtain the global link status, and can determine whether the vehicle ring network system needs to perform redundant link switching based on the global link status.
[0160] Some possible implementations also include: in response to determining that redundant link switching is required, determining whether a link switching operation needs to be performed based on the global link status, and performing the link switching operation when necessary.
[0161] In this embodiment, the first node can be vehicle control system 1 in Figures 3a and 3b, and the second node can be vehicle control system 2, vehicle control system 3 and integrated cockpit central control system in Figures 3a and 3b.
[0162] According to a third aspect of this application, a ring network communication redundancy control method is provided, which can be applied to a second node in an in-vehicle ring network system. Multiple second nodes are connected via Ethernet links. The in-vehicle ring network system also includes a first node that communicates with the second nodes based on a Control Area Network (CAN). Both the first and second nodes can be vehicle control systems with data processing and communication functions. For example, the first node can be the master control node in the various embodiments of the ring network communication redundancy control method of the first aspect described above, and the second node can be any node in the in-vehicle ring network system other than the master control node.
[0163] In one embodiment, as shown in FIG10, the method applied to the second node may include:
[0164] S1001 detects the status of the connected Ethernet link.
[0165] S1002, in response to determining that the state of the Ethernet link meets the preset abnormal conditions, broadcasts a link status message based on CAN communication.
[0166] Among them, the link status message represents the status of the Ethernet link.
[0167] In some possible implementations, detecting the status of the connected Ethernet link includes: periodically detecting the status of the connected Ethernet link. Accordingly, in response to determining that the status of the Ethernet link meets preset abnormal conditions, broadcasting a link status message based on CAN communication includes: determining whether the Ethernet link status is detected as abnormal in multiple consecutive detection cycles; if so, broadcasting a link status message based on CAN communication.
[0168] For example, a second node can be configured to detect the status of directly connected Ethernet links every 10ms. If an Ethernet link is detected to be disconnected for three consecutive cycles, it can be determined that the Ethernet link is abnormal, and the abnormality can be written into the link status message and broadcast according to the corresponding message data field format.
[0169] In some possible implementations, the data field of the link state message includes a node flag and a status flag. The node flag represents the identity information of the node that sent the link state message, and the status flag represents the status of the Ethernet link.
[0170] The data field of the link status message can refer to the embodiments related to Table 1 in the first aspect above. For example, when the second node is any of the systems in Figure 3a, the data field of the link status message can be set with 3 binary bits as node flag bits indicating the identity of the second node, and can also be set with 5 binary bits as status flag bits. Each of these 5 binary bits can represent the status of any link in Figure 3a.
[0171] S1003 receives the redundancy switching control message broadcast by the first node based on CAN communication.
[0172] S1004: Determine whether a link switching operation needs to be performed based on the redundancy switching control message. If so, perform the link switching operation.
[0173] The redundancy handover control message can contain handover instructions, and the second node can determine whether to perform a link handover operation by parsing the handover instructions in the redundancy handover control message. In addition, the redundancy handover control message can also contain the global link status and / or the target node that each node needs to connect to. The global link status can characterize the connectivity status of all Ethernet links in the vehicular ring network system.
[0174] For example, the message data field of the redundancy switching control message can refer to Table 2 in the first aspect above. The switching instruction can be a preset binary bit. When the binary bit is 0, the second node determines that it does not need to perform the link switching operation. When the binary bit is 1, the second node can determine that it needs to perform the link switching operation based on the global link status or the target node to be connected.
[0175] If the second node determines that a link switching operation is required, it can determine the target link to be switched to based on the global link status in the redundancy switching control message, and switch to the target link by adjusting the port settings. Alternatively, the second node can determine the target link to be switched to based on the target node to be connected in the redundancy switching control message, and switch to the target link by adjusting the port settings.
[0176] In some possible implementations, the redundancy handover control message contains the global link status, which includes the status of the Ethernet links corresponding to multiple second nodes in the vehicular ring network system. The redundancy handover control message is used to determine whether a link handover operation needs to be performed, including:
[0177] S10041, Based on the global link status and the preset mapping relationship, determine the target link that needs to be connected.
[0178] The target link is determined based on the Ethernet links connecting the current second node to other second nodes.
[0179] S10042 If the target link is inconsistent with the Ethernet link that is currently connected to the second node, a link switching operation needs to be performed.
[0180] For example, performing a link switching operation includes: determining the target node to be connected based on the target link; and modifying the port corresponding to the target node to the port where the target link is located.
[0181] S10043 If the target link is the same as the Ethernet link that the current second node is already connected to, then no link switching operation is required.
[0182] In some possible implementations, the redundancy handover control message may include the target node that the second node needs to connect to. After the second node parses the redundancy handover control message to obtain the target node, it can determine whether the Ethernet link between the second node and the target node is connected. If it is connected, no link handover operation is required. If it is disconnected, a link handover operation is required to connect the current second node to the target node.
[0183] Taking Figure 8 as an example, the redundancy handover control message can include the target nodes that each second node needs to connect to. For example, links AB and BC were originally connected. Even if link AC is not connected, node A can still exchange data with node C. At this time, the only target node that node A needs to connect to is node B. When link BC is not connected, the target nodes that node A needs to connect to become nodes B and C. After receiving a message containing the target nodes (nodes B and C), node A can activate link AC and switch the data communication link with node C to link AC.
[0184] Figure 11 is a schematic diagram of a ring network communication redundancy control device provided in an exemplary embodiment of this application. As shown in Figure 11, the ring network communication redundancy control device 1100 may include:
[0185] The node detection module 1101 is used to control the node to respond to the detection of an Ethernet link abnormality and broadcast the abnormal status of the Ethernet link based on the CAN communication of the control area network.
[0186] The main control management module 1102 is used to control the main control node to determine whether redundant link switching is needed based on the obtained link abnormal status, and broadcast a redundant switching control message based on CAN communication when redundant link switching is needed.
[0187] The switching module 1103 is used to control the node to adjust its own port settings according to the redundancy switching control message, so as to form a new ring network link according to the adjusted port settings.
[0188] In one embodiment, the main control management module 1102 may include:
[0189] The integration unit is used to control the master node to integrate the abnormal link status obtained, and obtain the global link status of the vehicle ring network system.
[0190] The switching judgment unit is used to control the master node to determine whether redundant link switching is needed based on the global link status.
[0191] In one embodiment, the switching determination unit may include:
[0192] The state comparison unit is used to control the master node to ensure that the global link state remains unchanged within a preset first time period, and to compare the global link state with the global link state recorded at the last judgment. If they are consistent, no redundant link switching is required; if they are inconsistent, redundant link switching is required.
[0193] In one embodiment, the switching module 1103 may include:
[0194] The parameter determination unit is used to control the node to determine the port parameters corresponding to the global link state based on the global link state and the preset mapping relationship.
[0195] The adjustment unit is used to control the node to adjust the port settings corresponding to the node according to the port parameters.
[0196] In one embodiment, the adjustment unit is further configured to block the packet transmission and reception of the switch corresponding to the current node according to the data flow direction between the current node and the first node, wherein the first node is a node with a link abnormality between the current node and the current node; and to perform a forwarding database FDB table flushing on the switch corresponding to the current node according to the target node.
[0197] In one embodiment, the switching module 1103 is further configured to control the node to adjust its own port settings according to the redundant link to be switched.
[0198] In one embodiment, the redundancy handover control message includes a handover instruction and a global link status.
[0199] In one embodiment, the node detection module 1101 is further configured to control the node to detect an anomaly in the directly connected Ethernet link.
[0200] In one embodiment, the node detection module 1101 is further configured to control the node to periodically detect whether the Ethernet link is abnormal; and to control the node to respond to the detection of the same Ethernet link abnormality in multiple consecutive detection cycles by broadcasting the abnormal status of the Ethernet link based on CAN communication.
[0201] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0202] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0203] Figure 12 is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. As shown in Figure 12, the electronic device 120 includes:
[0204] Processor 121, memory 122, and communication interface 123;
[0205] The memory 122 is used to store the executable instructions of the processor 121; the executable instructions may be computer-executable instructions.
[0206] The processor 121 is configured to execute the technical solutions in any of the foregoing method embodiments by executing the executable instructions.
[0207] Optionally, the memory 122 can be either standalone or integrated with the processor 121.
[0208] Optionally, when the memory 122 is a device independent of the processor 121, the electronic device 120 may further include:
[0209] Bus 124, memory 122 and communication interface 123 are connected to processor 121 through bus 124 and complete communication with each other. Communication interface 123 is used to communicate with other devices.
[0210] Optionally, the communication interface 123 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.
[0211] Bus 124 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in the diagram, but this does not imply that there is only one bus or one type of bus.
[0212] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0213] The electronic device is used to execute the technical solutions in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0214] This application also provides a readable storage medium, which can be a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the technical solution provided in any of the foregoing method embodiments.
[0215] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions provided in any of the foregoing method embodiments.
[0216] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0217] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0218] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0219] The above embodiments are merely preferred embodiments provided to fully illustrate this application, and the scope of protection of this application is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on this application are all within the scope of protection of this application.
Claims
1. A method for controlling redundancy in ring network communication, characterized in that, The method for controlling redundancy in a vehicle-mounted ring network system includes multiple nodes connected via Ethernet links to form a ring network link. Each node includes a master control node. The node responds to the detection of an Ethernet link anomaly by broadcasting the link anomaly status of the Ethernet link based on the CAN communication of the control area network. The master control node determines whether redundant link switching is required based on the obtained link abnormal status, and broadcasts a redundant switching control message based on CAN communication when redundant link switching is required. The node adjusts its own port settings according to the redundancy switching control message, so as to form a new ring network link based on 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 needed based on the acquired link anomaly status, including: The master control node integrates the acquired link anomaly status to obtain the global link status of the vehicle-mounted ring network system. The master control node determines whether redundant link switching is needed based on 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 needed based on the global link status, including: If the global link state remains unchanged within a preset first time period, compare whether the global link state is consistent with the global link state recorded in the previous judgment. If they are consistent, then there is no need to switch redundant links; If there is a discrepancy, a redundant link switch is required.
4. The ring network communication redundancy control method according to claim 2 or 3, characterized in that, The redundancy handover control message carries the global link status. Based on the redundancy handover control message, the node adjusts its own port settings, including: The node determines the port parameters corresponding to the global link state based on the global link state and the preset mapping relationship; The node adjusts its corresponding port settings based on the port parameters.
5. The ring network communication redundancy control method according to claim 4, characterized in that, The port parameters include the target node corresponding to the current node, and adjusting the port settings of the node according to the port parameters includes: Based on the data flow direction between the current node and the faulty node, the switch corresponding to the current node is blocked from sending and receiving packets. The faulty node is a node with abnormal link communication with the current node. Modify the port corresponding to the Media Access Control (MAC) address of the faulty node 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 5, characterized in that, The redundancy handover control message carries the redundant link to be handed over. The node adjusts its own port settings according to the redundancy handover 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 5, characterized in that, The redundancy handover control message includes handover instructions and global link status.
8. The ring network communication redundancy control method according to any one of claims 1 to 5, characterized in that, The node detects an Ethernet link anomaly, including: the node detects an anomaly in a directly connected Ethernet link.
9. The ring network communication redundancy control method according to any one of claims 1 to 5, characterized in that, Also includes: The node periodically checks whether the Ethernet link is abnormal; Accordingly, the node responds to the detection of an Ethernet link anomaly by broadcasting the link anomaly status of the Ethernet link based on CAN communication, including: The node response broadcasts the abnormal Ethernet link status based on CAN communication when it detects the same Ethernet link anomaly in multiple consecutive detection cycles.
10. A method for controlling redundancy in ring network communication, characterized in that, A first node is applied in an in-vehicle ring network system, the in-vehicle ring network system including the first node and multiple second nodes connected via Ethernet links, the first node and the second nodes communicate based on a Control Area Network (CAN), and the ring network communication redundancy control method includes: Obtain the link status message broadcast by the second node based on CAN communication, the link status message representing the status of the Ethernet link detected by the second node; Based on the Ethernet link status in the link status message, determine whether the vehicle ring network system needs to perform redundant link switching. If so, broadcast a redundant switching control message based on CAN communication. The redundant switching control message is used to instruct the second node to perform link switching operation.
11. The ring network communication redundancy control method according to claim 10, characterized in that, Determining whether the vehicular ring network system needs to perform redundant link switching based on the Ethernet link status in the link status message includes: The states of multiple Ethernet links detected by the second node are integrated to obtain the global link state; Determine whether redundant link switching is needed based on the global link status.
12. The ring network communication redundancy control method according to claim 11, characterized in that, The step of determining whether redundant link switching is needed based on the global link status includes: Compare the global link status with the preset reference link status to see if they are consistent; If they match, then it is determined that no redundant link switching is required; If there is a discrepancy, it is determined that a redundant link switch is required, and the global link status after the switch is obtained and recorded.
13. The ring network communication redundancy control method according to claim 12, characterized in that, The reference link status is the global link status recorded when the previous determination required a redundant link switch was made.
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 redundancy handover control message includes flag bits used to characterize 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 and the second node are connected via an Ethernet link, and the ring network communication redundancy control method further includes: Detect the status of the connected Ethernet link; Determining whether the vehicular ring network system needs to perform redundant link switching based on the Ethernet link status in the link status message includes: The system determines whether redundant link switching is required based on the detected Ethernet link status and the Ethernet link status in the link status message.
16. The ring network communication redundancy control method according to claim 15, characterized in that, Also includes: In response to the determination that redundant link switching is required, the system determines whether a link switching operation needs to be performed based on the global link status, and performs the link switching operation when necessary.
17. A method for controlling redundancy in ring network communication, characterized in that, The system includes multiple second nodes applied in an in-vehicle ring network system, connected via Ethernet links. The in-vehicle ring network system also includes a first node that communicates with the second nodes via a CAN (Controller Area Network). 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, a link status message is broadcast based on CAN communication, the link status message representing the state of the Ethernet link; Receive the redundancy switching control message broadcast by the first node based on CAN communication; The redundancy switching control message determines whether a link switching operation needs to be performed. If so, the link switching operation is performed.
18. The ring network communication redundancy control method according to claim 17, characterized in that, The detection of the status of the connected Ethernet link includes: Periodically check the status of the connected Ethernet link; Accordingly, the step of responding to determining that the state of the Ethernet link meets preset abnormal conditions by broadcasting a link status message based on CAN communication includes: Determine whether the Ethernet link is detected as being in an abnormal state in multiple consecutive detection cycles. If so, broadcast a link status message based on CAN communication.
19. The ring network communication redundancy control method according to claim 17 or 18, characterized in that, The 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 sent 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 any one of claims 17 to 19, characterized in that, The redundancy handover control message includes a global link status, which includes the status of Ethernet links corresponding to multiple second nodes in the vehicular ring network system. Determining whether a link handover operation needs to be performed based on the redundancy handover control message includes: Based on the global link status and the preset mapping relationship, the target link to be connected is determined. The target link is determined based on the Ethernet link connecting the current second node to other second nodes. If the target link is inconsistent with the Ethernet link that the current second node is already connected to, a link switching operation needs to be performed; If the target link is the same as the Ethernet link that the current second node is already connected to, then no link switching operation is required.
21. The ring network communication redundancy control method according to claim 20, characterized in that, The execution link switching operation includes: The target nodes that need to be connected are determined based on the target link; Modify the port corresponding to the target node to the port where the target link is located.
22. A ring network communication redundancy control device, characterized in that, Applied to an in-vehicle ring network system, the in-vehicle ring network system includes multiple nodes connected via Ethernet links to form a ring network link, the multiple nodes include a master control node, and the ring network communication redundancy control device includes: The node detection module is used to control the node to respond to the detection of an Ethernet link anomaly and broadcast the link anomaly status of the Ethernet link based on the CAN communication of the control area network. The main control management module is used to control the main control node to determine whether redundant link switching is needed based on the obtained link abnormal status, and broadcast a redundant switching control message based on CAN communication when redundant link switching is needed. The switching module is used to control the node to adjust its own port settings according to the redundancy 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-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in 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, when executed by a processor, are used to implement the method as described in any one of claims 1 to 21.
25. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 21.
Citation Information
Patent Citations
Ring network communication redundancy control methods, devices, electronic equipment and readable storage media
CN119135474B
Redundant link switching method based on vehicle-mounted Ethernet ring network and readable storage medium
CN114500161A
Message forwarding method, device and system
CN115567342A
Vehicle IDPS system and vehicle
CN117134959A
Ring network communication redundancy control method and device, electronic equipment and readable storage medium
CN119135474A