Method and system for redundancy backup of master control in distributed energy equipment collaborative system
By configuring the same control software and functional modules in distributed energy devices, dynamic election and redundancy backup are achieved, solving the problem of system failure caused by the failure of a single master control device, ensuring seamless switching and management continuity in the event of a failure, and improving the reliability and availability of the system.
Patent Information
- Application Number
- CN202610021451.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-05-26
AI Technical Summary
In existing distributed energy collaborative systems, the centralized control method that relies on a single master control device results in the system losing its unified management and scheduling capabilities when the master control device fails, causing the system to fail to operate according to the established goals, and even leading to equipment downtime and economic losses.
By configuring the same control software and functional modules in each distributed energy device, dynamic election of the master control device, periodic data synchronization and verification are achieved, ensuring automatic switching to a new master control device when the master control device fails, thus achieving redundancy backup.
It enables seamless switching in the event of a main control device failure, ensuring the continuity of system management and policy execution, avoiding control interruptions and state chaos, and improving the reliability and availability of the system.
Smart Images

Figure CN122092260A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of energy management technology, and specifically relates to a master control redundancy backup method for a distributed energy equipment collaborative system. Background Technology
[0002] Currently, in distributed energy collaborative application scenarios that include photovoltaic power generation, energy storage units, and electricity loads, a centralized energy management architecture is commonly adopted. Under this architecture, an independent central control unit is usually set up, such as a dedicated energy management system or master controller, which is responsible for collecting information such as photovoltaic output, energy storage status, load demand, and grid electricity price. Based on the preset economic dispatch strategy or grid instructions, it coordinates the operation of each device in a unified manner to achieve the optimal overall economic benefits of the system or specific operational goals. This type of centralized control scheme makes the system's management logic and decision-making functions completely dependent on this single current master control device.
[0003] However, this centralized control method, which relies on a single physical node, means that the main control device currently undertakes all system coordination and decision-making functions. Once this unit fails due to hardware failure, software anomaly, or communication interruption, the entire collaborative system will immediately lose its unified management and scheduling capabilities. The distributed devices will no longer be able to conduct effective data interaction and strategy coordination, causing the system to fail to operate according to the established goals, and may even lead to equipment downtime, revenue loss, or operational risks.
[0004] Existing technical solutions lack the ability to automatically, quickly, and seamlessly transfer the main control function to other available devices in the system when the current main control device fails. In other words, the reliability and availability of the system are limited by the reliability of a single main control node, which constitutes a bottleneck for the stable operation of the system. Summary of the Invention
[0005] To address the aforementioned issues, this application provides a method and system for redundancy backup of the master control unit in a distributed energy equipment collaborative system, which has the advantage of enabling dynamic migration and redundancy backup of the master control unit.
[0006] Specifically, a method for master control redundancy backup in a distributed energy device collaborative system, wherein the distributed energy device collaborative system consists of multiple distributed energy devices interconnected through a local communication network and all running the same control software, includes the following steps: Based on the unique device identifier of the pre-configured distributed energy device, the current master device is elected from all distributed energy devices according to the preset election rules, and the remaining distributed energy devices are regarded as slave devices. The current master control device periodically collects the operating data and configuration parameters of the current master control device and slave devices, generates a synchronization data packet containing verification information, and broadcasts the synchronization data packet to the slave devices through the local communication network; The slave device receives and verifies the synchronization data packet, and updates its local status based on the synchronization data packet after the verification is successful. Slave devices continuously monitor the online status of the current master device; When the current master device is detected to be offline, a master re-election event is triggered; In response to a re-election event, a new master device is elected from among the slave devices based on the unique device identifier and election rules. The new master device takes over system control based on the data in the last verified synchronization data packet stored in its storage.
[0007] Furthermore, the unique device identifier is a segmented code consisting of a high-order part and a low-order part. The high-order part is a numeric code used to indicate the device type, and the low-order part is a numeric code used to indicate the unique serial number of the device in its respective device type.
[0008] Furthermore, the election rule is a preset rule that enables each distributed energy device to reach a unique and deterministic consensus based on a unique device identifier.
[0009] Furthermore, the synchronization data packet includes at least a configuration file consisting of system operation data and configuration parameters, and the verification information is a verification value calculated by applying a message digest algorithm to the configuration file.
[0010] Furthermore, the slave device receives and verifies the synchronization data packets, including: Extract the configuration file from the received synchronization data packets; The extracted configuration file is used to calculate the first verification value using the same message digest algorithm as the current master control device; Extract the verification information from the synchronization data packet as the second verification value; The first check value is compared with the second check value for equality.
[0011] Furthermore, when the first verification value and the second verification value are inconsistent, the verification is determined to be unsuccessful, and a data retransmission request is initiated to the current master control device; If the first check value is exactly equal to the second check value, then the check is considered to have passed.
[0012] This application provides a master control redundancy backup system for a distributed energy device collaborative system, comprising multiple distributed energy device units interconnected through a local communication network and all running the same control software, wherein each of the distributed energy device units is provided with a master controller; The master controller of a distributed energy device can elect the current master device from all distributed energy devices according to a preset election rule based on the pre-configured unique device identifier of the distributed energy device, and treat the remaining distributed energy devices as slave devices. The current master controller of the master device can periodically collect the operating data and configuration parameters of the current master device and slave devices, generate a synchronization data packet containing verification information, and broadcast the synchronization data packet to the slave devices through the local communication network; The master controller of the slave device receives and verifies the synchronization data packet. After the verification is successful, it updates the local status according to the synchronization data packet and continuously monitors the online status of the current master controller. When the current master controller is detected to be offline, a master controller re-election event is triggered. In response to the master controller re-election event, a new master controller is elected from the slave devices based on the unique device identifier and election rules. The new master controller takes over control of the collaborative system based on the data in the last verified synchronization data packet stored in its storage.
[0013] This application also provides an electronic device, which includes at least one processor and at least one memory, the memory being data-connected to the processor, wherein the memory stores instructions executable by at least one processor, the instructions being executed by at least one processor to enable at least one processor to perform any of the methods described above.
[0014] This application also provides a computer-storable medium storing computer instructions, which, when executed by a processor, specifically perform the steps of any of the methods described above.
[0015] This application also provides a computer program product, including computer instructions, which, when executed by a processor, specifically perform the steps of any of the methods described above. Compared with the prior art, this application has the following advantages: This invention enables each distributed energy device unit in the system to become the master controller. When the original master controller fails and goes offline, the system can automatically trigger a re-election mechanism to quickly establish a new current master controller from the remaining online device units. This achieves dynamic migration and redundant backup of the master controller role, fundamentally solving the reliability bottleneck problem of the entire system being paralyzed due to the failure of a single node.
[0016] Meanwhile, this invention employs a mandatory periodic data synchronization and verification mechanism. The current master control device is responsible for periodically collecting system data and encapsulating it into synchronization data packets with verification information for broadcasting. The remaining slave devices receive, verify, and update their own status accordingly. This ensures that even at the moment of master control role switching, the newly selected current master control device can immediately and seamlessly take over the control of the system based on its last stored, verified, and consistent system data snapshot. This achieves continuity in system management and policy execution during fault switching and avoids control interruption or state chaos.
[0017] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart of a method according to an embodiment of this application is shown; Figure 2 A system structure diagram according to an embodiment of this application is shown. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] In current distributed energy collaborative application scenarios such as photovoltaic energy storage, a centralized energy management system architecture is typically adopted. This system sets up an independent master controller or energy gateway as the core, responsible for collecting information such as photovoltaic power generation, energy storage battery status, load demand, and grid electricity price, and uniformly managing the operation of each device based on localized strategies to maximize the system's economic benefits. However, this architecture concentrates the entire system's control logic and decision-making functions on this single physical node. Once the master controller fails due to hardware failure, software anomaly, or network interruption, the system will immediately lose its unified coordination capability, causing the devices to be unable to continue working collaboratively, interrupting the operation strategy, resulting in economic losses and even operational safety risks. There is a lack of an effective mechanism to automatically, quickly, and without business interruption migrate the master control functions to other redundant devices in the system when the master controller fails, making the availability of the entire system completely limited by the reliability of a single node.
[0022] To address the aforementioned technical issues, this invention proposes a distributed energy equipment collaborative system and its master control redundancy backup method. By equipping each device unit in the system with the same control software and complete functional modules, it endows each unit with the same capability to become a master controller. Based on a distributed collaborative mechanism, it dynamically elects a master controller, continuously synchronizes the status of the entire system, monitors the health of the master controller in real time, and automatically triggers a switchover when the master controller fails, thereby constructing a control system that does not depend on any single node.
[0023] For details, please refer to Figure 2 The distributed energy device collaborative system of the present invention is a system composed of at least two different types of distributed energy devices, such as photovoltaic power generation, energy storage, wind power generation, and electrical loads, interconnected through a local communication network. Each device unit runs the same control software. Specifically, each device is equipped with an independent master controller, and the master controllers are interconnected and communicate in real time through a WiFi network, together forming a dynamically coordinated energy management network. Figure 2 The virtual master controller in this context is not a physical device, but rather refers to a system-level master control logic function implemented in software that can be migrated and backed up between any device controllers in a network.
[0024] In some embodiments, the master controller may consist of a device identification memory, a master arbitration module, a data synchronization and status management module, and a status monitoring module.
[0025] The device identifier memory stores a pre-configured unique device identifier, which is preferably a structured digital code, with the high-order part indicating the device type and the low-order part indicating the individual serial number of the device of that type.
[0026] The main arbitration module is responsible for executing the election logic based on this identifier.
[0027] The data synchronization and status management module has three working modes: master, slave, and takeover, each corresponding to different system responsibilities.
[0028] The status monitoring module is used by slave devices to monitor the current master device.
[0029] For details, please refer to Figure 1 This application includes the following steps: S1, Initial Election Control Equipment.
[0030] S1-1. After the distributed energy device collaborative system is powered on and started, all distributed energy devices (including energy storage devices, electrical devices, wind power generation devices, and photovoltaic power generation devices) in the network discover each other and exchange device identifiers through the local communication network. The local communication network can be a wireless local area network composed of Wi-Fi. The device identifier is a segmented code composed of a high-order part and a low-order part. The high-order part is a digital code used to indicate the device type, such as 01 representing an energy storage device and 02 representing a photovoltaic device. The low-order part is a digital code used to indicate the unique serial number of the device in its respective device type, such as 0101 indicating that it is device number one in the energy storage device.
[0031] S1-2. The master controller within each distributed energy device selects the current master controller in the distributed energy device collaborative system according to the preset election rules.
[0032] Specifically, the core of the election rule is to enable all participating devices to reach a unique consensus on the master control identity without centralized coordination. In this embodiment, to clearly illustrate the principle, the election rule specifically selects the device unit with the smallest device identifier value in the current network as the current master control device. It should be understood that this rule is only an exemplary means to achieve the purpose, and not a limitation of the present invention. In other feasible implementations, the election rule can also be set to select the unit with the largest device identifier value, or to conduct the election based on the combination of device type priority and sequence number, etc. Regardless of the specific rule, its fundamental purpose is to dynamically elect the master control device from the set of online distributed energy devices through a preset and consistent algorithm.
[0033] This step enables dynamic allocation of control from the system startup phase, eliminating the dependence on specific fixed master control hardware and thus avoiding the existence of a single point of failure at the architectural level.
[0034] S2, Periodic data synchronization.
[0035] After the current master control device is elected, the system enters the stable operation and status maintenance phase.
[0036] S2-1. The main controller in the current main control equipment enters the main control working mode. The main controller works at set intervals according to the preset synchronization cycle, such as activating once every five minutes. When activated, the main controller collects real-time operating data of the entire system through internal or external data interfaces. This data includes, but is not limited to, the DC bus voltage and output power of each photovoltaic unit, the battery pack voltage, current, state of charge and health status of each energy storage unit, and the active power and reactive power of each load unit.
[0037] At the same time, the main controller also collects the system's configuration parameters, such as the peak-valley parity time period table sent from the server, the system's current economic operation mode flag, and alarm threshold parameters for various devices.
[0038] S2-2. The current master controller of the master device serializes the collected data according to a predetermined format and integrates it to generate a corresponding global configuration file, which aims to describe the complete state and strategy of the system at a certain moment. In order to ensure that the file will not be tampered with or have bit errors during subsequent network transmission to slave devices, a standard message digest algorithm, such as MD5 or SHA256, will be applied to the configuration file for calculation. The message digest algorithm will map a file of arbitrary length to a fixed-length and unique check value.
[0039] S2-3. The current master controller of the master device packages the original configuration file and the calculated check value into a synchronization data packet. The current master device sends this synchronization data packet to all slave device units in the network through the local communication network in a broadcast or multicast manner.
[0040] Through the above steps, the current master control device periodically and reliably disseminates the authoritative state snapshot of the system to the entire network, providing a consistent data source for all device units.
[0041] S3, Data reception, verification and local status update.
[0042] S3-1. The slave device master controller continuously monitors the local communication network. When it receives a synchronization data packet from the current master device, it separates the global configuration file and the checksum attached to the master device from the received synchronization data packet.
[0043] S3-2. The slave device master controller uses the same message digest algorithm as the master device master controller to independently recalculate the extracted configuration file to obtain a locally calculated second check value. Then, the master controller compares the locally calculated second check value with the first check value extracted from the data packet and calculated by the master controller bit by bit.
[0044] If the two check values are inconsistent, it indicates that the data may have been damaged or tampered with during transmission, the synchronization data is invalid, and a data retransmission request is initiated to the current master control device.
[0045] If the two verification values match, it proves that the configuration file has not been changed during the transmission from the master device to the slave device, and the data is complete and reliable. At this time, based on the status update of the received data packet, the global configuration file is parsed, the system status view maintained internally by this device unit is updated according to the data, and its own control strategy parameters are adjusted.
[0046] In some embodiments, the energy storage units in the slave devices can adjust their charging and discharging plans according to the new electricity price period in the document, thereby ensuring that all slave devices can follow the command of the master device in a timely and accurate manner, maintain the uniformity of the network strategy, and prevent the spread of erroneous states in the system.
[0047] S4. Current status monitoring of the main control device; The slave device's master controller listens for synchronization data packets periodically sent by the current master device. Since these synchronization data packets are sent at fixed intervals, preferably, the master controller internally sets a timer. Each time a valid synchronization data packet from the current master device is received, the timer is reset. A preset timeout threshold can be set, such as the length of three synchronization cycles. If the timer continues to run and the next synchronization data packet is not received before the threshold is exceeded, the master controller determines that the current master device has failed and is offline.
[0048] S5. The slave device takes over the master control when the master control device is in a faulty state.
[0049] S5-1. All slave device master controllers in the network re-execute the election process consistent with step S1. Based on the latest online device identifier list and following the same preset election rules, a new round of consensus election is quickly conducted to elect the same new master controller. The new master controller is usually the slave device with the smallest device identifier value.
[0050] S5-2. The new master controller enters the takeover mode. Since the new master controller does not need to collect system status from scratch, it has already successfully received, verified and stored the last valid synchronization data packet before the failure in step S3. The global configuration file in this data packet accurately records the complete system status at the moment the original master controller failed. Therefore, the new master controller can directly load this latest and verified status snapshot and immediately restore the global management and coordination functions of the system. It immediately takes over from the original master controller and continues to execute the control of the system from step S2, periodically collecting data and broadcasting new synchronization data packets.
[0051] From the moment a fault is detected to the start of operation of the new master controller, the entire switching process is completed automatically in a very short time, minimizing the interruption time of system services. For upper-layer applications, it may only manifest as a brief delay in control commands, without causing long-term interruption or chaos in policy execution.
[0052] In other embodiments, this application also discloses an electronic device including at least one processor and at least one memory, the memory being data-connected to the processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described method.
[0053] A computer-storable medium storing computer instructions, which, when executed by a processor, specifically perform the steps of the method.
[0054] A computer program product includes computer instructions that, when executed by a processor, specifically perform the steps described above.
[0055] Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for master control redundancy backup in a distributed energy device collaborative system, wherein the distributed energy device collaborative system comprises multiple distributed energy devices interconnected via a local communication network and all running the same control software, characterized in that, include: Based on the unique device identifier of the pre-configured distributed energy device, the current master device is elected from all distributed energy devices according to the preset election rules, and the remaining distributed energy devices are regarded as slave devices. The current master control device periodically collects the operating data and configuration parameters of the current master control device and slave devices, generates a synchronization data packet containing verification information, and broadcasts the synchronization data packet to the slave devices through the local communication network; The slave device receives and verifies the synchronization data packet, and updates its local status based on the synchronization data packet after the verification is successful. Slave devices continuously monitor the online status of the current master device; When the current master device is detected to be offline, a master re-election event is triggered; In response to a master re-election event, a new master device is elected from among the subordinate devices based on a unique device identifier and election rules. The new master device takes over control of the collaborative system based on the data in the last verified synchronization data packet stored in its storage.
2. The method according to claim 1, characterized in that, The unique device identifier is a segmented code consisting of a high-order part and a low-order part. The high-order part of the segmented code is a numeric code used to indicate the device type, and the low-order part of the segmented code is a numeric code used to indicate the unique serial number of the device in its respective device type.
3. The method according to claim 1, characterized in that, The election rules are preset rules that enable each distributed energy device to reach a unique and deterministic consensus based on a unique device identifier.
4. The method according to claim 1, characterized in that, The synchronization data packet includes at least a configuration file consisting of distributed energy equipment collaborative system operation data and its configuration parameters, and the verification information is a verification value calculated by applying a message digest algorithm to the configuration file.
5. The method according to claim 1, characterized in that, The slave device receives and verifies the synchronization data packet, including: Extract the configuration file from the received synchronization data packet; The extracted configuration file is used to calculate the first verification value using the same message digest algorithm as the current master control device; Extract the verification information from the synchronization data packet as the second verification value; The first check value and the second check value are compared for equality.
6. The method according to claim 5, characterized in that, When the first verification value and the second verification value are inconsistent, the verification is determined to be unsuccessful, and a data retransmission request is initiated to the current master control device. If the first check value is exactly equal to the second check value, then the check is considered to have passed.
7. A master control redundancy backup system for a distributed energy equipment collaborative system, characterized in that, It includes multiple distributed energy device units interconnected through a local communication network and all running the same control software, with each of the distributed energy device units equipped with a master controller; The master controller of a distributed energy device can elect the current master device from all distributed energy devices according to a preset election rule based on the pre-configured unique device identifier of the distributed energy device, and treat the remaining distributed energy devices as slave devices. The current master controller of the master device can periodically collect the operating data and configuration parameters of the current master device and slave devices, generate a synchronization data packet containing verification information, and broadcast the synchronization data packet to the slave devices through the local communication network; The master controller of the slave device receives and verifies the synchronization data packet. After the verification is successful, it updates the local status according to the synchronization data packet and continuously monitors the online status of the current master controller. When the current master controller is detected to be offline, a master controller re-election event is triggered. In response to the master controller re-election event, a new master controller is elected from the slave devices based on the unique device identifier and election rules. The new master controller takes over control of the collaborative system based on the data in the last verified synchronization data packet stored in its storage.
8. An electronic device, characterized in that, The electronic device includes at least one processor and at least one memory, the memory being data-connected to the processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A computer-storable medium, characterized in that, The storable medium stores computer instructions, which, when executed by a processor, specifically perform the steps of the method as described in any one of claims 1-6.
10. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they specifically perform the steps in the method as described in any one of claims 1-6.