CN112565234B - Cross-network transmission system and method based on WebRTC - Google Patents

Cross-network transmission system and method based on WebRTC Download PDF

Info

Publication number
CN112565234B
CN112565234B CN202011373564.1A CN202011373564A CN112565234B CN 112565234 B CN112565234 B CN 112565234B CN 202011373564 A CN202011373564 A CN 202011373564A CN 112565234 B CN112565234 B CN 112565234B
Authority
CN
China
Prior art keywords
network
server
public security
webrtc
room
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011373564.1A
Other languages
Chinese (zh)
Other versions
CN112565234A (en
Inventor
窦强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Fiberhome Digtal Technology Co Ltd
Original Assignee
Wuhan Fiberhome Digtal Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Fiberhome Digtal Technology Co Ltd filed Critical Wuhan Fiberhome Digtal Technology Co Ltd
Priority to CN202011373564.1A priority Critical patent/CN112565234B/en
Publication of CN112565234A publication Critical patent/CN112565234A/en
Application granted granted Critical
Publication of CN112565234B publication Critical patent/CN112565234B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/1016IP multimedia subsystem [IMS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/4061Push-to services, e.g. push-to-talk or push-to-video
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • H04N21/25866Management of end-user data
    • H04N21/25891Management of end-user data being end-user preferences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Computer Graphics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a cross-network transmission system and a method based on WebRTC, wherein the system comprises a public security network WebRTC server, a public security network proxy server, a public security network STUN/TURN server, a mobile network WebRTC server, a mobile network proxy server, a mobile network STUN/TURN server, a database gatekeeper server and an RTSP video gatekeeper server; the WebRTC server is used for room management, stream management and comprises a bottom layer WebRTC protocol; the proxy server is used for signaling message conversion and media protocol conversion; the STUN/TURN server is used for ICE to realize the intranet penetration function; the database network gate server is used for carrying out one-way synchronization on the ferrying data table from the public security network to the mobile police network and the ferrying data table from the mobile police network to the public security network so as to realize cross-network transmission of messages; and the RTSP video gateway server is used for ferrying the media stream which complies with the RTSP protocol in the mobile police network to the public security network. Under the condition of meeting the network safety specification, the invention realizes cross-network transmission by means of the gatekeeper safety equipment, so that the system is suitable for more communication scenes.

Description

Cross-network transmission system and method based on WebRTC
Technical Field
The invention relates to the field of audio and video communication in the public security industry, in particular to a cross-network transmission system and method based on WebRTC.
Background
With the rapid development of the current mobile internet technology, the application of the public security industry to intelligent mobile terminals is becoming mature day by day, and although the traditional digital talkback, analog talkback and other systems still occupy a place in the command and scheduling work, the single voice information scheduling function provided by the traditional digital talkback, analog talkback and other systems cannot meet the diversity requirements of the command work on information. After google opens the source of WebRTC in 2010, the threshold of the video call technology is greatly reduced, so that more people are willing to participate in the development of the function, but a new problem arises, the public security service is considered in network security, a public security information network and a mobile police service network are divided into two different networks, data exchange between the networks can be performed only by using a network gate security device under the condition of following the relevant public security standard, but no network gate device supporting the WebRTC exists on the market at present, so that audio and video communication between a public security PC end and the mobile police service network based on the WebRTC becomes difficult.
Disclosure of Invention
The invention aims to provide a cross-network transmission system and a cross-network transmission method based on WebRTC, and aims to solve the problem of audio and video communication between a PC (personal computer) end and a mobile police service network in a public security network based on WebRTC.
The invention is realized by the following steps:
on one hand, the invention provides a cross-network transmission system based on WebRTC, which comprises a public security network WebRTC server, a public security network proxy server, a public security network STUN/TURN server, a mobile network WebRTC server, a mobile network proxy server, a mobile network STUN/TURN server, a database gateway server and an RTSP video gateway server, wherein the public security network WebRTC server, the public security network proxy server and the public security network STUN/TURN server are arranged in a public security network;
the public security network WebRTC server and the mobile network WebRTC server are used for stream management and contain the realization of a bottom layer WebRTC protocol, and the mobile network WebRTC server is also used for room management;
the public security network proxy server and the mobile network proxy server are used for signaling message conversion and media protocol conversion;
the public security network STUN/TURN server and the mobile network STUN/TURN server are used for ICE to realize an intranet penetration function;
the database network gate server is used for carrying out one-way synchronization on the ferrying data table from the public security network to the mobile police network and the ferrying data table from the mobile police network to the public security network so as to realize cross-network transmission of messages;
and the RTSP video gatekeeper server is used for ferrying the media stream which complies with the RTSP protocol in the mobile police service network to the public security network.
Further, the public security network WebRTC server comprises a Streaming management module and a WebRTC protocol layer; the mobile network WebRTC server comprises a Room management module, a Streaming management module and a WebRTC protocol layer;
the Room management module is used for managing the video stream of each call node and forwarding each audio and video stream to other mixed flow modules;
the Streaming management module is used for receiving and distributing the video stream from the agent module and supporting each terminal to subscribe the audio and video stream;
the WebRTC protocol layer is used for realizing a WebRTC protocol containing a bottom layer;
in a mobile police network, a Room management module receives a Room joining request from a terminal user, joins the user into the same Room according to the number of the Room to be joined by each user, and creates the Room if no Room exists; the Room management module receives the audio and video streams published by each participant and informs other participants in the Room to subscribe the video streams; when the audio and video stream is released in a room, the Streaming management module pulls the audio and video stream, forwards the audio and video stream to the mobile network proxy server, and waits for the video gateway server to pull the video stream; when a user leaves a Room, the Room management module informs other participants and informs the Streaming management module, and the Streaming management module informs the mobile network proxy server to close the audio/video stream; in the public security network, the Streaming management module receives a stream subscription request from a client user, informs a public security network proxy server according to a user identifier in the request, pulls an audio and video stream from an RTSP video gateway server by the public security network proxy server, and pushes the audio and video stream to the Streaming management module for the client to subscribe.
Furthermore, the public security network proxy server and the mobile network proxy server both comprise a signaling message conversion module, a streaming media conversion module and an RTSP server module;
the signaling message conversion module of the public security network proxy server is used for writing an http request needing cross-network in the public security network into a corresponding data table of the database network gate server, ferrying the http request to the mobile police network through the data table, monitoring the data table in the database network gate server, acquiring a message, converting the message into an http response, and sending the http response to the WebRTC server of the public security network;
the signaling message conversion module of the mobile network proxy server is used for writing an http response needing to be subjected to network crossing in the mobile police network into a corresponding data table of the database network gate server, ferrying the response to the public security network through the data table, monitoring the data table in the database network gate server, acquiring a message, converting the message into an http request, and sending the http request to each terminal participating in conversation in the mobile police network;
the streaming media conversion module of the mobile network proxy server is used for receiving the video from the Room management module, converting the video into an RTSP video stream, issuing the RTSP video stream to the RTSP server module, and allowing the RTSP video gateway server to subscribe the video stream;
the Streaming media conversion module of the public security network proxy server is used for subscribing a video stream from an RTSP video gatekeeper server, converting the acquired video stream into an RTP media stream and pushing the RTP media stream into the Streaming management module of the public security network WebRTC server;
and the RTSP server module of the mobile network proxy server is used for receiving the RTSP media stream from the streaming media conversion module and subscribing other servers or clients.
In another aspect, the present invention further provides a WebRTC-based cross-network transmission method, applied to any one of the above systems, including the following steps:
the public security network proxy server receives a session request from a client, converts the session request into a database message, and writes the database message into a ferrying data table g2m from a public security network to a mobile police network in a database gatekeeper server;
the mobile network proxy server monitors a database table g2m, when a new session request comes, a mobile network WebRTC server interface is called, a room is created, a room id is obtained, the session request and the room number are distributed to each terminal participating in the session in the mobile network, a session response message is created, the response message contains the room id, and the response message is written into a ferrying data table m2g of the public security network from a mobile police network in a database gatekeeper server;
the WebRTC server of the mobile network receives and processes a request of a terminal for joining a room, executes ICE operation, starts to receive audio and video stream data from the terminal after ICE interaction is successful, and pushes the audio and video stream to the RTSP video gatekeeper server;
the method comprises the steps that a mobile network proxy server monitors the situation of a media stream in a corresponding room on a mobile network WebRTC server, when a new media stream is added into the room, the media stream is pulled from the mobile network WebRTC server, converted into an RTSP format and pushed to an RTSP video gatekeeper server;
the public security network proxy server monitors the data table m2g, pulls a corresponding RTSP media stream to the RTSP video gatekeeper server after receiving a response message of the session request, converts the RTSP media stream, and pushes the RTSP media stream to a WebRTC server of the public security network for a client in the public security network to subscribe;
and the public security network WebRTC server receives a media subscription request of the terminal and pushes the media stream to the corresponding client.
Further, the operation flow of the mobile web WebRTC server is as follows:
receiving a room joining request of a terminal;
judging whether the room exists or not, if not, ending the process; if so, joining the room;
executing ICE operation, including collecting candidate addresses, exchanging SDP, STUN connection check, selecting and establishing media channel by both addresses, and heartbeat detection; if the ICE interaction is successful, the subsequent steps are carried out; if the failure occurs, the process is ended;
after the ICE interaction is successful, audio and video stream data from the terminal are received;
other members in the room are informed that the audio and video stream is published, and the channel of audio and video stream can be subscribed;
and pushing the video and audio stream to an RTSP video gateway server to finish the process.
Further, the operation flow of the public security network proxy server is as follows:
receiving a session request from a client, wherein the request carries an id of a session participation terminal;
converting the session request into a database message, and writing the database message into a ferry data table g2m from a public security network in a database gatekeeper server to a mobile police network;
starting monitoring of a ferry data table m2g from a mobile police service network to a public security network in a database network gate server, monitoring whether a response message of a session request exists, and entering a subsequent step if the response message exists; if not, continuing monitoring;
after receiving the session response message, pulling a corresponding RTSP media stream to an RTSP gateway server;
and after the RTSP media stream is pulled, the RTSP media stream is converted and pushed to a WebRTC server of the public security network for a client side in the public security network to subscribe.
Further, the operation flow of the mobile network proxy server is as follows:
monitoring a ferry database table g2m from the public security network to the mobile police network, and waiting for a session request.
Judging whether a new session request comes, if so, entering the subsequent step, otherwise, continuing monitoring;
calling a WebRTC server interface, creating a room and acquiring a room id;
distributing the session request and the room number to each terminal participating in the session in the mobile network;
creating a session response message, writing the response message into a ferry database table m2g from the mobile police service network to the public security network when the message contains the room id;
starting monitoring on the media stream condition of the room on the WebRTC server to see whether a new media stream is added into the room;
judging whether a new media stream is added into the room, and if so, entering the subsequent step; if not, the monitoring is continued.
Subscribing to a newly entered media stream from a WebRTC server;
and after the media stream is pulled from the WebRTC server, the media stream is converted into an RTSP format and pushed to an RTSP server module.
Further, the operation flow of the public security network WebRTC server is as follows:
receiving a media subscription request of a client;
judging whether the media stream exists or not, if not, ending the process; if yes, executing the subsequent steps;
and pushing the media stream to the corresponding client, and ending the process.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a cross-network transmission system and a cross-network transmission method based on WebRTC, which provide a solution for carrying out audio and video communication between a PC terminal in a public security network and a mobile police network based on WebRTC. The users in the public security network release the audio and video to the WebRTC server in the mobile police network through the mobile terminal beside the PC terminal, and the users in the public security network can receive the audio and video sent by the users in the public security network as long as the users in the mobile police network join the room, so that WebRTC audio and video communication between the public security network and the mobile network is realized; the STUN/TURN server can support cluster deployment and support the concurrency capability of a horizontal expansion system when the number of users is too large. Compared with the traditional WebRTC transmission system in the same network, the invention realizes cross-network transmission by means of the gatekeeper safety equipment under the condition of meeting the network safety specification, so that the system is suitable for more conversation scenes.
Drawings
Fig. 1 is a network topology diagram of a WebRTC-based cross-network transmission system according to an embodiment of the present invention;
fig. 2 is a block diagram of a cross-network transmission system based on WebRTC according to this embodiment;
fig. 3 is a flowchart illustrating an operation of a public security network WebRTC server in a WebRTC-based cross-network transmission method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating an operation of a WebRTC server in a WebRTC-based cross-network transmission method according to an embodiment of the present invention;
fig. 5 is a flowchart of a public security network proxy server in a WebRTC-based cross-network transmission method according to an embodiment of the present invention;
fig. 6 is a flowchart of a mobile web proxy server in a WebRTC-based cross-network transmission method according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1 and fig. 2, an embodiment of the present invention provides a WebRTC-based cross-network transmission system, which includes a public security network WebRTC server 201, a public security network proxy server 204, a public security network STUN/TURN server 208, a mobile network WebRTC server 213, a mobile network proxy server 214, a mobile network STUN/TURN server 215, which are disposed in a public security network, and a database gatekeeper server 209 and an RTSP video gatekeeper server 212, which are disposed between the public security network and the mobile security network;
the public security network WebRTC server 201 and the mobile network WebRTC server 213 are used for stream management and include underlying WebRTC protocol implementation, and the mobile network WebRTC server 213 is also used for room management;
the public security network proxy server 204 and the mobile network proxy server 214 are used for signaling message conversion and media protocol conversion, and specifically, http signaling messages are written into a database table, or messages in the database table are transferred into http messages and sent to a corresponding server or a client, so that the function of a signaling proxy server is achieved, and meanwhile, the mutual conversion of two streaming media protocols of RTSP and WebRTC is also supported, so that the function of a media proxy server is achieved;
the public security network STUN/TURN server 208 and the mobile network STUN/TURN server 215 are built based on a TURN open source server and are used for ICE to realize an intranet penetration function;
the database network gate server 209 is used for carrying out one-way synchronization on a ferrying data table from the public security network to the mobile police network and a ferrying data table from the mobile police network to the public security network, so as to realize cross-network transmission of messages;
the RTSP video gatekeeper server 212 is configured to ferry media streams complying with the RTSP protocol in the mobile police network to the public security network.
Specifically, the public security network WebRTC server 201 includes a Streaming management module 203 and a WebRTC protocol layer; the mobile network WebRTC server 213 comprises a Room management module 202, a Streaming management module 203, and a WebRTC protocol layer;
the Room management module 202 is configured to manage call rooms, and is specifically configured to manage video streams of each call node, participants in the rooms can subscribe and publish the video streams, and the Room management module 202 can forward each audio/video stream to other mixing modules;
the Streaming management module 203 is configured to manage streams, support publishing and subscribing of the streams, specifically, receive and distribute video streams from the agent module, and support each terminal to subscribe the audio/video streams.
The WebRTC protocol layer is used for realizing a WebRTC protocol containing a bottom layer, and realizes the encapsulation of the WebRTC bottom layer protocol, including but not limited to the realization of RTP/SRTP and ICE, and the like.
The method specifically comprises the following steps: in the mobile police service network, the Room management module 202 receives a Room joining request from a terminal user, joins the user into the same Room according to the number of the Room that each user needs to join, and creates the Room if no Room exists; the Room management module 202 receives the audio and video streams published by each participant and informs other participants in the Room to subscribe the video streams; when the audio/video stream is released in the room, the Streaming management module 203 pulls the audio/video stream, forwards the audio/video stream to the mobile network proxy server 214, and waits for the video gateway server to pull the video stream; when a user leaves the Room, the Room management module 202 informs other participants, and simultaneously informs the Streaming management module 203, and the Streaming management module 203 informs the mobile network proxy server 214 to close the audio and video stream. In the public security network, the Streaming management module 203 receives a stream subscription request from a client user, notifies the public security network proxy server 204 according to a user identifier in the request, and the public security network proxy server 204 pulls an audio/video stream to the RTSP video gatekeeper server 212 and pushes the audio/video stream to the Streaming management module 203 for the client to subscribe.
Further, the public security network proxy server 204 and the mobile network proxy server 214 each include a signaling message conversion module 205, a streaming media conversion module 206, and an RTSP server module 207;
the signaling message conversion module 205 of the public security network proxy server 204 is configured to write an http request needing to cross a network in the public security network into a corresponding data table of the database gatekeeper server 209, ferry the request to the mobile police network through the data table, monitor the data table in the database gatekeeper server 209, acquire a message, convert the message into an http response, and send the http response to the WebRTC server 201 of the public security network;
the signaling message conversion module 205 of the mobile network proxy server 214 is configured to write an http response that needs to be performed across networks in the mobile police network into a corresponding data table of the database gatekeeper server 209, ferry the http response to the public security network through the data table, monitor the data table in the database gatekeeper server 209, obtain a message, convert the message into an http request, and send the http request to each terminal participating in a session in the mobile police network;
the streaming media conversion module 206 of the mobile network proxy server 214 is configured to receive the video from the Room management module 202, convert the video into an RTSP video stream, and publish the RTSP video stream to the RTSP server module 207 for the RTSP video gateway server 209 to subscribe the video stream;
the Streaming media conversion module 206 of the public security network proxy server 204 is configured to subscribe to a video stream from the RTSP video gatekeeper server 212, convert the acquired video stream into an RTP media stream, and push the RTP media stream to the Streaming management module 203 of the public security network WebRTC server 201;
the RTSP server module 207 of the mobile network proxy server 214 is configured to receive an RTSP media stream from the streaming media conversion module, so that other servers or clients subscribe to the RTSP media stream.
The embodiment of the invention also provides a cross-network transmission method based on the WebRTC, which applies the cross-network transmission system based on the WebRTC and comprises the following steps:
the public security network proxy server receives a session request from a client, converts the session request into a database message, and writes the database message into a ferrying data table g2m from a public security network to a mobile police network in a database gatekeeper server;
the mobile network proxy server monitors a database table g2m, when a new session request comes, a mobile network WebRTC server interface is called, a room is created, a room id is obtained, the session request and the room number are distributed to each terminal participating in the session in the mobile network, a session response message is created, the response message contains the room id, and the response message is written into a ferrying data table m2g of the public security network from a mobile police network in a database gatekeeper server;
the WebRTC server of the mobile network receives and processes a request of a terminal for joining a room, executes ICE operation, starts to receive audio and video stream data from the terminal after ICE interaction is successful, and pushes the audio and video stream to the RTSP video gatekeeper server;
the method comprises the steps that a mobile network proxy server monitors the situation of a media stream in a corresponding room on a mobile network WebRTC server, when a new media stream is added into the room, the media stream is pulled from the mobile network WebRTC server, converted into an RTSP format and pushed to an RTSP video gatekeeper server;
the public security network proxy server monitors the data table m2g, pulls a corresponding RTSP media stream to the RTSP video gatekeeper server after receiving a response message of the session request, converts the RTSP media stream, and pushes the RTSP media stream to the WebRTC server of the public security network for a client in the public security network to subscribe;
and the public security network WebRTC server receives a media subscription request of the terminal and pushes the media stream to the corresponding client.
The operation flow of each server is described in detail below.
Referring to fig. 3, the operation flow of the public security network WebRTC server is as follows:
step 301, a media subscription request of a client is received.
Step 302, determining whether the media stream exists, if not, executing step 304, and ending the process; if so, go to step 303.
Step 303, pushing the media stream to the corresponding client, and ending the process.
Referring to fig. 4, the operation flow of the WebRTC server is as follows:
step 401, receiving a room joining request of a terminal;
step 402, judging whether the room exists, if not, executing step 406, and ending the process; if so, go to step 403.
Step 403, join the room, and go to step 404.
In step 404, ICE operations are performed, including collecting candidate addresses, exchanging SDP, STUN connection check, selecting and establishing media channel between two addresses, and heartbeat detection. If the ICE interaction is successful, go to step 408; if the failure is detected, step 407 is entered, and the process ends.
And step 408, after the ICE interaction is successful, starting to receive audio and video stream data from the terminal. And proceeds to step 409
Step 409, notifying other members in the room that the video stream is published and that the video stream can be subscribed. And proceeds to step 410
Step 410, the video and audio stream is pushed to the RTSP video gatekeeper server, and the process is ended.
Referring to fig. 5, the operation flow of the public security network proxy server is as follows:
step 501, receiving a session request from a client, where the request carries an id of a session participating terminal. Step 502 is entered.
Step 502, converting the session request into a database message, writing the database message into a ferry data table g2m from the public security network in the database gatekeeper server to the mobile police network, and entering step 503.
Step 503, starting monitoring of a ferry data table m2g from the mobile police service network to the public security network in the database gatekeeper server, and monitoring whether a response message of the session request exists. If there is a response message, go to step 504; if not, step 503 is entered and listening continues.
Step 504, after receiving the session response message, pulling the corresponding RTSP media stream to the RTSP gateway server. Step 505 is then entered.
Step 506, after the RTSP media stream is pulled, the RTSP media stream is converted and pushed to the WebRTC server of the public security network for the client in the public security network to subscribe.
Referring to fig. 6, the operation flow of the mobile network proxy server is as follows:
step 601, monitoring a ferrying database table g2m from the public security network to the mobile police service network, waiting for a session request, and entering step 602.
Step 602, determine whether a new session request arrives. If yes, go to step 603, otherwise go to step 601.
Step 603, calling a WebRTC server interface, creating a room, acquiring a room id, and entering step 604.
Step 604, the session request and the room number are distributed to each terminal participating in the session in the mobile network, and step 605 is entered.
Step 605, creating a session response message, including the room id in the message, and writing the response message into a ferry database table m2g from the mobile network to the public security network. Step 606 is then entered.
Step 606, start monitoring the room media stream situation on WebRTC server, see if there is a new media stream added to the room. Step 607 is then entered.
Step 607, determine if there is a new media stream added to the room. If yes, go to step 608; if not, go to step 606 and continue listening.
Step 608, subscribe the newly incoming media stream from the WebRTC server and proceed to step 609.
Step 609, after the media stream is pulled from the WebRTC server, the media stream is converted into an RTSP format and pushed to the RTSP server module.
In summary, the invention provides a WebRTC-based cross-network transmission system and method, and provides a solution for performing audio and video communication between a PC terminal in a public security network and a mobile police network based on WebRTC, because audio and video in the public security network cannot flow out, a public security network proxy server is placed beside a PC in the public security network, the public security network proxy server collects audio and video of a PC terminal user in the public security network, and distributes the audio and video to other users in the mobile police network, so that users in the mobile police network can distribute the audio and video to the public security network through the system, and users in the public security network can watch contents recorded by a terminal in the mobile police network by subscribing the audio and video on the WebRTC server in the public security network. The users in the public security network release the audio and video to the WebRTC server in the mobile police network through the mobile terminal beside the PC terminal, and the users in the public security network can receive the audio and video sent by the users in the public security network as long as the users in the mobile police network join the room, so that WebRTC audio and video communication between the public security network and the mobile network is realized; the STUN/TURN server can support cluster deployment and support the concurrency capability of a horizontal expansion system when the number of users is too large. Compared with the traditional WebRTC transmission system in the same network, the invention realizes cross-network transmission by means of the gatekeeper safety equipment under the condition of meeting the network safety specification, so that the system is suitable for more call scenes.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (4)

1. A cross-network transmission system based on WebRTC is characterized in that: the system comprises a public security network WebRTC server, a public security network proxy server, a public security network STUN/TURN server, a mobile network WebRTC server, a mobile network proxy server, a mobile network STUN/TURN server, a database gatekeeper server and an RTSP video gatekeeper server, wherein the public security network WebRTC server, the public security network proxy server and the public security network STUN/TURN server are arranged in a public security network;
the public security network WebRTC server and the mobile network WebRTC server are used for stream management and contain underlying WebRTC protocol for realization, and the mobile network WebRTC server is also used for room management;
the public security network WebRTC server comprises a Streaming management module and a WebRTC protocol layer; the mobile network WebRTC server comprises a Room management module, a Streaming management module and a WebRTC protocol layer;
the Room management module is used for managing the video stream of each call node and forwarding each audio and video stream to other mixed flow modules;
the Streaming management module is used for receiving and distributing the video stream from the agent module and supporting each terminal to subscribe the audio and video stream;
the WebRTC protocol layer is used for realizing a WebRTC protocol containing a bottom layer;
in a mobile police network, a Room management module receives a Room joining request from a terminal user, joins the user into the same Room according to the number of the Room to be joined by each user, and creates the Room if no Room exists; the Room management module receives the audio and video streams published by each participant and informs other participants in the Room to subscribe the video streams; when the audio and video stream is released in a room, the Streaming management module pulls the audio and video stream, forwards the audio and video stream to the mobile network proxy server, and waits for the video gateway server to pull the video stream; when a user leaves a Room, the Room management module informs other participants and informs the Streaming management module, and the Streaming management module informs the mobile network proxy server to close the audio/video stream; in the public security network, the Streaming management module receives a stream subscription request from a client user, informs a public security network proxy server according to a user identifier in the request, pulls an audio and video stream from an RTSP video gateway server by the public security network proxy server, and pushes the audio and video stream to the Streaming management module for the client to subscribe;
the public security network proxy server and the mobile network proxy server both comprise a signaling message conversion module, a streaming media conversion module and an RTSP server module;
the signaling message conversion module of the public security network proxy server is used for writing an http request needing cross-network in the public security network into a corresponding data table of the database network gate server, ferrying the http request to the mobile police network through the data table, monitoring the data table in the database network gate server, acquiring a message, converting the message into an http response, and sending the http response to the WebRTC server of the public security network;
the signaling message conversion module of the mobile network proxy server is used for writing an http response needing to be subjected to network crossing in the mobile police network into a corresponding data table of the database network gate server, ferrying the response to the public security network through the data table, monitoring the data table in the database network gate server, acquiring a message, converting the message into an http request, and sending the http request to each terminal participating in conversation in the mobile police network;
the streaming media conversion module of the mobile network proxy server is used for receiving the video from the Room management module, converting the video into an RTSP video stream, and issuing the RTSP video stream to the RTSP server module for the RTSP video gateway server to subscribe the video stream;
the Streaming media conversion module of the public security network proxy server is used for subscribing a video stream from an RTSP video gatekeeper server, converting the acquired video stream into an RTP media stream and pushing the RTP media stream into the Streaming management module of the public security network WebRTC server;
the RTSP server module of the mobile network proxy server is used for receiving the RTSP media stream from the stream media conversion module and subscribing other servers or clients;
the public security network proxy server and the mobile network proxy server are used for signaling message conversion and media protocol conversion;
the public security network STUN/TURN server and the mobile network STUN/TURN server are used for ICE to realize an intranet penetration function;
the database network gate server is used for carrying out one-way synchronization on the ferrying data table from the public security network to the mobile police network and the ferrying data table from the mobile police network to the public security network so as to realize cross-network transmission of messages;
and the RTSP video gateway server is used for ferrying the media stream which complies with the RTSP protocol in the mobile police network to the public security network.
2. A WebRTC-based cross-network transmission method applied to the system of claim 1, the method comprising the steps of:
the public security network proxy server receives a session request from a client, converts the session request into a database message, and writes the database message into a ferrying data table g2m from a public security network to a mobile police network in a database gatekeeper server;
the method comprises the steps that a mobile network proxy server monitors a ferry data table g2m, when a new session request comes, a mobile network WebRTC server interface is called, a room is created, a room id is obtained, the session request and the room number are distributed to each terminal participating in the session in the mobile network, a session response message is created, the response message contains the room id, and the response message is written into the ferry data table m2g of the public security network from a mobile police network in a database gatekeeper server;
the WebRTC server of the mobile network receives and processes a request of a terminal for joining a room, executes ICE operation, starts to receive audio and video stream data from the terminal after ICE interaction is successful, and pushes the audio and video stream to the RTSP video gatekeeper server;
the operation flow of the mobile network WebRTC server is as follows:
receiving a room joining request of a terminal;
judging whether the room exists or not, if not, ending the process; if so, joining the room;
executing ICE operation including collecting candidate addresses, exchanging SDP, STUN connection check, selecting and establishing media channel by both addresses, and heartbeat detection; if the ICE interaction is successful, the subsequent steps are carried out; if the failure occurs, the process is ended;
after the ICE interaction is successful, audio and video stream data from the terminal is received;
other members in the room are informed that the audio and video stream is published, and the channel of audio and video stream can be subscribed;
pushing the video and audio stream to an RTSP video gateway server, and ending the process;
the operation flow of the public security network proxy server is as follows:
receiving a session request from a client, wherein the request carries the id of a session participation terminal;
converting the session request into a database message, and writing the database message into a ferry data table g2m from a public security network in a database gatekeeper server to a mobile police network;
starting monitoring of a ferry data table m2g from a mobile police service network to a public security network in a database network gate server, monitoring whether a response message of a session request exists, and entering a subsequent step if the response message exists; if not, continuing monitoring;
after receiving the session response message, pulling a corresponding RTSP media stream to an RTSP gateway server;
after the RTSP media stream is pulled, the RTSP media stream is converted and pushed to a WebRTC server of the public security network for a client in the public security network to subscribe;
the method comprises the steps that a mobile network proxy server monitors the situation of a media stream in a corresponding room on a mobile network WebRTC server, when a new media stream is added into the room, the media stream is pulled from the mobile network WebRTC server, converted into an RTSP format and pushed to an RTSP video gatekeeper server;
the public security network proxy server monitors the ferry data table m2g, pulls a corresponding RTSP media stream to the RTSP video gateway server after receiving a response message of the session request, converts the RTSP media stream, and pushes the RTSP media stream to the WebRTC server of the public security network for a client in the public security network to subscribe;
and the public security network WebRTC server receives a media subscription request of the terminal and pushes the media stream to the corresponding client.
3. The WebRTC-based cross-network transmission method of claim 2, wherein the mobile web proxy server operates as follows:
monitoring a ferrying data table g2m from a public security network to a mobile police network, and waiting for a session request;
judging whether a new session request comes, if so, entering the subsequent step, otherwise, continuing monitoring;
calling a WebRTC server interface, creating a room and acquiring a room id;
distributing the session request and the room number to each terminal participating in the session in the mobile network;
creating a session response message, wherein the message contains a room id, and writing the response message into a ferry data table m2g from the mobile police service network to the public security network;
starting monitoring of the media stream condition of the room on the WebRTC server to see whether a new media stream is added into the room;
judging whether a new media stream is added into the room, and if so, entering the subsequent step; if not, continuing monitoring;
subscribing to a newly entered media stream from a WebRTC server;
and after the media stream is pulled from the WebRTC server, the media stream is converted into an RTSP format and pushed to an RTSP server module.
4. The WebRTC-based cross-network transmission method of claim 2, wherein the operation flow of the public security network WebRTC server is as follows:
receiving a media subscription request of a client;
judging whether the media stream exists or not, if not, ending the process; if yes, executing the subsequent steps;
and pushing the media stream to the corresponding client, and ending the process.
CN202011373564.1A 2020-11-30 2020-11-30 Cross-network transmission system and method based on WebRTC Active CN112565234B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011373564.1A CN112565234B (en) 2020-11-30 2020-11-30 Cross-network transmission system and method based on WebRTC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011373564.1A CN112565234B (en) 2020-11-30 2020-11-30 Cross-network transmission system and method based on WebRTC

Publications (2)

Publication Number Publication Date
CN112565234A CN112565234A (en) 2021-03-26
CN112565234B true CN112565234B (en) 2022-10-14

Family

ID=75045399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011373564.1A Active CN112565234B (en) 2020-11-30 2020-11-30 Cross-network transmission system and method based on WebRTC

Country Status (1)

Country Link
CN (1) CN112565234B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113132376B (en) * 2021-04-14 2022-11-22 腾讯科技(深圳)有限公司 Media data processing method, device and system, electronic equipment and storage medium
CN113612956B (en) * 2021-06-28 2024-04-05 武汉众智数字技术有限公司 Video storage and playback system and method based on WebRTC
CN113612734A (en) * 2021-07-13 2021-11-05 共道网络科技有限公司 Cross-network remote court trial media stream transmission method and device
CN113542906A (en) * 2021-07-20 2021-10-22 山东新一代信息产业技术研究院有限公司 RTSP video-based webpage plug-in-free playing method
CN113382026B (en) * 2021-08-16 2021-10-29 腾讯科技(深圳)有限公司 Data processing method, device, related equipment and storage medium
CN115459938A (en) * 2022-06-15 2022-12-09 武汉众智数字技术有限公司 Distributed message distribution system and method supporting cross-network transmission

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101860536B (en) * 2010-05-31 2014-05-07 北京邮电大学 Private network access system based on SIP soft phone and method thereof
CN104144316A (en) * 2013-05-06 2014-11-12 南京理工大学连云港研究院 Vehicle-mounted mobile video monitoring system based on streaming media technology
US10546037B2 (en) * 2015-05-06 2020-01-28 Unify Gmbh & Co. Kg Method, server and software product for controlling physical-side-browser functions of remote desktop or virtual desktop environments
CN107770141B (en) * 2016-08-23 2022-04-19 中兴通讯股份有限公司 Communication method and device of video conference system
CN106453289B (en) * 2016-09-29 2020-05-22 广州市千钧网络科技有限公司 Data transmission method and device for live video
US10362173B2 (en) * 2017-05-05 2019-07-23 Sorenson Ip Holdings, Llc Web real-time communication from an audiovisual file
CN107731230A (en) * 2017-11-10 2018-02-23 北京联华博创科技有限公司 A kind of court's trial writing-record system and method
CN109257344B (en) * 2018-09-06 2021-01-26 广州高清视信数码科技股份有限公司 WebRTC media gateway based on Docker container technology and interworking method thereof
CN109783570A (en) * 2018-12-10 2019-05-21 安徽四创电子股份有限公司 A kind of cross-border case data ferry-boat implementation method
CN109587450A (en) * 2018-12-20 2019-04-05 北京明朝万达科技股份有限公司 Method of transmitting video data and system
CN110740161B (en) * 2019-08-30 2022-05-13 武汉烽火众智数字技术有限责任公司 System and method for adapting converged communication

Also Published As

Publication number Publication date
CN112565234A (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN112565234B (en) Cross-network transmission system and method based on WebRTC
CN108055496B (en) Live broadcasting method and system for video conference
JP4494419B2 (en) Content server and content service system
CN110971863B (en) Multi-point control unit cross-area conference operation method, device, equipment and system
CN101895569B (en) Implementation method of video browsing, IMS video monitoring system and front monitoring front-end
JP2007533247A (en) System and method for monitoring multiple PoC sessions
WO2012079321A1 (en) Method, system and apparatus for providing stream media service
CN105376516A (en) Mobile video conference system and implementing method thereof
WO2011088656A1 (en) Method and system for implementing three-party call of videophone by mobile terminals
CN103491106A (en) Method and system for recording IP (internet protocol) calls based on SIP (session initiation protocol) protocol
CN111131759B (en) Real-time multimedia transmission system and use method thereof
CN113489687B (en) Audio and video information intercommunication method and client across multiple networks
CN108881149B (en) Access method and system of video telephone equipment
CN101938494B (en) Intelligent switching method for media connection modes in safe city video monitoring
CN112751827B (en) Application method and system of SIP multi-party session in broadband cluster
WO2012163075A1 (en) Video conferencing processing method, apparatus and communication system
CN108810669A (en) A kind of voice inter-speaking system and method for multistage architecture
CN109429108B (en) IOS mobile terminal watching terminal video microphone connecting method based on socket
CN112543301A (en) Intelligent conference system based on IMS and implementation method thereof
CN113612759B (en) High-performance high-concurrency intelligent broadcasting system based on SIP protocol and implementation method
CN109963108A (en) A kind of method and apparatus of one-to-many intercommunication
CN112203040B (en) Railway emergency communication method and system based on communication conference
CN102291366A (en) Method for realizing instant messaging of multi-media conference and user equipment
CN100388781C (en) Conference delay method
WO2014075483A1 (en) Method, device, and system for implementing multi-party conference call by using set top box

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant