A method and system for door lock video stream distribution backhaul

By establishing a precise multicast forwarding table and splitting it into multiple sub-streams in the door lock video stream transmission, and using the door lock relay to forward the video stream to the central server, the reliability and real-time performance issues of video stream backhaul under network congestion are solved, and bandwidth utilization is improved.

CN122160484BActive Publication Date: 2026-07-28DESSMANN CHINA MACHINERY & ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DESSMANN CHINA MACHINERY & ELECTRONICS
Filing Date
2026-05-09
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve intelligent coordination of terminal resources and accurate routing of data packets when network congestion occurs during door lock video stream transmission, resulting in low reliability and real-time performance of video stream return and low network bandwidth utilization.

Method used

By employing methods such as identity registration and multicast tree enhancement, congestion detection and flow splitting, precise sub-stream routing and relay forwarding, server reassembly and packet loss recovery, a precise multicast forwarding table is established using the unique identifier of the door lock. The video stream is split into multiple sub-streams and relayed to the central server with the assistance of the door lock. Combined with the server's reassembly and packet loss recovery mechanisms, intelligent collaborative transmission under network congestion is achieved.

Benefits of technology

It improves the reliability, real-time performance, and network bandwidth utilization of video stream backhaul, and realizes intelligent collaboration of terminal resources and precise routing of data packets, making it suitable for door lock video stream transmission in IoT scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122160484B_ABST
    Figure CN122160484B_ABST
Patent Text Reader

Abstract

The application discloses a door lock video stream distribution backhaul method and system, the method comprising: establishing a multicast forwarding table by a router according to a unique identifier obtained when each door lock accesses a network; assigning a target cell ID and a target door lock ID for each sub-flow from an available assisting door lock list according to an event of detecting uplink path congestion of a source door lock; encapsulating the sub-flow as a multicast message carrying the target identifier and sending by the source door lock according to the identifier assigned for each sub-flow; unicasting and forwarding original video data packets to a central server by the source door lock as a source; sorting and reorganizing the video data packets received from the source door lock and multiple assisting door locks by the central server according to sequence numbers; directly requesting the source door lock to retransmit lost specific data packets by the server when detecting discontinuous sequence numbers, and directly unicasting and supplementing by the source door lock. The embodiment of the application can improve the reliability, real-time performance and overall utilization of network bandwidth of video stream backhaul.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart door lock technology, and in particular to a method and system for distributed transmission of door lock video streams. Background Technology

[0002] With the widespread adoption of smart homes and security monitoring, a large number of door lock devices need to upload video streams to a central server in real time. Traditional video transmission typically uses a point-to-point unicast method between the door lock and the server. When network uplink congestion or insufficient bandwidth occurs, it can easily lead to video stuttering, packet loss, or even transmission interruption, severely impacting real-time performance and reliability. While existing technologies utilize multicast or relay nodes for data transmission, they generally lack sophisticated adaptation for the massive number of low-power terminal devices like door locks. Specifically, existing methods struggle to dynamically and intelligently schedule resources from surrounding terminal devices for collaborative forwarding during network congestion. Furthermore, they cannot achieve precise packet-level routing and terminal-level addressing within a multicast framework, resulting in low transmission efficiency and cumbersome server reassembly and packet loss recovery mechanisms. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for distributed video stream transmission of door locks, in order to overcome the shortcomings of the prior art. It can realize intelligent coordination of terminal resources and accurate routing of data packets when the network is congested, thereby improving the reliability, real-time performance and overall utilization of network bandwidth of video stream transmission.

[0004] One embodiment of this application provides a method for distributed backhaul of a door lock video stream, the method comprising: Identity registration and multicast tree enhancement: Based on the unique identifier obtained by each door lock when accessing the network, an enhanced IGMP join message carrying the cell ID and door lock ID is sent to the public cooperative multicast group. The router then builds a multicast forwarding table containing the precise identifier of the door lock, forming an enhanced multicast distribution tree. Congestion detection and stream splitting: Based on the event of uplink path congestion detected by the source lock, the video stream to be uploaded is split into N sub-streams at intervals of data packet sequence number, and a target cell ID and a target lock ID are assigned to each sub-stream from the list of available assist locks; Substream precise routing and relay forwarding: Based on the identifier assigned to each substream, the source lock encapsulates the substream into a multicast message carrying the target identifier and sends it; the network router routes the message to the corresponding cell based on the target cell ID, and the access router precisely delivers it to the designated assisting lock based on the target lock ID; after receiving and decapsulating, the assisting lock forwards the original video data packet to the central server with itself as the source unicast; Server Reassembly and Packet Loss Recovery: Based on the video data packets received by the central server from the source lock and multiple assisting locks, the data packets are sorted and reassembled according to their sequence numbers. When a discontinuous sequence number is detected, the server directly requests the source lock to retransmit the lost specific data packet, which is then unicasted directly by the source lock to retransmit it.

[0005] Optionally, the identity registration and multicast tree enhancement include: Identity Acquisition: Based on the configuration or DHCP extended options when the door lock is connected to the network, obtain the logical identifier of the community to which it belongs and the unique identifier of the device; Enhanced IGMP registration: Based on the public cooperative multicast address, each gate period sends an IGMP join message, and the extended field of the message encapsulates a composite identifier of its cell ID and gate ID; Fine-grained forwarding table establishment: Based on the IGMP join message received by the access router, the multicast group address, cell ID and associated door lock ID list are recorded for the corresponding interface in its multicast forwarding table, forming a fine-grained table entry of multicast group-outgoing interface-cell ID-door lock ID; Global multicast tree construction: Based on the multicast routing protocol, a shared tree covering the entire network is constructed with the aggregation point RP as the core; the RP synchronously records the mapping relationship between the cell ID and door lock ID reported by each downstream router, forming a global multicast delivery mapping table.

[0006] Optionally, the congestion detection and flow splitting include: Congestion determination: Based on the real-time transmission control protocol report, transmit buffer status, or acknowledgment timeout rate monitored by the source lock, when the packet loss rate or delay continuously exceeds the threshold, it is determined as uplink congestion; Assisted door lock discovery and list maintenance: Based on the multicast query request sent by the source door lock, other routers in the network summarize the door lock identifiers they have accessed and reply; the source door lock generates or updates a "list of available assisted door locks" containing available door locks and their status information for each cell based on the reply; Video stream splitting: Based on the preset number of sub-streams N, the source gate group the video stream data packets into N sub-streams that are distributed at intervals on the sequence number by taking the result of taking the sequence number modulo N. Target assignment strategy: Based on the historical success rate, current network latency, and load feedback information in the "List of Available Assist Locks", calculate the weight for each sub-flow and select an optimal combination of target cell ID and target lock ID.

[0007] Optionally, the precise routing and relay forwarding of the sub-flow includes: Cooperative message encapsulation: Based on the target identifier assigned to the substream, the source lock performs three layers of encapsulation on the original video data packets: the inner layer is the original IP / UDP / RTP packet; the middle layer adds a cooperative header, which includes the opcode, target cell ID, and target lock ID; the outer layer is encapsulated as an IP / UDP header with the destination address being a public multicast group; Cell ID-based routing: Based on the target cell ID in the multicast packet, the aggregation router in the network queries its global mapping table and forwards the packet to the access router corresponding to the target cell. Precise delivery based on door lock ID: Based on the packets received by the access router of the target cell, the target door lock ID is parsed and the local enhanced multicast forwarding table is queried to forward the packets only from the physical interface connected to the specific door lock; Door lock relay processing: Based on the multicast message received by the assisting door lock, after verifying that the target door lock ID matches its own ID, the outer layer and the collaboration header are stripped off, the inner original video data packet is extracted, and it is re-encapsulated into a unicast message sent to the central server using its own IP address as the source for forwarding.

[0008] Optionally, the server reorganization and packet loss recovery include: Multi-source stream identification and aggregation: Based on the five-tuple information of the data packets received by the central server and the RTP synchronization source identifier, data packets from different IP addresses are identified as belonging to the same original video stream; Packet sorting and reassembly: Based on the original RTP sequence number in the data packets, all received data packets are sorted and an attempt is made to reassemble them into a complete and continuous video stream; Packet loss detection and retransmission request: Based on the sequence number gaps found in the sorting results, the server generates a negative acknowledgment retransmission request message for the specific lost sequence number and sends it directly to the source door lock via unicast. Source-end direct transmission retransmission: Based on the retransmission request received by the source lock, the corresponding lost data packet is extracted from its local transmission buffer and sent directly to the central server in a unicast manner to complete the packet loss recovery.

[0009] Optionally, the method further includes an assistive door lock dynamic management mechanism: Status self-awareness and reporting: Based on the real-time monitoring of its own uplink latency, transmission queue length or battery power, the assisting door lock will actively send an avoidance request containing the reason for avoidance and the suggested duration to the source door lock when any indicator exceeds the preset threshold. Assist list dynamic update: Based on the backoff request received by the source lock, immediately move the corresponding lock from the available list to the cooldown list, and stop assigning sub-stream tasks to it during the cooldown period; Hot replacement and path update: Based on the list of available assist locks, the source lock quickly selects a backup lock to replace the lock that has entered the backoff state, updates the target identifier for the affected sub-stream, and notifies the network router to update the multicast delivery mapping; State recovery: Based on the recovery ready message sent by the backoff lock after the cooldown period, the source lock re-adds it to the available list and gradually restores traffic allocation.

[0010] Another embodiment of this application provides a system for distributed backhaul of door lock video streams, the system comprising: The enhancement module is used for identity registration and multicast tree enhancement: based on the unique identifier obtained by each door lock when accessing the network, it sends an enhanced IGMP join message carrying the cell ID and door lock ID to the public cooperative multicast group. The router then builds a multicast forwarding table containing the precise identifier of the door lock, forming an enhanced multicast distribution tree. The splitting module is used for congestion detection and stream splitting: based on the event that the source lock detects uplink path congestion, the video stream to be uploaded is split into N sub-streams at intervals of data packet sequence numbers, and a target cell ID and a target lock ID are assigned to each sub-stream from the list of available assisting locks; The forwarding module is used for precise sub-stream routing and relay forwarding: Based on the identifier assigned to each sub-stream, the source lock encapsulates the sub-stream into a multicast message carrying the target identifier and sends it; the network router routes the message to the corresponding cell based on the target cell ID, and the access router accurately delivers it to the designated assisting lock based on the target lock ID; after receiving and decapsulating, the assisting lock forwards the original video data packet to the central server with itself as the source unicast; The recovery module is used for server reassembly and packet loss recovery: Based on the video data packets received by the central server from the source lock and multiple assisting locks, the data packets are sorted and reassembled according to the sequence number; when a discontinuous sequence number is detected, the server directly requests the source lock to retransmit the lost specific data packet, which is then directly unicasted by the source lock to resend it.

[0011] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0012] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.

[0013] Compared with existing technologies, the present invention provides a method for distributed backhaul of door lock video streams. Based on the unique identifier obtained by each door lock when accessing the network, a multicast forwarding table is established by the router. Based on the source door lock detecting uplink path congestion, a target cell ID and a target door lock ID are assigned to each sub-stream from the list of available assisting door locks. Based on the identifier assigned to each sub-stream, the source door lock encapsulates the sub-stream into a multicast message carrying the target identifier and sends it, unicasting the original video data packets to the central server with itself as the source. The central server receives video data packets from the source door lock and multiple assisting door locks, sorts and reassembles them according to sequence numbers. When a discontinuous sequence number is detected, the server directly requests the source door lock to retransmit the lost specific data packets, which are then directly unicasted and retransmitted. This enables intelligent coordination of terminal resources and accurate routing of data packets during network congestion, improving the reliability, real-time performance, and overall network bandwidth utilization of video stream backhaul. Attached Figure Description

[0014] Figure 1 Hardware structure block diagram of a computer terminal for a method of distributed backhaul of door lock video stream provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating a method for distributed backhaul of a door lock video stream provided in an embodiment of the present invention. Figure 3 This is a schematic diagram of a system network topology for distributed backhaul of a door lock video stream, provided in an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of a door lock video stream distribution and backhaul system provided in an embodiment of the present invention. Detailed Implementation

[0015] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0016] In IoT scenarios such as smart security and smart communities, smart door locks, as important terminals integrating video acquisition functions, need to continuously upload real-time video streams to a central server for processing and analysis. However, in actual large-scale deployments, due to complex network topology, fluctuating wireless links, and sudden local network congestion, the video stream from a single door lock often experiences high packet loss, high latency, or even interruption during the upload process, severely affecting the real-time performance and reliability of video surveillance.

[0017] Traditional solutions such as retransmission mechanisms, forward error correction (FEC), and multipath transmission often suffer from problems such as high terminal resource consumption, high additional latency, and inflexible path scheduling. Especially in scenarios where terminals are widely distributed and network conditions change dynamically, how to achieve reliable, low-latency backhaul of video streams in locally congested environments without significantly increasing the burden on terminals or relying on complex network protocols remains a pressing technical challenge.

[0018] This invention first provides a method for distributed backhaul of door lock video streams, which can be applied to electronic devices, such as computer terminals, specifically ordinary computers.

[0019] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for a method of distributed backhaul of a door lock video stream provided in an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.

[0020] The non-volatile storage medium can store the operating system and computer program. The computer program includes program instructions that, when executed, cause the processor to perform any method of door lock video stream distribution and return.

[0021] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0022] Internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to perform any method of door lock video stream distribution and backhaul.

[0023] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 1 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0024] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0025] See Figure 2 The present invention provides a method for distributed backhaul of door lock video streams, which may include the following steps: S201, Identity Registration and Multicast Tree Enhancement: Based on the unique identifier obtained by each door lock when accessing the network, an enhanced IGMP join message carrying the cell ID and door lock ID is sent to the public cooperative multicast group. The router establishes a multicast forwarding table containing the precise identifier of the door lock, forming an enhanced multicast distribution tree. Specifically, the identity registration and multicast tree enhancement includes: Identity Acquisition: Based on the configuration or DHCP extended options when the door lock is connected to the network, obtain the logical identifier of the community to which it belongs and the unique identifier of the device; Enhanced IGMP registration: Based on the public cooperative multicast address, each gate period sends an IGMP join message, and the extended field of the message encapsulates a composite identifier of its cell ID and gate ID; Fine-grained forwarding table establishment: Based on the IGMP join message received by the access router, the multicast group address, cell ID and associated door lock ID list are recorded for the corresponding interface in its multicast forwarding table, forming a fine-grained table entry of multicast group-outgoing interface-cell ID-door lock ID; Global multicast tree construction: Based on the multicast routing protocol, a shared tree covering the entire network is constructed with the aggregation point RP as the core; the RP synchronously records the mapping relationship between the cell ID and door lock ID reported by each downstream router, forming a global multicast delivery mapping table.

[0026] S202, Congestion Detection and Stream Splitting: Based on the event that the source lock detects uplink path congestion, the video stream to be uploaded is split into N sub-streams at data packet sequence number intervals, and a target cell ID and a target lock ID are assigned to each sub-stream from the list of available assisting locks; specifically, the congestion detection and stream splitting includes: Congestion determination: Based on the real-time transmission control protocol report, transmit buffer status, or acknowledgment timeout rate monitored by the source lock, when the packet loss rate or delay continuously exceeds the threshold, it is determined as uplink congestion; Assisted door lock discovery and list maintenance: Based on the multicast query request sent by the source door lock, other routers in the network summarize the door lock identifiers they have accessed and reply; the source door lock generates or updates a "list of available assisted door locks" containing available door locks and their status information for each cell based on the reply; Video stream splitting: Based on the preset number of sub-streams N, the source gate group the video stream data packets into N sub-streams that are distributed at intervals on the sequence number by taking the result of taking the sequence number modulo N. Target assignment strategy: Based on the historical success rate, current network latency, and load feedback information in the "List of Available Assist Locks", calculate the weight for each sub-flow and select an optimal combination of target cell ID and target lock ID.

[0027] S203, Substream Precise Routing and Relay Forwarding: Based on the identifier assigned to each substream, the source lock encapsulates the substream into a multicast message carrying the target identifier and sends it; the network router routes the message to the corresponding cell based on the target cell ID, and the access router precisely delivers it to the designated assisting lock based on the target lock ID; after receiving and decapsulating, the assisting lock unicasts the original video data packet to the central server with itself as the source; specifically, the substream precise routing and relay forwarding includes: Cooperative message encapsulation: Based on the target identifier assigned to the substream, the source lock performs three layers of encapsulation on the original video data packets: the inner layer is the original IP / UDP / RTP packet; the middle layer adds a cooperative header, which includes the opcode, target cell ID, and target lock ID; the outer layer is encapsulated as an IP / UDP header with the destination address being a public multicast group; Cell ID-based routing: Based on the target cell ID in the multicast packet, the aggregation router in the network queries its global mapping table and forwards the packet to the access router corresponding to the target cell. Precise delivery based on door lock ID: Based on the packets received by the access router of the target cell, the target door lock ID is parsed and the local enhanced multicast forwarding table is queried to forward the packets only from the physical interface connected to the specific door lock; Door lock relay processing: Based on the multicast message received by the assisting door lock, after verifying that the target door lock ID matches its own ID, the outer layer and the collaboration header are stripped off, the inner original video data packet is extracted, and it is re-encapsulated into a unicast message sent to the central server using its own IP address as the source for forwarding.

[0028] S204, Server Reassembly and Packet Loss Recovery: Based on the video data packets received by the central server from the source lock and multiple assisting locks, the data packets are sorted and reassembled according to their sequence numbers. When a discontinuous sequence number is detected, the server directly requests the source lock to retransmit the lost specific data packet, which is then directly unicasted by the source lock to retransmit it. Specifically, the server reassembly and packet loss recovery includes: Multi-source stream identification and aggregation: Based on the five-tuple information of the data packets received by the central server and the RTP synchronization source identifier, data packets from different IP addresses are identified as belonging to the same original video stream; Packet sorting and reassembly: Based on the original RTP sequence number in the data packets, all received data packets are sorted and an attempt is made to reassemble them into a complete and continuous video stream; Packet loss detection and retransmission request: Based on the sequence number gaps found in the sorting results, the server generates a negative acknowledgment retransmission request message for the specific lost sequence number and sends it directly to the source door lock via unicast. Source-end direct transmission retransmission: Based on the retransmission request received by the source lock, the corresponding lost data packet is extracted from its local transmission buffer and sent directly to the central server in a unicast manner to complete the packet loss recovery.

[0029] Furthermore, the method also includes an assistive door lock dynamic management mechanism: Status self-awareness and reporting: Based on the real-time monitoring of its own uplink latency, transmission queue length or battery power, the assisting door lock will actively send an avoidance request containing the reason for avoidance and the suggested duration to the source door lock when any indicator exceeds the preset threshold. Assist list dynamic update: Based on the backoff request received by the source lock, immediately move the corresponding lock from the available list to the cooldown list, and stop assigning sub-stream tasks to it during the cooldown period; Hot replacement and path update: Based on the list of available assist locks, the source lock quickly selects a backup lock to replace the lock that has entered the backoff state, updates the target identifier for the affected sub-stream, and notifies the network router to update the multicast delivery mapping; State recovery: Based on the recovery ready message sent by the backoff lock after the cooldown period, the source lock re-adds it to the available list and gradually restores traffic allocation.

[0030] In this invention, when the video stream of a door lock is blocked from being transmitted back to the central server due to local network congestion, the packet messages can be periodically divided into N groups, i.e., N streams, and these N streams can be sent to door locks in other distant cells, requesting them to forward them to the server. Innovation 1: To determine the assisting door lock, each door lock sends an IGMP join message carrying cell information and door lock ID. The door lock fills each of the N packets with a different cell ID + a random door lock ID and sends them via multicast. The router sends the packets to the corresponding door lock ID based on the cell ID + door lock ID. Innovation 2: After receiving the packet, the corresponding door lock forwards it to the server based on the server IP contained in the message. Innovation 3: After receiving the packet, the server determines a stream based on the five-tuple information, sorts the packets according to their sequence numbers, and if a packet is missing, requests the missing packet from the original door lock. The original door lock directly unicasts the missing packet without bypassing the congestion.

[0031] The core idea of ​​this invention is: when a door lock (source door lock) detects congestion on its uplink path, the video stream is split into multiple sub-streams at the application layer. Through an enhanced multicast mechanism, these sub-streams are precisely delivered to assisting door locks distributed in other cells. These assisting door locks act as relay nodes, forwarding the video streams to the central server, thereby bypassing local congestion areas and achieving multi-path parallel transmission. Specifically, the key steps include: Identity registration and multicast tree enhancement: Each door lock obtains its unique identifier (door lock ID and cell ID) when accessing the network, and joins the public cooperative multicast group through an IGMP message carrying a composite identifier, enabling the router to establish a fine-grained forwarding table entry of "multicast group - interface - door lock ID".

[0032] Stream splitting and target assignment: The source lock splits the video stream into N sub-streams at sequence number intervals, and assigns a "target cell ID + target lock ID" to each sub-stream, which is then encapsulated and sent to the multicast group.

[0033] Precise network routing: The router routes the packet to the corresponding cell based on the target cell ID, and the access router further delivers the packet precisely to the designated assisting lock based on the target door lock ID.

[0034] Door lock relay forwarding: Assists the door lock in receiving messages, extracting the original video payload, re-encapsulating it using itself as the source, and unicasting it to the central server.

[0035] Server reassembly and packet loss retransmission: The server receives video packets from multiple paths and reassembles them according to their sequence numbers; if packet loss is detected, it directly initiates a targeted retransmission request to the source lock, which then directly retransmits the packets.

[0036] This method achieves a collaborative transmission system with lightweight terminal participation, precise network scheduling, and intelligent server reconfiguration, significantly improving the transmission reliability of video streams in congested environments. Core idea: System network topology diagram as follows Figure 3 Core process overview: Initialization phase: Identity Registration: When each door lock (e.g., door lock B) connects to the network, it obtains its unique door lock ID and its cell ID. The door lock periodically sends an enhanced IGMP join message carrying "cell ID + door lock ID" to subscribe to the public cooperative multicast group G.

[0037] Enhanced IGMP entries: When an assisting lock (such as lock B) sends an IGMP join message carrying "cell ID + lock ID", its access router R_B not only records that lock B has joined multicast group G, but also records the "lock ID" reported by lock B in the entry of that interface. In this way, the multicast forwarding table maintained by router R_B is upgraded from a simple (group address G -> outgoing interface list) to (group address G -> list {outgoing interface 1: registered lock ID_1, outgoing interface 2: registered lock ID_2, ...}).

[0038] Multicast tree construction: The network runs a multicast routing protocol (such as PIM-SM) and establishes a multicast distribution tree covering the entire network with the RP as the core. Routers record the composite information of "cell ID + door lock ID" from the IGMP messages under each interface.

[0039] Business execution phase: 1: Door lock A detected uplink congestion and decided to initiate collaborative backhaul.

[0040] 2: Source lock A sends a multicast data query message containing its own cell ID; after receiving it, other routers summarize the lock IDs of the locks accessed by their own cells and send them back to source lock A. After receiving the summary message from all routers, lock A generates or updates the list of available assisting locks, obtains the assisting cell IDs, and the relevant lock IDs.

[0041] 3: Door lock A splits the video stream into N sub-streams at sequence number intervals.

[0042] 4: Lock A constructs a multicast message for each substream, and accurately fills in a "target cell ID + target lock ID based on policy selection" in the extended header (this ID combination comes from the list of available assist locks it maintains).

[0043] 5: Lock A sends these multicast messages to public multicast group G.

[0044] 6. After receiving a multicast message, the router parses its extended header. It uses the "destination cell ID" in the message as key routing information. Routers (especially the aggregation point RP) forward each sub-flow message to the access router of the corresponding target cell based on the "destination cell ID" in the message.

[0045] 7: After receiving the packet, the access router of the target cell parses the "target door lock ID", queries its enhanced multicast forwarding table, and forwards the packet only from the physical interface connected to the specific target door lock, thus achieving precise "point-to-point" delivery.

[0046] 8: The target assists the door lock (such as door lock B) to receive a message on its network interface that is sent to multicast group G and matches its ID.

[0047] 9: Door lock B parses the message and extracts the original video data packet encapsulated in the inner layer (the destination IP is server S).

[0048] 10: Door lock B does not process video content. Instead, it acts as a relay node, using its own IP as the source, to repackage the original video data packets into unicast messages destined for server S and forward them.

[0049] 11: Server S receives video packets from different IPs (lock A and multiple assist locks). It identifies them as belonging to the same original video stream based on the 5-tuple (specifically the destination port and protocol).

[0050] 12: The server sorts and reassembles the data packets according to their original sequence numbers, attempting to restore the complete stream.

[0051] 13: If the server finds that the sequence number is not consecutive (a certain packet is lost), it directly sends a NACK retransmission request for the specific lost sequence number to the original video source - door lock A.

[0052] 14: After receiving the NACK, door lock A sends the lost specific data packet directly to the server via unicast, without having to go through the distributed path again.

[0053] Specific implementation plan: Phase 1: Network Registration and Multicast Tree Establishment Identity Assignment: Each door lock obtains a "cell ID" and a "door lock ID" through DHCP extended options or local configuration when joining the network. The cell ID is a logical area identifier, and the door lock ID is a unique device identifier.

[0054] Enhanced IGMP Registration: After all door locks are activated, they send an IGMP join message to the public cooperative multicast address G, carrying a composite field of "cell ID + door lock ID". For example, door lock B sends: {Group: G, ID_Set: {cell B-ID, lock B-ID}}. IGMP Report { Group Record Type: IS_IN Multicast Address: 239.192.10.1 Aux Data Len: 8 Aux Data:{ Cell_ID: 0xA001 / / Cell ID Lock_ID: 0x0001B002 / / Door lock ID } }

[0055] Router entry creation: After receiving the IGMP message, the access router creates an enhancement entry in the multicast forwarding table, as shown in Table 1 below: Table 1 ; Multicast tree construction: The network runs the PIM-SM protocol, establishing a shared tree with the RP at its core. Routers transmit "cell ID + door lock ID" information in PIM join / register messages, and the RP maintains a global mapping table: G → {(cell B-ID, door lock B-ID) → next-hop interface}. For example: RP_Mapping_Table{ "239.192.10.1":{ "A001":{"Community_ID":"0x0001B002","Next_Hop":"Rtr_A"}, "B001":{"Community_ID":"0x0001C002","Next_Hop":"Rtr_B"}, ... } }

[0056] Phase Two: Congestion Detection and Cooperative Distribution Congestion detection: Door lock A determines uplink congestion by checking RTCP receive reports, send buffer backlog, or ACK timeout rate. If the packet loss rate is >10% or the average RTT is >300ms for three consecutive reporting periods, it is considered uplink congestion.

[0057] Assist with door lock list maintenance: Source door lock A sends a multicast data query message containing its own cell ID to the multicast forwarding tree; After receiving the data, other routers will collect the door lock IDs connected to their own community, associate them with the community ID, and send them to the source door lock A in a unified manner. After receiving the summary message from all routers, door lock A generates or updates the list of available assisting door locks, obtains the assisting cell ID, and the corresponding door lock ID; Lock A maintains this "list of available assisting locks", and the information sources may also include: initial topology distribution (server push); periodic multicast probe responses; historical forwarding success rate and latency statistics.

[0058] Stream splitting and target allocation: Lock A splits the video RTP packets into substreams based on their sequence number modulo N (N=2~4). For example, when N=3: Substream 1: Seq%3==0; Substream 2: Seq%3==1; Subflow 3: Seq%3==2.

[0059] For each sub-flow, select a combination of "cell ID + lock ID" from the list of available assist locks. The selection strategy is based on: Historical success rate weighted at 60%; The current RTT weight is 30%. Load feedback weight is 10%.

[0060] Message encapsulation: Perform three layers of encapsulation on each sub-stream packet: Inner layer: Raw RTP / IP packet (destination IP = server S); Middle layer: Coordination header (including target cell ID, target door lock ID, operation code = 0x02 "door lock relay"); Outer layer: Multicast IP / UDP header (destination IP=G).

[0061] Original RTP packet: [IP header | UDP header | RTP header | Video payload] Collaboration header (8 bytes):

[0062] Outer multicast head: [Multicast IP header | UDP header (destination port=8888) | Coordination header | Raw RTP packet].

[0063] Multicast transmission and routing: Lock A sends the encapsulated multicast packet to the first-hop router Rtr_A.

[0064] Rtr_A checks that the destination IP is a multicast address G, queries the multicast routing table, and sends it to RP along the shared tree.

[0065] After receiving the packet, the RP parses the "target cell ID" in the coordination header, queries the mapping table, and determines the access router (such as Rtr_B) that is the next hop to the corresponding cell.

[0066] RP forwards the packet to Rtr_B, preserving the coordination header unchanged before forwarding.

[0067] After receiving the packet, Rtr_B parses the "target door lock ID", queries the local multicast forwarding table, finds the corresponding interface (such as Eth0 / 2 bound to door lock B), and multicasts it to door lock B.

[0068] Phase 3, Door Lock Relay Forwarding: Assist with door lock reception: Lock B listens on multicast group G on its socket. Upon receiving a packet, it first checks whether the target lock ID matches its own ID.

[0069] Decapsulation and recapsulation: Lock B parses the coordination header and verifies whether the target lock ID matches its own ID. After stripping the outer layer and coordination header, the original RTP packet is obtained.

[0070] It re-encapsulates its own IP address into a UDP / IP packet (destination IP = server S) and forwards it through its default route.

[0071] Forwarding optimization: Lock B can enable lightweight queuing and priority scheduling to ensure low forwarding latency, and does not process video content, acting only as a relay.

[0072] Phase Four: Server Reorganization and Packet Loss Recovery Multi-source receiver identification: Server S receives RTP packets from different IPs (lock A, lock B, lock C) and identifies them as belonging to the same original video stream based on characteristics such as destination IP, destination port, transport layer protocol, and Synchronization Source Identifier (SSRC) in the RTP payload.

[0073] Sorting and Reorganization: The server sorts all packets according to their RTP sequence numbers to reconstruct a continuous stream.

[0074] Packet loss detection and retransmission requests: If a sequence number gap is detected (e.g., missing Seq=120), the server directly sends a NACK request to door lock A, carrying the missing sequence number range. For example: NACK Packet { Source: Server_S Destination: Lock_A Type: 0x85 (NACK) Lost_Seq_Start: 120 Lost_Seq_End: 120 Timestamp: T }

[0075] Source door lock direct transmission replacement: After receiving the NACK, door lock A directly retrieves the corresponding RTP packet from its local cache and sends it to the server via unicast, bypassing the collaborative path.

[0076] Anomaly protection mechanism: Mechanism Name: Assistance Mechanism for Dynamic Retreat and Quick Replacement of Door Locks; Problem scenario: When a certain assist lock (such as lock B) experiences a sudden congestion in its uplink or insufficient power, the relay forwarding delay increases dramatically, affecting the real-time performance of the overall video stream.

[0077] Solution: Step 1: Door lock self-sensing and status reporting: Assist door locks in continuously monitoring the following indicators: Uplink latency (local ping to gateway); Send queue length; Battery level (e.g., below 20%).

[0078] When any indicator exceeds the threshold (e.g., latency > 200ms, queue > 50, battery < 20%), the door lock proactively sends a "backoff request" to the source door lock A: Backoff_Request { Lock_ID: 0x0001B002 Reason: High_Latency / Low_Battery Timestamp: T Suggested_Backoff_Time: 30s / / Suggested duration for pausing the selected option. }

[0079] Step 2, Dynamic Update Assistance List for Source Locks: After receiving the backoff request: Immediately move the lock from the "Available List" to the "Cooldown List"; During the cooldown period (e.g., 30 seconds), no more subflows will be allocated to this lock; Quickly select an alternative lock (such as lock D) from the list of backup assistance to take over its sub-stream.

[0080] Step 3: Update the router's forwarding table: Source lock A sends a Lightweight Control Message to the RP, notifying it to update the mapping table and replace the original target lock ID with the new ID. The RP then synchronizes this information to the access router via a PIM message.

[0081] Step 4: Automatic recovery after the cooldown period: After the cooling-off period, lock B automatically sends a "recovery ready" message, and the source lock A adds it back to the available list and gradually restores traffic allocation.

[0082] Beneficial effects: Significantly improved transmission reliability: Parallel transmission via multi-lock relay effectively avoids single-point congestion and reduces end-to-end packet loss rate.

[0083] Terminal resource friendly: It assists door locks by only transparently forwarding information, without consuming a lot of computing and storage resources, making it suitable for IoT device scenarios with limited capabilities.

[0084] Precise and flexible path scheduling: Based on multicast delivery with dual identifiers of "cell + door lock", it achieves precise routing at the sub-stream level and supports dynamic load balancing.

[0085] Highly efficient packet loss recovery: The server directly requests retransmission from the source lock, avoiding multi-hop retransmission delays and improving recovery speed.

[0086] The system is highly scalable: based on a multicast architecture, it supports large-scale door lock collaboration, and adding a new door lock does not require modification of the core network configuration.

[0087] Innovation points: An enhanced multicast precision delivery mechanism based on "cell ID + door lock ID": By extending IGMP and the multicast forwarding table, the granularity of multicast data is upgraded from "multicast to cell" to "multicast to specific door lock", providing basic routing support for distributed door lock relay; Door lock transparent relay forwarding mechanism: Design the collaboration header and decapsulation process so that the assisting door lock can identify the relay task and forward it automatically without modifying the application logic, thus realizing lightweight terminal collaboration; Server-driven direct retransmission mechanism: Introducing a packet loss recovery method with NACK direct return source lock during server reassembly to avoid the complexity and latency of multi-path retransmission and improve retransmission efficiency and system response speed. A distributed transmission system with three-layer collaboration between the terminal, network, and service: Constructing a complete collaborative system consisting of source gates (stream splitting and target assignment), network (identification awareness and precise routing), assist gates (relay forwarding), and servers (reassembly and retransmission control) to achieve efficient, reliable, and low-overhead video stream backhaul in local congestion scenarios; Assisted door lock dynamic retreat and hot replacement mechanism: Introduced assisted door lock self-sensing and status reporting mechanism, supports dynamic cooling and fast replacement, and improves the robustness and adaptability of the system in dynamic network environment.

[0088] As can be seen, based on the unique identifier obtained by each lock when accessing the network, the router establishes a multicast forwarding table; based on the source lock detecting uplink path congestion, it assigns a target cell ID and a target lock ID to each sub-stream from the list of available assisting locks; based on the identifier assigned to each sub-stream, the source lock encapsulates the sub-stream into a multicast message carrying the target identifier and sends it, and unicasts the original video data packets to the central server with itself as the source; based on the video data packets received by the central server from the source lock and multiple assisting locks, it sorts and reassembles them according to the sequence number; when a discontinuous sequence number is detected, the server directly requests the source lock to retransmit the lost specific data packets, which are then directly unicasted and retransmitted by the source lock. This enables intelligent coordination of terminal resources and accurate routing of data packets during network congestion, improving the reliability, real-time performance, and overall network bandwidth utilization of video stream backhaul.

[0089] Another embodiment of the present invention provides a system for distributed backhaul of door lock video streams, see [link to relevant documentation]. Figure 4 The system may include: Enhancement module 401 is used for identity registration and multicast tree enhancement: based on the unique identifier obtained by each door lock when accessing the network, it sends an enhanced IGMP join message carrying the cell ID and door lock ID to the public cooperative multicast group. The router establishes a multicast forwarding table containing the precise identifier of the door lock, forming an enhanced multicast distribution tree. The splitting module 402 is used for congestion detection and flow splitting: based on the event that the source lock detects uplink path congestion, the video stream to be uploaded is split into N sub-streams at intervals of data packet sequence numbers, and a target cell ID and a target lock ID are assigned to each sub-stream from the list of available assisting locks; Forwarding module 403 is used for precise sub-stream routing and relay forwarding: Based on the identifier assigned to each sub-stream, the source lock encapsulates the sub-stream into a multicast message carrying the target identifier and sends it; the network router routes the message to the corresponding cell based on the target cell ID, and the access router accurately delivers it to the designated assisting lock based on the target lock ID; after receiving and decapsulating, the assisting lock forwards the original video data packet to the central server with itself as the source unicast; Recovery module 404 is used for server reassembly and packet loss recovery: Based on the video data packets received by the central server from the source lock and multiple assisting locks, the data packets are sorted and reassembled according to the sequence number; when a discontinuous sequence number is detected, the server directly requests the source lock to retransmit the lost specific data packet, which is then directly unicasted by the source lock to retransmit it.

[0090] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0091] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0092] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0093] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A method for distributed backhaul of a door lock video stream, characterized in that, The method includes: Identity registration and multicast tree enhancement: Based on the unique identifier obtained when each door lock accesses the network, an enhanced IGMP join message carrying the cell ID and door lock ID is sent to the public cooperative multicast group. The router establishes a multicast forwarding table containing the precise identifier of the door lock, forming an enhanced multicast distribution tree. The identity registration and multicast tree enhancement includes: Identity identification acquisition: Based on the configuration or DHCP extended options when the door lock enters the network, the logical identifier of its cell and the unique identifier of the device are obtained; Enhanced IGMP registration: Based on the public cooperative multicast address, each door lock periodically sends an IGMP join message. The extended field of the message encapsulates a composite identifier of its cell ID and door lock ID; fine-grained forwarding table establishment: based on the IGMP join message received by the access router, the multicast group address, cell ID and associated door lock ID list are recorded for the corresponding interface in its multicast forwarding table, forming a fine-grained table entry of multicast group-outgoing interface-cell ID-door lock ID; global multicast tree construction: according to the multicast routing protocol, a shared tree covering the entire network is built with the aggregation point RP as the core; the RP synchronously records the mapping relationship between cell ID and door lock ID reported by each downstream router, forming a global multicast delivery mapping table; Congestion detection and stream splitting: Based on the event of uplink path congestion detected by the source lock, the video stream to be uploaded is split into N sub-streams at intervals of data packet sequence number, and a target cell ID and a target lock ID are assigned to each sub-stream from the list of available assist locks; Substream precise routing and relay forwarding: Based on the identifier assigned to each substream, the source lock encapsulates the substream into a multicast message carrying the target identifier and sends it; the network router routes the message to the corresponding cell based on the target cell ID, and the access router precisely delivers it to the designated assisting lock based on the target lock ID; after receiving and decapsulating, the assisting lock forwards the original video data packet to the central server with itself as the source unicast; Server Reassembly and Packet Loss Recovery: Based on the video data packets received by the central server from the source lock and multiple assisting locks, the data packets are sorted and reassembled according to their sequence numbers. When a discontinuous sequence number is detected, the server directly requests the source lock to retransmit the lost specific data packet, which is then unicasted directly by the source lock to retransmit it.

2. The method according to claim 1, characterized in that, The congestion detection and flow splitting include: Congestion determination: Based on the real-time transmission control protocol report, transmit buffer status, or acknowledgment timeout rate monitored by the source lock, when the packet loss rate or delay continuously exceeds the threshold, it is determined as uplink congestion; Assisted door lock discovery and list maintenance: Based on the multicast query request sent by the source door lock, other routers in the network summarize the door lock identifiers they have accessed and reply; the source door lock generates or updates an available assisted door lock list containing available door locks and their status information for each cell based on the reply; Video stream splitting: Based on the preset number of sub-streams N, the source gate group the video stream data packets into N sub-streams that are distributed at intervals on the sequence number by taking the result of taking the sequence number modulo N. Target assignment strategy: Based on the historical success rate of the available assist lock list, current network latency, and load feedback information, calculate the weight for each sub-flow and select an optimal combination of target cell ID and target lock ID.

3. The method according to claim 2, characterized in that, The precise routing and relay forwarding of the sub-stream includes: Cooperative message encapsulation: Based on the target identifier assigned to the substream, the source lock performs three layers of encapsulation on the original video data packets: the inner layer is the original IP / UDP / RTP packet; the middle layer adds a cooperative header, which includes the opcode, target cell ID, and target lock ID; the outer layer is encapsulated as an IP / UDP header with the destination address being a public multicast group; Cell ID-based routing: Based on the target cell ID in the multicast packet, the aggregation router in the network queries its global mapping table and forwards the packet to the access router corresponding to the target cell. Precise delivery based on door lock ID: Based on the packets received by the access router of the target cell, the target door lock ID is parsed and the local enhanced multicast forwarding table is queried to forward the packets only from the physical interface of the connected assist door lock; Door lock relay processing: Based on the multicast message received by the assisting door lock, after verifying that the target door lock ID matches its own ID, the outer layer and the collaboration header are stripped off, the inner original video data packet is extracted, and it is re-encapsulated into a unicast message sent to the central server using its own IP address as the source for forwarding.

4. The method according to claim 3, characterized in that, The server reorganization and packet loss recovery include: Multi-source stream identification and aggregation: Based on the five-tuple information of the data packets received by the central server and the RTP synchronization source identifier, data packets from different IP addresses are identified as belonging to the same original video stream; Packet sorting and reassembly: Based on the original RTP sequence number in the data packets, all received data packets are sorted and an attempt is made to reassemble them into a complete and continuous video stream; Packet loss detection and retransmission request: Based on the sequence number gaps found in the sorting results, the server generates a negative acknowledgment retransmission request message for the specific lost sequence number and sends it directly to the source door lock via unicast. Source-end direct transmission retransmission: Based on the retransmission request received by the source lock, the corresponding lost data packet is extracted from its local transmission buffer and sent directly to the central server in a unicast manner to complete the packet loss recovery.

5. The method according to claim 4, characterized in that, The method also includes a mechanism to assist in the dynamic management of door locks: Status self-awareness and reporting: Based on the real-time monitoring of its own uplink latency, transmission queue length or battery power, the assisting door lock will actively send an avoidance request containing the reason for avoidance and the suggested duration to the source door lock when any indicator exceeds the preset threshold. Assist list dynamic update: Based on the backoff request received by the source lock, immediately move the corresponding lock from the available list to the cooldown list, and stop assigning sub-stream tasks to it during the cooldown period; Hot replacement and path update: Based on the list of available assist locks, the source lock quickly selects a backup lock to replace the lock that has entered the backoff state, updates the target identifier for the affected sub-stream, and notifies the network router to update the multicast delivery mapping; State recovery: Based on the recovery ready message sent by the backoff lock after the cooldown period, the source lock re-adds it to the available list and gradually restores traffic allocation.

6. A system for distributed video stream transmission back to a door lock, characterized in that, The system includes: The enhancement module is used for identity registration and multicast tree enhancement: based on the unique identifier obtained when each door lock accesses the network, it sends an enhanced IGMP join message carrying the cell ID and door lock ID to the public cooperative multicast group. The router then establishes a multicast forwarding table containing the precise identifier of the door lock, forming an enhanced multicast distribution tree. The identity registration and multicast tree enhancement include: identity identifier acquisition: based on the configuration or DHCP extended options when the door lock enters the network, it obtains the logical identifier of the cell to which it belongs and the unique identifier of the device; enhanced IGMP registration: based on the public cooperative multicast address, each door lock periodically sends an IGMP join message. Incoming message: The extended field of this message encapsulates a composite identifier of its cell ID and door lock ID; Fine-grained forwarding table establishment: Based on the IGMP join message received by the access router, the multicast group address, cell ID and associated door lock ID list are recorded for the corresponding interface in its multicast forwarding table, forming a fine-grained table entry of multicast group-outgoing interface-cell ID-door lock ID; Global multicast tree construction: According to the multicast routing protocol, a shared tree covering the entire network is built with the aggregation point RP as the core; The RP synchronously records the mapping relationship between cell ID and door lock ID reported by each downstream router, forming a global multicast delivery mapping table; The splitting module is used for congestion detection and stream splitting: based on the event that the source lock detects uplink path congestion, the video stream to be uploaded is split into N sub-streams at intervals of data packet sequence numbers, and a target cell ID and a target lock ID are assigned to each sub-stream from the list of available assisting locks; The forwarding module is used for precise sub-stream routing and relay forwarding: Based on the identifier assigned to each sub-stream, the source lock encapsulates the sub-stream into a multicast message carrying the target identifier and sends it; the network router routes the message to the corresponding cell based on the target cell ID, and the access router accurately delivers it to the designated assisting lock based on the target lock ID; after receiving and decapsulating, the assisting lock forwards the original video data packet to the central server with itself as the source unicast; The recovery module is used for server reassembly and packet loss recovery: Based on the video data packets received by the central server from the source lock and multiple assisting locks, the data packets are sorted and reassembled according to the sequence number; when a discontinuous sequence number is detected, the server directly requests the source lock to retransmit the lost specific data packet, which is then directly unicasted by the source lock to resend it.

7. A storage medium, characterized in that, The storage medium stores a computer program, wherein a processor is configured to run the computer program to perform the method of any one of claims 1-5.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-5.