A one-way proxy method, system, device and medium based on a one-way import device

By using a one-way RTMP proxy system and method for one-way import devices, the transmission bottleneck problem of VPN and RTMP protocols in strictly one-way flow scenarios is solved, realizing secure one-way data transmission within the intranet, which is suitable for fields such as live video streaming and enterprise-level real-time interaction.

CN121239742BActive Publication Date: 2026-03-17中孚安全技术有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511811914.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-03-17
Estimated Expiration
2045-12-04

AI Technical Summary

Technical Problem

In scenarios where unidirectional data flow is strictly restricted, existing technologies require VPNs to establish tunnels through bidirectional communication. The RTMP protocol handshake process also relies on bidirectional transmission, which leads to the problem that internet camera data cannot enter the intranet for on-demand use through a unidirectional channel.

Method used

An RTMP one-way proxy system and method based on one-way import devices is adopted. Through the collaborative design of the streaming media service relay module and the one-way sending program, the one-way encapsulation and transmission of data streams are realized. The simulated terminal subscription module actively pulls the data stream from the external network streaming media server, and performs one-way encapsulation through the one-way sending program. Finally, the simulated terminal publishing module on the internal network pushes the data to the internal network RTMP streaming media server.

Benefits of technology

It achieves seamless one-way proxy of the RTMP protocol, meets the security requirements of strict one-way data flow scenarios, ensures the transmission characteristic of data only entering and not exiting, is applicable to all current mainstream scenarios, requires no modification to the existing deployment topology, and is imperceptible to users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121239742B_ABST
    Figure CN121239742B_ABST
Patent Text Reader

Abstract

This application discloses an RTMP one-way proxy method, system, device, and medium based on a one-way import device. It mainly relates to the field of one-way proxy technology, aiming to address the problem that existing solutions severely restrict one-way data flow. However, VPNs require bidirectional communication to establish a tunnel, and the RTMP protocol handshake process also relies on bidirectional transmission; existing technologies cannot avoid this deficiency. The system includes: a streaming media service relay module connected to the RTMP streaming end device A; a one-way sending program connected to the streaming media service relay module; a one-way receiving program connected to the one-way sending program; and a simulated terminal publishing module connected to the one-way receiving program; a simulated terminal subscription module connected to the subscribed external network RTMP streaming media server; a one-way sending program connected to the simulated terminal subscription module; a one-way receiving program connected to the one-way sending program; and a simulated terminal publishing module connected to the one-way receiving program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of RTMP one-way proxy technology, and in particular to an RTMP one-way proxy method, system, device and medium based on a one-way import device. Background Technology

[0002] RTMP (Real-Time Messaging Protocol) is currently widely used in live streaming, security monitoring, and enterprise-level real-time interaction. Its core advantages lie in its low latency, high stability, and mature ecosystem. As organizations become increasingly information-driven, they face higher security requirements for data entering and leaving the network, while simultaneously demanding that ease of use in daily operations not be compromised.

[0003] Most organizations require internet access from their internal work network. When direct internet access is permitted, users typically use client applications to access internet resources directly. Some organizations, when building dedicated streaming media services, require the streaming media server to be located on the internal work network. Cameras or recorders use VPN (Virtual Private Network) or similar technologies to connect to the streaming media server. By configuring a VPN connection, internet users can use RTMP streaming clients to push video streams to the internal work network streaming media server through the VPN tunnel. Internal work network users can then use RTMP playback clients to access the media streams pushed to the streaming media server, enabling access to live internet video resources while maintaining a certain level of security.

[0004] However, some organizations require that data entering the work intranet from the internet be allowed only to enter, with no data being allowed to exit in the opposite direction. Simultaneously, they need to ensure that live video data from internet cameras or recorders can be streamed on demand within the office network, achieving accessibility of internet video live data to the office network. However, existing VPN tunnels require bidirectional data transmission, and the RTMP protocol also requires a bidirectional handshake to establish a connection. Current technologies are unusable in scenarios where unidirectional data flow is strictly restricted, and there are no workarounds, making this a fatal flaw and rendering the task impossible. Summary of the Invention

[0005] This application provides an RTMP one-way proxy method, system, device, and medium based on a one-way import device to address the fundamental contradiction faced by existing solutions in scenarios where one-way data flow is strictly restricted (only allowing transmission from the Internet to the intranet): VPNs require bidirectional communication to establish a tunnel, and the RTMP protocol handshake process also relies on bidirectional transmission. Existing technologies cannot circumvent this deficiency, resulting in the inability of Internet camera data to enter the intranet for on-demand use through a one-way channel.

[0006] In a first aspect, this application provides an RTMP one-way proxy system based on a one-way import device, the system comprising:

[0007] RTMP publish mode and RTMP subscription mode;

[0008] The RTMP publishing modes include:

[0009] A streaming media service relay module connected to RTMP streaming terminal device A, a one-way sending program connected to the streaming media service relay module, a one-way receiving program connected to the one-way sending program through a one-way isolated transmission channel, and an analog terminal publishing module connected to the one-way receiving program.

[0010] Among them, the one-way sending program is deployed on the external network unit of the one-way import device, the one-way receiving program is deployed on the internal network unit of the one-way import device, the streaming media service relay module is deployed independently on the external network unit or Internet side of the one-way import device, and the analog terminal publishing module is deployed independently on the internal network unit or working internal network side of the one-way import device, and the analog terminal publishing module is connected to the internal network RTMP streaming media server.

[0011] The RTMP subscription models include:

[0012] The simulated terminal subscription module is connected to the subscribed external RTMP streaming media server; the one-way sending program is connected to the simulated terminal subscription module; the one-way receiving program is connected to the one-way sending program through a one-way isolated transmission channel; and the simulated terminal publishing module is connected to the one-way receiving program.

[0013] Among them, the analog terminal subscription module is independently deployed on the external network unit or Internet side of the one-way import device.

[0014] In one implementation of this application, the simulated terminal publishing module for publishing video is connected to an intranet RTMP streaming media server, and the intranet RTMP streaming media server is connected to a playback client that subscribes to the video.

[0015] In one implementation of this application, the RTMP streaming device A includes a camera and a recorder.

[0016] In one implementation of this application, the subscribed external RTMP streaming media server is connected to an external RTMP streaming device B.

[0017] Secondly, this application provides an RTMP one-way proxy method based on a one-way import device, applied to an RTMP one-way proxy system based on a one-way import device, the method comprising:

[0018] In RTMP publishing mode:

[0019] The streaming media service relay module receives raw streaming media data collected by RTMP push-streaming device A; it obtains streaming media data stripped of the original protocol through the streaming media service relay module, encapsulates the streaming media data according to the private communication protocol of the one-way import device, and sends the encapsulated streaming media data to the one-way sending program.

[0020] In RTMP subscription mode:

[0021] The original streaming media data is obtained from the subscribed external RTMP streaming media server through the simulated terminal subscription module;

[0022] The streaming media data stripped of the original protocol is obtained by the simulated terminal subscription module. The streaming media data is encapsulated according to the private communication protocol of the one-way import device and sent to the one-way sending program.

[0023] In RTMP publish or subscribe mode, after the encapsulated streaming media data is sent to the one-way sender...

[0024] The private communication protocol is stripped from the encapsulated streaming media data by a one-way sending program to obtain the streaming media data, which is then encapsulated and sent to a one-way receiving program.

[0025] After receiving the encapsulated streaming media data, the one-way receiving program decapsulates and reassembles the protocol, and then forwards it to the simulated terminal publishing module; the simulated terminal publishing module sends the reassembled streaming media data to the intranet RTMP streaming media server.

[0026] In one implementation of this application, before receiving the raw streaming media data collected by RTMP push-streaming device A through the streaming media service relay module, the method further includes:

[0027] The RTMP streaming device A on the Internet side establishes a connection with the streaming media service relay module through a handshake, and performs identity authentication and control signaling interaction.

[0028] In one implementation of this application, after the simulated terminal publishing module sends the reconstructed streaming media data to the intranet RTMP streaming media server, the method further includes:

[0029] The internal RTMP streaming media server sends the video to the subscribed playback clients.

[0030] In one implementation of this application, before obtaining the subscribed raw streaming media data from the subscribed external RTMP streaming media server via the simulated terminal subscription module, the method further includes:

[0031] The RTMP streaming device B on the Internet side establishes a connection with the RTMP streaming media server on the Internet through a handshake, and performs identity authentication, control signaling interaction and video publishing.

[0032] The analog terminal subscription module establishes a connection with the Internet's RTMP streaming media server through a handshake, performs identity authentication and control signaling interaction, and subscribes to the desired on-demand videos.

[0033] Thirdly, this application provides an RTMP one-way proxy device based on a one-way import device, the device comprising:

[0034] processor;

[0035] And a memory that stores executable code, which, when executed, causes the processor to execute an RTMP one-way proxy method based on a one-way import device, as described above.

[0036] Fourthly, this application provides a non-volatile computer storage medium storing computer instructions thereon, which, when executed, implement an RTMP one-way proxy method based on a one-way import device as described above.

[0037] As can be seen from the above technical solutions, this application has the following advantages:

[0038] This application achieves unidirectional encapsulated transmission of data streams in RTMP publishing mode through the collaborative design of a streaming media service relay module and a one-way sending program. After receiving data from the RTMP push-end device, the streaming media service relay module encapsulates the data into a format supported by the one-way import device and transmits it to the one-way receiving program of the intranet unit through a physically isolated channel. This process completely avoids the bidirectional communication requirement of the traditional RTMP protocol handshake phase, enabling internet camera data to enter the intranet in a unidirectional flow. In RTMP subscription mode, the simulated terminal subscription module actively pulls the data stream from the external network streaming media server, also performs unidirectional encapsulation through the one-way sending program, and finally pushes the data to the intranet RTMP streaming media server by the simulated terminal publishing module on the intranet side. This architecture design completely solves the unidirectional transmission bottleneck problem caused by the reliance on bidirectional communication for protocol handshake in traditional solutions.

[0039] The beneficial effect of this application lies in its modular design, which achieves seamless one-way proxying of the RTMP protocol. The dual-mode support of the streaming media service relay module and the analog terminal subscription module covers both scenarios where internet cameras actively publish data and scenarios where internal networks actively subscribe to external streaming media servers. The paired deployment of one-way sending and receiving programs ensures the one-way transmission characteristics of data in physically isolated channels. Simultaneously, the protocol conversion function of the analog terminal publishing module enables internal network RTMP streaming media servers to properly process one-way imported data streams. This design not only retains the native functionality of the RTMP protocol but also meets the security requirements of scenarios with strict one-way data flow through the physical isolation characteristics of the one-way channel.

[0040] Specifically, by using one-way import technology, data can only enter and not exit, providing a more secure data transmission channel and ensuring the data security of the intranet, preventing it from being leaked to devices on the Internet side.

[0041] By extracting application-layer streaming media data from the RTMP protocol, the RTMP and lower-layer protocol data are stripped away, and the data enters the work intranet through a private protocol and a one-way transmission channel, making it impossible to launch network attacks from the RTMP and lower-layer protocols, thus ensuring the security of the imported data.

[0042] By collecting streaming media data through both publish and subscribe modes, it is applicable to all current mainstream scenarios, requires no modification to the existing deployment topology, and is imperceptible to users on both the video publishing and playback ends.

[0043] The RTMP publishing mode can receive streaming media data from all legitimate video publishing terminals, facilitating the access of a large number of terminals to the work intranet and enabling real-time viewing of streaming media videos published by all terminals on the Internet within the work intranet.

[0044] The RTMP subscription model allows users to subscribe to streaming video on the internet on demand, enabling strict control over intranet users and limiting the range of streaming videos they can watch.

[0045] The modules in this application are all independent software modules, which can be deployed independently on the server or integrated into the device through a one-way import process, making them highly flexible in use. Attached Figure Description

[0046] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1This is a schematic diagram of the internal structure of an RTMP one-way proxy system based on a one-way import device, provided in an embodiment of this application.

[0048] Figure 2 This is a schematic diagram of an integrated deployment RTMP publishing mode based on a one-way import device provided in an embodiment of this application.

[0049] Figure 3 This is a schematic diagram of an independently deployed RTMP publishing mode based on a one-way import device, provided in an embodiment of this application.

[0050] Figure 4 This is a schematic diagram of an integrated deployment RTMP subscription mode based on a one-way import device provided in an embodiment of this application.

[0051] Figure 5 This is a schematic diagram of an independently deployed RTMP subscription mode based on a one-way import device, provided in an embodiment of this application.

[0052] Figure 6 This is a flowchart of an RTMP one-way proxy method based on a one-way import device provided in an embodiment of this application.

[0053] Figure 7 This is a schematic diagram of the internal structure of an RTMP one-way proxy device based on a one-way import device, provided in an embodiment of this application.

[0054] Explanation of main figure symbols

[0055] 1. RTMP streaming device A; 2. Streaming media service relay module; 3. One-way sending program; 4. One-way receiving program; 5. Simulated terminal publishing module; 6. Intranet RTMP streaming media server; 7. Playback client; 8. RTMP streaming device B; 9. Extranet RTMP streaming media server; 10. Simulated terminal subscription module; 11. One-way import device. Detailed Implementation

[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] Those skilled in the art should understand that the embodiments described below are merely preferred embodiments of this disclosure and do not imply that this disclosure can only be implemented through these preferred embodiments. These preferred embodiments are merely used to explain the technical principles of this disclosure and are not intended to limit the scope of protection of this disclosure. Based on the preferred embodiments provided by this disclosure, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of this disclosure.

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

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

[0060] like Figure 1 As shown in the figure, this application provides an RTMP one-way proxy system based on a one-way import device. The system provided in this application mainly includes:

[0061] Streaming media service relay module 2: This is a service program that can be independently deployed on the external network unit of the one-way import device 11 or on the Internet side. It is responsible for accessing RTMP push end devices A1 such as cameras and recorders, receiving the streaming media data they publish, stripping the streaming media data from the protocol, extracting the streaming media data, and sending it to the one-way sending program 3 of the external network unit of the one-way import device 11.

[0062] The simulated terminal subscription module 10 is a simulated terminal program that can be independently deployed on the external network unit or Internet side of the one-way import device 11. It is responsible for subscribing to live video from the external RTMP streaming media server 9, receiving streaming media data sent to the streaming media server by the RTMP push end device B8, and extracting streaming media data to forward to the one-way transmission program 3 of the one-way import external network unit.

[0063] Simulated terminal publishing module 5: This is a simulated terminal program that can be independently deployed on the intranet unit of the one-way import device 11 or the working intranet side. It is responsible for receiving streaming media data from the one-way receiving program 4 and simulating the streaming client to publish the streaming media data to the intranet RTMP streaming media server 6 of the working intranet.

[0064] Specifically, such as Figure 1As shown, the system is divided into RTMP publish mode and RTMP subscribe mode;

[0065] The RTMP publishing modes include:

[0066] A streaming media service relay module 2 connected to an RTMP streaming end device A1 (for example, the RTMP streaming end device A1 includes a camera and a recorder); a one-way sending program 3 connected to the streaming media service relay module 2; a one-way receiving program 4 connected to the one-way sending program 3 via a one-way isolated transmission channel; and an analog terminal publishing module 5 connected to the one-way receiving program 4.

[0067] Among them, the one-way sending program 3 is deployed in the external network unit of the one-way import device 11, the one-way receiving program 4 is deployed in the internal network unit of the one-way import device 11, the streaming media service relay module 2 is independently deployed in the external network unit or Internet side of the one-way import device 11; the simulated terminal publishing module 5 is independently deployed in the internal network unit or working internal network side of the one-way import device 11, and the simulated terminal publishing module 5 is connected to the internal network RTMP streaming media server 6; the simulated terminal publishing module 5 for publishing video is connected to the internal network RTMP streaming media server 6, and the internal network RTMP streaming media server 6 is connected to the playback client 7 that subscribes to the video.

[0068] More specifically, such as Figure 2 As shown, the streaming media service relay module 2 is independently deployed in the external network unit of the one-way import device 11, and the simulated terminal publishing module 5 is independently deployed in the internal network unit of the one-way import device 11. Figure 2 In the diagram, the camera and recorder correspond to RTMP streaming device A1; the one-way sending program 3 in the internal network unit is not shown, and the one-way receiving program 4 in the external network unit is not shown. Figure 3 As shown, the streaming media service relay module 2 is deployed on the Internet side, and the simulated terminal publishing module 5 is deployed on the intranet side.

[0069] The RTMP subscription models include:

[0070] The analog terminal subscription module 10 is connected to the external RTMP streaming media server 9 (which is connected to the external RTMP streaming terminal device B8), the one-way sending program 3 is connected to the analog terminal subscription module 10, the one-way receiving program 4 is connected to the one-way sending program 3 through a one-way isolated transmission channel, and the analog terminal publishing module 5 is connected to the one-way receiving program 4; the analog terminal publishing module 5 for publishing video is connected to the internal RTMP streaming media server 6, and the internal RTMP streaming media server 6 is connected to the playback client 7 for the subscribed video.

[0071] Among them, the analog terminal subscription module 10 is independently deployed on the external network unit or Internet side of the one-way import device 11.

[0072] More specifically, such as Figure 4 As shown, the simulated terminal subscription module 10 is independently deployed in the external network unit of the one-way import device 11, and the simulated terminal publishing module 5 is independently deployed in the internal network unit of the one-way import device 11. Figure 4 In the diagram, the camera and recorder correspond to RTMP streaming device B8; the one-way sending program 3 in the internal network unit is not shown, and the one-way receiving program 4 in the external network unit is not shown. Figure 5 As shown, the simulated terminal subscription module 10 is deployed on the Internet side, and the simulated terminal publishing module 5 is deployed on the intranet side.

[0073] Based on the above description, in this embodiment, under RTMP publishing mode: the streaming media service relay module 2 receives the raw streaming media data collected by the RTMP push-end device A1; the streaming media service relay module 2 obtains the streaming media data stripped of the original protocol, encapsulates the streaming media data according to the private communication protocol of the one-way import device 11, and sends the encapsulated streaming media data to the one-way sending program 3. Under RTMP subscription mode: the simulated terminal subscription module 10 obtains the subscribed raw streaming media data from the subscribed external network RTMP streaming media server 9; the simulated terminal subscription module 10 obtains the streaming media data stripped of the original protocol, encapsulates the streaming media data according to the private communication protocol of the one-way import device 11, and sends the encapsulated streaming media data to the one-way sending program 3. In either RTMP publish or RTMP subscription mode, after the encapsulated streaming media data is sent to the one-way sending program 3, the one-way sending program 3 strips the private communication protocol from the encapsulated streaming media data to obtain the streaming media data, encapsulates the streaming media data, and sends it to the one-way receiving program 4. After receiving the encapsulated streaming media data, the one-way receiving program 4 decapsulates and reassembles the protocol, and then forwards it to the simulated terminal publishing module 5. The simulated terminal publishing module 5 sends the reassembled streaming media data to the intranet RTMP streaming media server 6.

[0074] This application achieves unidirectional encapsulated transmission of data streams in RTMP publishing mode through the collaborative design of the streaming media service relay module 2 and the one-way sending program 3. After receiving data from the RTMP push-end device, the streaming media service relay module 2 encapsulates the data into a format supported by the one-way import device 11 by the one-way sending program 3, and transmits it to the one-way receiving program 4 of the intranet unit through a physically isolated channel. This process completely avoids the bidirectional communication requirement of the traditional RTMP protocol handshake phase, enabling internet camera data to enter the intranet in a unidirectional flow. In RTMP subscription mode, the simulated terminal subscription module 10 actively pulls the data stream from the external network streaming media server, and also performs unidirectional encapsulation through the one-way sending program 3. Finally, the simulated terminal publishing module 5 on the intranet side pushes the data to the intranet RTMP streaming media server 6. This architecture design completely solves the unidirectional transmission bottleneck problem caused by the reliance on bidirectional communication for protocol handshake in traditional solutions.

[0075] The beneficial effect of this application lies in its modular design, which achieves seamless one-way proxying of the RTMP protocol. The dual-mode support of the streaming media service relay module 2 and the analog terminal subscription module 10 covers both scenarios where internet cameras actively publish data and scenarios where the intranet actively subscribes to an external streaming media server. The paired deployment of the one-way sending program 3 and the one-way receiving program 4 ensures the one-way transmission characteristic of data in the physically isolated channel. Simultaneously, through the protocol conversion function of the analog terminal publishing module 5, the intranet RTMP streaming media server 6 can normally process the one-way imported data stream. This design not only retains the native functionality of the RTMP protocol but also meets the security requirements of scenarios with strict one-way data flow through the physical isolation characteristics of the one-way channel.

[0076] In addition, the embodiment provides an RTMP one-way proxy method based on a one-way import device, such as... Figure 6 As shown in the embodiments of this application, the method mainly includes the following steps:

[0077] Step 110: In RTMP publishing mode: Receive the raw streaming media data collected by RTMP push-end device A through the streaming media service relay module; obtain the streaming media data stripped of the original protocol through the streaming media service relay module; encapsulate the streaming media data according to the private communication protocol of the one-way import device; and send the encapsulated streaming media data to the one-way sending program.

[0078] In some embodiments, before receiving the raw streaming media data collected by RTMP push-end device A through the streaming media service relay module, the method further includes:

[0079] The RTMP streaming device A on the Internet side (such as cameras or recorders on the Internet side) establishes a connection with the streaming media service relay module through a handshake, and performs identity authentication and control signaling interaction.

[0080] In step 110, before sending the encapsulated streaming media data to the one-way transmission program, the specific steps can be as follows:

[0081] Step S11: The camera, recorder and other devices on the Internet side establish a connection with the streaming media service relay module through a handshake, and perform identity authentication and control signaling interaction;

[0082] Step S12: The RTMP streaming media service relay module receives streaming media data containing the original protocol pushed by devices such as cameras and recorders, and strips off the original protocol to extract only the streaming media data;

[0083] Step S13: The RTMP streaming media service relay module encapsulates the streaming media data into TCP according to the private communication protocol of the one-way import device and sends it to the one-way sending program on the external network of the one-way import device.

[0084] After sending the encapsulated streaming media data to the one-way transmission program, this application may include:

[0085] Step S14: After receiving the streaming media data sent by the RTMP streaming media service relay module, the one-way sending program of the one-way import device's external network unit performs protocol stripping (TCP) and data encapsulation on the data, and sends it to the one-way receiving program of the internal network unit through the one-way isolated transmission channel.

[0086] Step S15: After receiving the data sent by the one-way sending program of the external network unit, the one-way receiving program of the one-way import device decapsulates the data, reassembles the private protocol, and forwards it to the simulated terminal publishing module.

[0087] Step S16: The simulated terminal publishing module registers and authenticates with the RTMP streaming media server on the intranet, and completes the RTMP protocol handshake to establish a connection;

[0088] Step S17: After receiving the private streaming media protocol data sent by the one-way receiving program of the one-way import device, the simulated terminal publishing module extracts the streaming media data, performs RTMP protocol reassembly, and publishes the RTMP protocol streaming media data to the intranet RTMP streaming media server on the work intranet.

[0089] Step S18: Intranet users can use a playback client (RTMP player) to subscribe to video content from the intranet RTMP streaming media server and play video content from the internet.

[0090] Step 120: In RTMP subscription mode: Obtain the subscribed raw streaming media data from the subscribed external RTMP streaming media server through the simulated terminal subscription module; obtain the streaming media data stripped of the original protocol through the simulated terminal subscription module, encapsulate the streaming media data according to the private communication protocol of the one-way import device, and send the encapsulated streaming media data to the one-way sending program.

[0091] Before obtaining the subscribed raw streaming media data from the subscribed external RTMP streaming media server via the simulated terminal subscription module, the method also includes:

[0092] The RTMP streaming device B on the Internet side establishes a connection with the RTMP streaming media server on the Internet through a handshake, and performs identity authentication, control signaling interaction and video publishing.

[0093] The analog terminal subscription module establishes a connection with the Internet's RTMP streaming media server through a handshake, performs identity authentication and control signaling interaction, and subscribes to the desired on-demand videos.

[0094] In step 120, before sending the encapsulated streaming media data to the one-way transmission program, the specific steps can be as follows:

[0095] Step S21: The camera, recorder and other devices on the Internet side (RTMP streaming device B) establish a connection with the RTMP streaming media server on the Internet through a handshake, and perform identity authentication, control signaling interaction and video publishing.

[0096] Step S22: The simulated terminal subscription module establishes a connection with the external RTMP streaming media server on the Internet through a handshake, performs identity authentication and control signaling interaction, and subscribes to the required on-demand video;

[0097] Step S22: The simulated terminal subscription module receives raw streaming media data published by devices such as cameras and recorders (RTMP push end device B) from the external RTMP streaming media server on the Internet, and strips the original RTMP protocol to extract only the streaming media data;

[0098] Step S23: The simulated terminal subscription module encapsulates the streaming media data according to the private communication protocol of the one-way import device and sends it to the one-way sending program on the external network of the one-way import device.

[0099] In step 120, after sending the encapsulated streaming media data to the one-way transmission program, this application may include:

[0100] Step S24: After receiving the streaming media data sent by the analog terminal subscription module, the one-way sending program of the one-way import device external network unit performs protocol stripping and data encapsulation on the data, and sends it to the one-way receiving program of the internal network unit through the one-way isolated transmission channel.

[0101] Step S25: After receiving the data sent by the one-way sending program of the external network unit, the one-way receiving program of the one-way import device decapsulates the data, reassembles the private protocol, and forwards it to the simulated terminal publishing module.

[0102] Step S26: The simulated terminal publishing module registers and authenticates with the RTMP streaming media server on the intranet, and completes the RTMP protocol handshake to establish a connection;

[0103] Step S27: After receiving the private streaming media protocol data sent by the one-way receiving program of the one-way import device, the simulated terminal publishing module extracts the streaming media data, performs RTMP protocol reassembly, and publishes the RTMP protocol streaming media data to the intranet RTMP streaming media server on the work intranet.

[0104] Step S28: Intranet users can use a playback client (RTMP player) to subscribe to video content from the intranet RTMP streaming media server and play video content from the internet.

[0105] Step 130: In RTMP publish mode or RTMP subscription mode, after sending the encapsulated streaming media data to the one-way sending program, the one-way sending program strips the private communication protocol from the encapsulated streaming media data to obtain the streaming media data, encapsulates the streaming media data, and sends it to the one-way receiving program; after receiving the encapsulated streaming media data, the one-way receiving program decapsulates and reassembles the protocol, and then forwards it to the simulated terminal publishing module; the simulated terminal publishing module sends the reassembled streaming media data to the intranet RTMP streaming media server.

[0106] In some embodiments, after the simulated terminal publishing module sends the reconstructed streaming media data to the intranet RTMP streaming media server, the method further includes:

[0107] The internal RTMP streaming media server sends the video to the subscribed playback clients.

[0108] Based on the above description, step 130 can be specifically described as follows:

[0109] Step S31: After receiving the streaming media data sent by the analog terminal subscription module, the one-way sending program of the one-way import device external network unit performs protocol stripping and data encapsulation on the data, and sends it to the one-way receiving program of the internal network unit through the one-way isolated transmission channel.

[0110] Step S32: After receiving the data sent by the one-way sending program of the external network unit, the one-way receiving program of the one-way import device decapsulates the data, reassembles the private protocol, and forwards it to the simulated terminal publishing module.

[0111] Step S33: The simulated terminal publishing module registers and authenticates with the RTMP streaming media server on the intranet, and completes the RTMP protocol handshake to establish a connection.

[0112] Step S34: After receiving the private streaming media protocol data sent by the one-way receiving program of the one-way import device, the simulated terminal publishing module extracts the streaming media data, performs RTMP protocol reassembly, and publishes the RTMP protocol streaming media data to the intranet RTMP streaming media server on the work intranet.

[0113] Step S35: Intranet users can use a playback client (RTMP player) to subscribe to video content from the intranet RTMP streaming media server and play video content from the internet.

[0114] As described above, this embodiment achieves unidirectional encapsulation and transmission of data streams in RTMP publishing mode through the collaborative design of the streaming media service relay module and the one-way sending program. After receiving data from the RTMP push-end device, the streaming media service relay module encapsulates the data into a format supported by the one-way import device and transmits it to the one-way receiving program of the intranet unit through a physically isolated channel. This process completely avoids the bidirectional communication requirement of the traditional RTMP protocol handshake phase, enabling internet camera data to enter the intranet in a unidirectional flow. In RTMP subscription mode, the simulated terminal subscription module actively pulls the data stream from the external streaming media server, also performs unidirectional encapsulation through the one-way sending program, and finally pushes the data to the intranet RTMP streaming media server by the simulated terminal publishing module on the intranet side. This architecture design completely solves the unidirectional transmission bottleneck problem caused by the reliance on bidirectional communication for protocol handshake in traditional solutions.

[0115] A modular design enables seamless one-way proxying of the RTMP protocol. Dual-mode support for the streaming media service relay module and the analog terminal subscription module covers both scenarios where internet cameras actively publish data and scenarios where internal networks actively subscribe to external streaming media servers. The paired deployment of one-way sending and receiving programs ensures the one-way transmission characteristic of data in physically isolated channels. Simultaneously, the protocol conversion function of the analog terminal publishing module enables internal RTMP streaming media servers to properly handle one-way imported data streams. This design not only retains the native functionality of the RTMP protocol but also meets the security requirements of scenarios with strict one-way data flow through the physical isolation of the one-way channel.

[0116] The above are method embodiments of this application. Based on the same inventive concept, this application also provides an RTMP one-way proxy device based on a one-way import device. Figure 7As shown, the device includes: a processor; and a memory storing executable code, which, when executed, causes the processor to perform an RTMP one-way proxy method based on a one-way import device as described in the above embodiment.

[0117] Specifically, on the server side, in RTMP publishing mode: the server receives raw streaming media data collected by RTMP push device A through the streaming media service relay module; the server obtains streaming media data stripped of the original protocol through the streaming media service relay module, encapsulates the streaming media data according to the private communication protocol of the one-way import device, and sends the encapsulated streaming media data to the one-way sending program; in RTMP subscription mode: the server obtains subscribed raw streaming media data from the subscribed external RTMP streaming media server through the simulated terminal subscription module; the server obtains streaming media data stripped of the original protocol through the simulated terminal subscription module, encapsulates the streaming media data according to the private communication protocol of the one-way import device, and sends the encapsulated streaming media data to the one-way sending program; in either RTMP publishing or RTMP subscription mode, after sending the encapsulated streaming media data to the one-way sending program, the one-way sending program strips the private communication protocol from the encapsulated streaming media data to obtain streaming media data, encapsulates the streaming media data, and sends it to the one-way receiving program; the one-way receiving program receives the encapsulated streaming media data, decapsulates and reassembles the protocol, and then forwards it to the simulated terminal publishing module; the simulated terminal publishing module sends the reassembled streaming media data to the internal RTMP streaming media server.

[0118] In addition, embodiments of this application also provide a non-volatile computer storage medium storing executable instructions, which, when executed, implement the RTMP one-way proxy method based on a one-way import device as described above.

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

Claims

1. A one-way proxy system based on a one-way import device RTMP, characterized in that, The system comprises: RTMP publishing mode and RTMP subscription mode; The RTMP publishing mode comprises: A streaming media service relay module connected with the RTMP push streaming terminal device A, a one-way sending program connected with the streaming media service relay module, a one-way receiving program connected with the one-way sending program through a one-way isolated transmission channel, and an analog terminal publishing module connected with the one-way receiving program; The RTMP push streaming terminal device A on the Internet side establishes a connection with the streaming media service relay module through handshaking, performs identity authentication, and interacts with control signaling; the one-way sending program is deployed in an external network unit of the one-way import device, the one-way receiving program is deployed in an internal network unit of the one-way import device, the streaming media service relay module is independently deployed in the external network unit of the one-way import device or on the Internet side; and the analog terminal publishing module is independently deployed in the internal network unit of the one-way import device or on the working internal network side, and is connected with an internal network RTMP streaming media server. The RTMP subscription mode comprises: An analog terminal subscription module connected with a subscribed external network RTMP streaming media server, a one-way sending program connected with the analog terminal subscription module, a one-way receiving program connected with the one-way sending program through a one-way isolated transmission channel, and an analog terminal publishing module connected with the one-way receiving program; The analog terminal subscription module is independently deployed in the external network unit of the one-way import device or on the Internet side.

2. The RTMP one-way proxy system based on the one-way import device according to claim 1, wherein The analog terminal publishing module publishing a video is connected with the internal network RTMP streaming media server, and the internal network RTMP streaming media server is connected with a playing client subscribing a video.

3. The RTMP unidirectional proxy system based on unidirectional import device according to claim 1, wherein, The RTMP push streaming terminal device A comprises a camera and a recorder.

4. The RTMP one-way proxy system based on the one-way import device according to claim 1, wherein The subscribed external network RTMP streaming media server is connected with an external RTMP push streaming terminal device B.

5. A method for RTMP unidirectional proxy based on unidirectional propagation equipment, applied to the RTMP unidirectional proxy system based on unidirectional propagation equipment in claim 1, characterized in that, The method comprises: In the RTMP publishing mode: the RTMP push streaming terminal device A on the Internet side establishes a connection with the streaming media service relay module through handshaking, performs identity authentication, and interacts with control signaling; the streaming media service relay module receives raw streaming media data collected by the RTMP push streaming terminal device A; the streaming media service relay module obtains streaming media data stripped of a raw protocol, encapsulates the streaming media data according to a private communication protocol of the one-way import device, and sends the encapsulated streaming media data to the one-way sending program; In the RTMP subscription mode: the analog terminal subscription module obtains subscribed raw streaming media data from the subscribed external network RTMP streaming media server; the analog terminal subscription module obtains streaming media data stripped of a raw protocol, encapsulates the streaming media data according to a private communication protocol of the one-way import device, and sends the encapsulated streaming media data to the one-way sending program; The RTMP publishing mode or the RTMP subscription mode is used to send the encapsulated stream media data to the one-way sending program, to strip the encapsulated stream media data by the one-way sending program, to obtain the stream media data, to encapsulate the stream media data, and to send the encapsulated stream media data to the one-way receiving program; the one-way receiving program receives the encapsulated stream media data, performs unencapsulation and protocol recombination, and then forwards the recombined stream media data to the analog terminal publishing module; and the analog terminal publishing module sends the recombined stream media data to the intranet RTMP stream media server.

6. The RTMP unidirectional proxy method based on unidirectional import device according to claim 5, characterized in that, After the analog terminal publishing module sends the recombined stream media data to the intranet RTMP stream media server, the method further includes: The intranet RTMP stream media server sends the video to the subscribed playback client.

7. The RTMP unidirectional proxy method based on unidirectional import device according to claim 5, wherein, Before the analog terminal subscription module obtains the subscribed original stream media data from the subscribed extranet RTMP stream media server, the method further includes: The RTMP stream pushing terminal device B on the Internet side establishes a connection with the RTMP stream media server on the Internet through handshaking, performs identity authentication, interacts with control signaling, and publishes a video; The analog terminal subscription module establishes a connection with the RTMP stream media server on the Internet through handshaking, performs identity authentication, interacts with control signaling, and subscribes to a required on-demand video.

8. A unidirectional proxy device for RTMP based on a unidirectional import device, characterized in that, The device includes: a processor; and a memory having executable code stored thereon that, when executed, causes the processor to perform a one-way proxy method for RTMP based on a one-way import device according to any one of claims 5-7.

9. A non-transitory computer storage medium, comprising, a memory having executable code stored thereon that, when executed, causes the processor to perform a one-way proxy method for RTMP based on a one-way import device according to any one of claims 5-7.

Citation Information

Patent Citations

  • Video stream one-way import system and method based on multicast proxy technology

    CN116033237A