Ring network communication redundancy control methods, devices, electronic equipment and readable storage media
By detecting Ethernet link anomalies in the vehicle-mounted ring network system and broadcasting redundancy switching control messages using CAN communication, the master control node coordinates with each node to adjust port settings, solving the problem of high hardware resource requirements for redundancy control schemes in existing technologies, and achieving higher communication reliability and simplified redundancy control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2026-03-10
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 detecting Ethernet link anomalies, the master node broadcasts link status and redundancy switching control messages via CAN communication. The master node then determines and coordinates with each node to adjust port settings, forming a new ring network link to ensure switching to the backup link for communication in the event of a link anomaly.
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 and easier to implement.
Smart Images

Figure CN119135474B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of vehicle communication, in particular to a ring network communication redundancy control method and device, electronic equipment and readable storage medium. BACKGROUND
[0002] The rapid development of automobile electrification and intelligence puts forward higher requirements for the capability of vehicle systems, and the automobile electronic and electrical architecture also gradually evolves into a "central + regional" form with the realization of high computing center. The central computing center is mainly used for calculation and decision-making, and the regional controller is mainly used for transmitting body and sensor related data to the central computing center and executing the control instructions of the central computing center. In order to guarantee 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 form based on Ethernet link to realize communication redundancy.
[0003] The core of the ring network communication redundancy control scheme is to realize redundancy switching in abnormal communication link conditions through the cooperation of nodes in the ring network. At present, in order to realize communication redundancy control in the field of vehicles, some solutions integrate functions such as frame duplication and frame elimination in nodes in the ring network based on TSN technology to ensure that there is a correct message under any link condition. However, this way has high requirements for the hardware resources of nodes and cannot effectively solve the problem of redundancy control in vehicle ring network communication. SUMMARY
[0004] One of the purposes of the present application is to provide a ring network communication redundancy control method, device, electronic equipment and readable storage medium to solve the problem of redundancy control in vehicle ring network communication.
[0005] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows:
[0006] A ring network communication redundancy control method applied to a vehicle ring network system, the vehicle ring network system comprising a plurality of nodes, the plurality of nodes being connected to form a ring network link through an Ethernet link, the plurality of nodes including a master node, the ring network communication redundancy control method comprising:
[0007] The node responds to detection of Ethernet link abnormality and broadcasts the link abnormality state of the Ethernet link based on control area network (CAN) communication;
[0008] The master node determines whether redundancy link switching is needed according to the obtained link abnormality state, and broadcasts a redundancy switching control message based on CAN communication when redundancy link switching is needed;
[0009] The node adjusts the port settings of the node itself according to the redundancy switching control message to form a new ring network link according to the adjusted port settings.
[0010] 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.
[0011] Furthermore, the master control node determines whether redundant link switching is needed based on the acquired link anomaly status, including:
[0012] The master control node integrates the acquired link anomaly 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 needed based on the global link status.
[0014] Furthermore, the master control node determines whether redundant link switching is needed based on the global link status, including:
[0015] 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.
[0016] If they are consistent, then there is no need to switch redundant links;
[0017] If there is a discrepancy, a redundant link switch is required.
[0018] 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:
[0019] The node determines the port parameters corresponding to the global link state based on the global link state and the preset mapping relationship;
[0020] The node adjusts its corresponding port settings based on the port parameters.
[0021] 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:
[0022] 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.
[0023] 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.
[0024] 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:
[0025] The node adjusts its own port settings according to the redundant link to be switched.
[0026] Furthermore, the redundancy handover control message includes a handover instruction and a global link status.
[0027] Furthermore, the node detects an Ethernet link anomaly, including: the node detects an anomaly in a directly connected Ethernet link.
[0028] Furthermore, this ring network communication redundancy control method also includes:
[0029] The node periodically checks whether the Ethernet link is abnormal;
[0030] 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:
[0031] 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.
[0032] 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:
[0033] 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;
[0034] 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.
[0035] 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:
[0036] The states of multiple Ethernet links detected by the second node are integrated to obtain the global link state;
[0037] Determine whether redundant link switching is needed based on the global link status.
[0038] Furthermore, the step of determining whether redundant link switching is needed based on the global link status includes:
[0039] Compare the global link status with the preset reference link status to see if they are consistent;
[0040] If they match, then it is determined that no redundant link switching is required;
[0041] 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.
[0042] Furthermore, the reference link status is the global link status recorded when it was previously determined that a redundant link switch was required.
[0043] Furthermore, the message data field of the redundancy switching control message includes flag bits used to characterize the global link state.
[0044] Furthermore, 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 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:
[0047] 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.
[0048] Furthermore, it also includes:
[0049] 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.
[0050] 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:
[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, a link status message is broadcast based on CAN communication, the link status message representing the state of the Ethernet link;
[0053] Receive the redundancy switching control message broadcast by the first node based on CAN communication;
[0054] The redundancy switching control message determines whether a link switching operation needs to be performed. If so, the link switching operation is performed.
[0055] Furthermore, the detection of the status of the connected Ethernet link includes:
[0056] Periodically check the status of the connected Ethernet link;
[0057] 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:
[0058] 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.
[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] 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:
[0061] 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.
[0062] 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;
[0063] 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.
[0064] Furthermore, the execution of the link switching operation includes:
[0065] The target nodes that need to be connected are determined based on the target link;
[0066] Modify the port corresponding to the target node to the port where the target link is located.
[0067] 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:
[0068] 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.
[0069] 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.
[0070] 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.
[0071] An electronic device includes: a processor, and a memory communicatively connected to the processor;
[0072] The memory stores computer-executed instructions;
[0073] 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.
[0074] 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.
[0075] 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.
[0076] The beneficial effects of this invention are:
[0077] (1) In this invention, 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.
[0078] (2) In this invention, 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 the node hardware resources. Compared with the existing control scheme, it is simpler and easier to implement and has stronger availability. Attached Figure Description
[0079] Figure 1 This is a schematic diagram illustrating an application scenario of a ring network communication redundancy control method according to an embodiment of the present invention;
[0080] Figure 2 This is a flowchart illustrating a ring network communication redundancy control method according to an embodiment of the present invention.
[0081] Figure 3a This is a schematic diagram of a vehicle-mounted ring network system communication architecture provided in an embodiment of the present invention;
[0082] Figure 3b for Figure 3a The diagram shows a redundancy switching mechanism in a ring network system when a link is faulty.
[0083] Figure 4 This is a flowchart illustrating a link switching determination method according to an embodiment of the present invention;
[0084] Figure 5 This is a flowchart illustrating a method for adjusting node ports according to an embodiment of the present invention.
[0085] Figure 6 This is a schematic diagram of a node functional module deployment according to an embodiment of the present invention;
[0086] Figure 7 This is a flowchart illustrating another ring network communication redundancy control method provided in an embodiment of the present invention;
[0087] Figure 8 This is a schematic diagram of a redundancy control process provided in an embodiment of the present invention;
[0088] Figure 9 This is a flowchart illustrating another ring network communication redundancy control method provided in an embodiment of the present invention;
[0089] Figure 10 This is a flowchart illustrating another ring network communication redundancy control method provided in an embodiment of the present invention;
[0090] Figure 11 This is a schematic diagram of the structure of a ring network communication redundancy control device according to an embodiment of the present invention;
[0091] Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0092] The accompanying drawings have illustrated specific embodiments of the invention, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the invention in any way, but rather to illustrate the concept of the invention to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0093] The embodiments of the present invention will be described below with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention and not for limiting the scope of protection of the present invention.
[0094] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention 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.
[0095] 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 numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0096] 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.
[0097] Figure 1 This is a schematic diagram illustrating an application scenario provided by an embodiment of the present invention. For example... Figure 1As shown, the overall architecture of the vehicle-mounted system can include a central computing center and regional controllers. The central computing center can be used for calculations and decision-making; the regional controllers can transmit vehicle 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, they are typically networked in a ring network configuration using Ethernet links to achieve mutual redundancy. For example, Figure 1 The central computing center and two area controllers 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 in the vehicle (referred to as the "cockpit-integrated system"), and the area controllers can be vehicle control systems such as intelligent driving and intelligent control systems deployed in the vehicle.
[0098] This invention can be applied to including Figure 1 The illustrated in-vehicle ring network system is designed to meet the vehicle communication requirements of intelligent driving, intelligent control, and other vehicle control systems. The in-vehicle ring network system can contain at least three nodes, with a master control node among them. In some application scenarios, the nodes can communicate with each other via Ethernet in a daisy-chain configuration to form an Ethernet ring network communication system. 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 invention, 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 other vehicle control system.
[0099] 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 are combined with Figure 1 Application scenarios, refer to Figures 2 to 6 This invention describes a ring network communication redundancy control method provided by a first aspect of the present invention.
[0100] Figure 2 This is a flowchart illustrating a ring network communication redundancy control method according to an embodiment of the present invention. Figure 2 As shown, the method may include:
[0101] 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.
[0102] 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.
[0103] 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 Datarate) protocol.
[0104] Specifically, nodes in a 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 anomaly in the status of an adjacent link, it can encapsulate the anomaly information into a message and broadcast it to the bus based on the CAN protocol. A node detecting an anomaly in an adjacent Ethernet link can refer to a node detecting an anomaly in a directly connected Ethernet link. For example, Figure 1 In the system, 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.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] 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.
[0109] 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.
[0110] 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.
[0111] 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.
[0112] 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.
[0113] Figure 3a This is a schematic diagram of a vehicle-mounted ring network system communication architecture provided in 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 an integrated driver-cabin central control system. Each system contains 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-cabin central control system are directly connected via link 2; vehicle control system 2 and the integrated driver-cabin 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-cabin 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 diagram shows redundancy switching in a ring network system when a link anomaly occurs. Figure 3bAs shown, 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.
[0115] In one embodiment, such as Figure 4 As shown, the master control node determines whether redundant link switching is needed based on the obtained link anomaly status, including:
[0116] Step S401: The master control node integrates the obtained link anomaly status to obtain the global link status of the vehicle ring network system.
[0117] 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.
[0118] In step S402, the master control node determines whether redundant link switching is needed based on the global link status.
[0119] 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.
[0120] 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.
[0121] 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.
[0122] In one embodiment, the nodes and links in the ring network system can be pre-numbered, and the message format for CAN communication can be set based on the node and link numbers. 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 a total of 5 links in the system. In the message, 5 bits from bit0 to bit4 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.
[0123] like 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.
[0124]
[0125] Table 1
[0126] After determining the status of adjacent links (link1, link2, and link5), vehicle control system 1 (the master control 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. Figure 3b Taking the system as an example, a link status calculation 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 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 at the time of the master node's last judgment. If the comparison result is inconsistent, a link switch needs to be performed.
[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 state, such as... Figure 5 As shown, the node adjusts its own port settings according to the redundancy handover control message, 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]
[0136] Table 2
[0137] 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.
[0138] by Figure 3a and Figure 3b Taking the illustrated 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 disable 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.
[0139]
[0140] Table 3
[0141]
[0142] Table 4
[0143] Figure 6 This is a schematic diagram illustrating the deployment of a node functional module according to an embodiment of the present invention. Figure 6 As shown, the terminal 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 a directly connected link for several consecutive cycles, the abnormal status can be recorded and compared with the previously recorded status. If the comparison result is consistent, no action is taken; 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 to a backup link based on the matching result.
[0144] 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.
[0145] According to a second aspect of the present invention, 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 including the first node and a plurality of second nodes connected via Ethernet links, the first node and the second nodes communicating 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 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.
[0146] In one embodiment, such as Figure 7 As shown, the methods applied to the first node may include:
[0147] S701, obtain the link status message broadcast by the second node based on CAN communication.
[0148] Among them, the link status message represents the status of the Ethernet link detected by the second node.
[0149] 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.
[0150] Among them, the redundancy handover control message is used to instruct the second node to perform a link handover operation.
[0151] 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.
[0152] 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.
[0153] 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.
[0154] 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.
[0155] 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.
[0156] Figure 8 This is a schematic diagram of a redundancy control process provided in an embodiment of the present invention. Figure 8 As shown, in this embodiment, the vehicular 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.
[0157] against Figure 8A redundancy control process corresponding to the illustrated embodiment 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 status detected by 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. Similarly, when node B sends data to node C, it originally sent the data directly to node C via link BC. After the switch, 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 example, in the FDB table of node A, the port corresponding to the MAC address of node C is the port where link AB is located. 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, thus enabling link AC.
[0158] In another embodiment, the first node and the second node are connected via an Ethernet link, such as... Figure 9 As shown, the method applied to the first node may also include:
[0159] S901 detects the status of the connected Ethernet link.
[0160] 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:
[0161] 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.
[0162] 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.
[0163] 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.
[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 The vehicle control system consists of vehicle control system 2, vehicle control system 3, and an integrated central control system for the cockpit.
[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 an in-vehicle ring network system. Multiple second nodes are connected to each other 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.
[0166] In one embodiment, such as Figure 10 As shown, the methods applied to the second node may include:
[0167] S1001 detects the status of the connected Ethernet link.
[0168] 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.
[0169] Among them, the link status message represents the status of the Ethernet link.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] The message data field of the link state message can be referenced from the embodiments related to Table 1 in the first aspect above. For example, when the second node is... Figure 3a In any system, the data field of the link state message can be configured with 3 bits as a node flag indicating the identity of the second node, or 5 bits as a status flag. Each of these 5 bits can represent... Figure 3a The state of any link in the chain.
[0174] S1003 receives the redundancy switching control message broadcast by the first node based on CAN communication.
[0175] 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.
[0176] 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.
[0177] 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.
[0178] 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.
[0179] 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:
[0180] S10041, Based on the global link status and the preset mapping relationship, determine the target link that needs to be connected.
[0181] The target link is determined based on the Ethernet links connecting the current second node to other second nodes.
[0182] 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.
[0183] 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.
[0184] 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.
[0185] 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.
[0186] by Figure 8 For example, a redundancy handover control message can include the target nodes that each second node needs to connect to. For instance, links AB and BC are originally connected. Even if link AC is not connected, node A can still exchange data with node C. In this case, node A's only target node to connect to is node B. When link BC is not connected, node A's target nodes become nodes B and C. After receiving a message containing the target nodes (nodes B and C), node A can activate link AC, switching the data communication link with node C to link AC.
[0187] Figure 11 This is a schematic diagram of a ring network communication redundancy control device provided as an exemplary embodiment of the present invention. Figure 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 an Ethernet link abnormality and broadcast the abnormal status of the Ethernet link based on the CAN communication of the control area network.
[0189] 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.
[0190] 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.
[0191] In one embodiment, the main control management module 1102 may include:
[0192] 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.
[0193] 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.
[0194] In one embodiment, the switching determination unit may include:
[0195] 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.
[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 parameters corresponding to the global link state based on the global link state and the preset mapping relationship.
[0198] The adjustment unit is used to control the node to adjust the port settings corresponding to the node according to the port parameters.
[0199] 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.
[0200] 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.
[0201] In one embodiment, the redundancy handover control message includes a handover instruction and a global link status.
[0202] 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.
[0203] 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.
[0204] It should be understood that the above-described device embodiments are merely 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 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.
[0205] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of the present invention 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.
[0206] Figure 12 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present invention. For example... Figure 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 the executable instructions of the processor 121; the executable instructions may be computer-executable instructions.
[0209] The processor 121 is configured to execute the technical solutions in any of the foregoing method embodiments by executing the executable instructions.
[0210] Optionally, the memory 122 can be either standalone 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] 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.
[0213] 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.
[0214] 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.
[0215] 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.
[0216] 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.
[0217] This invention 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.
[0218] This invention 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.
[0219] 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.
[0220] 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.
[0221] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention 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 the invention are indicated by the following claims.
[0222] The above embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention.
Claims
1. A ring network communication redundancy control method, characterized by, The application is applied to a vehicle-mounted ring network system, the vehicle-mounted ring network system comprises a plurality of nodes, the plurality of nodes are connected to form a ring network link through an Ethernet link, the plurality of nodes comprise a master node, and the ring network communication redundancy control method comprises: The node broadcasts a link abnormal state of the Ethernet link based on a control area network CAN communication in response to detecting an Ethernet link abnormality; The master node determines whether redundancy link switching is needed according to the obtained link abnormal state, and broadcasts a redundancy switching control message based on the CAN communication when the redundancy link switching is needed; The node adjusts the port setting of the node itself according to the redundancy switching control message to form a new ring network link according to the adjusted port setting.
2. The ring network communication redundancy control method according to claim 1, wherein The master node determines whether redundancy link switching is needed according to the obtained link abnormal state, comprising: The master node integrates the obtained link abnormal state to obtain a global link state of the vehicle-mounted ring network system; The master node determines whether redundancy link switching is needed according to the global link state.
3. The ring network communication redundancy control method according to claim 2, wherein The master node determines whether redundancy link switching is needed according to the global link state, comprising: In response to the global link state remaining unchanged within a preset first time period, the global link state is compared with a global link state recorded at the last time of judgment; If consistent, no redundancy link switching is needed; If inconsistent, redundancy link switching is needed.
4. The ring network communication redundancy control method according to claim 2 or 3, characterized by, The redundancy switching control message carries the global link state, and the node adjusts the port setting of the node itself according to the redundancy switching control message, comprising: The node determines a 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, wherein The port parameter comprises a target node corresponding to the current node, and the adjustment of the port setting corresponding to the node according to the port parameter comprises: blocking the message transmission and reception of a switch corresponding to the current node according to the data flow direction between the current node and a fault node, the fault node being a node having a link communication abnormality with the current node; The port corresponding to the media access control (MAC) address of the fault 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 by, The redundancy switching control message carries a redundancy link to be switched, and the node adjusts the port setting of the node itself according to the redundancy switching control message, comprising: The node adjusts the port setting of the node itself according to the redundancy link to be switched.
7. The ring network communication redundancy control method according to any one of claims 1 to 3, characterized by, The redundancy switching control message comprises a switching instruction and a global link state.
8. The ring network communication redundancy control method according to any one of claims 1 to 3, characterized by, The node detects an Ethernet link abnormality, comprising: the node detects a directly connected Ethernet link abnormality.
9. The ring network communication redundancy control method according to any one of claims 1 to 3, characterized by, Further comprising: The node periodically detects whether the Ethernet link is abnormal; Correspondingly, the node broadcasts a link abnormal state of the Ethernet link based on a CAN communication in response to detecting an Ethernet link abnormality, comprising: The node broadcasts a link abnormal state of the Ethernet link based on CAN communication in response to detecting the same Ethernet link abnormality in a plurality of consecutive detection cycles.
10. A ring network communication redundancy control method characterized by comprising: The first node applied to a vehicle-mounted ring network system, the vehicle-mounted ring network system comprising the first node and a plurality of second nodes connected through Ethernet links, the first node and the second nodes communicating based on a control area network (CAN), and a ring network communication redundancy control method comprising: obtaining a link state message broadcast by the second nodes based on CAN communication, the link state message representing the state of the Ethernet link detected by the second nodes; determining whether the vehicle-mounted ring network system needs to perform a redundant link switching based on the state of the Ethernet link in the link state message, and broadcasting a redundant switching control message based on CAN communication if needed, the redundant switching control message being used to instruct the second nodes to perform a link switching operation.
11. The ring network communication redundancy control method according to claim 10, wherein The determination of whether the vehicle-mounted ring network system needs to perform a redundant link switching based on the state of the Ethernet link in the link state message comprises: integrating the states of the Ethernet links detected by the plurality of second nodes to obtain a global link state; judging whether a redundant link switching is needed based on the global link state.
12. The ring network communication redundancy control method according to claim 11, wherein, The judgment of whether a redundant link switching is needed based on the global link state comprises: comparing the global link state with a preset reference link state to determine whether they are consistent; if they are consistent, determining that no redundant link switching is needed; if they are not consistent, determining that a redundant link switching is needed, obtaining a global link state after the switching and recording it.
13. The ring network communication redundancy control method according to claim 12, wherein, The reference link state is a global link state recorded when it was last determined that a redundant link switching was needed.
14. The ring network communication redundancy control method according to any one of claims 11 to 13, characterized by, The data field of the redundant switching control message contains a flag bit representing the global link state.
15. The ring network communication redundancy control method according to any one of claims 11 to 13, characterized by, The first node and the second nodes are connected through Ethernet links, and the ring network communication redundancy control method further comprises: detecting the state of the connected Ethernet link; The determination of whether the vehicle-mounted ring network system needs to perform a redundant link switching based on the state of the Ethernet link in the link state message comprises: determining whether the vehicle-mounted ring network system needs to perform a redundant link switching based on the state of the Ethernet link detected and the state of the Ethernet link in the link state message.
16. The ring network communication redundancy control method according to claim 15, wherein, Further comprising: in response to determining that a redundant link switching is needed, determining whether a link switching operation is needed based on the global link state, and performing the link switching operation if needed.
17. A ring network communication redundancy control method characterized by comprising: The second node applied to a vehicle-mounted ring network system, the second node being one of a plurality of second nodes, different second nodes being connected through Ethernet links, the vehicle-mounted ring network system further comprising a first node communicating with the second nodes based on a control area network (CAN), and a ring network communication redundancy control method comprising: detecting the state of the connected Ethernet link; broadcasting a link state message based on CAN communication in response to determining that the state of the Ethernet link meets a preset abnormal condition, the link state message representing the state of the Ethernet link; receiving a redundant switching control message broadcast by the first node based on CAN communication; According to the redundancy switching control message, it is determined whether a link switching operation needs to be performed, and if so, the link switching operation is performed.
18. The ring network communication redundancy control method of claim 17, wherein, The state of the connected Ethernet link is detected, including: The state of the connected Ethernet link is periodically detected; Accordingly, in response to determining that the state of the Ethernet link meets a preset abnormal condition, a link state message is broadcast based on CAN communication, including: If the state of the Ethernet link is detected as abnormal in a plurality of consecutive detection periods, a link state message is broadcast based on CAN communication.
19. The ring network communication redundancy control method according to claim 17 or 18, wherein, The message data field of the link state message includes a node flag bit and a state flag bit, the node flag bit representing the identity information of the node sending the link state message, and the state flag bit representing the state of the Ethernet link.
20. The ring network communication redundancy control method according to claim 17 or 18, wherein, The redundancy switching control message contains a global link state, which includes the states of the Ethernet links corresponding to a plurality of second nodes in the vehicle ring network system, and according to the redundancy switching control message, it is determined whether a link switching operation needs to be performed, including: According to the global link state and a preset mapping relationship, a target link to be connected is determined, which is determined based on the Ethernet links connected between the current second node and other second nodes; If the target link is inconsistent with the Ethernet link already connected by the current second node, a link switching operation needs to be performed; If the target link is consistent with the Ethernet link already connected by the current second node, a link switching operation does not need to be performed.
21. The ring network communication redundancy control method according to claim 20, wherein, The link switching operation includes: According to the target link, a target node to be connected is determined; The port corresponding to the target node is modified to the port where the target link is located.
22. A ring network communication redundancy control device, characterized by comprising: Applied to a vehicle ring network system, the vehicle ring network system includes a plurality of nodes connected to form a ring network link through Ethernet links, and the plurality of nodes include a master node. The ring network communication redundancy control device includes: A node detection module for controlling the node to broadcast a link abnormal state of the Ethernet link based on CAN communication in response to detecting an Ethernet link abnormality; A master management module for controlling the master node to determine whether a redundant link switching is needed according to the acquired link abnormal state, and broadcasting a redundancy switching control message based on CAN communication when the redundant link switching is needed; A switching module for controlling the node to adjust the port settings of the node itself 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, comprising: It includes: A processor and a memory connected to the processor in communication; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method of any one of claims 1-21.
24. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer execution instructions, which are executed by the processor to implement the method of any one of claims 1-21.
25. A computer program product, characterised in that, It includes a computer program, which is executed by the processor to implement the method of any one of claims 1-21.
Citation Information
Patent Citations
Redundant link switching method based on vehicle-mounted Ethernet ring network and readable storage medium
CN114500161A
Message forwarding method, device and system
CN115567342A
Cited By
Vehicle-mounted network fault isolation and self-healing system and vehicle-mounted network fault self-healing method
CN121711234A
Ring-network communication redundancy control method and apparatus, and electronic device and readable storage medium
WO2026045441A1