Streaming media asymmetric network penetration method

By actively connecting to the external network server through the intranet device and establishing a persistent control channel, audio and video streams can be pushed on demand, solving the problems of remote access difficulties and resource waste of LAN devices, and realizing efficient streaming media transmission and system scalability.

CN120640078APending Publication Date: 2025-09-12GUANGDONG AVCIT TECH HLDG CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510901910.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the existing technology, audio and video equipment deployed in the local area network cannot be directly accessed from the external Internet, resulting in difficulties in remote viewing and management. At the same time, there are problems such as unnecessary network resource occupation and poor system scalability.

Method used

The intranet video device actively connects to the external network server to establish a persistent control channel. The external network server issues instructions when the user requests it, and the intranet device pushes the audio and video stream on demand. It communicates through protocols such as WebSocket, MQTT, and TCP long connection, and stops pushing the stream when there is no user watching. It uses RTMP, SRT, RTP, WebRTC and other protocols for audio and video transmission.

Benefits of technology

It significantly saves bandwidth resources, improves system efficiency and scalability, realizes remote access and control of devices deployed in the LAN, avoids long-term bandwidth occupation, and supports large-scale deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120640078A_ABST
    Figure CN120640078A_ABST
Patent Text Reader

Abstract

The invention mainly discloses a streaming media asymmetric network penetration method, which comprises the following steps that: after being started, intranet video equipment is actively connected to a preset extranet server, and a persistent control channel is established; the extranet server receives a watching request instruction of the user side and judges whether a corresponding audio and video stream is transmitted or not, if not, a first instruction is sent to the intranet video device through the control channel, and the first instruction is used for instructing the intranet video device to push the audio and video stream to the extranet server; and the intranet video device responds to the first instruction and transmits the encoded audio and video streams to the extranet server through the data transmission channel.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of streaming media communication, and in particular to a streaming media asymmetric network penetration method. Background Art

[0002] With the development of the Internet of Things (IoT) and smart devices, more and more audio and video capture devices are deployed within local area networks (LANs), such as home or enterprise security cameras, conference terminals, and telemedicine equipment. These devices are typically located within private networks and cannot be directly accessed from the external internet, making remote viewing and management difficult.

[0003] Therefore, there is an urgent need to provide a new streaming media transmission mechanism that can reduce unnecessary network resource usage while ensuring remote access capabilities and improve the flexibility and controllability of the system. Summary of the Invention

[0004] In order to solve at least one of the aforementioned technical problems, the present disclosure proposes a method for penetrating an asymmetric network of streaming media in the first aspect, including: after the intranet video device is started, it actively connects to a preset external network server to establish a persistent control channel; the external network server receives the viewing request instruction from the user terminal and determines whether the corresponding audio and video stream is being transmitted. If not, it sends a first instruction to the intranet video device through the control channel, and the first instruction is used to instruct the intranet video device to push the audio and video stream to the external network server; the intranet video device responds to the first instruction and transmits the encoded audio and video stream to the external network server through the data transmission channel.

[0005] Preferably, the control channel adopts one or more combinations of WebSocket, MQTT, and TCP long connection.

[0006] Preferably, the data transmission channel uses one or more protocols among RTMP, SRT, RTP, and WebRTC to transmit audio and video streams.

[0007] Preferably, the external network server detects the connection status of the control channel by sending heartbeat packets to the internal network video device at regular time intervals.

[0008] Preferably, if the reconnection fails more than three times, the intranet video device enters offline mode and records logs locally, and re-uploads the logs to the external network server after the network is restored.

[0009] Preferably, after the intranet video device receives the first instruction, it performs the following operations: parses the target address and verifies its validity; configures the video encoder parameters according to the target address; starts the audio and video acquisition module; establishes an independent data transmission channel and starts pushing the audio and video stream.

[0010] Preferably, the video encoder parameters include: encoding standard, resolution, frame rate, bit rate limit, GOP length, wherein the bit rate limit is dynamically adjusted according to the current network bandwidth and does not exceed the maximum value set by the external network server.

[0011] Preferably, when the user terminal stops watching or disconnects, the external network server sends a second instruction to the internal network video device through the control channel, and the second instruction is used to instruct the internal network video device to stop pushing the audio and video stream.

[0012] In a second aspect, the present disclosure proposes a streaming media asymmetric network penetration system, including: an establishment module, which is used for the intranet video device to actively connect to a preset external network server after startup to establish a persistent control channel; an instruction sending module, which is used for the external network server to receive a viewing request instruction from the user terminal and determine whether a corresponding audio and video stream is being transmitted. If not, a first instruction is sent to the intranet video device through the control channel, and the first instruction is used to instruct the intranet video device to push the audio and video stream to the external network server; an audio and video transmission module, which is used for the intranet video device to respond to the first instruction and transmit the encoded audio and video stream to the external network server through the data transmission channel.

[0013] In a third aspect, the present disclosure provides a computer-readable medium, wherein a computer program is stored in the computer-readable medium. The computer program is loaded and executed by a processing module to implement the steps of any of the above methods.

[0014] Some technical effects disclosed herein are: a method for penetrating an asymmetric network of streaming media, comprising: after the intranet video device is started, it actively connects to a preset external network server to establish a persistent control channel; the external network server receives a viewing request instruction from the user terminal and determines whether a corresponding audio and video stream is being transmitted. If not, a first instruction is sent to the intranet video device through the control channel, and the first instruction is used to instruct the intranet video device to push the audio and video stream to the external network server; the intranet video device responds to the first instruction and transmits the encoded audio and video stream to the external network server through the data transmission channel. This significantly saves bandwidth resources and improves system efficiency and scalability. It also enables video devices deployed in the intranet to be remotely accessed and controlled through NAT / firewall. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] To better understand the technical solutions of this disclosure, please refer to the following drawings, which are used to assist in explaining the prior art or embodiments. These drawings selectively illustrate the products or methods involved in the prior art or some embodiments of this disclosure. The basic information of these drawings is as follows: Figure 1 This application provides a flowchart of an embodiment of a method for penetrating an asymmetric network of streaming media. DETAILED DESCRIPTION

[0016] The following will further describe the technical means or technical effects involved in this disclosure. Obviously, the embodiments (or implementation methods) provided are only some of the implementation methods covered by the present disclosure, and not all of them. Based on the embodiments in this disclosure and the explicit or implicit descriptions in the figures and texts, all other embodiments that can be obtained by those skilled in the art without making any creative efforts will fall within the scope of protection requested by this disclosure.

[0017] To achieve remote access, you can use the following method: let the video device continuously push the stream to the server, and then the server forwards it to the user end. Although this method can achieve remote access, it has the following problems: Serious bandwidth waste: Regardless of whether there are users watching, the device continues to push audio and video streams to the external network, resulting in a large amount of bandwidth waste.

[0018] Poor system scalability: As the number of devices increases, server load and bandwidth consumption rise rapidly, making it difficult to support large-scale deployment.

[0019] Lack of flexible control mechanism: Unable to dynamically adjust the streaming status, nor to issue control instructions in real time, such as parameter configuration and firmware upgrades.

[0020] For at least one of the above problems, such as Figure 1 , the present application discloses a method for penetrating an asymmetric streaming media network, comprising: S10, after the intranet video device is started, it actively connects to the pre-set external network server to establish a persistent control channel; S20: The external network server receives the viewing request instruction from the user terminal and determines whether the corresponding audio and video stream is already being transmitted. If not, it sends a first instruction to the internal network video device via the control channel. The first instruction is used to instruct the internal network video device to push the audio and video stream to the external network server; S30, the intranet video device responds to the first instruction and transmits the encoded audio and video stream to the external network server through the data transmission channel.

[0021] The disclosed method uses an intranet device to actively connect to an external server and establish a persistent control channel. When a user requests to view an audio or video stream, the external server issues a first instruction instructing the intranet device to push the audio or video stream to the external server, enabling the intranet device to push the stream to a designated address on demand. The method stops pushing the stream when no user is watching, significantly saving bandwidth resources and improving system efficiency and scalability. Furthermore, it enables remote access and control of devices such as cameras and microphones deployed within a local area network (LAN) through NAT / firewalls.

[0022] The system architecture of the present invention includes an intranet video device, which can be a high-definition camera deployed in a local area network and has functions such as audio and video acquisition, encoding, and network communication; an extranet server, which can be a streaming media server with a public IP address, is responsible for tasks such as receiving video streams, transcoding, distribution, and issuing instructions; a control channel module, which is used to establish two-way communication between the intranet video device and the extranet server and transmit control instructions; a data transmission channel module: used to carry the transmission of audio and video streams, and is only turned on when there is demand; a user terminal: used to initiate viewing requests and receive video streams, such as a smartphone, tablet computer, PC browser, etc.

[0023] Intranet video devices can capture audio and video, using built-in cameras and microphones to capture images and audio signals. They can also perform encoding, using standards such as H.264 / H.265 for video compression and AAC / G.711 for audio encoding. They can also communicate over the network, supporting the TCP / IP protocol stack and possessing NAT penetration capabilities, enabling them to actively connect to external servers. They can also parse control commands, receiving and parsing control commands from external servers, such as the first command for initiating streaming and the second command for stopping streaming on the intranet video device. They can also report status, with intranet video devices regularly reporting information such as device operating status, network conditions, and storage capacity to external servers. The intranet and external networks are isolated from each other, and external servers cannot actively access intranet video devices.

[0024] The external network server maintains control channel connections with all internal network video devices, receives device status, and issues control commands. It also receives audio and video streams from internal network video devices and performs caching, transcoding, and distribution. It also manages user access, verifies user identities, and provides video stream access interfaces supporting multiple formats, such as HLS and DASH. It can record and analyze logs, including device behavior, user behavior, and network status, to facilitate maintenance and auditing. It can also dynamically select the optimal streaming path based on current server load to avoid single points of failure.

[0025] The control channel module enables bidirectional communication, allowing external servers to issue control commands to internal video devices and also allowing cameras to upload status information to external servers. The control channel module supports protocols such as WebSocket, MQTT, and HTTP long polling to ensure communication stability and compatibility. Security is ensured by means of encryption signatures and authentication mechanisms, preventing unauthorized device access and malicious command injection. Internal video devices periodically send heartbeat packets to the external server to check the control channel connection status and automatically reconnect to enhance system robustness. If reconnection fails more than three times, the internal video device enters offline mode and logs locally, re-uploading the logs to the external server when the network is restored.

[0026] The data transmission channel module carries audio and video streams and supports multiple mainstream streaming protocols, including RTMP, SRT, RTP, and WebRTC. Data transmission channels are opened on demand and established only when users are watching, avoiding long-term bandwidth usage. Parameters such as bit rate and resolution are automatically adjusted based on network bandwidth to ensure smooth playback. Reconnection attempts are made during network fluctuations to prevent brief interruptions that may impact the user experience.

[0027] The user can initiate a viewing request through the app or website by entering the device ID or room number. The system receives and plays audio and video streams from external servers, supporting multiple player formats. The user reports playback status, such as freezes, resolution switching, and exiting the viewing experience, to the server. The user authenticates user access rights to prevent unauthorized access.

[0028] S10: After the intranet video device is started, it actively connects to the pre-set external network server to establish a persistent control channel; In one embodiment, the intranet video device is powered on, the operating system and network driver are loaded, and the device automatically connects to the pre-set external network server to establish a control channel. A registration message containing information such as the device ID, version number, and network status is sent to the external network server. The control channel enters a listening state, ready to receive control commands. The external network server detects the connection status of the control channel by sending heartbeat packets to the intranet video device at regular intervals. Specifically, when the intranet video device is powered on, it boots up and loads the operating system and network drivers. It first performs a power-on self-test. Then, the device begins loading its built-in operating system, reading and loading the core operating system components from storage media such as eMMC or an SD card. It initializes the root file system, providing basic file management and an operating environment. Based on pre-configured configurations, it starts necessary background services, such as network services and video encoding services.

[0029] After the operating system boots, the network driver is loaded. The operating system automatically scans and identifies all available network interfaces, such as Ethernet ports and Wi-Fi modules. Based on the identified network interface type, the corresponding driver is loaded. For example, for a wired network, the eth0 interface and the corresponding Ethernet driver are used. For a wireless network, the wlan0 interface and the Wi-Fi driver are used. Network parameters such as the IP address, subnet mask, and gateway are obtained through DHCP or static configuration.

[0030] Automatically connect to a pre-configured external server and establish a control channel. Once the network driver is loaded and network parameters are successfully acquired, the internal video device can attempt to communicate with the outside world. At this point, the internal video device attempts to connect to the designated external server based on pre-configured information, typically stored in the device's non-volatile memory. It resolves the external server address by reading the domain name or IP address from a configuration file; creates a WebSocket client using a standard library or a third-party library; and sends a TCP handshake request to establish a WebSocket connection. It also periodically sends "heartbeat" messages to the external server to confirm the connection status. If no response is received for several consecutive times, the connection is considered broken, triggering a reconnection mechanism. In the event of a network interruption, the internal video device can automatically reconnect. A maximum retry count and retry interval are pre-set to avoid frequent and ineffective reconnection attempts.

[0031] Once the control channel is successfully established, the intranet video device sends a registration message to the external network server, informing the external network server of its existence and related information. This message typically contains the following key fields: the intranet video device ID, a string that uniquely identifies the device, such as camera_001, used to distinguish different intranet video devices; the version number, which contains the current device firmware or software version, allowing the external network server to determine whether an upgrade is required; the network status, including information such as the current IP address, network bandwidth, and latency, to help the external network server optimize resource allocation; and other metadata, such as the device model, geographic location, and access time.

[0032] After successful registration, the control channel enters a listening state, ready to receive control commands from the external server. The primary task at this stage is to maintain an open connection and promptly respond to various commands issued by the external server. The internal video device needs to continuously monitor messages on the control channel in a separate thread or coroutine. Whenever a new command is received, the internal video device should perform the corresponding operation based on the command content. It then processes the control command. For example, upon receiving the first command, it starts streaming, instructing the internal video device to begin capturing audio and video and push it to the specified address of the external server. Alternatively, upon receiving the second command, it stops streaming, notifying the internal video device to stop pushing the current audio and video to the external server. Other tasks include updating configurations, which modify device operating parameters such as resolution and frame rate, and upgrading firmware, which prompts the device to download and install the latest version of the firmware.

[0033] S20: The external network server receives the viewing request instruction from the user terminal and determines whether the corresponding audio and video stream is already being transmitted. If not, it sends a first instruction to the internal network video device via the control channel. The first instruction is used to instruct the internal network video device to push the audio and video stream to the external network server; The user terminal initiates a viewing request, the external network server receives and parses the request, and the server queries whether there is a corresponding audio and video stream. If not, a first instruction is generated. The first instruction is used to instruct the internal network video device to push the audio and video stream to the external network server. The external network server sends the first instruction to the specified internal network video device through the control channel.

[0034] When a user accesses a camera feed using a mobile app or webpage, the app or front-end page initiates an HTTP request or WebSocket message to the backend service. A web service module, such as Nginx, Spring Boot, or Node.js, is deployed on the external server to listen for user requests. This module verifies the request format is legal; extracts information such as the device ID, user identity, and request type; verifies user permissions, such as whether access to the camera is authorized; and calls an internal service to process the viewing request. The external server maintains an audio and video stream status table, recording whether all cameras are currently receiving video streams.

[0035] If the query results in no active video stream being found, the external server generates a first command to initiate streaming and sends it to the internal video device. Before issuing this command, the external server must ensure a persistent control channel has been established with the target camera, such as a WebSocket, MQTT, or TCP persistent connection. If the connection is lost, the server can attempt to reconnect or mark the corresponding internal video device as offline. The server then checks whether a video stream is currently available. If no active video stream is found, the server returns the address of the existing stream to the user.

[0036] S30, the intranet video device responds to the first instruction and transmits the encoded audio and video stream to the external network server through the data transmission channel.

[0037] After receiving the first command, the intranet video device performs the following operations: parsing the target address and verifying its validity; configuring the video encoder parameters based on the target address; starting the audio and video capture module; establishing an independent data transmission channel and starting to push the audio and video streams. Video encoder parameters include: encoding standard, resolution, frame rate, bit rate limit, and GOP length. The bit rate limit is dynamically adjusted based on the current network bandwidth and does not exceed the maximum value set by the external network server.

[0038] The intranet video device first checks the control channel connection status. Before receiving the first command to start streaming, it ensures that the control channel with the external server is connected. If disconnected, it attempts to reconnect or waits for a successful reconnection before processing control commands, such as the first command. The received control command is first verified for legitimacy. Once verified, the target address and port information in the control command are parsed. Based on the parsed target address and port information, the camera device is configured with the corresponding audio and video encoding parameters to generate a qualified audio and video stream.

[0039] The camera device establishes a new data transmission channel that supports multiple protocols such as RTMP and SRT to adapt to different application scenarios. The encoded audio and video stream is pushed to the external network server through the newly created data transmission channel. The new data transmission channel is independent of the control channel and is only established when needed, saving bandwidth resources. Once the new data transmission channel is established, the camera device can push the encoded audio and video stream to the designated external network server. Audio and video data are sent frame by frame in the form of a stream to ensure low latency. When the network fluctuates, tools such as FFmpeg will automatically attempt to reconnect to ensure the continuity of data transmission. The external network server supports load balancing and dynamically selects the optimal streaming path based on the current load situation.

[0040] When the user stops watching or disconnects, the external network server sends a second instruction to the internal network video device via the control channel. The second instruction is used to instruct the internal network video device to stop pushing the audio and video stream. When the user stops watching or disconnects, the external network server notifies the internal network video device to stop pushing the stream via the control channel. When the user stops watching the video or disconnects, the external network server detects that no one is watching, generates and sends a second instruction to stop pushing the stream to the internal network video device. In one embodiment, the user closes the viewing page, such as a browser tab. The mobile app exits the live broadcast room. The network connection is interrupted, such as the Wi-Fi signal is lost. The client periodically sends heartbeat packets to the external network server. If the external network server does not receive the heartbeat within the set time, it is considered that the client has been disconnected. The HTTP request ends. For viewing requests based on HTTP / HTTPS, when the client closes the page, the server will detect the connection close event. WebSocket is disconnected. If WebSocket is used for real-time communication, the server can detect the connection disconnection through the onClose event of WebSocket.

[0041] Once it determines that no other viewers are watching a particular video stream, the external network server generates a second instruction to "stop streaming" and sends it to the corresponding internal network video device through the control channel. Upon receiving the instruction, the internal network video device, such as a camera, stops streaming.

[0042] In a second aspect, the present disclosure proposes a streaming media penetration system for an asymmetric network, comprising: a setup module, configured to enable an intranet video device to proactively connect to a pre-configured external network server upon startup, establishing a persistent control channel; a command transmission module, configured to enable the external network server to receive a viewing request from a user terminal and determine whether a corresponding audio or video stream is already being transmitted. If not, the module sends a first command to the intranet video device via the control channel, the first command instructing the intranet video device to push the audio or video stream to the external network server; and an audio or video transmission module, configured to enable the intranet video device to respond to the first command and transmit the encoded audio or video stream to the external network server via a data transmission channel.

[0043] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored therein, which is loaded and executed by a processing module to implement the steps of the acquisition method. It will be understood by those skilled in the art that all or part of the steps in the embodiments may be implemented by instructing related hardware through a computer program, and the program may be stored in a computer-readable medium, which may include various media that can store program code, such as a flash drive, a mobile hard disk, a read-only memory, a random access device, a magnetic disk, or an optical disk.

[0044] Within the scope of the knowledge and ability level of those skilled in the art, the various embodiments or technical features mentioned herein may be combined with each other to serve as other optional embodiments without conflict. These limited number of optional embodiments, which are not listed one by one and are formed by combining a limited number of technical features, still fall within the technical scope disclosed in the present disclosure and can be understood or inferred by those skilled in the art in combination with the drawings and the above text.

[0045] In addition, the descriptions of most embodiments are based on different focuses. If you need to further understand the details that are not described in detail, you can refer to the relevant content of the prior art, other relevant descriptions in this document or the purpose of the invention for reasonable reasoning.

[0046] It is emphasized again that the embodiments listed above are typical and preferred embodiments of the present disclosure and are intended only to illustrate and explain the technical solutions of the present disclosure in detail to facilitate understanding by the reader. They are not intended to limit the scope or application of the present disclosure. Any technical solutions obtained through modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included within the scope of protection claimed by the present disclosure.

Claims

1. A method for penetrating an asymmetric network of streaming media, characterized in that: include: After the intranet video device is started, it will actively connect to the pre-set external network server to establish a persistent control channel; The external network server receives the viewing request instruction from the user terminal and determines whether the corresponding audio and video stream is already being transmitted. If not, it sends a first instruction to the internal network video device through the control channel, and the first instruction is used to instruct the internal network video device to push the audio and video stream to the external network server; The intranet video device responds to the first instruction and transmits the encoded audio and video stream to the external network server through the data transmission channel.

2. The method according to claim 1, characterized in that The control channel uses one or more combinations of WebSocket, MQTT, and TCP long connection.

3. The method according to claim 1, characterized in that The data transmission channel uses one or more protocols such as RTMP, SRT, RTP, and WebRTC to transmit audio and video streams.

4. The method according to claim 1, wherein The external network server detects the connection status of the control channel by sending heartbeat packets to the internal network video device at regular time intervals.

5. The method according to claim 4, characterized in that If the reconnection fails more than three times, the intranet video device enters offline mode and records logs locally. The logs will be uploaded to the external network server again after the network is restored.

6. The method according to claim 4, characterized in that After receiving the first instruction, the intranet video device performs the following operations: Parse the target address and verify its validity; Configure video encoder parameters according to the target address; Start the audio and video acquisition module; Establish an independent data transmission channel and start pushing audio and video streams.

7. The method according to claim 6, characterized in that Video encoder parameters include: encoding standard, resolution, frame rate, bit rate limit, and GOP length. The bit rate limit is dynamically adjusted according to the current network bandwidth and does not exceed the maximum value set by the external network server.

8. The method according to claim 1, characterized in that When the user end stops watching or disconnects, the external network server sends a second instruction to the internal network video device through the control channel, and the second instruction is used to instruct the internal network video device to stop pushing the audio and video stream.

9. A streaming media asymmetric network penetration system, characterized in that: include: Establish a module for the intranet video device to actively connect to the preset external network server after startup and establish a persistent control channel; An instruction sending module is used for the external network server to receive the viewing request instruction from the user terminal and determine whether the corresponding audio and video stream is already being transmitted. If not, it sends a first instruction to the internal network video device through the control channel, and the first instruction is used to instruct the internal network video device to push the audio and video stream to the external network server; The audio and video transmission module is used for the intranet video device to respond to the first instruction and transmit the encoded audio and video stream to the external network server through the data transmission channel.

10. A computer-readable medium, characterized in that: The computer readable medium stores a computer program, which is loaded and executed by the processing module to implement the steps of any one of the methods of claims 1 to 8.

Citation Information

Cited By

  • Establishment method of self-built unmanned aerial vehicle emergency command platform

    CN121357339A