Communication control method and system based on intelligent switching of main link and standby link

By employing a communication control method that intelligently switches between primary and backup links, heterogeneous links between Ethernet and mobile communication networks are constructed, enabling seamless switching during faults. This solves the reliability problem of communication network failures in existing technologies and ensures the stable operation of the microgrid.

CN121396752APending Publication Date: 2026-01-23HENAN PINGGAO ELECTRIC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511559504.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing communication technologies lack redundant control schemes that enable intelligent switching between Ethernet and mobile communication networks, making it difficult to quickly and seamlessly connect in the event of network failures and failing to meet the reliability and stability requirements of microgrid communication.

Method used

The communication control method adopts intelligent switching between primary and backup links. By constructing heterogeneous communication links between Ethernet and mobile communication networks, adopting data synchronization strategies and hot backup mechanisms, the status of the primary link is monitored in real time, and the system switches to the backup link in case of failure. Combined with link layer and application layer verification, it ensures seamless switching of communication services and data integrity.

Benefits of technology

It enables intelligent switching between Ethernet and mobile communication networks, ensuring the reliability and stability of microgrid communication, reducing the risk of communication interruption, improving the performance of the system's redundant communication architecture, and adapting to the high requirements of complex industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121396752A_ABST
    Figure CN121396752A_ABST
Patent Text Reader

Abstract

The invention discloses a communication control method and system based on intelligent switching of a main link and a standby link. The method comprises the following steps: constructing a redundant communication architecture consisting of an Ethernet main link and a mobile communication network standby link which are physically isolated; during the communication period of the main link, synchronously writing a data packet to be sent into a cache to be sent of the standby link for backup by adopting a data synchronization strategy; the state of the main link is monitored in real time, and hot backup of the standby link is maintained; when the state of the main link deteriorates to a switching threshold value, starting a link switching process; validity verification is executed during switching, and all services are loaded on the standby link after verification is passed; and on the basis of the to-be-sent cache, the data packets which are not successfully sent on the main link are subjected to compensation sending, so that zero data loss is ensured. The corresponding system comprises the micro-grid terminal equipment, a control management unit and a link management unit for realizing the functions. According to the invention, lossless and reliable switching between the main link and the standby link is realized, and the problem of vulnerability of a single link in micro-grid communication is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of microgrid communication technology, and specifically to a communication control method and system based on intelligent switching of primary and backup links. Background Technology

[0002] With the continued advancement of energy transition, distributed generation systems based on new energy sources are becoming increasingly widespread. Smart microgrids, as small-scale power generation and distribution systems capable of self-control, protection, and management, are playing an increasingly important role. Microgrids integrate distributed power sources (such as photovoltaics and wind turbines), energy storage devices, energy conversion devices, and related loads to form a single, controllable unit. They can operate in parallel with the main grid or in islanded mode during main grid failures, thereby effectively improving the reliability and resilience of regional power supply.

[0003] Currently, the core demand of the new energy industry for smart microgrids lies in ensuring the power quality level on the user side through precise control of the supply and demand balance between the power source and load sides. The stable and efficient operation of a microgrid highly depends on continuous and reliable communication between intelligent terminal devices within the microgrid's intelligent control system and between these terminal devices and the upper-level control and management unit. These terminal devices deployed at key nodes of the microgrid constitute the "nerve endings" and "executing hands and feet" of the microgrid.

[0004] As a critical component of the microgrid intelligent control system, any communication interruption will directly cause voltage and frequency surges or even grid collapse in the microgrid, thus placing extremely high demands on the reliability of the communication link. Meanwhile, after three generations of transformation in the industrial network field—from fieldbus to wired Ethernet to wireless networks—the interconnectivity of the entire vertical industry chain and the digital transformation driving the accelerated construction of the Industrial Internet require high-performance communication networks to support the close connection between people, products, and machines.

[0005] While wired Ethernet offers advantages in transmission stability, it is susceptible to limitations imposed by cabling environments in complex industrial scenarios, posing a risk of single points of failure and necessitating mobile communication technology as a supplement. Both 4G and 5G mobile communications are used in industrial networks, but existing communication technologies lack redundant communication control schemes capable of intelligent switching between Ethernet and mobile communication networks. This makes it difficult to quickly and seamlessly reconnect during network failures, failing to meet the core requirements of safe and stable power supply and real-time transmission of industrial control signals.

[0006] Therefore, how to provide a redundant communication control method and system that can switch between Ethernet and mobile communication networks without loss and with reliability is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] In view of this, the present invention provides a communication control method and system based on intelligent switching between primary and backup links, realizing intelligent switching redundancy control between Ethernet and mobile communication networks. This technology fully combines the advantages of Ethernet's high bandwidth and zero packet loss with the characteristics of mobile communication networks' wide coverage, low latency, and high reliability, ensuring the reliability of microgrid communication while also taking into account cost-effectiveness and adaptability to application scenarios.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] This invention first proposes a communication control method based on intelligent switching between primary and backup links, where the primary link and backup link serve as communication links between microgrid terminal equipment and control management unit; the method includes the following steps:

[0010] S1: Construct a communication architecture, which includes an Ethernet as the main link and a mobile communication network as a backup link. The Ethernet and the mobile communication network are heterogeneous communication links that are physically isolated from each other. A data synchronization strategy is adopted between the main link and the backup link, including: during communication on one link, the data packets to be sent are synchronously written into the buffer to be sent on the other link for backup.

[0011] S2: During normal operation of the main link, monitor the communication status of the main link in real time, and at the same time keep the backup link in a hot backup ready state.

[0012] S3: When the communication status of the main link is detected to deteriorate to the preset switching threshold, the link switching process is initiated;

[0013] S4: When performing link switching, execute the switching validity verification process. After the verification is successful, carry all communication services on the backup link.

[0014] S5: After switching to the backup link, based on the pending transmission buffer, compensate for the data packets that were not successfully transmitted on the main link.

[0015] Preferably, S1 includes the following steps: while sending the data packet between the microgrid terminal device and the control management unit through one of the links, a copy of the data packet is written into the pending transmission buffer of the other link;

[0016] Upon receiving a successful confirmation signal from one of the links for the transmission of the data packet, the corresponding copy of the data packet is cleared from the pending transmission buffer of the other link.

[0017] Preferably, step S5 includes the following steps:

[0018] After switching to another link, a compensation thread is started to retrieve all copies of data packets that have not been cleared from the pending transmission buffer of the other link and send them through the other link.

[0019] Preferably, the step of maintaining the backup link in a hot standby ready state in S2 includes:

[0020] Heartbeat detection signals are sent to the main link and backup link at a preset period, and the connection status of the main link and backup link is determined based on the heartbeat detection signals.

[0021] Preferably, step S3 includes the following steps:

[0022] When a preset abnormal state is detected in the communication status data of the main link, the mobile communication network parameters are configured and a transmission layer connection with the control and management unit is established.

[0023] When the backup link latency is detected to meet the preset requirements, a switching command is issued and the data packet transmission of the main link is suspended. The control and management unit responds to the switching command and switches to the backup link.

[0024] Preferably, after switching to the backup link, the following steps are also included:

[0025] When the switching delay is detected to meet the preset requirements, the communication status of the backup link is verified. Once all communication status indicators meet the preset requirements, all services of the microgrid terminal equipment are switched to the backup link for transmission.

[0026] Preferably, the handover validity verification process in step S4 includes link layer verification and application layer verification steps; wherein,

[0027] The link layer verification is used to verify whether the communication status of the backup link meets the indicator requirements.

[0028] The application layer verification is used to verify the response latency and parsing accuracy of the microgrid terminal equipment by sending test control commands to the microgrid terminal equipment.

[0029] Preferably, in the link layer verification step: the microgrid terminal device sends a handover confirmation frame to the control management unit, the handover confirmation frame containing the communication status information of the backup link; after receiving the handover confirmation frame, the control management unit verifies the communication status data therein, and if the communication requirements are met, it replies with a reception confirmation frame, the reception confirmation frame containing the latest data sequence number associated with the received data packet.

[0030] Preferably, after S5, a step of switching back from the backup link to the primary link is also included:

[0031] S6: During the normal operation of the backup link, monitor the communication status of the primary link in real time;

[0032] S7: When the communication status data of the main link is detected to have returned to normal, initiate the link switching process;

[0033] S8: When performing link switching, execute the switching validity verification process. After the verification is successful, carry all communication services on the main link.

[0034] S9: After switching to the primary link, based on the pending transmission buffer, compensate for the data packets that were not successfully transmitted on the backup link.

[0035] The present invention also provides a communication control system according to the communication control method based on intelligent switching of primary and backup links, including a link management unit that is communicatively connected to the microgrid terminal equipment and the control management unit respectively;

[0036] The link management unit includes:

[0037] A communication architecture construction module is used to construct a redundant communication architecture including an Ethernet network as the main link and a mobile communication network as a backup link, wherein the Ethernet network and the mobile communication network are heterogeneous communication links that are physically isolated from each other.

[0038] The data synchronization module is used to synchronously write the data packets to be sent into the backup link's buffer for backup during the main link communication.

[0039] The status monitoring and maintenance module is used to monitor the communication status of the main link in real time during normal operation of the main link, and at the same time maintain the backup link in a hot backup ready state.

[0040] The switching control module is used to initiate the link switching process when the communication status of the main link is detected to deteriorate to a preset switching threshold.

[0041] The validity verification module is used to perform a switch validity verification process when a link switch is executed. After the verification is successful, all communication services are carried on the backup link.

[0042] The data compensation module is used to compensate for data packets that were not successfully sent on the main link after switching to the backup link, based on the pending transmission buffer.

[0043] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a communication control method and system based on intelligent switching of primary and backup links, which has the following beneficial effects:

[0044] This invention effectively addresses potential issues such as main link failures and system crashes during microgrid operation, ensuring stable transmission of control commands and real-time data. It provides a robust communication guarantee for the stable operation of microgrids and is of great significance for promoting the large-scale application and intelligent development of microgrid technology. This invention is applicable to both 4G and 5G mobile network links. By leveraging the superior communication performance of 5G networks, it further enhances the overall performance of the redundant communication architecture to meet the demands of more complex and demanding microgrid operation scenarios. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0046] Figure 1 A communication architecture diagram based on intelligent switching of primary and backup links provided for embodiments of the present invention;

[0047] Figure 2 A flowchart of a communication control method based on intelligent switching of primary and backup links provided in an embodiment of the present invention;

[0048] Figure 3 This is a flowchart illustrating the handover verification process based on intelligent switching of primary and backup links, provided for an embodiment of the present invention. Detailed Implementation

[0049] 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 some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0050] The first aspect of this invention discloses a communication control method based on intelligent switching between primary and backup links, such as... Figure 1 As shown, the main link and backup link serve as communication links between the microgrid terminal equipment and the control and management unit; as Figure 2 As shown, it includes the following steps:

[0051] S1: Construct a communication architecture, which includes Ethernet as the main link and a mobile communication network as the backup link. Ethernet and the mobile communication network are heterogeneous communication links that are physically isolated from each other. A data synchronization strategy is adopted between the main link and the backup link, including: during communication on one link, the data packets to be sent are synchronously written into the buffer to be sent on the other link for backup.

[0052] S2: During normal operation of the main link, monitor the communication status of the main link in real time, and at the same time keep the backup link in a hot backup ready state.

[0053] S3: When the communication status of the main link is detected to deteriorate to the preset switching threshold, the link switching process is initiated;

[0054] S4: When performing link switching, execute the switching validity verification process. After the verification is successful, all communication services will be carried on the backup link.

[0055] S5: After switching to the backup link, based on the pending transmission buffer, compensate for the data packets that were not successfully transmitted on the main link.

[0056] This embodiment constructs a redundant communication architecture for the "Ethernet + mobile communication" link, adopts a hardware and software collaborative link switching mechanism to achieve decoupling of the hardware functions of the two links, uses a "dual write synchronization" data strategy to ensure the integrity of data during the link switching process, and implements a "two-way handshake + command verification" switching validity verification and fault recovery process.

[0057] In one embodiment, the main link and the backup link are two completely independent communication links. These two links are physically isolated from each other, and there are no shared parts from the transmission medium to the communication unit, so as to avoid the paralysis of the entire communication system due to a single point of failure.

[0058] Main link: Ethernet supports adaptive rates of 10 / 100 / 1000 Mbit / s, uses optical signal transmission, is unaffected by electromagnetic interference, has low signal attenuation, and is suitable for long-distance, high-precision scenarios. The main link is primarily responsible for carrying critical control commands and real-time data.

[0059] The system tracks and controls the operating status of the equipment in real time, including key parameters such as voltage, current, and power. It also monitors the communication status of the main link itself, such as the bandwidth utilization, data transmission rate, and the presence of bit errors. Once an anomaly is detected, the system can promptly trigger the subsequent link switching process.

[0060] Backup Link: In the microgrid redundant communication architecture, using a mobile communication network as a backup link can achieve higher cost-effectiveness while meeting communication requirements. The backup link can utilize 4G URLLC (Ultra-Reliable Low-Latency Communication) slices, configured with QoS level 1 (latency <30ms, reliability 99.999%). Its theoretical peak downlink rate can reach 100Mbps (in a mobile environment), and the uplink rate is approximately 50Mbps (when stationary or moving at low speed), with an end-to-end latency ≤100ms. It normally operates in parallel with the main link, synchronously transmitting non-critical status monitoring data, such as equipment fault type, fault time, historical statistics of distributed power sources, and predictive data.

[0061] In one embodiment, the mobile communication network includes a 4G network and a 5G network. 4G networks are commercially mature with comprehensive wide-area coverage, especially in remote villages and islands where microgrids are widely used. Furthermore, 4G modules are low-cost and highly compatible, and their millisecond-level latency and Mbps-level speeds already meet the transmission needs of most microgrid industrial control systems. 5G networks offer superior communication performance, further enhancing the overall performance of the redundant communication architecture to meet the demands of more complex and demanding microgrid operation scenarios.

[0062] In one embodiment, S1 includes the following steps: while sending data packets between the microgrid terminal device and the control management unit through one of the links, a copy of the data packets is written into the pending transmission buffer of the other link;

[0063] Once a successful acknowledgment signal for packet transmission is received from one of the links, the corresponding packet copy is cleared from the pending transmission buffer of the other link.

[0064] The specific execution process of the "dual-write strategy" of Ethernet as the currently used main link in this embodiment includes: "synchronous dual-write" to the main link + "asynchronous recording" to the backup link. Synchronously attempt to send data packets through the main link (Ethernet) and also write them into the pending transmission buffer of the backup link (4G network). If the Ethernet transmission is successful and an acknowledgment (ACK) is received from the other end, then the data packet is cleared from the local queue and the pending transmission buffer of the 4G network.

[0065] In this embodiment, step S5 includes the following steps:

[0066] After switching to another link, a compensation thread is started to retrieve copies of all data packets that have not been cleared from the pending transmission buffer of the other link and send them through the other link. This retransmission mechanism ensures that no control commands are lost during the handover process, keeping the data loss rate <0.01% and further improving the reliability of communication.

[0067] The specific execution process of the retransmission mechanism in this embodiment includes: when an Ethernet failure is detected, switching to the 4G network, starting to synchronously send new data packets through the 4G network, and starting a "compensation thread" to retrieve those "pending" data packets that have not yet received ACK from the local sending queue and retransmit them through the 4G network. This ensures that the data being transmitted at the moment of failure is not lost. When Ethernet recovery is detected, the communication agent does not immediately switch back, but first marks it as "recovered, pending verification". After verification, it switches back to the main link. At the moment of switching back to Ethernet, it is necessary to check whether there is any data sent through the 4G network but not acknowledged, and perform compensation retransmission on Ethernet. After the switch is completed, the 4G network returns to the standby state.

[0068] In one embodiment, the step of maintaining the backup link in a hot standby ready state in S2 includes:

[0069] Heartbeat detection signals are sent to the primary link and backup link at a preset period, and the connection status of the primary link and backup link is determined based on the heartbeat detection signals.

[0070] In this embodiment, a heartbeat query signal with timing markers is sent to the primary and backup links at a 1ms cycle. When the primary link is determined to be faulty, a precise control signal sequence is generated through preset timing logic to ensure the "hot backup" state and switching latency are less than 1ms. This "hot backup" design can avoid communication interruption caused by excessive startup preparation time of the backup link when the primary link suddenly fails, greatly shortening the overall latency of link switching and ensuring the continuity of microgrid monitoring data transmission.

[0071] In one embodiment, S3 includes the following steps:

[0072] When a preset abnormal state is detected in the communication status data of the main link, the mobile communication network parameters are configured and a transmission layer connection with the control and management unit is established.

[0073] When the backup link latency is detected to meet the preset requirements, a switching command is issued and the data packet transmission of the primary link is suspended. The control and management unit responds to the switching command and switches to the backup link.

[0074] The specific execution process of this embodiment is as follows:

[0075] When the main link is normal, Ethernet transmits main control services, real-time data, and main link status, while 4G simultaneously performs non-critical data detection and backup link status transmission. When the software detects an impending risk of main link interruption, such as persistently high bandwidth utilization, frequent network jitter, or packet loss or increased bit error rate, it immediately initiates the link switching preparation process. The software configures 4G module parameters (APN, IP address) via AT commands and establishes a TCP connection with the control and management unit. Only when the 4G link latency is tested to be less than 30ms will it proceed to the next switching preparation stage. When the main link experiences a communication interruption, the software immediately issues a "switching command," which explicitly includes a switching latency requirement of less than 50ms. Simultaneously, it suspends Ethernet data transmission to prevent data confusion or duplicate transmission during the switching process.

[0076] In one embodiment, the following steps are further included after switching to the backup link:

[0077] When the switching delay is detected to meet the preset requirements, the communication status of the backup link is verified. Once all communication status indicators meet the preset requirements, all services of the microgrid terminal equipment are switched to the backup link for transmission.

[0078] In this embodiment, after the switch is completed, the software will perform a comprehensive verification of the 4G link status, including indicators such as packet loss rate <0.5% and latency jitter <10ms. Only after confirming that all indicators meet the requirements will all services in the microgrid, including hard real-time control commands and soft real-time monitoring data, be switched to the 4G link for transmission.

[0079] In one embodiment, such as Figure 3 As shown, step S4, which involves performing a handover validity verification process, includes link layer verification and application layer verification steps; among which,

[0080] Link layer verification is used to verify whether the communication status of the backup link meets the indicator requirements.

[0081] Application layer verification is used to verify the response latency and parsing accuracy of microgrid terminal equipment by issuing test control commands to the microgrid terminal equipment.

[0082] In this embodiment, during the link layer verification step: the microgrid terminal device sends a handover confirmation frame to the control management unit, which contains the communication status information of the backup link; after receiving the handover confirmation frame, the control management unit verifies the communication status data therein, and if the communication requirements are met, it replies with a reception confirmation frame, which contains the latest data sequence number associated with the received data packet.

[0083] The specific execution process of link layer verification includes: the microgrid terminal equipment sends a "handover confirmation frame" to the control and management unit. This confirmation frame contains key indicator information such as handover time, 4G link latency, packet loss rate, and reliability. Upon receiving the "handover confirmation frame," the control and management unit verifies the indicator information. If the communication requirements are met, it replies with a "receive confirmation frame." This confirmation frame contains the latest received data sequence number, confirming the link connectivity with the control and management unit.

[0084] The specific execution process of application layer verification includes: the terminal sends out a test control command to verify the service transmission capability of the 4G link, ensuring that the command response latency is less than 30ms and the parsing accuracy is 100%.

[0085] Only when both of these indicators meet the requirements is the 4G link considered capable of carrying all services, and the link switching considered effective.

[0086] In one embodiment, after the Ethernet main link fault is cleared and restored to normal, the system monitors the Ethernet communication status. When the Ethernet bit error rate R < 0.25 and other communication indicators such as bandwidth utilization and data transmission rate return to normal, all services are switched back to the Ethernet link following the same procedure as when switching to the 4G link. This fault recovery mechanism avoids the bandwidth limitations faced by the 4G link during long-term operation. Although the 4G link can meet the communication needs of the microgrid, its bandwidth resources are relatively limited compared to Ethernet's full-bandwidth, lossless transmission capability of 1000 Mbit / s. Long-term operation may affect data transmission efficiency due to insufficient bandwidth. By switching back to the Ethernet link in a timely manner, the bandwidth advantage of Ethernet can be fully utilized, ensuring the long-term stable operation of the microgrid.

[0087] Specifically, after S5, it also includes the step of switching back from the backup link to the primary link:

[0088] S6: During the normal operation of the backup link, monitor the communication status of the primary link in real time;

[0089] S7: When the communication status data of the main link is detected to have returned to normal, initiate the link switching process;

[0090] S8: When performing link switching, execute the switching validity verification process. After the verification is successful, all communication services will be carried on the main link.

[0091] S9: After switching to the primary link, based on the pending transmission buffer, compensate for the data packets that were not successfully transmitted on the backup link.

[0092] The second aspect of the present invention also discloses a communication control system based on a communication control method for intelligent switching of primary and backup links according to the first aspect of the present invention, comprising: a link management unit that is communicatively connected to a microgrid terminal device and a control management unit respectively;

[0093] The link management unit includes:

[0094] The communication architecture building module is used to build a redundant communication architecture that includes Ethernet as the main link and a mobile communication network as a backup link. The Ethernet and mobile communication networks are heterogeneous communication links that are physically isolated from each other.

[0095] The data synchronization module is used to synchronously write the data packets to be sent into the backup link's buffer for backup during the main link communication.

[0096] The status monitoring and maintenance module is used to monitor the communication status of the main link in real time during normal operation of the main link, and at the same time maintain the backup link in a hot backup ready state.

[0097] The switching control module is used to initiate the link switching process when the communication status of the main link is detected to deteriorate to a preset switching threshold.

[0098] The validity verification module is used to perform a switch validity verification process when a link switch is executed. After the verification is successful, all communication services are carried on the backup link.

[0099] The data compensation module is used to compensate for data packets that were not successfully sent on the primary link after switching to the backup link, based on the pending transmission buffer.

[0100] In one embodiment, the Ethernet and mobile communication networks achieve hardware-level functional decoupling. At the hardware architecture level, the Ethernet communication module and the mobile communication module are designed as independent functional units. During PCB layout, a sufficient safe distance (not less than 20mm) is maintained between them and the RF lines of the mobile communication module, and a grounding isolation strip is provided to prevent signal crosstalk between the two. The antenna interface of the mobile module is independently designed and equipped with a dedicated impedance matching circuit to ensure the transmission and reception efficiency of the mobile communication signal, while avoiding interference between the digital signals of the Ethernet module and the mobile RF signals. The control interfaces of the dual links also achieve hardware-level isolation. The main MCU of the link management unit, as the hardware body carrying the data synchronization module, status monitoring and maintenance module, switching control module, validity verification module, and data compensation module, connects the control signals of the Ethernet module (such as the PHY chip reset signal and rate negotiation signal) and the control signals of the mobile communication module (such as the module wake-up signal and data transmission enable signal) to different I / O ports of the main MCU, and each control port is equipped with an independent optocoupler isolation device to achieve electrical isolation. This design ensures that when one link experiences a hardware failure (such as a damaged Ethernet PHY chip or a short circuit in the mobile communication module), the fault signal will not be transmitted to the main MCU or another link module through the control interface, thus ensuring that the non-faulty link can continue to operate normally and providing a reliable hardware-level guarantee for dual-link redundant communication.

[0101] In one embodiment, the switching operation between the primary link and the backup link employs a double-pole electronic relay. Specifically, the physical interfaces of the Ethernet PHY (physical layer chip) and the 4G module maintain a physical connection simultaneously. The primary and backup links are powered independently. The relay only controls the power supply to its respective link (not the signal path). During rapid switching, the power supply to the primary link is cut off to avoid signal interference, significantly shortening the physical interface switching time and providing a hardware foundation for low latency throughout the entire link switching process.

[0102] In one embodiment, the main MCU of the link management unit is based on an industrial-grade chip, capable of generating precise timing signals to ensure that the time difference between "Ethernet disconnection" and "4G connection" is less than 1ms, effectively preventing the simultaneous disconnection of both links and ensuring the continuity of the communication link. Furthermore, the main MCU has a built-in 2MB SRAM cache. During link switching, this cache can temporarily store control commands to be sent and add a unique sequence number to each command. After the switch is complete, the main MCU will retransmit the temporarily stored control commands to the target device in sequence according to the sequence number. This retransmission mechanism ensures that no control commands are lost during the switch, resulting in a data loss rate of less than 0.01%, further improving communication reliability.

[0103] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0104] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A communication control method based on intelligent switching of primary and backup links, characterized in that, The main link and backup link serve as communication links between microgrid terminal equipment and control management units; the process includes the following steps: S1: Construct a communication architecture, which includes an Ethernet as the main link and a mobile communication network as a backup link. The Ethernet and the mobile communication network are heterogeneous communication links that are physically isolated from each other. A data synchronization strategy is adopted between the main link and the backup link, including: during communication on one link, the data packets to be sent are synchronously written into the buffer to be sent on the other link for backup. S2: During normal operation of the main link, monitor the communication status of the main link in real time, and at the same time keep the backup link in a hot backup ready state. S3: When the communication status of the main link is detected to deteriorate to the preset switching threshold, the link switching process is initiated; S4: When performing link switching, execute the switching validity verification process. After the verification is successful, carry all communication services on the backup link. S5: After switching to the backup link, based on the pending transmission buffer, compensate for the data packets that were not successfully transmitted on the main link.

2. The communication control method based on intelligent switching of primary and backup links according to claim 1, characterized in that, S1 includes the following steps: while sending the data packet between the microgrid terminal equipment and the control management unit through one of the links, a copy of the data packet is written into the pending transmission buffer of the other link; Upon receiving a successful confirmation signal from one of the links for the transmission of the data packet, the corresponding copy of the data packet is cleared from the pending transmission buffer of the other link.

3. The communication control method based on intelligent switching of primary and backup links according to claim 2, characterized in that, S5 includes the following steps: After switching to another link, a compensation thread is started to retrieve all copies of data packets that have not been cleared from the pending transmission buffer of the other link and send them through the other link.

4. The communication control method based on intelligent switching of primary and backup links according to claim 1, characterized in that, The steps in S2 to maintain the backup link in a hot standby ready state include: Heartbeat detection signals are sent to the main link and backup link at a preset period, and the connection status of the main link and backup link is determined based on the heartbeat detection signals.

5. The communication control method based on intelligent switching of primary and backup links according to claim 1, characterized in that, S3 includes the following steps: When a preset abnormal state is detected in the communication status data of the main link, the mobile communication network parameters are configured and a transmission layer connection with the control and management unit is established. When the backup link latency is detected to meet the preset requirements, a switching command is issued and the data packet transmission of the main link is suspended. The control and management unit responds to the switching command and switches to the backup link.

6. The communication control method based on intelligent switching of primary and backup links according to claim 5, characterized in that, After switching to the backup link, the following steps are also included: When the switching delay is detected to meet the preset requirements, the communication status of the backup link is verified. Once all communication status indicators meet the preset requirements, all services of the microgrid terminal equipment are switched to the backup link for transmission.

7. The communication control method based on intelligent switching of primary and backup links according to claim 1, characterized in that, The handover validity verification process in step S4 includes link layer verification and application layer verification steps; wherein... The link layer verification is used to verify whether the communication status of the backup link meets the indicator requirements. The application layer verification is used to verify the response latency and parsing accuracy of the microgrid terminal equipment by sending test control commands to the microgrid terminal equipment.

8. The communication control method based on intelligent switching of primary and backup links according to claim 7, characterized in that, In the link layer verification step: the microgrid terminal device sends a handover confirmation frame to the control management unit, which contains the communication status information of the backup link; after receiving the handover confirmation frame, the control management unit verifies the communication status data in it. If the communication requirements are met, it replies with a reception confirmation frame, which contains the latest data sequence number associated with the received data packet.

9. The communication control method based on intelligent switching of primary and backup links according to claim 1, characterized in that, Following S5, there is also a step of switching back from the backup link to the primary link: S6: During the normal operation of the backup link, monitor the communication status of the primary link in real time; S7: When the communication status data of the main link is detected to have returned to normal, initiate the link switching process; S8: When performing link switching, execute the switching validity verification process. After the verification is successful, carry all communication services on the main link. S9: After switching to the primary link, based on the pending transmission buffer, compensate for the data packets that were not successfully transmitted on the backup link.

10. A communication control system based on a communication control method for intelligent switching of primary and backup links according to any one of claims 1-9, characterized in that, This includes a link management unit that is communicatively connected to the microgrid terminal equipment and the control management unit, respectively; The link management unit includes: A communication architecture construction module is used to construct a redundant communication architecture including an Ethernet network as the main link and a mobile communication network as a backup link, wherein the Ethernet network and the mobile communication network are heterogeneous communication links that are physically isolated from each other. The data synchronization module is used to synchronously write the data packets to be sent into the backup link's buffer for backup during the main link communication. The status monitoring and maintenance module is used to monitor the communication status of the main link in real time during normal operation of the main link, and at the same time maintain the backup link in a hot backup ready state. The switching control module is used to initiate the link switching process when the communication status of the main link is detected to deteriorate to a preset switching threshold. The validity verification module is used to perform a switch validity verification process when a link switch is executed. After the verification is successful, all communication services are carried on the backup link. The data compensation module is used to compensate for data packets that were not successfully sent on the main link after switching to the backup link, based on the pending transmission buffer.