A PLC multi-protocol redundant gateway and a method and device for independent operation in case of network interruption and a medium

CN122845504APending Publication Date: 2026-09-29RIZHAO KANGYUAN ENERGY SAVING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610832602.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-10
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种PLC多协议冗余网关及断网独立运行方法、设备及介质,能够解决现有技术中的在网络中断或信号完全屏蔽环境下,不能实现异构安防设备数据的持续可靠传输、分级响应及物理联动的问题

Benefits of technology

[0016]本申请实施例提供的一种PLC多协议冗余网关及断网独立运行方法、设备及介质,以电力线载波作为主通信通道,在辅通信通道全部中断时自动切换至独立运行模式,利用现有电力线持续传输预警数据并本地缓存,网络恢复后自动补传,实现信号屏蔽场景下安防系统零漏报;通过协议适配器动态加载与远程在线更新,支持多协议异构设备统一接入,无需额外布线,降低改造成本;四级分级路由决策根据预警等级智能选择通道,低级别预警不占用无线流量,高级别预警触发物理干接点独立联动门禁与消防设备,提供不依赖通信网络的安全兜底;进一步地,通过载波误码率驱动的FEC冗余动态调整与非关键载荷丢弃,在极差电力线信道下仍能保证核心预警信息可靠传输;在PLC信道完全失效时,可降级至工频通信模式,以超窄带方式传输最高等级预警的存在标志,构建三层冗余通信保障体系。本发明适用于校园考点信号屏蔽保障、工业现场电磁干扰环境、老旧建筑智能化改造及养老院安全监护等场景,显著提升安防系统的环境适应性和可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122845504A_ABST
    Figure CN122845504A_ABST
Patent Text Reader

Abstract

The application discloses a PLC multi-protocol redundancy gateway and a network interruption independent running method, equipment and medium. The method comprises the following steps: taking a power line as a main communication channel, taking an Ethernet and a wireless as auxiliary communication channels, and monitoring the connection states of the main communication channel and the auxiliary communication channels in real time; receiving original data from heterogeneous devices, bidirectionally converting the original data between heterogeneous protocols, and obtaining to-be-transmitted data; analyzing the to-be-transmitted data, obtaining early warning data, determining an early warning level, and making a routing decision according to the early warning level; when it is monitored that all the auxiliary communication channels are interrupted, switching to the main communication channel to run in an independent mode, and buffering the to-be-transmitted data locally; when it is monitored that the auxiliary communication channels are recovered, uploading the locally buffered to-be-transmitted data through the auxiliary communication channels, and exiting the independent running mode. The application realizes continuous and reliable transmission of early warning data of heterogeneous devices and supports hierarchical routing and physical linkage under network interruption through the above method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) communication technology, and in particular to a PLC multi-protocol redundant gateway and a method, device and medium for independent operation when the network is disconnected. Background Technology

[0002] Existing building, industrial, and campus security systems primarily use wireless communication methods such as WiFi, 4G, and ZigBee to transmit sensor data. However, in environments with signal shielding at examination sites, electromagnetic interference in industrial settings, or network congestion, wireless communication is highly susceptible to interruption, paralyzing security systems and preventing the reporting of early warning data. Furthermore, installing dedicated communication cables during the renovation of older buildings is difficult and costly, and heterogeneous devices using multiple communication protocols (Modbus RTU, ONVIF, BACnet, etc.) struggle to interconnect, creating data silos. While existing dual-mode communication solutions propose a dual-channel architecture combining wireless and power line carrier, their channel selection logic is based on data type or signal quality, still relying on wireless network recovery after a network outage, failing to address the issue of continuous communication in scenarios of physical network interruption or complete signal shielding.

[0003] To address the aforementioned issues, some gateway products have implemented offline data caching functionality, but their caching strategies are simplistic, allowing only one-by-one uploads after network recovery. While tiered alarm schemes exist, they lack system integration with channel switching and physical dry contact linkage. Although multi-protocol conversion is widespread in the gateway field, it lacks deep integration with independent operation during network outages and adaptive power line channel transmission. Therefore, there is an urgent need for a communication gateway capable of operating independently using existing power lines in environments with complete network outages or signal blockages, supporting multi-protocol conversion, and possessing tiered routing and physical linkage capabilities.

[0004] Based on the above analysis, the problems and shortcomings of the existing technology are as follows: Existing technologies cannot achieve continuous and reliable data transmission, hierarchical response, and physical linkage of heterogeneous security devices in environments with network interruption or complete signal shielding. Summary of the Invention

[0005] This application provides a PLC multi-protocol redundant gateway and a method, device and medium for independent operation when the network is interrupted, which can solve the problem in the prior art that the continuous and reliable transmission of data, hierarchical response and physical linkage of heterogeneous security devices cannot be achieved in the environment of network interruption or complete signal shielding.

[0006] In a first aspect, embodiments of this application provide a PLC multi-protocol redundancy gateway and a method for independent operation during network outages. The method includes: coupling a power line carrier communication module to a power line, using the power line as the main communication channel and Ethernet and wireless as auxiliary communication channels, and monitoring the connectivity status of the main and auxiliary communication channels in real time; receiving raw data from heterogeneous devices, performing bidirectional conversion between heterogeneous protocols on the raw data to obtain data to be transmitted; parsing the data to be transmitted to obtain warning data, determining the warning level, and making routing decisions based on the warning level; when all auxiliary communication channels are detected to be interrupted, switching to the main communication channel for independent operation mode, and caching the data to be transmitted locally; when the auxiliary communication channels are detected to be reconnected, uploading the locally cached data to be transmitted through the auxiliary communication channels, and exiting the independent operation mode.

[0007] In one implementation of this application, when all auxiliary communication channels are detected to be interrupted, the system switches to the main communication channel for independent operation and caches the data to be transmitted locally. Specifically, this includes: determining that the auxiliary communication channel is interrupted when there is no response to the Ethernet logical heartbeat request for a preset number of consecutive times and the wireless signal strength is lower than a preset threshold; shutting down the data transmission of the auxiliary communication channel and directing the transmission route of the data to be transmitted to the main communication channel.

[0008] In one implementation of this application, raw data from heterogeneous devices is received, and bidirectional conversion between heterogeneous protocols is performed on the raw data to obtain data to be transmitted. Specifically, this includes: when a new device is connected, automatically scanning the device address of the data bus, matching the data structure of the response frame with the protocol feature library to identify the protocol type of the new device; loading the protocol adapter corresponding to the protocol type to complete the protocol conversion, and the protocol adapter supports remote online updates.

[0009] In one implementation of this application, the data to be transmitted is parsed to obtain the warning data and the warning level is determined. Routing decisions are made based on the warning level, specifically including: if it is the first level, the warning data is cached locally; if it is the second level, the warning data is sent to the duty room terminal through the main communication channel and the duty room terminal is triggered to display a prompt.

[0010] In one implementation of this application, the method further includes: if it is the third level, copying and distributing the warning data to the sending queues of the main communication channel and the auxiliary communication channel, and pushing it synchronously to the duty room terminal and the mobile application terminal; if it is the fourth level, outputting through the main communication channel, the auxiliary communication channel and the physical dry contact to trigger the action of the external linkage device, wherein the physical dry contact is a local independent triggering logic.

[0011] In one implementation of this application, before coupling the power line carrier communication module to the power line, the method further includes: continuously monitoring the integrity of the equipment casing and the status of the input power supply; when it is detected that the equipment casing is opened or the voltage of the input power supply exceeds the normal operating range, generating an anti-tamper alarm signal or a power failure alarm signal, and forcibly sending the anti-tamper alarm signal or power failure alarm signal through the main communication channel.

[0012] In one implementation of this application, the method further includes: in independent operation mode, real-time monitoring of the carrier bit error rate of the main communication channel; when the carrier bit error rate exceeds a first threshold, initiating redundancy adjustment of forward error correction coding, increasing the redundancy from a first redundancy value to a second redundancy value, while discarding non-critical payload fields in the data to be transmitted, and retaining the warning level, device ID and timestamp triplet for transmission.

[0013] In one implementation of this application, the method further includes: when all auxiliary communication channels are interrupted and the signal-to-noise ratio of the main communication channel is lower than a second threshold, downgrading to power frequency communication mode; in power frequency communication mode, transmitting the fourth-level presence flag and the physical address of the gateway in an ultra-narrowband manner with a bit rate lower than a preset value by modulating the voltage zero-crossing distortion of the power line.

[0014] Secondly, embodiments of this application also provide a PLC multi-protocol redundancy gateway and a device for independent operation when the network is disconnected. The device includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: perform any of the steps of a PLC multi-protocol redundancy gateway and a method for independent operation when the network is disconnected.

[0015] Thirdly, this application also provides a PLC multi-protocol redundancy gateway and a non-volatile computer storage medium for independent operation when the network is disconnected, which stores computer-executable instructions. The computer-executable instructions are configured to execute any one of the steps of a PLC multi-protocol redundancy gateway and independent operation method when the network is disconnected.

[0016] This application provides a PLC multi-protocol redundancy gateway and a method, device, and medium for independent operation during network outages. It uses power line carrier as the primary communication channel and automatically switches to independent operation mode when all secondary communication channels are interrupted. It continuously transmits and locally caches early warning data using existing power lines, automatically retransmitting it after network recovery, achieving zero missed detections in security systems under signal shielding scenarios. Through dynamic loading and remote online updates via protocol adapters, it supports unified access for heterogeneous devices with multiple protocols, eliminating the need for additional wiring and reducing upgrade costs. A four-level hierarchical routing decision intelligently selects channels based on the early warning level; low-level warnings do not consume wireless traffic, while high-level warnings trigger independent linkage of physical dry contacts with access control and fire-fighting equipment, providing a safety backup independent of the communication network. Furthermore, through carrier error rate-driven FEC redundancy dynamic adjustment and non-critical load discarding, it ensures reliable transmission of core early warning information even under extremely poor power line channel conditions. When the PLC channel completely fails, it can degrade to power frequency communication mode, transmitting the highest-level early warning presence marker in ultra-narrowband mode, constructing a three-layer redundant communication guarantee system. This invention is applicable to scenarios such as signal shielding and protection at school examination sites, electromagnetic interference environments in industrial sites, intelligent renovation of old buildings, and security monitoring in nursing homes, significantly improving the environmental adaptability and reliability of security systems. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a PLC multi-protocol redundancy gateway and a method for independent operation when the network is disconnected, provided in an embodiment of this application; Figure 2 This is a schematic diagram of the internal structure of a PLC multi-protocol redundant gateway and an independent operation device when the network is disconnected, provided as an embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] This application provides a PLC multi-protocol redundant gateway and a method, device and medium for independent operation when the network is interrupted, which solves the problem in the prior art that continuous and reliable transmission of data, hierarchical response and physical linkage of heterogeneous security devices cannot be achieved in the environment of network interruption or complete signal shielding.

[0020] The technical solutions proposed in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0021] Figure 1 This application provides a flowchart of a PLC multi-protocol redundant gateway and a method for independent operation when the network is disconnected. Figure 1 As shown in the figure, the PLC multi-protocol redundancy gateway and independent operation method in the event of network outage provided in this application embodiment specifically includes the following steps: Step 10: Couple the power line carrier communication module to the power line, using the power line as the main communication channel and Ethernet and wireless as secondary communication channels, and monitor the connectivity status of the main and secondary communication channels in real time.

[0022] In this step, the PLC (Power Line Carrier) modem module is connected to the power line in the building or industrial site via a coupling circuit, using the power line as the main communication channel; the Ethernet interface is connected to the wired network via RJ45, and the wireless communication module constitutes the secondary communication channel; the channel switching control module independently monitors the connectivity status of the main and secondary communication channels in real time: for the Ethernet wired channel, a dual monitoring mechanism combining physical layer link status detection and ICMP (Internet Control Message Protocol) logical heartbeat packets is used; for the wireless channel, connectivity is determined by a dual mechanism of monitoring the wireless signal strength RSRP (Reference Signal Received Power) value and data link heartbeat packets; the channel switching control module continuously polls the status of each channel to determine the currently available transmission path.

[0023] Step 20: Receive raw data from heterogeneous devices, perform bidirectional conversion between heterogeneous protocols on the raw data, and obtain the data to be transmitted.

[0024] In this step, the protocol conversion module receives raw data from heterogeneous devices, including millimeter-wave radar, access control controllers, fire alarm control panels, AI cameras, etc., via RS485 / RS232, Ethernet, or PLC interfaces. The protocol conversion module adopts a modular architecture and internally maintains a protocol adapter registry, supporting bidirectional conversion between the following protocols: Power Line Carrier Protocol. TCP / IP, Modbus (Modbus Protocol), RTU (Remote Terminal Unit) TCP / IP and ONVIF (Open Network Video Interface Forum) TCP / IP, BACnet TCP / IP, DL / T645 The converted TCP / IP data is standardized and output as data to be transmitted to the hierarchical early warning routing module.

[0025] As an optional embodiment, receiving raw data from heterogeneous devices and performing bidirectional conversion between heterogeneous protocols to obtain data to be transmitted may specifically include: Step 201: When a new device is connected, automatically scanning the device address of the data bus and matching it with the protocol feature library according to the data structure of the response frame to identify the protocol type of the new device.

[0026] In this step, when a new sensor or controller is connected to the RS485 bus, the protocol conversion module sequentially sends probe frames to possible device addresses on the bus and listens for responses. The received response frame data is sent to a protocol feature library for matching. This library pre-stores frame header features, verification methods, and data formats for various industrial protocols such as Modbus RTU, DL / T645, and Profibus. By comparing the structural features of the response frames, including the start character, address length, function code range, and verification algorithm, the protocol type used by the new device is automatically identified.

[0027] Step 202: Load the protocol adapter corresponding to the protocol type to complete the protocol conversion. The protocol adapter supports remote online updates.

[0028] In this step, after identifying the protocol type, the protocol conversion module dynamically loads the corresponding protocol adapter from the Flash memory. For example, if the device is identified as a Modbus RTU device, the Modbus RTU adapter is loaded, mapping serial port function codes 01 (read coil), 03 (read register), 06 (write single register), and 16 (write multiple registers) to standard RESTful API calls on the TCP / IP Socket port; if the device is identified as an ONVIF device, the ONVIF adapter is loaded, and the camera video stream metadata is parsed via RTSP / HTTP protocols. The protocol conversion rule table is stored in the gateway's Flash memory and supports remote online updates via the management platform, adapting to subsequently added device protocol types.

[0029] Step 30: Parse the data to be transmitted to obtain the warning data, determine the warning level, and make routing decisions based on the warning level.

[0030] In this step, the hierarchical early warning routing module receives the data to be transmitted from the protocol conversion module, parses out the early warning data, and extracts the early warning level information. The early warning level includes at least four levels, each corresponding to a different routing strategy and output method. The hierarchical early warning routing module automatically selects the transmission channel and output method according to the early warning level and executes the corresponding routing decision.

[0031] As an optional embodiment, the data to be transmitted is parsed to obtain the warning data and the warning level is determined. The routing decision is made according to the warning level, specifically including: Step 301: If it is the first level, the warning data is cached locally.

[0032] In this step, the first level is the lowest level of concern, such as non-emergency information like normal device status or low battery reminders; the hierarchical warning routing module stores such warning data in the data cache module for manual review by on-duty personnel later, without triggering any remote notifications or audio-visual prompts.

[0033] Step 302: If it is the second level, the warning data will be sent to the duty room terminal through the main communication channel and the duty room terminal will be triggered to display a prompt.

[0034] In this step, the second level is the alert level, such as events that require attention but are not urgent, such as abnormal opening of door magnetic sensors or people loitering in the area. The hierarchical early warning routing module encapsulates the early warning data into power line carrier protocol data and pushes it to the duty room terminal through the main communication channel (PLC), simultaneously triggering the terminal's audio and visual alerts to remind management personnel. This level does not consume wireless auxiliary communication channel resources.

[0035] As an optional embodiment, the method may further include: step 303: if it is the third level, copy and distribute the warning data to the sending queues of the main communication channel and the auxiliary communication channel, and push it synchronously to the duty room terminal and the mobile application terminal.

[0036] In this step, the third level is the early warning level, such as events that require timely response, such as smoke detector triggering or infrared alarm. The hierarchical early warning routing module copies the same early warning data into two copies and sends them to the main communication channel (PLC) and the auxiliary communication channel (Ethernet or wireless) respectively, so as to realize synchronous push to the duty room terminal and the mobile APP of the management personnel, ensuring multi-level linkage response.

[0037] Step 304: If it is the fourth level, the external linkage device is triggered by outputting through the main communication channel, the auxiliary communication channel and the physical dry contact. The physical dry contact is a local independent triggering logic.

[0038] In this step, the fourth level is the emergency level, such as confirming a fire alarm or emergency rescue, which requires immediate action. The graded early warning routing module executes full-channel linkage decision-making: on the one hand, it pushes early warning data to all receiving terminals simultaneously through the main communication channel and the auxiliary communication channel; on the other hand, it generates an independent level or switch signal without any protocol stack processing and outputs it directly through the physical dry contact output interface. This dry contact output adopts local independent triggering logic. Even if the main communication channel and the auxiliary communication channel are both interrupted, the dry contact can still independently trigger fire linkage equipment or access control unlocking according to the local preset linkage rules, such as receiving hard-wired signals from the fire control panel or emergency button, providing a safety backup guarantee for the system that does not rely on the communication network.

[0039] Step 40: When all auxiliary communication channels are detected to be interrupted, switch to the main communication channel for independent operation mode and cache the data to be transmitted locally.

[0040] In this step, the channel switching control module continuously monitors the status of the Ethernet channel and the wireless channel. When it is determined that neither the wired network nor the wireless network can communicate normally, i.e., all auxiliary communication channels are interrupted, the channel switching control module automatically triggers the following operations: switching the current data transmission mode from dual-channel mode to independent operation mode, in which only the power line carrier main communication channel is used as the data transmission channel; at the same time, the data buffer module is activated to temporarily store the data to be transmitted in the local storage medium to prevent data loss.

[0041] As an optional embodiment, when all auxiliary communication channels are detected to be interrupted, the system switches to the main communication channel for independent operation mode and caches the data to be transmitted locally. Specifically, this may include: Step 401: When there is no response to the Ethernet logical heartbeat request for a preset number of consecutive times and the wireless signal strength is lower than a preset threshold, it is determined that the auxiliary communication channel is interrupted.

[0042] In this step, the channel switching control module uses the ICMP (Internet Control Message Protocol) heartbeat monitoring mechanism for the Ethernet channel, sending heartbeat requests to the management platform at preset time intervals. If no response is received after a preset number of consecutive attempts, the Ethernet physical link or upper-layer network is determined to be interrupted. Simultaneously, the wireless channel is monitored by reading the signal strength indicator value of the 4G module. If this value remains below a preset threshold, and there is no response from the data link layer heartbeat, the wireless channel is determined to be interrupted. When both conditions are met simultaneously—that is, the Ethernet heartbeat times out and the wireless signal strength is below the threshold—all secondary communication channels are determined to be interrupted.

[0043] Step 402: Close the data transmission of the secondary communication channel and direct the transmission route of the data to be transmitted to the primary communication channel.

[0044] In this step, once it is determined that all secondary communication channels are interrupted, the channel switching control module immediately performs the following operations: It shuts down all wireless data transmission processes, including 4G and WiFi uplink data, prohibiting any data from being transmitted outward through the secondary communication channels; simultaneously, it forces the transmission route of all data to be transmitted to the PLC modem module, meaning all data is transmitted through the power line carrier main communication channel. Furthermore, it synchronously starts the data caching module to cache the data to be transmitted locally, automatically retransmitting it once the network is restored.

[0045] Step 50: When the auxiliary communication channel is detected to be reconnected, upload the locally cached data to be transmitted through the auxiliary communication channel and exit the independent operation mode.

[0046] In this step, the channel switching control module continuously monitors the recovery status of the secondary communication channel. When it detects a response to an Ethernet heartbeat request, or when the signal strength of the wireless channel rises above a preset threshold and the data link returns to normal, it determines that the secondary communication channel has been restored. At this point, the channel switching control module exits the independent operation mode and resumes dual-channel operation. Simultaneously, the data caching module uploads the locally cached data to be transmitted during the network outage to the management platform one by one through the restored secondary communication channel, following a first-in-first-out (FIFO) order. After the upload is complete, the previously sent cached data is cleared, and the normal data transmission process is restored, meaning the primary and secondary communication channels operate in parallel.

[0047] As an optional embodiment, before coupling the power line carrier communication module to the power line, the method may further include: Step 01: Continuously monitoring the integrity of the device housing and the status of the input power supply.

[0048] In this step, the tamper / power failure detection module includes a microswitch (tamper switch) installed inside the gateway housing and a power detection circuit. The microswitch is in the open state when the housing is normally closed. When the housing is illegally opened, the microswitch contacts close, triggering the tamper signal. The power detection circuit monitors the input voltage amplitude in real time, covering an AC range of 85V-265V. When the voltage is lower than a preset lower threshold or higher than a preset upper threshold, it is determined to be a power supply abnormality.

[0049] Step 02: When the device casing is detected to be opened or the voltage of the input power supply exceeds the normal operating range, an anti-tamper alarm signal or a power failure alarm signal is generated, and the anti-tamper alarm signal or power failure alarm signal is forcibly sent through the main communication channel.

[0050] In this step, when the tamper detection module detects that the casing has been opened, it immediately generates a tamper alarm signal; when the power detection circuit detects that the input voltage exceeds the normal operating range, it immediately generates a power failure alarm signal. These alarm signals are independent of the status of the auxiliary communication channel; instead, they are directly forced by the channel switching control module through the PLC modem module and transmitted outwards via the main communication channel. Even if the gateway is in independent operation mode or the auxiliary communication channel is completely interrupted, the tamper alarm and power failure alarm signals can still be reliably transmitted to the management platform or duty room terminal via the power line, preventing safety hazards caused by human sabotage or abnormal power supply from being masked.

[0051] As an optional embodiment, the method may further include: in stand-alone operation mode, real-time monitoring of the carrier bit error rate of the main communication channel; when the carrier bit error rate exceeds a first threshold, initiating redundancy adjustment of forward error correction coding, increasing the redundancy from a first redundancy value to a second redundancy value, while discarding non-critical payload fields in the data to be transmitted, and retaining the warning level, device ID, and timestamp triplet for transmission.

[0052] In this step, after the gateway switches to independent operation mode, the PLC modem module continuously monitors the carrier bit error rate on the power line channel. The carrier bit error rate reflects the current data transmission quality of the power line channel and is affected by factors such as power line impedance changes, load switching, and noise interference.

[0053] The PLC modulation and demodulation module has an internal bit error rate counter that performs cyclic redundancy check (CRC) on each received data frame. It calculates the real-time carrier bit error rate by counting the proportion of frames that fail the check out of all received frames. When this bit error rate exceeds a preset first threshold, it indicates a deterioration in the current power line channel quality. Continuing to use the original coding parameters may result in the loss of warning data.

[0054] At this point, the hierarchical early warning routing module and the PLC modulation and demodulation module work together to execute the following adaptive transmission strategy: First, dynamically adjust the redundancy of the forward error correction (FEC) coding. Increase the redundancy of the FEC coding from the currently used first redundancy value to a higher second redundancy value. The second redundancy value corresponds to stronger error correction capability, but the effective data rate decreases. The increase in redundancy is achieved by increasing the number of check bytes in the FEC coding, for example, adjusting the code rate from (4 / 5) to (1 / 2), so that the receiver can still correctly recover the original data under worse signal-to-noise ratio conditions.

[0055] Second, non-critical payload fields are stripped from the data to be transmitted. Specifically, for warning data that is not at level four, the hierarchical warning routing module performs data simplification before sending it to the PLC modem module: the warning level field, device identifier field, and timestamp field are retained to form the core information of the triple; other non-critical payload fields such as detailed device descriptions, raw sensor values, and configuration parameters are discarded. For level four warnings, all fields are still transmitted in their entirety to ensure information integrity.

[0056] Through the above-mentioned coordinated operation, when the power line channel quality deteriorates, the gateway sacrifices non-critical information and reduces the data rate in exchange for the reliability of core early warning information transmission, thereby ensuring the successful delivery of the highest priority early warning data even under extreme channel conditions.

[0057] As an optional embodiment, the method may further include: when all auxiliary communication channels are interrupted and the signal-to-noise ratio of the main communication channel is lower than a second threshold, downgrading to power frequency communication mode; in power frequency communication mode, transmitting the fourth-level presence flag and the physical address of the gateway in an ultra-narrowband manner with a bit rate lower than a preset value by modulating the voltage zero-crossing distortion of the power line.

[0058] In this step, when the gateway is already in independent operation mode and the power line channel conditions further deteriorate, causing the signal-to-noise ratio of the PLC modulation and demodulation module to remain below the preset second threshold, conventional OFDM (Orthogonal Frequency Division Multiplexing) carrier communication can no longer guarantee reliable transmission. At this point, the gateway automatically triggers the second-level degradation mechanism, switching to power frequency communication mode.

[0059] Power frequency communication (also known as two-way power frequency automatic communication system, TWACS) employs a physical layer technology completely different from high-frequency carriers. The power frequency communication modulation circuit inside the gateway modulates information by applying a weak distortion near the zero-crossing point of the power line voltage. Specifically, within a specific phase interval of the voltage zero-crossing point, a detectable current or voltage distortion is generated by switching the impedance load using a thyristor switch. The receiving end decodes the binary information by detecting the presence and timing of the distortion. Because the distorted signal is mainly concentrated near the power frequency, its spectral energy is far removed from common radio frequency interference and high-frequency power line noise, giving it extremely strong anti-interference capabilities and the ability to transmit across transformer substations.

[0060] This embodiment uses power frequency communication as a last resort channel, with the following transmission parameters configured: the bit rate is limited to below a preset value, i.e., communication is conducted in ultra-narrowband mode, exchanging extremely low data rates for extremely long transmission distances and extremely high anti-interference margins. In this mode, the gateway no longer transmits complete warning data frames, but only transmits the following minimum set of information: the presence flag of the fourth-level warning, i.e., the Boolean identifier of the emergency event, and the physical address of this gateway. This set of information is further reinforced by repetitive encoding and Manchester encoding before being modulated to the voltage zero-crossing point.

[0061] When the gateway is downgraded to power frequency communication mode, the power frequency communication receiver located on the same power line network, such as a dedicated receiver in the duty room or an upper-level gateway with power frequency communication capability, can receive the above-mentioned fourth-level presence flag, thereby knowing that an emergency has occurred in the area where the specific gateway is located. It does not rely on any network protocol stack and is not affected by building network interruption, wireless signal shielding, high-frequency noise from power lines, etc., providing the last physical layer guarantee for emergency early warning under extreme working conditions.

[0062] In specific implementation, the following application scenarios are included: Intelligent renovation of old buildings: In the renovation of old residential communities or office buildings, the buildings are already filled with power lines but no network cables have been pre-buried. The gateway of this application is deployed in the building's power distribution room. Sensors on each floor, including smoke detectors, door magnetic sensors, and infrared detectors, are connected to the building's power lines through a PLC module. The gateway receives data from each floor through the PLC, and the protocol conversion module converts the data into TCP / IP before reporting it to the property management platform; Signal jamming protection at school examination sites: When signal jammers are activated at school examination sites during the college entrance examination, academic proficiency test, WiFi / 4G wireless communication is completely interrupted. The main channel of this gateway's PLC uses power lines to transmit data, which is not affected by radio frequency signal interference. The warning data is still uploaded to the campus communication management platform as usual, ensuring that the campus security system operates continuously without interruption during the examination period; Industrial IoT access in factories: Most industrial control equipment such as PLC controllers, frequency converters, and sensors in factory workshops use Modbus RTU / RS485 interfaces. This application's gateway connects to the field powerline backbone network via an RS485 interface, enabling protocol conversion from Modbus RTU devices to TCP / IP Ethernet. This allows industrial control equipment to be connected to the factory SCADA system without rewiring, reducing the cost of digital transformation. In nursing home safety monitoring, devices such as elderly activity monitoring sensors, emergency call buttons, and fall detection mats are connected to the building's power lines via a PLC gateway. The gateway uniformly converts the data to TCP / IP before reporting it to the nursing home management platform. During network outages, the PLC channel independently maintains alarm data transmission. L4-level early warning triggers dry contact linkage to unlock doors, ensuring emergency response is unaffected by network status.

[0063] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a PLC multi-protocol redundancy gateway and an independent operation device when the network is disconnected, the structure of which is as follows: Figure 2 As shown.

[0064] Figure 2 This is a schematic diagram of the internal structure of a PLC multi-protocol redundant gateway and an independent operation device when the network is disconnected, provided as an embodiment of this application. Figure 2 As shown, the device includes: At least one processor 201; And a memory 202 that is communicatively connected to at least one processor; The memory 202 stores instructions that can be executed by at least one processor. The instructions are executed by at least one processor 201 to enable at least one processor 201 to: execute any one of the steps of a PLC multi-protocol redundant gateway and independent operation method when disconnected from the network.

[0065] Some embodiments of this application provide corresponding to Figure 1 A PLC multi-protocol redundancy gateway and a non-volatile computer storage medium for independent operation when the network is disconnected are disclosed. The computer-executable instructions are configured to execute any one of the steps of a PLC multi-protocol redundancy gateway and independent operation method when the network is disconnected.

[0066] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments for IoT devices and media are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0067] The systems, media, and methods provided in this application are one-to-one correspondences. Therefore, the systems and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the systems and media will not be repeated here.

[0068] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0069] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0070] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0071] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0072] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0073] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0074] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0075] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0076] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A PLC multi-protocol redundant gateway and a method for independent operation during network outages, characterized in that, The method includes: The power line carrier communication module is coupled to the power line, with the power line as the main communication channel and Ethernet and wireless as auxiliary communication channels, and the connectivity status of the main and auxiliary communication channels is monitored in real time. Receive raw data from heterogeneous devices, perform bidirectional conversion between heterogeneous protocols on the raw data, and obtain the data to be transmitted; The data to be transmitted is parsed to obtain early warning data, and the early warning level is determined. Routing decisions are then made based on the early warning level. When all auxiliary communication channels are detected to be interrupted, the system switches to the main communication channel for independent operation and caches the data to be transmitted locally. When the auxiliary communication channel is detected to have resumed connectivity, the locally cached data to be transmitted is uploaded through the auxiliary communication channel, and the independent operation mode is exited.

2. The PLC multi-protocol redundant gateway and independent operation method in case of network outage as described in claim 1, characterized in that, When all auxiliary communication channels are detected to be interrupted, the system switches to the main communication channel for independent operation and caches the data to be transmitted locally, specifically including: If the Ethernet logical heartbeat request fails to respond for a preset number of consecutive times, and the wireless signal strength is lower than a preset threshold, the auxiliary communication channel is determined to be interrupted. The data transmission of the secondary communication channel is turned off, and the transmission route of the data to be transmitted is directed to the primary communication channel.

3. The PLC multi-protocol redundant gateway and independent operation method in case of network outage as described in claim 1, characterized in that, The process of receiving raw data from heterogeneous devices and performing bidirectional conversion between heterogeneous protocols to obtain data to be transmitted specifically includes: When a new device is connected, the device address on the data bus is automatically scanned, and the protocol type of the new device is identified by matching the data structure of the response frame with the protocol feature library. The protocol adapter corresponding to the protocol type is loaded to complete the protocol conversion. The protocol adapter supports remote online updates.

4. The PLC multi-protocol redundant gateway and independent operation method for network outages as described in claim 1, characterized in that, The process of parsing the data to be transmitted to obtain warning data, determining the warning level, and making routing decisions based on the warning level specifically includes: If it is the first level, the warning data will be cached locally; If it is the second level, the warning data will be sent to the duty room terminal through the main communication channel, and the duty room terminal will be triggered to issue a prompt.

5. The PLC multi-protocol redundant gateway and independent operation method for network outages as described in claim 4, characterized in that, The method further includes: If it is level three, the warning data is copied and distributed to the sending queues of the main communication channel and the auxiliary communication channel, and pushed synchronously to the duty room terminal and the mobile application terminal. If it is the fourth level, the external linkage device is triggered by outputting through the main communication channel, the auxiliary communication channel and the physical dry contact. The physical dry contact is a local independent triggering logic.

6. The PLC multi-protocol redundant gateway and independent operation method for network outages as described in claim 1, characterized in that, Prior to coupling the power line carrier communication module to the power line, the method further includes: Continuously monitor the integrity of the equipment casing and the status of the input power supply; When the device casing is detected to be opened or the voltage of the input power supply exceeds the normal operating range, an anti-tamper alarm signal or a power failure alarm signal is generated and the anti-tamper alarm signal or power failure alarm signal is forcibly sent through the main communication channel.

7. The PLC multi-protocol redundant gateway and independent operation method for network outages as described in claim 1, characterized in that, The method further includes: In the independent operation mode, the carrier bit error rate of the main communication channel is monitored in real time; When the carrier bit error rate exceeds the first threshold, the redundancy adjustment of the forward error correction coding is initiated, increasing the redundancy from the first redundancy value to the second redundancy value. At the same time, non-critical payload fields in the data to be transmitted are discarded, and the warning level, device ID and timestamp triplet are retained for transmission.

8. The PLC multi-protocol redundant gateway and independent operation method for network outages as described in claim 5, characterized in that, The method further includes: When all auxiliary communication channels are interrupted and the signal-to-noise ratio of the main communication channel is lower than the second threshold, the communication mode is downgraded to power frequency communication mode. In the power frequency communication mode, the presence flag of the fourth level and the physical address of the gateway are transmitted in an ultra-narrowband manner with a bit rate lower than a preset value by modulating the voltage zero-crossing distortion of the power line.

9. A PLC multi-protocol redundant gateway and an independent operation device when the network is down, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Perform the steps of a PLC multi-protocol redundant gateway and independent operation method as described in any one of claims 1-8.

10. A non-volatile computer storage medium storing computer-executable instructions for a PLC multi-protocol redundant gateway and an independent operation method when the network is disconnected, characterized in that, The computer-executable instructions are set as follows: Perform the steps of a PLC multi-protocol redundant gateway and independent operation method as described in any one of claims 1-8.