Dual-network redundancy and network-disconnection cache transmission system and method of construction site edge computing gateway

CN122533933APending Publication Date: 2026-08-07DONGGUAN HAOKONG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGGUAN HAOKONG TECHNOLOGY CO LTD
Filing Date
2026-06-23
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

1、采用单网络链路,主链路故障即导致数据上报中断,缺乏链路级冗余备份;

Benefits of technology

[0014]The beneficial effects of this invention are as follows: This invention adopts a dual-link redundancy architecture with wired and wireless cellular links, which can automatically complete link switching and backoff, effectively avoiding service interruption caused by single-link failure; when the network is abnormal or the reporting fails, the system will persistently store alarm data and screenshot indexes, and the data can still be restored normally after power failure and restart. When the cache space is insufficient, high-priority alarms are prioritized for retention, effectively reducing the risk of data loss; after the network is restored, alarms are retransmitted in an orderly manner according to priority and time order, ensuring that high-risk alarms are delivered first; alarm deduplication is achieved by using a unique identifier to prevent duplicate reporting; at the same time, the computing power scheduling is optimized through frame buffering, concurrency control, asynchronous queues and other strategies, coupled with an exponential backoff retry mechanism, reducing resource consumption and ensuring long-term stable operation of the equipment; in addition, the system is equipped with a standardized operation and maintenance interface, supporting operations such as status query, parameter configuration, and manual retransmission, effectively improving the convenience of operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122533933A_ABST
    Figure CN122533933A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of network communication, in particular to a dual-network redundancy and network interruption cache transmission system and method of a construction site edge computing gateway; the system comprises a hardware adaptation layer, a dual-network redundancy layer, a local cache management layer, a breakpoint transmission scheduling layer, a cloud communication layer and a local operation and maintenance layer; a wired main link and a wireless cellular backup link redundancy switching mechanism is adopted, alarm data and screenshot indexes are persistently stored when a network is abnormal, and the network is supplemented according to preset rules after recovery, and deduplication and cloud confirmation are realized in combination with unique identification. The application can effectively improve network availability and alarm data integrity, ensure that high-priority safety alarms are preferentially delivered, and adapt to all-weather commercial operation requirements of a construction site.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network communication technology, specifically to a dual-network redundancy and outage buffering and resume transmission system and method for construction site edge computing gateways. Background Technology

[0002] With the advancement of smart construction site development, construction sites are commonly deploying edge computing gateways to aggregate RTSP video streams from multiple network cameras. These gateways run AI recognition algorithms locally and send alarms and screenshots related to safety helmet violations, smoking, and other incidents back to the monitoring backend. However, the network environment at construction sites is complex, with wired broadband and 4G / 5G cellular networks frequently experiencing momentary interruptions, congestion, or handover failures. Simultaneously, edge devices may encounter short-term power outages, restarts, and other anomalies. Existing edge gateway solutions generally suffer from the following shortcomings: 1. It uses a single network link, and the failure of the main link will cause the data reporting to be interrupted, lacking link-level redundancy backup; 2. When alarm reporting fails, there is a lack of a reliable local persistence mechanism. Alarm JSON and screenshot evidence generated during network outages are easily lost when the process exits or the queue overflows. 3. After the network is restored, there is a lack of automatic retransmission strategy based on priority and time order. Important alarms are easily blocked by a large number of ordinary events, resulting in incomplete cloud data. 4. Lack of deduplication and cloud confirmation mechanism based on unique identifier, which easily generates duplicate alarms during retransmission; 5. The system has high resource consumption, poor long-term operational stability, and lacks local and remote operation and maintenance methods, making it difficult to meet the requirements for 24 / 7 commercial deployment on construction sites. Summary of the Invention

[0003] The purpose of this invention is to address the aforementioned shortcomings in the prior art by providing a dual-network redundancy and outage caching and resume transmission system and method for construction site edge computing gateways.

[0004] The objective of this invention is achieved through the following technical solution: a dual-network redundancy and network outage caching and resume transmission system for a construction site edge computing power gateway, characterized by comprising a hardware adaptation layer, a dual-network redundancy layer, a local cache management layer, an breakpoint resume transmission scheduling layer, a cloud communication layer, and a local operation and maintenance layer. The hardware adaptation layer is used to access the video stream and perform local artificial intelligence inference, identify and generate alarm events, and encapsulate alarm data carrying priority markers, unique identifiers and screenshot indexes, while generating corresponding associated screenshots. The dual network redundancy layer uses a wired link as the primary link and a wireless cellular network as the backup link, periodically performs link detection, and completes the primary / backup link switching or triggers offline caching mode based on the link connectivity status. The local cache management layer is used to store alarm data and screenshot index into the local cache and write them to persistent storage when there is a network anomaly or alarm callback failure. At the same time, it manages the local cache according to priority and executes a data eviction policy when the cache capacity is insufficient. The breakpoint resume scheduling layer is used to monitor the link recovery status, perform retransmission of alarm data in the local cache according to preset rules, and complete data deduplication and status marking by combining the unique identifier and feedback from the monitoring backend. The cloud communication layer is used to send alarm callbacks to the regulatory backend and receive confirmation information returned by the platform. The local operation and maintenance layer is used to provide system operation and maintenance interfaces to realize equipment status monitoring, parameter configuration and manual operation and maintenance intervention.

[0005] The present invention is further configured such that the dual network redundancy layer periodically performs connectivity detection on the primary link; when the primary link detection fails and the backup link is connected normally, it switches to the backup link and records the link switching event; when the primary link recovers and the detection is normal, it smoothly switches back to the primary link; when both the primary link and the backup link are unreachable, it issues an offline instruction to the local cache management layer to enable the local cache mechanism.

[0006] The present invention is further configured such that the local cache management layer uses an asynchronous batch write method to save alarm data and screenshot index to persistent storage, and relies on the unique identifier in the alarm data to realize the recovery of cache data after power failure and restart; when the local cache space is insufficient, the historical data with the longest storage time is eliminated in order of priority from low to high, and high priority alarm data is retained first.

[0007] The present invention is further configured such that the retransmission sorting rule of the breakpoint resume scheduling layer is as follows: priority is given to sorting alarm data from high to low priority, and under the same priority, alarm data is sorted from old to new according to the generation time of the alarm event; for alarm data that fails to be retransmitted, an exponential backoff strategy is adopted for retrying, and if multiple retries still fail, the data is retained in the local cache and retransmitted again after the next link is restored.

[0008] The present invention is further configured such that each alarm data is configured with an independent unique identifier; the breakpoint resume scheduling layer marks the alarm data that has been retransmitted through the unique identifier; the cloud communication layer sends the unique identifier to the monitoring backend along with the alarm data, and the monitoring backend combines the unique identifier with a preset cooling period to achieve duplicate alarm filtering.

[0009] The present invention is further configured such that the hardware adaptation layer configures a single-frame buffer for the video stream to reduce transmission latency, and automatically performs a reconnection operation after the video stream is disconnected; the device load is regulated through concurrency control and frame skipping strategies; the generated alarm data is first stored in a bounded memory queue and processed asynchronously by multiple threads to avoid blocking the video acquisition and artificial intelligence inference process.

[0010] The present invention is further configured such that the hardware adaptation layer prioritizes alarm events according to their risk type: high-risk alarm events are classified as high priority, and regular alarm events are classified as regular priority.

[0011] The present invention is further configured such that the cloud communication layer initiates an alarm callback based on an encrypted network protocol, and the request message carries an authentication token; the screenshot index supports two forms: local address and remote object storage address, and when the remote upload of the associated screenshot fails, it automatically switches to the local screenshot index to complete the reporting.

[0012] The present invention is further configured such that the local operation and maintenance layer provides a standardized operation and maintenance interface, which supports querying device operating status, link status, and alarm statistics; supports remotely issuing video acquisition tasks and modifying system operating parameters; and also supports manual operation and maintenance operations such as manually triggering alarm data retransmission and exporting local logs.

[0013] The dual-network redundancy and network outage caching and resume transmission method for edge computing gateways at construction sites includes the following steps: S1. Access the live video stream and perform local AI inference to identify alarm events, generate associated screenshots, and encapsulate them into alarm data carrying priority, unique identifier, and screenshot index; S2. Periodically perform link detection on the main link and backup link, switch communication links according to the link connectivity status, and enter offline buffer state when both links are abnormal. S3. When the network is normal, an alarm callback is initiated for the alarm data; when the alarm callback fails or the network is abnormal, the alarm data and screenshot index are stored in the local cache and written to persistent storage; when the cache space is insufficient, low-priority historical data is evicted according to priority. S4. After the communication link is detected to be restored, the alarm data in the local cache is retransmitted one by one according to priority and time order; if the retransmission is successful, the corresponding local cache is cleared; if the retransmission fails, exponential backoff retry is performed. S5, the operation and maintenance end monitors the system's operating status in real time through the operation and maintenance interface, and completes operation and maintenance operations such as parameter configuration, manual re-upload, and log export as required.

[0014] The beneficial effects of this invention are as follows: This invention adopts a dual-link redundancy architecture with wired and wireless cellular links, which can automatically complete link switching and backoff, effectively avoiding service interruption caused by single-link failure; when the network is abnormal or the reporting fails, the system will persistently store alarm data and screenshot indexes, and the data can still be restored normally after power failure and restart. When the cache space is insufficient, high-priority alarms are prioritized for retention, effectively reducing the risk of data loss; after the network is restored, alarms are retransmitted in an orderly manner according to priority and time order, ensuring that high-risk alarms are delivered first; alarm deduplication is achieved by using a unique identifier to prevent duplicate reporting; at the same time, the computing power scheduling is optimized through frame buffering, concurrency control, asynchronous queues and other strategies, coupled with an exponential backoff retry mechanism, reducing resource consumption and ensuring long-term stable operation of the equipment; in addition, the system is equipped with a standardized operation and maintenance interface, supporting operations such as status query, parameter configuration, and manual retransmission, effectively improving the convenience of operation and maintenance. Attached Figure Description

[0015] The invention will be further illustrated with reference to the accompanying drawings, but the embodiments in the drawings do not constitute any limitation on the invention. For those skilled in the art, other drawings can be obtained based on the following drawings without any creative effort.

[0016] Figure 1 This is a system framework diagram of the present invention; Figure 2 This is a flowchart of the dual-network redundant heartbeat monitoring and automatic switching process of the present invention; Figure 3 This is a flowchart of the local caching and priority breakpoint resume process of this invention. Figure 4 This is a schematic diagram of the alarm caching and priority retransmission timing in the network outage scenario of this invention. Detailed Implementation

[0017] The present invention will be further described in conjunction with the following embodiments.

[0018] like Figures 1 to 4As shown, the dual-network redundancy and network outage caching and resume transmission system of the construction site edge computing gateway described in this embodiment includes a hardware adaptation layer, a dual-network redundancy layer, a local cache management layer, an breakpoint resume transmission scheduling layer, a cloud communication layer, and a local operation and maintenance layer. The hardware adaptation layer is used to access video streams and perform local artificial intelligence inference, identify and generate alarm events, and encapsulate alarm data carrying priority tags, unique identifiers, and screenshot indexes, while generating corresponding associated screenshots. The dual-network redundancy layer uses a wired link as the primary link and a wireless cellular network as the backup link, periodically performs link detection, and completes the primary / backup link switching or triggers offline caching mode according to the link connectivity status. The local cache management layer is used to store alarm data and screenshot indexes in the local cache and write them to persistent storage when there is a network anomaly or alarm callback failure. It also manages the local cache according to priority and executes a data eviction policy when the cache capacity is insufficient. The breakpoint resume scheduling layer is used to monitor the link recovery status, perform retransmission of alarm data in the local cache according to preset rules, and complete data deduplication and status marking by combining unique identifiers and feedback from the regulatory backend. The cloud communication layer is used to initiate alarm callbacks to the regulatory backend and receive confirmation information returned by the platform. The local operation and maintenance layer is used to provide system operation and maintenance interfaces to realize device status monitoring, parameter configuration and manual operation and maintenance intervention.

[0019] Specifically, this system adopts a layered and decoupled modular architecture design. Each layer interacts with data through standardized interfaces to achieve functional independence and horizontal expansion. After the system starts, the hardware adaptation layer first completes the initialization of the video acquisition device and the access of the video stream, starts the local AI inference engine and loads the pre-trained construction site safety detection model. At the same time, the dual network redundancy layer starts the link detection thread to periodically detect the connectivity and network quality of the primary and backup links.

[0020] When the hardware adaptation layer identifies an alarm event through AI inference, it immediately captures the key frame at the moment the alarm occurs as a related screenshot, automatically generates a globally unique identifier, and marks the corresponding priority according to the alarm type. This information is then encapsulated into a standardized alarm data structure and pushed to the data processing queue. The dual network redundancy layer provides the data processing queue with real-time link status information. If the primary or backup link is connected, the alarm data directly initiates a callback to the monitoring backend through the cloud communication layer. If both links are disconnected, or if alarm callbacks fail consecutively to a preset threshold, a local caching mechanism is triggered, and the alarm data and screenshot index are taken over by the local cache management layer. When the dual network redundancy layer detects link recovery, it sends a link recovery signal to the breakpoint resumption scheduling layer. The scheduling layer initiates a retransmission task, reading alarm data from the local cache according to rules for batch retransmission. After retransmission, the breakpoint resumption scheduling layer updates the local cache status based on the confirmation information returned from the cloud and clears the successfully reported data. Throughout the entire operation, the local operation and maintenance layer continuously collects the operational status data of each module, providing standardized operation and maintenance interfaces to support remote monitoring and manual intervention.

[0021] This embodiment integrates edge computing and cloud-edge collaboration, pushing AI inference capabilities down to edge gateway devices on the construction site, avoiding bandwidth pressure and latency issues caused by uploading massive video streams to the cloud. The layered architecture decouples common capabilities such as network communication, data caching, and breakpoint resumption from business inference capabilities, allowing each module to be independently iterated and upgraded, reducing system maintenance complexity. In addition, the system adopts an event-driven asynchronous processing model, where alarm data generation, transmission, caching, and retransmission are all decoupled through message queues, avoiding overall system blockage caused by single module failures. The dual network redundancy layer serves as the network status hub of the system, uniformly managing all external communication links and providing transparent network services to upper-layer businesses, without upper-layer modules needing to be aware of the switching process of the underlying links.

[0022] The dual-network redundancy and network outage caching and resume transmission system of the construction site edge computing gateway described in this embodiment periodically detects the connectivity of the main link in the dual-network redundancy layer; when the main link detection fails and the backup link is connected normally, it switches to the backup link and records the link switching event; when the main link recovers and the detection is normal, it smoothly switches back to the main link; when both the main link and the backup link are unreachable, it issues an offline command to the local cache management layer to enable the local caching mechanism.

[0023] Specifically, after the dual network redundancy layer is started, the network interfaces of the wired primary link and the wireless cellular backup link are first initialized, and their respective routing tables and DNS servers are configured. Then, two independent link probe threads are started to periodically probe the primary and backup links respectively. The primary link probe uses a combination of ICMPPing and TCP port probing to send probe data packets to a preset cloud probe server. The probe period is set to 3 seconds by default, and the timeout is set to 5 seconds. The backup link probe uses the same probe method, with a probe period set to 10 seconds by default to reduce the traffic consumption of the wireless cellular network. When the primary link probe fails three times consecutively, it is determined that the primary link is disconnected; when the connection fails... If the backup link fails to be detected three times, the backup link is determined to be disconnected. When the primary link is disconnected and the backup link is normal, the system automatically modifies the default route to point to the backup link interface and writes a link switching event to the system log, recording the switching time and reason. When the primary link recovers and five consecutive detections are successful, the system starts a smooth back-off mechanism. First, new alarm data is switched to the primary link for transmission. After all unfinished requests on the backup link are processed, the default route is switched back to the primary link interface. When both the primary and backup links are determined to be disconnected, the dual network redundancy layer immediately issues an offline command to the local cache management layer and the breakpoint resume scheduling layer to suspend all cloud communication requests and enable the local caching mechanism.

[0024] In this embodiment, both the primary and backup links remain online simultaneously. The primary link handles the majority of communication traffic, while the backup link only performs periodic probes, seamlessly taking over communication tasks in the event of a primary link failure. Furthermore, the combination of ICMPPing and TCP port probing allows for more accurate assessment of network connectivity. ICMPPing detects network layer connectivity, while TCP port probing detects application layer connectivity, avoiding misjudgments caused by firewalls blocking ICMP packets. Additionally, a smooth failover mechanism ensures that data transmission is not interrupted or duplicated during primary link recovery. By switching to new data traffic first and then waiting for the old data transmission to complete, seamless link switching is achieved.

[0025] The dual-network redundancy and network outage cache resume system of the construction site edge computing gateway described in this embodiment uses an asynchronous batch writing method to save alarm data and screenshot indexes to persistent storage. The cache data is restored after a power outage and restart by relying on the unique identifier in the alarm data. When the local cache space is insufficient, the historical data with the longest storage time is eliminated in order of priority from low to high, and high priority alarm data is retained first.

[0026] Specifically, when an offline command or alarm callback fails, the local cache management layer receives the alarm data and screenshot index to be cached from the data processing queue and first writes them to the memory cache. An independent write thread is then started. When the amount of data in the memory cache reaches a preset threshold or the time since the last write exceeds a preset interval, the data in the memory cache is written in batches to persistent storage. Simultaneously with writing to disk, an index table is created using the unique alarm identifier as the key for quick querying and locating cached data. Upon system startup, the local cache management layer automatically scans all cached data in persistent storage, rebuilds the memory cache and index table based on the unique identifier, and restores the cache state to its state before the power outage. The local cache's disk usage is monitored in real time. When the disk usage reaches a preset threshold, a data eviction mechanism is initiated. Following a priority-first, time-second eviction strategy, the oldest historical data among all regular priority data is evicted first, until the disk usage drops below the safe threshold. If the space requirement is still not met after all regular priority data has been evicted, then the oldest historical data among the higher priority data is evicted.

[0027] This embodiment employs asynchronous batch write technology, merging multiple small-batch random writes into a series of small-batch sequential writes, significantly improving disk write efficiency while reducing disk wear and extending device lifespan. The two-level caching architecture combines the high-speed read / write characteristics of memory with the persistent characteristics of disk, ensuring both real-time data processing and preventing data loss due to power outages or restarts. A unique identifier-based data indexing mechanism enables rapid querying and locating of cached data, improving the efficiency of resume downloads. A priority-based data eviction policy ensures that, given limited cache space, the most important high-priority alarm data is retained first, minimizing the security risks associated with data loss.

[0028] The dual-network redundancy and network outage caching and retransmission system of the construction site edge computing gateway described in this embodiment has the following retransmission sorting rules in the retransmission scheduling layer: priority is given to sorting alarm data from high to low priority, and under the same priority, alarm events are sorted from old to new in terms of generation time; for alarm data that fails to be retransmitted, an exponential backoff strategy is adopted for retrying, and if multiple retries still fail, the data is retained in the local cache and retransmitted again after the link is restored.

[0029] Specifically, the breakpoint resume scheduling layer is in standby mode after system startup. When it receives a link recovery signal from the dual network redundancy layer, it immediately initiates the retransmission task scheduling process. It retrieves all alarm data to be retransmitted from the local cache management layer, sorts them according to priority from high to low, and for the same priority, from oldest to newest, to generate a retransmission task queue. It then starts a preset number of retransmission threads, sequentially retrieving tasks from the retransmission task queue and initiating alarm callbacks to the monitoring backend via the cloud communication layer. If the retransmission is successful, the breakpoint resume scheduling layer sends a deletion command to the local cache management layer to clear the local cache of the alarm data. If the retransmission fails, it records... The number of failures is recorded, and the next retry time is calculated based on the exponential backoff strategy. The task is then added back to the tail of the retransmission queue. The first retry interval is 1 second, the second is 2 seconds, the third is 4 seconds, the fourth is 8 seconds, and so on, with a maximum retry interval of no more than 30 minutes. When the number of retries for a single alarm data reaches a preset threshold, automatic retry for that data is suspended, it is marked as pending manual processing, and a notification is displayed on the operation and maintenance interface. When the retransmission task queue is empty, or a link disconnection signal is received from the dual network redundancy layer, the current retransmission task is terminated, and the scheduling layer returns to standby mode, waiting for the next link recovery signal.

[0030] This embodiment employs multi-threaded concurrent retransmission technology, making full use of network bandwidth resources and significantly improving the efficiency of breakpoint resumption, enabling the retransmission of a large amount of offline alarm data in a short time. Priority- and time-based retransmission sorting rules ensure that the most important high-priority alarm data is reported first, allowing the monitoring backend to promptly grasp major safety hazards at the construction site. The exponential backoff strategy effectively avoids network congestion caused by a large number of retries when the network is unstable, while also reducing the server pressure on the monitoring backend. By gradually increasing the retry interval, sufficient network recovery time is given, improving the success rate of retransmission.

[0031] In this embodiment, the dual-network redundancy and network outage caching and resume transmission system of the construction site edge computing gateway is configured with a unique identifier for each alarm data. The breakpoint resume transmission scheduling layer marks the alarm data that has been retransmitted through the unique identifier. The cloud communication layer sends the unique identifier to the monitoring backend along with the alarm data. The monitoring backend combines the unique identifier with the preset cooling period to achieve duplicate alarm filtering.

[0032] Specifically, when the hardware adaptation layer detects an alarm event, it generates a globally unique UUID (Universally Unique Identifier) ​​using a combination of device ID, timestamp, and random number. This ensures that alarm data generated by different devices at different times has a unique identifier. After successful retransmission, the breakpoint resume scheduling layer locates and deletes the corresponding alarm data in its local cache using the unique identifier, avoiding duplicate retransmissions. The end-to-end communication layer synchronously sends the unique identifier as a necessary field for the alarm data to the monitoring backend. Upon receiving the alarm data, the monitoring backend first checks its local database for an alarm record with the same unique identifier. If it does not exist, the alarm data is stored in the database, and a success confirmation is returned to the edge gateway. If it already exists, a success confirmation is directly returned to the edge gateway without further processing. For consecutive alarm events of the same monitoring area and alarm type, the monitoring backend filters them using the unique identifier and a preset cooling-off period, retaining only the first alarm record within the cooling-off period to avoid generating a large number of duplicate alarm messages.

[0033] This embodiment uses UUID as the unique identifier for alarm data. A UUID is an identifier composed of 128 binary numbers, which is globally unique and can ensure that no duplicate identifiers are generated in a distributed system. By performing deduplication based on the unique identifier at both the edge gateway and the monitoring backend, a dual deduplication mechanism is formed. The edge gateway avoids duplicate retransmissions, and the monitoring backend avoids duplicate processing and storage, ensuring the data consistency and accuracy of the entire system. Combined with the duplicate alarm filtering mechanism of the cooling cycle, it can effectively filter out continuous duplicate alarms caused by AI model misjudgment or objects staying for a long time, greatly reducing invalid alarm information and improving the work efficiency of the monitoring backend.

[0034] The dual-network redundancy and network outage caching and resume transmission system of the construction site edge computing gateway described in this embodiment features a hardware adaptation layer that configures a single-frame buffer for the video stream to reduce transmission latency and automatically performs a reconnection operation after the video stream is disconnected. The system also regulates the device load through concurrency control and frame skipping strategies. The generated alarm data is first stored in a bounded memory queue and then processed asynchronously by multiple threads to avoid blocking the video acquisition and artificial intelligence inference processes.

[0035] Specifically, the hardware adaptation layer is the interface layer between the system and the on-site hardware devices, responsible for video stream access, processing, and AI inference. Its workflow is as follows: Video stream access: It supports multiple mainstream video stream protocols such as RTSP, RTMP, and ONVIF, automatically discovers and connects to network cameras on the construction site, and configures the resolution, frame rate, and encoding format of the video stream; It configures a single-frame buffer for each video stream, retaining only the latest frame of video data. The AI ​​inference engine directly reads the latest frame from the buffer for processing, avoiding latency caused by video frame accumulation; It monitors the connection status of the video stream in real time. When a video stream disconnection is detected, it immediately initiates an automatic reconnection process, attempting to reconnect to the camera every 5 seconds. The process continues until a connection is successfully established; the number of video streams performing AI inference simultaneously is dynamically adjusted based on the device's CPU and GPU computing power to avoid device overload; when the device load exceeds a preset threshold, the inference frame rate is automatically reduced, for example, from 1 frame per second to 1 frame per 2 seconds, prioritizing the real-time inference of high-priority monitoring areas; a pre-trained construction site safety detection model is loaded to perform real-time inference on video frames, identifying various safety hazards such as not wearing a safety helmet, not fastening a safety belt, open flames, smoke, and personnel intrusion; when an alarm event is detected, the alarm data and associated screenshots are stored in a bounded memory queue, and a dedicated multi-threaded pool is used for subsequent encapsulation, transmission, or caching to ensure that the video acquisition and AI inference processes are not blocked.

[0036] This embodiment employs single-frame buffering technology to minimize video processing latency. Traditional multi-frame buffering mechanisms cache multiple frames of video data, causing AI inference to process video frames from several seconds ago. In contrast, the single-frame buffering mechanism retains only the latest frame, ensuring real-time alarm response. Dynamic device load control technology automatically adjusts the system workload based on the actual operating status of the device, preventing system lag or crashes caused by device overload. The frame skipping strategy maximizes the utilization of device computing resources while ensuring system stability. The asynchronous data processing mechanism decouples AI inference from subsequent data processing flows. The AI ​​inference engine is only responsible for generating alarm data, while subsequent time-consuming operations such as encapsulation, transmission, and caching are handled by a dedicated thread pool, ensuring that the real-time performance of AI inference is not affected.

[0037] The dual-network redundancy and network outage caching and resume transmission system of the construction site edge computing gateway described in this embodiment has a hardware adaptation layer that prioritizes alarm events based on their risk type: high-risk alarm events are classified as high priority, and regular alarm events are classified as regular priority.

[0038] Specifically, when generating alarm data, the hardware adaptation layer automatically assigns a priority to each alarm event based on its risk level and urgency. High-priority alarms include events such as personnel not wearing safety belts while working at heights, open flames or smoke in hot work areas, personnel entering dangerous areas, abnormal equipment operation, and fights. Regular-priority alarms include events such as personnel not wearing safety helmets, smoking at construction sites, haphazardly piled materials, vehicles not following designated routes, and obstructed or offline monitoring equipment. An integer field represents the priority in the alarm data structure, with high priority marked as 1 and regular priority marked as 2. When the network is normal, high-priority alarm data is transmitted first through the cloud communication layer. When cached locally, high-priority alarm data is retained first. When resuming interrupted transmissions, high-priority alarm data is retransmitted first. On the monitoring backend, high-priority alarms are highlighted with a prominent color and sound and are pushed first to the mobile devices of monitoring personnel.

[0039] This embodiment prioritizes alarm events based on their risk level, allocating limited network bandwidth and caching resources to the most urgent and important alarm events. This is a service quality-based resource scheduling strategy that can maximize the availability of critical services even when resources are limited. Priority marking is applied throughout the entire lifecycle of alarm data, from generation, transmission, caching to retransmission. All stages follow the principle of priority, ensuring that high-priority alarm data receives the highest priority processing under any circumstances.

[0040] The dual-network redundancy and network outage caching and resume transmission system of the construction site edge computing gateway described in this embodiment, wherein the cloud communication layer initiates alarm callbacks based on encrypted network protocols and carries an authentication token in the request message; the screenshot index supports two forms: local address and remote object storage address, and when the remote upload of the associated screenshot fails, it automatically switches to the local screenshot index to complete the report.

[0041] Specifically, the cloud communication layer is responsible for secure communication between the edge gateway and the monitoring backend. Its workflow is as follows: A secure connection is established with the monitoring backend using HTTPS / TLS 1.3 encryption protocol. All data transmission is encrypted to prevent data theft or tampering during transmission. Each time an alarm callback request is initiated, the request header carries a unique device identifier and an encrypted authentication token. The monitoring backend verifies the device's legitimate identity by verifying the authentication token. The encapsulated alarm data is sent to the monitoring backend's alarm callback interface in JSON format, awaiting confirmation from the platform. An attempt is made to upload the associated screenshot to a remote object storage service. Upon successful upload, the access address of the object storage service is used as the screenshot index and written into the alarm data. If the remote object storage upload fails, the system automatically switches to local screenshot index mode, saving the screenshot locally on the edge gateway and using the local access address as the screenshot index in the alarm data. After receiving the local screenshot index, the monitoring backend can access and download the corresponding screenshot through the edge gateway's HTTP interface. If the alarm callback request times out or returns a failure status code, the alarm data is marked as a callback failure and handed over to the local cache management layer for processing.

[0042] This embodiment employs the HTTPS / TLS 1.3 encryption protocol, providing end-to-end data encryption and authentication capabilities to ensure the confidentiality, integrity, and authenticity of data during transmission. The token-based authentication mechanism effectively prevents unauthorized devices from accessing the monitoring backend and avoids the injection of false alarm data. The authentication token uses a periodic update mechanism, further enhancing system security. The dual-mode screenshot reporting design provides flexible screenshot access methods. When network conditions are good, a remote object storage mode is used, reducing the access pressure on the edge gateway; when network conditions are poor, a local screenshot index mode is used, ensuring that alarm data can be reported normally.

[0043] The dual-network redundancy and network outage caching and resume transmission system of the construction site edge computing gateway described in this embodiment provides a standardized operation and maintenance interface in the local operation and maintenance layer, which supports querying device operating status, link status, and alarm statistics; supports remotely issuing video acquisition tasks and modifying system operating parameters; and also supports manual operation and maintenance operations such as manually triggering alarm data retransmission and exporting local logs.

[0044] Specifically, the local operations and maintenance layer serves as the system's operations and maintenance management entry point, providing rich remote operations and maintenance functions. Its workflow is as follows: It provides a standardized HTTP interface with a RESTful style, while also supporting access to a web management interface and third-party operations and maintenance platforms; it collects real-time hardware status information such as device CPU usage, memory usage, disk usage, and temperature, as well as network status information such as connectivity, latency, and packet loss rate of the primary and backup links, and business status information such as total alarms, successful reports, and cached data, displaying this information through the operations and maintenance interface and the web interface; it supports remote modification of all system operating parameters, including link detection cycle, cache capacity threshold, and replenishment... It transmits parameters such as thread count and AI inference frame rate, and changes take effect immediately without requiring a device restart; it supports remotely issuing video capture tasks, specifying the camera, capture time, and capture duration; it supports manually triggering alarm data retransmission tasks, specifying the retransmission time range and priority; it supports querying and exporting local system logs, alarm logs, and error logs by time, level, module, and other conditions, providing a basis for troubleshooting; it supports remote control operations such as remotely restarting the device, restarting specified modules, and restoring factory settings; when the device malfunctions (such as high CPU usage, insufficient disk space, or link disconnection), it automatically sends alarm notifications to maintenance personnel via email, SMS, or WeChat.

[0045] This embodiment adopts a standardized RESTful interface design, which has good readability and scalability, and can be seamlessly integrated with various mainstream operation and maintenance management platforms. The web management interface is developed based on a front-end and back-end separation architecture, providing an intuitive and easy-to-use graphical operation interface. Real-time status monitoring adopts a push-pull combination method, with the device periodically pushing status data to the operation and maintenance platform, while the operation and maintenance platform can also actively initiate status query requests to the device, ensuring the real-time and accuracy of status data. Remote parameter configuration adopts hot-loading technology, and parameter modifications take effect immediately without restarting the device, ensuring continuous system operation. All operation and maintenance operations are recorded in the operation log for easy auditing and traceability.

[0046] The dual-network redundancy and network outage buffering and resume transmission method for the construction site edge computing gateway described in this embodiment includes the following steps: S1. Access the live video stream and perform local AI inference to identify alarm events, generate associated screenshots, and encapsulate them into alarm data carrying priority, unique identifier, and screenshot index; S2. Periodically perform link detection on the main link and backup link, switch communication links according to the link connectivity status, and enter offline buffer state when both links are abnormal. S3. When the network is normal, an alarm callback is initiated for the alarm data; when the alarm callback fails or the network is abnormal, the alarm data and screenshot index are stored in the local cache and written to persistent storage; when the cache space is insufficient, low-priority historical data is evicted according to priority. S4. After the communication link is detected to be restored, the alarm data in the local cache is retransmitted one by one according to priority and time order; if the retransmission is successful, the corresponding local cache is cleared; if the retransmission fails, exponential backoff retry is performed. S5, the operation and maintenance end monitors the system's operating status in real time through the operation and maintenance interface, and completes operation and maintenance operations such as parameter configuration, manual re-upload, and log export as required.

[0047] Specifically, this method fully describes the entire process of the system from alarm generation to reporting, with each step connected through an event-driven approach. The specific process is as follows: Detailed process of step S1: After the system starts, the hardware adaptation layer automatically discovers and connects to the network cameras on the construction site, establishing a video stream connection; it starts the local AI inference engine, loads the pre-trained construction site safety detection model, and performs real-time inference on the video stream; when a safety hazard is identified, it captures the key frame at the moment the alarm occurs as a related screenshot; it generates a globally unique identifier, marks the priority according to the alarm type, and encapsulates the alarm information, unique identifier, priority, and screenshot index into a standardized alarm data structure; and it pushes the alarm data to the data processing queue.

[0048] Detailed process of step S2: The dual network redundancy layer starts a link detection thread to periodically detect the connectivity of the primary and backup links. When the primary link is disconnected and the backup link is normal, it automatically switches to the backup link for communication. When the primary link is restored, it smoothly switches back to the primary link. When both links are disconnected, it sends an offline command to the local cache management layer and the breakpoint resume scheduling layer, and the system enters the offline cache state.

[0049] Step S3 detailed process: The data processing thread retrieves alarm data from the queue and first checks the current network status. If the network is normal, it sends an alarm callback to the monitoring backend through the cloud communication layer. If the callback is successful, the alarm processing is completed. If the network is abnormal or the callback fails, the alarm data and screenshot index are stored in the local cache. The local cache management layer uses an asynchronous batch write method to write the data to persistent storage. The cache space is monitored in real time, and when the space is insufficient, the oldest historical data is evicted in order of priority from low to high.

[0050] Step S4 detailed process: The breakpoint resume scheduling layer monitors the link status in real time. When the link is detected to be restored, a retransmission task is started. All alarm data to be retransmitted is retrieved from the local cache and sorted according to the rules of high priority to low priority and old time to new for the same priority. Retransmission is performed in a multi-threaded concurrent manner. If the retransmission is successful, the local cache is cleared. If the retransmission fails, an exponential backoff strategy is used to retry. If multiple retries fail, it is marked as pending manual handling.

[0051] Step S5 detailed process: The local operations and maintenance layer continuously collects operational status data from each module and provides standardized operations and maintenance interfaces to the outside world. Operations and maintenance personnel can monitor the system's operational status in real time through a web management interface or a third-party operations and maintenance platform. They can remotely modify system operating parameters and issue video acquisition tasks according to actual needs. When necessary, they can manually trigger alarm data retransmission, query and export system logs, and receive system anomaly alarm notifications to promptly handle equipment failures.

[0052] This embodiment employs edge inference, dual-network redundancy, local caching, and breakpoint resumption techniques to solve the problem of alarm data loss caused by unstable network conditions at the construction site. The various steps cooperate to form a closed-loop alarm data processing flow. Furthermore, an event-driven asynchronous processing model is used throughout the entire process, with each step decoupled via message queues, ensuring high concurrency and high reliability. Even if a failure occurs in one step, it will not affect the normal operation of other steps.

[0053] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the essence and scope of the technical solutions of the present invention.

Claims

1. A dual-network redundancy and network outage caching and resume transmission system for a construction site edge computing gateway, characterized in that: It includes a hardware adaptation layer, a dual network redundancy layer, a local cache management layer, a breakpoint resume scheduling layer, a cloud communication layer, and a local operation and maintenance layer; The hardware adaptation layer is used to access the video stream and perform local artificial intelligence inference, identify and generate alarm events, and encapsulate alarm data carrying priority markers, unique identifiers and screenshot indexes, while generating corresponding associated screenshots. The dual network redundancy layer uses a wired link as the primary link and a wireless cellular network as the backup link, periodically performs link detection, and completes the primary / backup link switching or triggers offline caching mode based on the link connectivity status. The local cache management layer is used to store alarm data and screenshot index into the local cache and write them to persistent storage when there is a network anomaly or alarm callback failure. At the same time, it manages the local cache according to priority and executes a data eviction policy when the cache capacity is insufficient. The breakpoint resume scheduling layer is used to monitor the link recovery status, perform retransmission of alarm data in the local cache according to preset rules, and complete data deduplication and status marking by combining the unique identifier and feedback from the monitoring backend. The cloud communication layer is used to send alarm callbacks to the regulatory backend and receive confirmation information returned by the platform. The local operation and maintenance layer is used to provide system operation and maintenance interfaces to realize equipment status monitoring, parameter configuration and manual operation and maintenance intervention.

2. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: The dual network redundancy layer periodically performs connectivity detection on the primary link; when the primary link detection fails and the backup link is connected normally, it switches to the backup link and records the link switching event; when the primary link recovers and the detection is normal, it smoothly switches back to the primary link; when both the primary link and the backup link are unreachable, it issues an offline command to the local cache management layer to enable the local cache mechanism.

3. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: The local cache management layer uses an asynchronous batch write method to save alarm data and screenshot indexes to persistent storage, and relies on the unique identifier in the alarm data to restore cache data after power failure and restart; when the local cache space is insufficient, the historical data with the longest storage time is eliminated in order of priority from low to high, and high priority alarm data is retained first.

4. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: The retransmission sorting rules of the breakpoint resume scheduling layer are as follows: alarm data is sorted from high to low priority, and under the same priority, alarm events are sorted from oldest to newest generation time. For alarm data that fails to be retransmitted, an exponential backoff strategy is adopted for retry. If multiple retries still fail, the data is retained in the local cache and retransmitted again after the link is restored.

5. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: Each alarm data is configured with a unique identifier; the breakpoint resume scheduling layer marks the alarm data that has been retransmitted using the unique identifier; the cloud communication layer sends the unique identifier to the monitoring backend along with the alarm data, and the monitoring backend combines the unique identifier with a preset cooling period to filter duplicate alarms.

6. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: The hardware adaptation layer configures a single-frame buffer for the video stream to reduce transmission latency and automatically performs a reconnection operation after the video stream is disconnected; it regulates the device load through concurrency control and frame skipping strategies; the generated alarm data is first stored in a bounded memory queue and processed asynchronously by multiple threads to avoid blocking the video acquisition and artificial intelligence inference process.

7. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: The hardware adaptation layer prioritizes alarm events based on their risk type: high-risk alarm events are classified as high priority, and regular alarm events are classified as regular priority.

8. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: The cloud communication layer initiates alarm callbacks based on encrypted network protocols, and the request message carries an authentication token; the screenshot index supports two forms: local address and remote object storage address. When the remote upload of the associated screenshot fails, it automatically switches to the local screenshot index to complete the report.

9. The dual-network redundancy and network outage buffering and resume transmission system for the construction site edge computing gateway according to claim 1, characterized in that: The local operation and maintenance layer provides standardized operation and maintenance interfaces, which support querying device operating status, link status, and alarm statistics. It supports remotely issuing video capture tasks and modifying system operating parameters, as well as manual operation and maintenance operations such as manually triggering alarm data retransmission and exporting local logs.

10. A method for dual-network redundancy and network outage buffering and resume transmission for a construction site edge computing gateway, applied to the dual-network redundancy and network outage buffering and resume transmission system of the construction site edge computing gateway as described in any one of claims 1-9, characterized in that: Includes the following steps: S1. Access the live video stream and perform local AI inference to identify alarm events, generate associated screenshots, and encapsulate them into alarm data carrying priority, unique identifier, and screenshot index; S2. Periodically perform link detection on the main link and backup link, switch communication links according to the link connectivity status, and enter offline buffer state when both links are abnormal. S3. When the network is normal, an alarm callback is initiated for the alarm data; when the alarm callback fails or the network is abnormal, the alarm data and screenshot index are stored in the local cache and written to persistent storage; when the cache space is insufficient, low-priority historical data is evicted according to priority. S4. After the communication link is detected to be restored, the alarm data in the local cache will be retransmitted one by one according to priority and time order; If the retransmission is successful, the corresponding local cache is cleared; if the retransmission fails, an exponential backoff retry is performed. S5, the operation and maintenance end monitors the system's operating status in real time through the operation and maintenance interface, and completes operation and maintenance operations such as parameter configuration, manual re-upload, and log export as required.