Master-slave cooperative control method, system and device for automobile electronic control unit
The collaborative control method for automotive electronic control units, which dynamically elects master nodes, solves the reliability and scalability issues of automotive electronic systems, achieving highly reliable, low-cost collaborative control and rapid fault recovery. It is applicable to scenarios such as distributed databases and distributed computing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GAC COMPONENT CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-06-12
AI Technical Summary
Existing automotive electronic control systems suffer from insufficient reliability, poor scalability, and inadequate state consistency. Centralized control is prone to single-point failures, while distributed control is prone to action conflicts and synchronization failures.
The system adopts a master-slave collaborative control method for automotive electronic control units. By dynamically electing the master node and utilizing heartbeat detection and countdown mechanisms, it achieves collaborative control and fault self-healing among nodes, eliminates the risk of single point of failure, and supports plug-and-play expansion.
It improves system reliability and scalability, reduces hardware costs, prevents action conflicts, and enables rapid fault recovery and high-precision synchronization.
Smart Images

Figure CN122194805A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive control technology, specifically to a master-slave collaborative control method, system, and device for automotive electronic control units. Background Technology
[0002] With the accelerated development of intelligent and electric vehicles, the complexity of vehicle electronic systems continues to rise, and the number of electronic loads such as seat adjustment motors, air conditioning blowers, chassis solenoid valves, and their corresponding actuators has increased significantly. To achieve complex functions such as multi-directional seat adjustment and zoned air conditioning control, these actuators need to work precisely in coordination; for example, when adjusting the seat forward and backward, physical interference with the steering wheel and center console must be avoided. Existing solutions employ a centralized collaborative control scheme, deploying a central control unit (CCU) as the core. The CCU collects the status of each actuator node and generates unified commands for execution. This scheme suffers from a single point of failure risk; a CCU failure will paralyze the entire system. Expansion is difficult, as adding new nodes requires modifying the CCU software or even upgrading the hardware. The high cost of CCU hardware and its associated long-distance wiring increases system costs. Another solution employs a fully distributed collaborative scheme, eliminating the central controller. This type of scheme relies entirely on a single ECU receiving the status of other ECUs to achieve coordination, with each node exchanging status and making independent decisions through a communication network. While this solution avoids single points of failure, the lack of a unified coordination mechanism leads to new problems. Independent decision-making by each node can easily cause action conflicts and make it impossible to achieve accurate synchronization across nodes. Network latency or packet loss can cause nodes with inconsistent states to misjudge and cause collision risks.
[0003] There is a need for a new collaborative control method to replace the centralized architecture and solve the problems of insufficient reliability, poor scalability and insufficient state consistency of automotive electronic systems. Summary of the Invention
[0004] One of the objectives of this invention is to provide a master-slave cooperative control method for automotive electronic control units, which solves the problems of insufficient reliability and poor scalability of existing automotive electronic control units.
[0005] To achieve the above-mentioned objectives, the technical solution adopted by the present invention is as follows: The master-slave cooperative control method for automotive electronic control units includes the following steps: S1. Dynamic election of master nodes: The vehicle includes multiple controller nodes and a network connecting each controller node, and each controller node is marked with a unique identifier ID. After power-on initialization, each controller node enters the initial slave node state. After a node remains in the node state for a period of time, it automatically enters the observer state. A node in observer state continuously listens for the heartbeat signal of the master node on the network; If a valid master node heartbeat signal is detected, maintain the observer state and record the information of that master node; If no valid master node heartbeat signal is detected within the preset heartbeat detection timeout threshold T seconds, the node enters a countdown state. A node that enters a countdown state starts a countdown timer, the duration of which is calculated and determined based on the unique identifier ID of the node in the countdown state; During the countdown, if a node detects a valid master node heartbeat signal, it exits the countdown state and returns to the observer state. The node continuously listens to the network while in countdown mode: If no valid master node heartbeat signal is detected before the countdown timer reaches zero, it becomes the new master node and enters the master node state. If a valid master node heartbeat signal is detected before the countdown timer reaches zero, the countdown will be stopped immediately, the countdown state will be exited, the observer state will be returned, and the valid master node ID will be recorded. A node that has entered master node state performs the following operations: The master node's heartbeat signal is broadcast periodically at fixed intervals, and the heartbeat signal contains the master node's ID information. While broadcasting the heartbeat signal, continuously monitor other heartbeat signals on the network; If a valid heartbeat signal is detected and the master node ID in the valid signal is less than the ID of the current node, then immediately exit the master node state and enter the slave node state. S2, Cooperative Control: The elected master node activates its built-in central coordination and control logic; The master node generates control commands for all loads requiring coordination within the system based on a predefined coordination control strategy. For loads located within the master node itself, the master node directly controls the internal loads through its internal application programming interface; For loads located within other slave nodes, the master node sends control commands to the corresponding slave nodes through the vehicle communication network; Each slave node receives and executes control commands from the master node for its internal load, eliminating the risk of single point of failure. The failure of any node does not affect other nodes. In the event of a failure, a new system is automatically elected and remains available, ensuring high reliability.
[0006] Furthermore, this also includes S3 and fault self-healing: When the master node fails, the periodic heartbeat signal stops broadcasting; Other nodes in the observer state do not receive a heartbeat signal from the master node within the heartbeat detection timeout threshold, triggering master node failure detection; Nodes that detect a primary node failure enter a countdown state and recalculate the countdown duration based on their own ID; The node with the shortest countdown timer completes its countdown first and becomes the new master node; The newly elected master node begins broadcasting heartbeat signals and takes over the system's collaborative control functions; If the original faulty master node recovers and comes back online, it enters the slave node state after initialization, stays for a period of time, and then enters the observer state. After listening to the heartbeat signal of the new master node, it maintains the observer state and records the ID of the new master node. The fault recovery is fast and the deployment cost is low.
[0007] Furthermore, in S1, the countdown duration = node ID × base time unit K. The smaller the ID, the shorter the duration, and the higher the priority. 0.1S≤K≤5S. Priority evaluation prevents conflicts between nodes.
[0008] Furthermore, the interval R between the periodic broadcast heartbeat signals by the master node is less than the heartbeat detection timeout threshold T, and satisfies T ≥ 2×R, where the value of R ranges from 0.1 seconds to 1 second, and the value of T ranges from 0.5 seconds to 5 seconds, which can quickly restore system operation after a fault.
[0009] Furthermore, prior to the S2 and collaborative control steps, a virtual group mapping configuration step is also included: During the initialization or configuration phase, based on the coordination requirements between loads, the loads that need to work together are defined as a virtual control group; The configuration information of the virtual control group is stored or accessible on all nodes; The central coordination and control logic of the master node identifies the set of loads that need to be coordinated and controlled based on the configuration information of the virtual control group, thereby realizing the coordinated control of multiple functional components.
[0010] Furthermore, the collaborative control strategy specifically includes: receiving status information from each node, calculating according to predefined collaborative rules, and generating a sequence of collaborative control instructions for all loads within the virtual control group, which facilitates expansion.
[0011] Preferably, the vehicle communication network is a controller area network, vehicle Ethernet, or FlexRay bus, which offers high communication speeds.
[0012] Preferably, the pause period during node initialization refers to the transition phase from node initialization to normal operation. The pause duration is determined by the node's initialization process and ranges from 10 milliseconds to 500 milliseconds.
[0013] The second objective of this invention is to provide a master-slave cooperative control system for automotive electronic control units, which solves the problem of insufficient state consistency in existing automotive control systems, which easily leads to collisions.
[0014] To achieve the above-mentioned objectives, the technical solution adopted by the present invention is as follows: Automotive electronic control unit master-slave cooperative control system, including: Multiple controller nodes, each node containing a load drive unit and a controller logic unit; The vehicle-mounted communication network connects all controller nodes; The dynamic election module is used to execute the aforementioned dynamic election steps for the master node; The collaborative control module is used to execute the aforementioned collaborative control steps.
[0015] The third objective of this invention is to provide a master-slave collaborative control device for automotive electronic control units, which solves the problem of difficulty in expanding accessories in existing automobiles.
[0016] To achieve the above-mentioned objectives, the technical solution adopted by the present invention is as follows: A master-slave collaborative control device for automotive electronic control units, including the aforementioned master-slave collaborative control system for automotive electronic control units.
[0017] The beneficial effects of this invention are as follows: (1) The master-slave collaborative control method of the automotive electronic control unit can completely eliminate the risk of single-point failure and improve the reliability of the system. Compared with the fatal defect of the centralized solution where the failure of the central control unit leads to the paralysis of the entire system, such as the complete loss of seat functions when the CCU fails, this solution prevents local failures through a dynamic master node election mechanism. That is, the independent master node is canceled, and then a dynamic master node is dynamically selected from each actuator to be responsible for coordination. When any node fails, the system automatically completes the election of a new master node in a short time. This is achieved by timeout detection and the shortest countdown, ensuring the continuous availability of the system. The master node step-off mechanism ensures seamless stepping down when a higher priority node is detected. The failure of a single node only affects local functions, which is much shorter than the long repair time of the centralized solution. Through decentralized dynamic election, there is no need to preset the master node. The master controller is dynamically elected through heartbeat detection and countdown mechanism, which improves the reliability of system operation.
[0018] (2) The master-slave collaborative control method of the automotive electronic control unit can achieve strong global collaborative control and solve the problems of decision conflict and synchronization failure in distributed schemes. In view of the defects of action conflict caused by the lack of a coordinating core in fully distributed schemes, such as collisions caused by the simultaneous forward movement of two seats and cross-node synchronization deviations, this scheme introduces virtual group mapping and dual-interface control. The master node defines the loads that need to be coordinated as virtual groups, runs the anti-collision algorithm based on the global state, and directly controls the local load and remote loads through API and network control, thereby improving the cross-node synchronization accuracy and preventing control chaos caused by inconsistent states in distributed schemes.
[0019] (3) The master-slave collaborative control method of the automotive electronic control unit can reduce the hardware cost during expansion and supports plug-and-play expansion. Compared with the centralized solution, which requires modification of CCU hardware and software when adding new nodes, and the distributed solution, which cannot support multi-node collaboration, the decentralized architecture of this solution directly eliminates the CCU hardware and a large number of wiring harnesses, and reuses the control chip of the actuator node to reduce costs. After the new node is powered on, it automatically joins the election system, and the priority is controllable by reserving the ID segment. There is no need to modify the master node logic when expanding. The ECU hardware and software specifications of each node are uniform, and there is no need for a high-performance central controller. The configuration time for different models and different layout schemes is short, which reduces the development cost. Attached Figure Description
[0020] Figure 1 A flowchart illustrating the election process of the master-slave collaborative control method for automotive electronic control units provided by this invention; Figure 2 The communication logic diagram of the central control unit within the main control node of the vehicle provided by this invention; Figure 3 The node load virtual group mapping diagram provided by this invention; Figure 4 A flowchart illustrating the fault self-healing process of the master-slave collaborative control method for automotive electronic control units provided by the present invention. Figure 5 This is a diagram illustrating the architecture of the technical solution one of the present invention. Figure 6 This is the architecture diagram of the second technical solution of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments in the application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0022] Example 1 like Figures 1-4 As shown, this embodiment discloses a master-slave cooperative control method for automotive electronic control units, including the following steps: S1. Dynamic election of master nodes: The vehicle includes multiple controller nodes and a network connecting each controller node. Each controller node is marked with a unique identifier ID. After power-on initialization, each controller node enters the initial slave node state. After a node remains in the node state for a period of time, it automatically enters the watcher state. A node in the Watcher state continuously listens for the heartbeat signal of the master node on the network; If a valid master node heartbeat signal is detected, maintain the watcher state and record the master node's information; If no valid master node heartbeat signal is detected within the preset heartbeat detection timeout threshold T seconds, the node enters a countdown state. A node that enters a countdown state starts a countdown timer, the duration of which is calculated and determined based on the unique identifier ID of the node in the countdown state; During the countdown, if a node detects a valid master heartbeat signal, it exits the countdown state and returns to the observer state. The node continuously listens to the network while in countdown mode: If no valid master node heartbeat signal is detected before the countdown timer reaches zero, it becomes the new master node and enters the master node state. If a valid master node heartbeat signal is detected before the countdown timer reaches zero, the countdown will be stopped immediately, the countdown state will be exited, the observer state will be returned, and the valid master node ID will be recorded. A node that has entered master node state performs the following operations: The master node's heartbeat signal is broadcast periodically at fixed intervals, and the heartbeat signal contains the master node's ID information. While broadcasting the heartbeat signal, continuously monitor other heartbeat signals on the network; If a valid heartbeat signal is detected and the master node ID in the valid signal is less than the ID of the current node, then immediately exit the master node state and enter the slave node state. S2, Cooperative Control: The elected master node activates its built-in central coordination and control logic; The master node generates control commands for all loads requiring coordination within the system based on a predefined coordination control strategy. For loads located within the master node itself, the master node directly controls the internal loads through its internal application programming interface; For loads located within other slave nodes, the master node sends control commands to the corresponding slave nodes through the vehicle communication network; Each slave node receives and executes control commands from the master node for its internal load. The decentralized distribution eliminates the risk of single point of failure. The failure of any node does not affect other nodes. When the master node fails, a new master is automatically elected. The system remains available and the fault recovery time is in the millisecond range, which improves the reliability of the system and reduces the deployment cost.
[0023] Furthermore, it also includes S3 and fault self-healing: When the master node fails, the periodic heartbeat signal stops broadcasting; Other nodes in the observer state do not receive a heartbeat signal from the master node within the heartbeat detection timeout threshold, triggering master node failure detection; Nodes that detect a primary node failure enter a countdown state and recalculate the countdown duration based on their own ID; The node with the shortest countdown timer completes its countdown first and becomes the new master node; The newly elected master node begins broadcasting heartbeat signals and takes over the system's collaborative control functions; If the original faulty master node recovers and comes back online, it will enter the slave node state after initialization, stay for a period of time, and then enter the observer state. After listening to the heartbeat signal of the new master node, it will maintain the observer state and record the ID of the new master node. It can self-heal after the fault.
[0024] Furthermore, in S1, the countdown duration = node ID × base time unit K. The smaller the ID, the shorter the duration, and the higher the priority. 0.1S≤K≤5S. By using ID priority countdown, multiple nodes are prevented from claiming the master node at the same time. The election time can be controlled within 0.2-1 seconds, which is much faster than traditional election algorithms.
[0025] Furthermore, the interval R between the periodic broadcasts of the heartbeat signal by the master node is less than the heartbeat detection timeout threshold T, and satisfies T ≥ 2×R, where the value of R ranges from 0.1 seconds to 1 second, and the value of T ranges from 0.5 seconds to 5 seconds.
[0026] Furthermore, prior to the S2 and collaborative control steps, a virtual group mapping configuration step is also included: During the initialization or configuration phase, based on the coordination requirements between loads, the loads that need to work together are defined as a virtual control group; The configuration information of the virtual control group is stored or accessible on all nodes; The central coordination control logic of the master node identifies the set of loads that need to be controlled collaboratively based on the configuration information of the virtual control group. Specifically, in the virtual group mapping configuration step, according to the collaborative requirements of the loads, such as the torque distribution when a car is turning, the loads that need to be controlled synchronously are defined as a virtual control group. The virtual group FL is configured as the left front motor, FR as the right front motor, RL as the left rear motor, and RR as the right rear motor, which need to coordinately adjust torque to ensure vehicle stability when turning. Through the abstraction of virtual groups, the master node is not limited by the physical location of the loads and can achieve collaborative control by calling a unified interface, which reduces the logical complexity of the master node and improves control efficiency.
[0027] Furthermore, the collaborative control strategy specifically includes: receiving status information from each node, calculating according to predefined collaborative rules, generating a sequence of collaborative control instructions for all loads within the virtual control group, and achieving simultaneous control of multiple functional components to ensure stable operation.
[0028] Preferably, the vehicle communication network is a controller local area network, vehicle Ethernet, or FlexRay bus, which has a fast communication speed and low latency.
[0029] Preferably, the pause period during node initialization refers to the transition phase from node initialization to normal operation. The pause duration is determined by the node's initialization process and ranges from 10 milliseconds to 500 milliseconds.
[0030] The specific control process is as follows: The system has 3 nodes with node IDs 1, 2, and 3. The initial master node is the node with ID=1.
[0031] When the master node ID=1 fails, a heartbeat detection is performed. Nodes 2 and 3 are in the watcher state and listen for the heartbeat packet of node 1. After node 1 fails, nodes 2 and 3 do not receive heartbeat packets for 3 consecutive seconds and enter a countdown state. The countdown time for node 2 is 2 × 2 = 4 seconds. The countdown time for node 3 is 3 × 2 = 6 seconds. Node 2 completes the countdown first, becomes the master node, and sends a heartbeat packet; Node 3 receives Node 2's heartbeat packet in the 4th second of the countdown, stops the countdown, returns to the observer state, and records the master node ID=2; Node 2, as the master node, sends a heartbeat packet every second, and Node 3, as the slave node, listens for the heartbeat, and the system returns to normal.
[0032] Node recovery scenario ID=1 recovery status: After node 1 restarts, it enters the initialization state, sets its state to slave node state, and then enters slave node state, pausing briefly for 1 second; Then enter the Watcher state: Node 1 enters the Watcher state to listen for heartbeat packets, receives the heartbeat packet from Node 2, and records the master node ID=2; Master node detection: Node 2 acts as the master node and periodically checks the master node IDs in the network. If it finds that Node 1 (ID=1<2) has recovered, it automatically steps down to a slave node status. Re-election: After node 2 steps down, it enters the observer state from the slave node state and listens for heartbeat packets; Node 1 becomes the master node: Node 1 is in the watcher state. If Node 2 steps down and stops sending heartbeats, and Node 1 does not receive a heartbeat for 3 consecutive seconds, it enters a countdown state for 2 seconds. After the countdown is complete, it becomes the master node and sends heartbeats. Node 1 acts as the master node with the smallest ID, while nodes 2 and 3 act as slave nodes listening for heartbeats. The system then returns to its initial state.
[0033] When a new node with ID=0 is added: Node 0 Startup: Node 0, ID=0, has the highest priority. After startup, it enters the initialization state, sets its status to slave node, and then enters the slave node state, pausing briefly for 1 second. Then enter the Watcher state: Node 0 enters the Watcher state, listens for heartbeat packets, and records the master node ID=2 when it receives the heartbeat packet of the current master node, such as ID=2. The current master node ID is 2. When node 0 (ID=0<2) is detected periodically, the node will automatically step down to the slave node state. After node 2 leaves the position, node 0 does not receive a heartbeat packet for 3 consecutive seconds, enters the countdown state, and the countdown is 0 × 2 = 0 seconds, which means it will be completed immediately, and node 0 will become the master node and send a heartbeat packet. Node 0 acts as the master node, while nodes 1, 2, and 3 act as slave nodes that listen for heartbeats. The system maintains stable operation after expansion.
[0034] By employing a state machine model and a priority countdown mechanism, this method addresses the issues of uncertain election order and high latency in existing technologies, enabling rapid and orderly master node election and ensuring high availability and stability of the distributed system. This approach can be widely applied to scenarios such as distributed databases, distributed caching, and distributed computing.
[0035] See Figure 2 After the master node is selected, the central control unit logic within the master node is activated. At this time, the operation flow between the master node and other nodes is as follows: The Central Control Unit (CCU) decomposes tasks and sends instructions to each virtual group via the SCM: Virtual group FL (master local): "Acquire temperature data from the device"; Virtual group FR (from node 1): "Denoise the collected data"; Virtual group RL (from node 2): "Store the processed data into the database"; Virtual group RR (from node 3): "Adjust device speed based on stored data".
[0036] The virtual group FL collects the temperature data of device A and returns it to the central control unit via SCM; The central control unit (CCU) forwards the data to the virtual group (FR), which then performs noise reduction processing. FR sends the processed data to the virtual group RL via SCM, and RL stores it in the database; The central control unit (CCU) reads data from the database and sends it to the virtual group (RR), which then adjusts the equipment's speed.
[0037] The central control unit (CCU) updates the global status database and synchronizes the status with all nodes via the system management system (SCM), and the system enters a stable operating state.
[0038] See Figure 3 The central control unit (CCU) issues commands and determines the load location, then uses the CAN interface to send control commands to the slave nodes. After receiving the CAN command from the CCU, the RTE of the master node sends the message to the CAN bus through the CAN controller. The RTE is responsible for message encapsulation to ensure reliable message transmission.
[0039] The slave node's RTE receives bus messages through the CAN controller, parses the arbitration ID and data field, and determines whether it is the target node and target load. If they match, the instruction is passed to the slave node's ASW. The logic of the slave node ASW is the same as that of the master node ASW: Verify the right rear load status, calculate the drive signal based on the parameters, and encapsulate the drive signal into a format recognizable by the RTE. Receive the RTE drive signal from node BSW, call the driver of the right rear load, and execute the physical action.
[0040] After the slave node completes its load execution, the BSW will feed back its status to the master node via the RTE through the CAN bus. The master node's RTE receives the feedback message, parses it, and passes it to the CCU. The CCU then updates the system status database.
[0041] When the system needs to coordinate the control of multiple loads, the CCU will initiate two commands simultaneously: the local load FL calls the local API to send the start command; the slave node load RR sends the start command via CAN. The two commands are executed in parallel. Through virtual group abstraction, the CCU does not need to care about the load location, but only needs to call a unified interface to ensure synchronization.
[0042] Example 2 This embodiment also discloses a master-slave cooperative control system for automotive electronic control units, including: Multiple controller nodes, each node containing a load drive unit and a controller logic unit; The vehicle-mounted communication network connects all controller nodes; The dynamic election module is used to execute the dynamic election steps for the master node; The collaborative control module is used to execute collaborative control steps.
[0043] Example 3 This embodiment also discloses a master-slave collaborative control device for automotive electronic control units, including a master-slave collaborative control system for automotive electronic control units.
[0044] Based on the disclosure and teachings of the foregoing specification, those skilled in the art can make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and any modifications and changes to the present invention should also fall within the protection scope of the claims of the present invention. Furthermore, although some specific terms are used in this specification, these terms are only for convenience of explanation and do not constitute any limitation on the present invention.
Claims
1. A master-slave cooperative control method for automotive electronic control units, characterized in that, Includes the following steps: S1. Dynamic election of master nodes: The vehicle includes multiple controller nodes and a network connecting each controller node, and each controller node is marked with a unique identifier ID. After power-on initialization, each controller node enters the initial slave node state. After a node remains in the node state for a period of time, it automatically enters the observer state. A node in observer state continuously listens for the heartbeat signal of the master node on the network; If a valid master node heartbeat signal is detected, maintain the observer state and record the information of that master node; If no valid master node heartbeat signal is detected within the preset heartbeat detection timeout threshold T seconds, the node enters a countdown state. A node that enters a countdown state starts a countdown timer, the duration of which is calculated and determined based on the unique identifier ID of the node in the countdown state; During the countdown, if a node detects a valid master node heartbeat signal, it exits the countdown state and returns to the observer state. The node continuously listens to the network while in countdown mode: If no valid master node heartbeat signal is detected before the countdown timer reaches zero, it becomes the new master node and enters the master node state. If a valid master node heartbeat signal is detected before the countdown timer reaches zero, the countdown will be stopped immediately, the countdown state will be exited, the observer state will be returned, and the valid master node ID will be recorded. A node that has entered master node state performs the following operations: The master node's heartbeat signal is broadcast periodically at fixed intervals, and the heartbeat signal contains the master node's ID information. While broadcasting the heartbeat signal, continuously monitor other heartbeat signals on the network; If a valid heartbeat signal is detected and the master node ID in the valid signal is less than the ID of the current node, then immediately exit the master node state and enter the slave node state. S2, Cooperative Control: The elected master node activates its built-in central coordination and control logic; The master node generates control commands for all loads requiring coordination within the system based on a predefined coordination control strategy. For loads located within the master node itself, the master node directly controls the internal loads through its internal application programming interface; For loads located within other slave nodes, the master node sends control commands to the corresponding slave nodes through the vehicle communication network; Each slave node receives and executes control commands from the master node for its internal load.
2. The master-slave cooperative control method for automotive electronic control units according to claim 1, characterized in that: It also includes S3 and fault self-healing: When the master node fails, the periodic heartbeat signal stops broadcasting; Other nodes in the observer state do not receive a heartbeat signal from the master node within the heartbeat detection timeout threshold, triggering master node failure detection; Nodes that detect a primary node failure enter a countdown state and recalculate the countdown duration based on their own ID; The node with the shortest countdown timer completes its countdown first and becomes the new master node; The newly elected master node begins broadcasting heartbeat signals and takes over the system's collaborative control functions; If the original faulty master node recovers and comes back online, it will enter the slave node state after initialization, stay for a period of time, and then enter the observer state. After listening to the heartbeat signal of the new master node, it will maintain the observer state and record the ID of the new master node.
3. The master-slave cooperative control method for automotive electronic control units according to claim 1, characterized in that: In S1, the countdown duration = node ID × base time unit K. The smaller the ID, the shorter the duration, and the higher the priority. 0.1S≤K≤5S.
4. The master-slave cooperative control method for automotive electronic control units according to claim 1, characterized in that: The interval R between the periodic broadcasts of the heartbeat signal by the master node is less than the heartbeat detection timeout threshold T, and satisfies T ≥ 2×R, where the value of R ranges from 0.1 seconds to 1 second, and the value of T ranges from 0.5 seconds to 5 seconds.
5. The master-slave cooperative control method for automotive electronic control units according to claim 1, characterized in that: Before the S2 and collaborative control steps, there is also a virtual group mapping configuration step: During the initialization or configuration phase, based on the coordination requirements between loads, the loads that need to work together are defined as a virtual control group; The configuration information of the virtual control group is stored or accessible on all nodes; The central coordination and control logic of the master node identifies the set of loads that need to be coordinated and controlled based on the configuration information of the virtual control group.
6. The master-slave cooperative control method for automotive electronic control units according to claim 5, characterized in that: The collaborative control strategy specifically includes: receiving status information from each node, calculating according to predefined collaborative rules, and generating a sequence of collaborative control instructions for all loads within the virtual control group.
7. The master-slave cooperative control method for automotive electronic control units according to claim 1, characterized in that: The vehicle communication network is a controller area network, vehicle Ethernet, or FlexRay bus.
8. The master-slave cooperative control method for automotive electronic control units according to claim 1, characterized in that: The pause period during node initialization refers to the transition phase from node initialization to normal operation. The duration of the pause is determined by the node's initialization process and ranges from 10 milliseconds to 500 milliseconds.
9. A master-slave cooperative control system for automotive electronic control units, characterized in that, include: Multiple controller nodes, each node containing a load drive unit and a controller logic unit; The vehicle-mounted communication network connects all controller nodes; The dynamic election module is used to execute the master node dynamic election steps as described in any one of claims 1-8; A collaborative control module for executing the collaborative control steps as described in any one of claims 1-8.
10. A master-slave cooperative control device for automotive electronic control units, characterized in that: Including the master-slave cooperative control system for automotive electronic control units as described in claim 9.