CN116896546B - Visual intercom method, system and storage medium based on SRT communication protocol - Google Patents

Visual intercom method, system and storage medium based on SRT communication protocol Download PDF

Info

Publication number
CN116896546B
CN116896546B CN202311142068.9A CN202311142068A CN116896546B CN 116896546 B CN116896546 B CN 116896546B CN 202311142068 A CN202311142068 A CN 202311142068A CN 116896546 B CN116896546 B CN 116896546B
Authority
CN
China
Prior art keywords
srt
push
pull
link
address
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
CN202311142068.9A
Other languages
Chinese (zh)
Other versions
CN116896546A (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.)
Tsinghua University
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
Tsinghua University
China Mobile Hangzhou Information 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 Tsinghua University, China Mobile Hangzhou Information Technology Co Ltd filed Critical Tsinghua University
Priority to CN202311142068.9A priority Critical patent/CN116896546B/en
Publication of CN116896546A publication Critical patent/CN116896546A/en
Application granted granted Critical
Publication of CN116896546B publication Critical patent/CN116896546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/1066Session management
    • H04L65/1101Session protocols
    • 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/80Responding to QoS
    • 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
    • H04N7/147Communication arrangements, e.g. identifying the communication as a video-communication, intermediate storage of the signals

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Interconnected Communication Systems, Intercoms, And Interphones (AREA)

Abstract

The invention provides a visual intercom method, a system and a storage medium based on an SRT communication protocol, relating to the field of visual intercom processing, wherein the method comprises the following steps: responding to the first request information; generating a first SRT push-pull stream address; sending a first SRT push-pull stream address to a target end so as to establish a first SRT push-pull stream link with the target end; generating a second SRT push-pull stream address; sending a second SRT push-pull stream address to establish a second SRT push-pull stream link with the client; and transmitting the audio data and the video data according to the first SRT push-pull stream link and the second SRT push-pull stream link. The SRT protocol is combined with the URL technology, and the link can be conveniently and rapidly established with the media server through the first SRT push-pull stream address and the second SRT push-pull stream address, so that the link establishment process is simplified, video and audio are transmitted on the same SRT push-pull stream link channel, an intercom channel is not required to be additionally established, and the lightweight link establishment is realized.

Description

Visual intercom method, system and storage medium based on SRT communication protocol
Technical Field
The invention relates to the technical field of visual intercom processing, in particular to a visual intercom method, a system and a storage medium based on an SRT communication protocol.
Background
In the prior art, remote Real-time visual intercom has a mode based on RTMP (Real-Time Messaging Protocol) protocol and a scheme based on WebRTC technology. However, the RTMP protocol has the disadvantages of poor real-time performance, accumulated delay, no support for h.265 coding, etc., and in addition, the RTMP protocol is transmitted based on the TCP protocol, and it is difficult to pass through a firewall by using a non-public port 1935. In addition, since RTMP does not support two-way communication, if an intercom channel needs to be established, a voice intercom channel needs to be established separately, which increases the technical difficulty of implementation. For the WebRTC technology, P2P, namely point-to-point connection is used based on a browser, so that the security is poor, the video quality cannot be guaranteed in a complex network environment, the WebRTC technology is complex and light, and the deployment of a server scheme is lacking, so that the mass distribution of media data cannot be satisfied. In summary, the existing visual intercom method has the problems that the process of establishing a link channel is complex, the intercom channel needs to be additionally established, and the weight is not light enough.
Disclosure of Invention
The invention provides a visual intercom method, a visual intercom system and a storage medium based on an SRT communication protocol, which are used for solving the defects that the process of establishing a link channel is complex, the intercom channel needs to be additionally established and the weight is not light enough in the prior art.
The invention provides a visual intercom method based on SRT communication protocol, which is applied to a media server and comprises the following steps:
responding to first request information of a client, wherein the first request information comprises client identification information of the client and target identification information of a target;
generating a first SRT push-pull stream address corresponding to the target end according to the first request information and the URL format;
sending the first SRT push-pull stream address to the target end so as to establish a first SRT push-pull stream link with the target end;
generating a second SRT push-pull stream address according to the URL format according to the first SRT push-pull stream link and the first request information;
sending the second SRT push-pull stream address to the client so as to establish a second SRT push-pull stream link with the client;
transmitting audio data and video data between the client and the target according to the first SRT push-pull stream link and the second SRT push-pull stream link;
the first SRT push-pull stream address and the second SRT push-pull stream address are used for indicating that a link for push stream and pull stream multiplexing is established based on an SRT protocol.
According to the visual intercom method based on the SRT communication protocol provided by the invention, the first SRT push-pull stream address corresponding to the target end is generated according to the URL format according to the first request information, and the method comprises the following steps:
Determining target end identification information according to the first request information;
generating first key information according to the target end identification information;
generating the first SRT push-pull stream address according to the target end identification information and the first key information and the URL format;
the first SRT push-pull address includes an SRT protocol field, a first key field corresponding to the first key information, and a first push-pull identifier field.
According to the visual intercom method based on the SRT communication protocol provided by the invention, the second SRT push-pull stream address is generated according to the first SRT push-pull stream link and the first request information and the URL format, and the visual intercom method comprises the following steps:
when the first SRT push-pull stream link is established, determining client identification information according to the first request information;
generating second key information according to the client identification information;
generating the second SRT push-pull stream address according to the URL format according to the client identification information and the second key information;
the second SRT push-pull address includes an SRT protocol field, a second key field corresponding to the second key information, and a second push-pull identifier field.
According to the visual intercom method based on the SRT communication protocol provided by the present invention, the sending the first SRT push-pull address to the target end to establish a first SRT push-pull link with the target end includes:
sending the first SRT push-pull address to a signaling server to instruct the signaling server to forward the first SRT push-pull address to the target end;
responding to the second request information, and establishing a first SRT push-pull stream link with the target end;
wherein the second request information is generated based on the first SRT push-pull address.
According to the visual intercom method based on the SRT communication protocol provided by the present invention, the sending the second SRT push-pull stream address to the client so as to establish a second SRT push-pull stream link with the client includes:
sending the second SRT push-pull address to a signaling server to instruct the signaling server to forward the second SRT push-pull address to the client;
responding to third request information, and establishing a second SRT push-pull stream link with the client;
wherein the third request information is generated based on the second SRT push-pull address.
According to the visual intercom method based on the SRT communication protocol provided by the invention, after the audio data and the video data between the client and the target are transmitted according to the first SRT push-pull stream link and the second SRT push-pull stream link, the visual intercom method further comprises the following steps:
Closing the second SRT push-pull stream link in response to the stop request of the client;
and if the data cannot be acquired from the client and the preset time is continued, closing the first SRT push-pull stream link.
The visual intercom method based on the SRT communication protocol, provided by the invention, is applied to a client and comprises the following steps:
transmitting first request information to a signaling server, wherein the first request information comprises client identification information of a client and target identification information of a target;
acquiring a second SRT push-pull stream address from a signaling server;
establishing a second SRT push-pull stream link with a media server according to the second SRT push-pull stream address;
establishing a session keep-alive link with the signaling server, the session keep-alive link for maintaining the second SRT push-pull link;
and sending audio data to the media server according to the second SRT push-pull stream link to instruct the media server to forward the audio data to the target end, and acquiring the audio data and the video data of the target end from the media server.
According to the visual intercom method based on the SRT communication protocol provided by the present invention, after the audio data is sent to the media server according to the second SRT push-pull link to instruct the media server to forward the audio data to the target terminal, the method further comprises the steps of:
Closing the session keep-alive link with the signaling server in response to a stop operation;
and sending a stop request to the media server to close the second SRT push-pull link.
The visual intercom method based on the SRT communication protocol, provided by the invention, is applied to a target terminal and comprises the following steps:
acquiring a first SRT push-pull stream address;
establishing a first SRT push-pull stream link with a media server according to the first SRT push-pull stream address;
and sending video data and audio data to the media server according to the first SRT push-pull stream link to instruct the media server to forward the video data and the audio data to a client, and acquiring the audio data of the client from the media server.
According to the visual intercom method based on the SRT communication protocol provided by the present invention, after the video data and the audio data are sent to the media server according to the first SRT push-pull stream link to instruct the media server to forward the video data and the audio data to the client, the method further comprises:
and closing the first SRT push-pull stream link after the audio data of the client cannot be acquired from the media server and the preset time is continued.
The visual intercom method based on the SRT communication protocol, provided by the invention, is applied to a signaling server and comprises the following steps:
responding to first request information of a client, wherein the first request information comprises client identification information of the client and target identification information of a target;
forwarding the first request information to a media server to obtain a first SRT push-pull stream address;
sending the first SRT push-pull address to the target end so that the target end establishes a first SRT push-pull link with the media server based on the first SRT push-pull address;
acquiring a second SRT push-pull address from the media server;
and sending the second SRT push-pull address to the client so that the client establishes a second SRT push-pull link with the media server based on the second SRT push-pull address.
The invention also provides a visual intercom system, comprising: the system comprises client equipment, target equipment, a signaling server and a media server; the client device sends first request information to the signaling server; the signaling server forwards the first request information to the media server; the media server generates a first SRT push-pull address corresponding to the target terminal equipment according to the first request information and a URL format, and sends the first SRT push-pull address to the signaling server; the signaling server forwards the first SRT push-pull address to the target terminal device; the target end device establishes a first SRT push-pull stream link with the media server according to the first SRT push-pull stream address; the media server generates a second SRT push-pull address according to the first SRT push-pull link and the first request information, and sends the second SRT push-pull address to the signaling server; the signaling server forwards the second SRT push-pull address to the client device; the client device establishes a second SRT push-pull link with the media server according to the second SRT push-pull address; the media server obtains video data and audio data of the target terminal device according to the first SRT push-pull stream link and sends the audio data of the client terminal to the target terminal device, and obtains audio data of the client terminal device and sends the video data and the audio data of the target terminal device to the client terminal device according to the second SRT push-pull stream link.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the visual intercom method based on the SRT communication protocol when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a visual intercom method based on an SRT communication protocol as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a visual intercom method based on an SRT communication protocol as described in any of the above.
The visual intercom method based on the SRT communication protocol provided by the invention has at least the following beneficial effects: the media server generates a first SRT push-pull stream address according to the URL format according to the first request information, so that the target end establishes a first SRT push-pull stream link with the media server according to the first SRT push-pull stream address, after the first SRT push-pull stream link is established successfully, the media server generates a second SRT push-pull stream address according to the URL format according to the first request information, so that the client end establishes a second SRT push-pull stream link with the media server according to the second SRT push-pull stream address, and the media server transmits video data and audio data between the client end and the target end according to the first SRT push-pull stream link and the second SRT push-pull stream link, thereby realizing the effect of visual intercom. By combining the SRT protocol with the URL technology, the first SRT push-pull stream address and the second SRT push-pull stream address can be conveniently and rapidly established with the media server, the process of establishing a link channel is facilitated to be simplified, the SRT push-pull stream link has the characteristic of bidirectional transmission, video data and audio data can be transmitted on the same SRT push-pull stream link channel, no additional talkback channel is required to be established, and meanwhile, the first SRT push-pull stream address and the second SRT push-pull stream address based on the URL format have small data volume during transmission, and the link is facilitated to be established in a light-weight manner.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a signaling diagram of a visual intercom method based on an SRT communication protocol provided by the present invention;
FIG. 2 is a schematic flow chart of a visual intercom method based on SRT communication protocol applied to a media server;
FIG. 3 is a second flow chart of a visual intercom method based on SRT communication protocol applied to a media server according to the present invention;
FIG. 4 is a third flow chart of the SRT communication protocol-based visual intercom method applied to the media server;
FIG. 5 is a flow chart of a visual intercom method based on SRT communication protocol applied to a media server;
FIG. 6 is a flow chart of a visual intercom method based on SRT communication protocol applied to a media server;
Fig. 7 is a flow chart of a visual intercom method based on SRT communication protocol applied to a client side according to the present invention;
fig. 8 is a flow chart of a visual intercom method based on SRT communication protocol applied to a destination terminal according to the present invention;
fig. 9 is a flow chart of a visual intercom method based on SRT communication protocol applied to a signaling server according to the present invention;
fig. 10 is a schematic structural diagram of a visual intercom system provided by the present invention;
fig. 11 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following describes a visual intercom method based on an SRT communication protocol according to the present invention with reference to fig. 1 to 5, applied to a media server, including:
S100: responding to first request information of a client, wherein the first request information comprises client identification information of the client and target identification information of a target;
s110: generating a first SRT push-pull stream address corresponding to the target end according to the first request information and the URL format;
s120: sending the first SRT push-pull stream address to the target end so as to establish a first SRT push-pull stream link with the target end;
s130: generating a second SRT push-pull stream address according to the URL format according to the first SRT push-pull stream link and the first request information;
s140: sending the second SRT push-pull stream address to the client so as to establish a second SRT push-pull stream link with the client;
s150: transmitting audio data and video data between the client and the target according to the first SRT push-pull stream link and the second SRT push-pull stream link;
the first SRT push-pull stream address and the second SRT push-pull stream address are used for indicating that a link for push stream and pull stream multiplexing is established based on an SRT protocol.
The media server generates a first SRT push-pull stream address according to the URL format according to the first request information, so that the target end establishes a first SRT push-pull stream link with the media server according to the first SRT push-pull stream address, after the first SRT push-pull stream link is established successfully, the media server generates a second SRT push-pull stream address according to the URL format according to the first request information, so that the client end establishes a second SRT push-pull stream link with the media server according to the second SRT push-pull stream address, and the media server transmits video data and audio data between the client end and the target end according to the first SRT push-pull stream link and the second SRT push-pull stream link, thereby realizing the effect of visual intercom. By combining the SRT protocol with the URL technology, the first SRT push-pull stream address and the second SRT push-pull stream address can be conveniently and rapidly established with the media server, the process of establishing a link channel is facilitated to be simplified, the SRT push-pull stream link has the characteristic of bidirectional transmission, video data and audio data can be transmitted on the same SRT push-pull stream link channel, no additional talkback channel is required to be established, and meanwhile, the first SRT push-pull stream address and the second SRT push-pull stream address based on the URL format have small data volume during transmission, and the link is facilitated to be established in a light-weight manner.
URL (Uniform Resource Locator) is a string format for identifying and locating resources on the internet and includes protocols, locations, access conditions, etc. required to access the resources. The SRT (Secure Reliable Transport) protocol is an open source real-time transport protocol that aims to provide reliable, secure and low latency streaming media transport, has forward error correction, packet loss retransmission mechanisms to enable reliable data transport, and has bi-directional transport characteristics, enabling video data and audio data to be transported on the same SRT link, i.e. video and audio multiplexed into one channel, without the need to additionally set up links for talkbacked audio, while the SRT link supports h.265 coded transport. The SRT protocol is combined with the URL technology, and the SRT link can be conveniently and quickly established, so that a low-delay, stable and reliable bidirectional transmission channel is provided, and the requirement of visual intercom is met.
Referring to fig. 3, the present invention provides a visual intercom method based on SRT communication protocol applied to a media server, in some embodiments, the S110 includes:
s111: determining target end identification information according to the first request information;
s112: generating first key information according to the target end identification information;
S113: generating the first SRT push-pull stream address according to the target end identification information and the first key information and the URL format;
the first SRT push-pull address includes an SRT protocol field, a first key field corresponding to the first key information, and a first push-pull identifier field.
By generating the first key information according to the target terminal identification information, and the first SRT push-pull address comprises the corresponding first key field, the target terminal performs security verification according to the first key information and the first key field in the process of establishing the first SRT push-pull link with the media server according to the first SRT push-pull address, so that the security of the first SRT push-pull link is improved.
The destination identification information may be an implementation manner of a MAC address, an IP address, an identification code, and the like of the destination.
Referring to fig. 4, the present invention provides a visual intercom method based on SRT communication protocol applied to a media server, in some embodiments, the S130 includes:
s131: when the first SRT push-pull stream link is established, determining client identification information according to the first request information;
s132: generating second key information according to the client identification information;
S133: generating the second SRT push-pull stream address according to the URL format according to the client identification information and the second key information;
the second SRT push-pull address includes an SRT protocol field, a second key field corresponding to the second key information, and a second push-pull identifier field.
After the first SRT push-pull stream link is established, namely the target equipment and the media server can normally transmit data, second key information is generated according to the client identification information, and the second SRT push-pull stream address comprises a corresponding second key field, so that the client can perform security verification according to the second key information and the second key field in the process of establishing the second SRT push-pull stream link with the media server according to the second SRT push-pull stream address, and the security of the second SRT push-pull stream link is improved.
The client identification information may be an embodiment of a MAC address, an IP address, or an identification code of the client.
Referring to fig. 5, the present invention provides a visual intercom method based on SRT communication protocol applied to a media server, in some embodiments, the S120 includes:
s121: sending the first SRT push-pull address to a signaling server to instruct the signaling server to forward the first SRT push-pull address to the target end;
S122: responding to the second request information, and establishing a first SRT push-pull stream link with the target end;
wherein the second request information is generated based on the first SRT push-pull address.
The signaling server is used for session management, and can directly send or receive messages with the client and the target, and the target establishes a link and the session generally interacts with the signaling server. The media server sends the generated first SRT push-pull address to the signaling server, the signaling server forwards the first SRT push-pull address to the target end, when the target end uses the first SRT push-pull address, second request information is generated and sent to the media server, and the media server responds to the second request information and establishes a first SRT push-pull link with the target end. Therefore, the target end can directly establish the first SRT push-pull stream link with the media server through the first SRT push-pull stream address without passing through the signaling server again, and the method is beneficial to simplifying the process of establishing the link channel.
In some embodiments of the present invention, the media server may also directly send the first SRT push-pull address to the target.
Referring to fig. 6, the present invention provides a visual intercom method based on SRT communication protocol applied to a media server, in some embodiments, the S140 includes:
S141: sending the second SRT push-pull address to a signaling server to instruct the signaling server to forward the second SRT push-pull address to the client;
s142: responding to third request information, and establishing a second SRT push-pull stream link with the client;
wherein the third request information is generated based on the second SRT push-pull address.
The signaling server is used for session management, and can directly send or receive messages with the client and the target, the client establishes a link, the session generally interacts with the signaling server, and the request information is sent to the client. The media server sends the generated second SRT push-pull address to the signaling server, the signaling server forwards the second SRT push-pull address to the client, when the target end uses the second SRT push-pull address, third request information is generated and sent to the media server, and the media server responds to the third request information and establishes a second SRT push-pull link with the client. Therefore, after the client sends the first request information to the signaling server, the signaling server returns the second SRT push-pull stream address without changing a communication target, and the client can directly establish the second SRT push-pull stream link with the media server through the second SRT push-pull stream address without passing through the signaling server again, thereby being beneficial to simplifying the process of establishing a link channel.
In some embodiments of the present invention, the media server may also directly send the second SRT push-pull address to the client.
Referring to fig. 1 and 2, the present invention provides a visual intercom method based on SRT communication protocol applied to a media server, and in some embodiments, after S150, further comprising:
s160: closing the second SRT push-pull stream link in response to the stop request of the client;
s170: and if the data cannot be acquired from the client and the preset time is continued, closing the first SRT push-pull stream link.
And after the client side finishes the visual intercom service, sending a stop request, closing the second SRT push-pull stream link by the media server in response to the stop request to release the link resource, and closing the first SRT push-pull stream link to release the link resource after the client side does not receive the data of the client side and the preset time is continued. Therefore, the resources of the second SRT push-pull stream link can be released in time after the visual intercom service is completed, and the resources of the first SRT push-pull stream link are released after the second SRT push-pull stream link is released and the preset time passes. In the preset time, if the client establishes the second SRT push-pull stream link through the second SRT push-pull stream address again, the visual intercom service can be continued with the target normally, the client does not need to wait for the client to reestablish the first SRT push-pull stream link, and the efficiency is improved. In addition, when the client fails and can not send data to the media server, the resources of the first SRT push-pull stream link are released after the preset time, and the long-time occupation of the resources for idle operation is avoided.
Referring to fig. 1 and 7, the present invention further provides a visual intercom method based on SRT communication protocol applied to a client, comprising:
s200: transmitting first request information to a signaling server, wherein the first request information comprises client identification information of a client and target identification information of a target;
s210: acquiring a second SRT push-pull stream address from a signaling server;
s220: establishing a second SRT push-pull stream link with a media server according to the second SRT push-pull stream address;
s230: establishing a session keep-alive link with the signaling server, the session keep-alive link for maintaining the second SRT push-pull link;
s240: and sending audio data to the media server according to the second SRT push-pull stream link to instruct the media server to forward the audio data to the target end, and acquiring the audio data and the video data of the target end from the media server.
When the visual intercom service is carried out, the client side sends first request information to the signaling server, a returned second SRT push-pull stream address is obtained, and the client side can send a third request to the media server by using the second SRT push-pull stream address so as to establish a second SRT push-pull stream link with the media server. The client can send local audio data to the media server as push stream based on the second SRT push stream link so as to be acquired by the target end, and simultaneously acquire the audio data and the video data of the target end as pull stream from the media server, and the media server is used as a relay to realize visual intercom with the target end. In this way, the second SRT push-pull address generated by combining the SRT protocol and the URL technology is used, the client can quickly and conveniently establish the second SRT push-pull link with the media server by using the second SRT push-pull address, the process of establishing the link channel is facilitated to be simplified, the SRT push-pull link has the characteristic of bidirectional transmission, video data and audio data can be transmitted on the same SRT push-pull link channel, no additional intercom channel is required to be established, and meanwhile, the data quantity is small during transmission based on the second SRT push-pull address in the URL format, and the link establishment is facilitated to be realized by light weight.
Because the signaling server is used for managing the link session, the client establishes a session keep-alive link with the signaling server for maintaining the second SRT push-pull link, and when the client fails, the signaling server cannot receive the keep-alive heartbeat packet of the client through the session keep-alive link, and the signaling server can send an instruction to the media server to enable the media server to close the second SRT push-pull link to release resources. Therefore, when the client fails, the second SRT push-pull stream link can be closed in time, and long-term occupation of resources is avoided.
The keep-alive session link is used for periodically sending a keep-alive heartbeat data packet, so that whether the opposite side of the link works normally or whether the used link is reliable can be obtained, and when the keep-alive heartbeat data packet is not received in excess of the preset time, the opposite side of the link can be considered to be faulty or the link is faulty.
Referring to fig. 1 and 7, the present invention provides a visual intercom method based on SRT communication protocol applied to a client, and in some embodiments, after S240, further comprising:
s250: closing the session keep-alive link with the signaling server in response to a stop operation;
s260: and sending a stop request to the media server to close the second SRT push-pull link.
When the user completes the stopping operation of the visual intercom service, the client closes the session keep-alive link between the client and the signaling server, and sends a stopping request to the media server through the second SRT push-pull stream link, so that the media server closes the second SRT push-pull stream link to release the link resource.
Referring to fig. 1 and 8, the present invention further provides a visual intercom method based on SRT communication protocol applied to a target end, including:
s300: acquiring a first SRT push-pull stream address;
s310: establishing a first SRT push-pull stream link with a media server according to the first SRT push-pull stream address;
s320: and sending video data and audio data to the media server according to the first SRT push-pull stream link to instruct the media server to forward the video data and the audio data to a client, and acquiring the audio data of the client from the media server.
The signaling server sends the first SRT push-pull address to the target end, and the target end uses the acquired first SRT push-pull address to generate second request information sent to the media server, so that a first SRT push-pull link can be established with the media server. The target end can send locally generated video data and audio data to the media server as push stream based on the first SRT push-pull stream link so as to be acquired by the client end, and can acquire the audio data of the client end as pull stream to perform local play, so that the purpose of visual intercom is achieved by using the media server as a relay. In this way, the SRT protocol is combined with the URL technology to generate the first SRT push-pull stream address, the target end can quickly and conveniently establish the first SRT push-pull stream link with the media server by using the first SRT push-pull stream address, the process of establishing the link channel is facilitated to be simplified, the SRT push-pull stream link has the characteristic of bidirectional transmission, video data and audio data can be transmitted on the same SRT push-pull stream link channel, no additional intercom channel is required to be established, and meanwhile, the data quantity is small during transmission based on the first SRT push-pull stream address in the URL format, and the link is facilitated to be established in a light manner.
Referring to fig. 1 and 8, the present invention provides a visual intercom method based on SRT communication protocol applied to a target end, and in some embodiments, after S320, further includes:
s330: and closing the first SRT push-pull stream link after the audio data of the client cannot be acquired from the media server and the preset time is continued.
After the audio data of the client cannot be obtained from the media server and the preset time is continued, the client can be considered to be faulty and visual intercom cannot be continued, so that the first SRT push-pull stream link is closed to release the link resource, thereby being beneficial to avoiding the long-term occupied idle operation of the link resource and improving the resource utilization rate.
Referring to fig. 1 and 9, the present invention also provides a visual intercom method based on SRT communication protocol applied to a signaling server, comprising:
s400: responding to first request information of a client, wherein the first request information comprises client identification information of the client and target identification information of a target;
s410: forwarding the first request information to a media server to obtain a first SRT push-pull stream address;
s420: sending the first SRT push-pull address to the target end so that the target end establishes a first SRT push-pull link with the media server based on the first SRT push-pull address;
S430: acquiring a second SRT push-pull address from the media server;
s440: and sending the second SRT push-pull address to the client so that the client establishes a second SRT push-pull link with the media server based on the second SRT push-pull address.
The signaling server receives first request information sent by the client and then forwards the first request information to the media server, a first SRT push-pull stream address generated by the media server is forwarded to the target end, after the first SRT push-pull stream link is established between the target end and the media server, a second SRT push-pull stream address is generated by the media server, the signaling server obtains the second SRT push-pull stream address from the media server and then forwards the second SRT push-pull stream address to the client, and the client can establish the second SRT push-pull stream link with the media server based on the second SRT push-pull stream address so as to perform visual intercom. In this way, the SRT protocol is combined with the URL technology, the generated first SRT push-pull stream address and second SRT push-pull stream address can quickly and conveniently establish the SRT push-pull stream link with the media server, the process of establishing the link channel is facilitated to be simplified, the SRT push-pull stream link has the characteristic of bidirectional transmission, video data and audio data can be transmitted on the same SRT push-pull stream link channel, no additional intercom channel is required to be established, and meanwhile, the data size is small during transmission based on the first SRT push-pull stream address and the second SRT push-pull stream address in the URL format, and the link is facilitated to be established in a light manner.
The visual intercom system provided by the invention is described below, and the visual intercom system described below and the visual intercom method based on the SRT communication protocol described above can be referred to correspondingly.
Referring to fig. 10, the present invention also provides a visual intercom system comprising: the system comprises client equipment, target equipment, a signaling server and a media server;
the client device sends first request information to the signaling server;
the signaling server forwards the first request information to the media server;
the media server generates a first SRT push-pull address corresponding to the target terminal equipment according to the first request information and a URL format, and sends the first SRT push-pull address to the signaling server;
the signaling server forwards the first SRT push-pull address to the target terminal device;
the target end device establishes a first SRT push-pull stream link with the media server according to the first SRT push-pull stream address;
the media server generates a second SRT push-pull address according to the first SRT push-pull link and the first request information, and sends the second SRT push-pull address to the signaling server;
The signaling server forwards the second SRT push-pull address to the client device;
the client device establishes a second SRT push-pull link with the media server according to the second SRT push-pull address;
the media server obtains video data and audio data of the target terminal device according to the first SRT push-pull stream link and sends the audio data of the client terminal device to the target terminal device, and obtains audio data of the client terminal device and sends the video data and the audio data of the target terminal device to the client terminal device according to the second SRT push-pull stream link.
The SRT protocol is combined with the URL technology, the first SRT push-pull stream address and the second SRT push-pull stream address are used, the target end equipment and the client end equipment can conveniently and rapidly establish the first SRT push-pull stream link and the second SRT push-pull stream link with the media server, the process of establishing a link channel is facilitated to be simplified, the SRT push-pull stream link has the characteristic of bidirectional transmission, video data and audio data can be transmitted on the same SRT push-pull stream link channel, no additional talk channel is required to be established, and meanwhile, the first SRT push-pull stream address and the second SRT push-pull stream address based on the URL format have small data quantity during transmission, and the link construction is facilitated to be realized.
The client device may be an embodiment of a mobile phone, a computer, an embedded device, etc. The target terminal equipment can be specifically an implementation mode such as a mobile phone, a computer, monitoring equipment, an intelligent doorbell and the like. The signaling server and the media server are adopted, so that functions can be definitely divided, and management and expansion are facilitated.
Fig. 11 illustrates a schematic physical structure of an electronic device according to the present invention, where, as shown in fig. 11, the electronic device may include: processor 810, communication interface (Communications Interface) 820, memory 830, and communication bus 840, wherein processor 810, communication interface 820, memory 830 accomplish communication with each other through communication bus 840. The processor 810 may invoke logic instructions in the memory 830 to perform the visual intercom method described above based on the SRT communication protocol.
The electronic equipment provided by the invention can be used as a media server, a client device, a target device or a signaling server.
Further, the logic instructions in the memory 830 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute the visual intercom method based on the SRT communication protocol provided by the above methods.
In yet another aspect, the present invention further provides a non-transitory computer readable storage medium having stored thereon a computer program that, when executed by a processor, is implemented to perform the SRT communication protocol-based visual intercom method provided by the methods described above.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (14)

1. The visual intercom method based on the SRT communication protocol is characterized by being applied to a media server and comprising the following steps:
responding to first request information of a client, wherein the first request information comprises client identification information of the client and target identification information of a target;
generating a first SRT push-pull stream address corresponding to the target end according to the first request information and the URL format;
sending the first SRT push-pull stream address to the target end so as to establish a first SRT push-pull stream link with the target end;
generating a second SRT push-pull stream address according to the URL format according to the first SRT push-pull stream link and the first request information;
sending the second SRT push-pull stream address to the client so as to establish a second SRT push-pull stream link with the client;
transmitting audio data and video data between the client and the target according to the first SRT push-pull stream link and the second SRT push-pull stream link;
the first SRT push-pull stream address and the second SRT push-pull stream address are used for indicating that a link for push stream and pull stream multiplexing is established based on an SRT protocol.
2. The visual intercom method based on the SRT communication protocol as set forth in claim 1, wherein said generating a first SRT push-pull address corresponding to the target according to the URL format according to the first request information includes:
Determining target end identification information according to the first request information;
generating first key information according to the target end identification information;
generating the first SRT push-pull stream address according to the target end identification information and the first key information and the URL format;
the first SRT push-pull address includes an SRT protocol field, a first key field corresponding to the first key information, and a first push-pull identifier field.
3. The visual intercom method based on the SRT communication protocol as set forth in claim 1, wherein said generating a second SRT push-pull address according to URL format based on said first SRT push-pull link and said first request information comprises:
when the first SRT push-pull stream link is established, determining client identification information according to the first request information;
generating second key information according to the client identification information;
generating the second SRT push-pull stream address according to the URL format according to the client identification information and the second key information;
the second SRT push-pull address includes an SRT protocol field, a second key field corresponding to the second key information, and a second push-pull identifier field.
4. The method of claim 1, wherein the sending the first SRT push-to-flow address to the target to establish a first SRT push-to-flow link with the target comprises:
sending the first SRT push-pull address to a signaling server to instruct the signaling server to forward the first SRT push-pull address to the target end;
responding to the second request information, and establishing a first SRT push-pull stream link with the target end;
wherein the second request information is generated based on the first SRT push-pull address.
5. The SRT communication protocol based visual intercom method of claim 1, wherein said sending the second SRT push-pull address to the client for establishing a second SRT push-pull link with the client comprises:
sending the second SRT push-pull address to a signaling server to instruct the signaling server to forward the second SRT push-pull address to the client;
responding to third request information, and establishing a second SRT push-pull stream link with the client;
wherein the third request information is generated based on the second SRT push-pull address.
6. The SRT communication protocol based visual intercom method of claim 1, further comprising, after said transmitting audio data and video data between said client and said target according to said first SRT push-pull link and said second SRT push-pull link:
closing the second SRT push-pull stream link in response to the stop request of the client;
and if the data cannot be acquired from the client and the preset time is continued, closing the first SRT push-pull stream link.
7. The visual intercom method based on the SRT communication protocol is characterized by being applied to a client and comprising the following steps:
transmitting first request information to a signaling server, wherein the first request information comprises client identification information of a client and target identification information of a target;
acquiring a second SRT push-pull stream address from a signaling server;
establishing a second SRT push-pull stream link with a media server according to the second SRT push-pull stream address;
establishing a session keep-alive link with the signaling server, the session keep-alive link for maintaining the second SRT push-pull link;
according to the second SRT push-pull stream link, sending audio data to the media server to instruct the media server to forward the audio data to the target end, and acquiring the audio data and the video data of the target end from the media server;
The second SRT push-pull stream address is generated by the media server according to a first SRT push-pull stream link and the first request information according to a URL format, and the first SRT push-pull stream link is generated by the media server according to the first request information according to the URL format.
8. The SRT communication protocol based visual intercom method of claim 7, wherein after said sending audio data to said media server according to said second SRT push-pull link to instruct said media server to forward audio data to said destination, obtaining audio data and video data of said destination from said media server further comprises:
closing the session keep-alive link with the signaling server in response to a stop operation;
and sending a stop request to the media server to close the second SRT push-pull link.
9. The visual intercom method based on the SRT communication protocol is characterized by being applied to a target end and comprising the following steps:
acquiring a first SRT push-pull stream address;
establishing a first SRT push-pull stream link with a media server according to the first SRT push-pull stream address;
according to the first SRT push-pull stream link, sending video data and audio data to the media server to instruct the media server to forward the video data and the audio data to a client, and acquiring the audio data of the client from the media server;
The first SRT push-pull stream link is generated by the media server according to the first request information sent by the client according to the URL format.
10. The SRT communication protocol based visual intercom method of claim 9, wherein after said sending video data and audio data to said media server according to said first SRT push-pull link to instruct said media server to forward video data and audio data to a client, obtaining audio data of said client from said media server, further comprising:
and closing the first SRT push-pull stream link after the audio data of the client cannot be acquired from the media server and the preset time is continued.
11. The visual intercom method based on the SRT communication protocol is characterized by being applied to a signaling server and comprising the following steps:
responding to first request information of a client, wherein the first request information comprises client identification information of the client and target identification information of a target;
forwarding the first request information to a media server to obtain a first SRT push-pull stream address;
sending the first SRT push-pull address to the target end so that the target end establishes a first SRT push-pull link with the media server based on the first SRT push-pull address;
Acquiring a second SRT push-pull address from the media server;
sending the second SRT push-pull address to the client so that the client establishes a second SRT push-pull link with the media server based on the second SRT push-pull address;
wherein, the first SRT push-pull stream link is generated by a media server according to the first request information and the URL format; the second SRT push-pull stream address is generated by a media server according to the first SRT push-pull stream link and the first request information according to a URL format.
12. A visual intercom system, comprising: the system comprises client equipment, target equipment, a signaling server and a media server;
the client device sends first request information to the signaling server;
the signaling server forwards the first request information to the media server;
the media server generates a first SRT push-pull address corresponding to the target terminal equipment according to the first request information and a URL format, and sends the first SRT push-pull address to the signaling server;
the signaling server forwards the first SRT push-pull address to the target terminal device;
The target end device establishes a first SRT push-pull stream link with the media server according to the first SRT push-pull stream address;
the media server generates a second SRT push-pull address according to the first SRT push-pull link and the first request information, and sends the second SRT push-pull address to the signaling server;
the signaling server forwards the second SRT push-pull address to the client device;
the client device establishes a second SRT push-pull link with the media server according to the second SRT push-pull address;
the media server obtains video data and audio data of the target terminal device according to the first SRT push-pull stream link and sends the audio data of the client terminal device to the target terminal device, and obtains audio data of the client terminal device and sends the video data and the audio data of the target terminal device to the client terminal device according to the second SRT push-pull stream link.
13. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the SRT communication protocol based visual intercom method of any of claims 1 to 11 when the program is executed.
14. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the SRT communication protocol based visual intercom method of any of claims 1 to 11.
CN202311142068.9A 2023-09-06 2023-09-06 Visual intercom method, system and storage medium based on SRT communication protocol Active CN116896546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311142068.9A CN116896546B (en) 2023-09-06 2023-09-06 Visual intercom method, system and storage medium based on SRT communication protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311142068.9A CN116896546B (en) 2023-09-06 2023-09-06 Visual intercom method, system and storage medium based on SRT communication protocol

Publications (2)

Publication Number Publication Date
CN116896546A CN116896546A (en) 2023-10-17
CN116896546B true CN116896546B (en) 2023-12-26

Family

ID=88315166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311142068.9A Active CN116896546B (en) 2023-09-06 2023-09-06 Visual intercom method, system and storage medium based on SRT communication protocol

Country Status (1)

Country Link
CN (1) CN116896546B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020086452A1 (en) * 2018-10-22 2020-04-30 Radiant Communications Corporation Low-latency video internet streaming for management and transmission of multiple data streams
CN112333268A (en) * 2020-11-02 2021-02-05 中国联合网络通信集团有限公司 Data transmission method and device
US11100197B1 (en) * 2020-04-10 2021-08-24 Avila Technology Llc Secure web RTC real time communications service for audio and video streaming communications
CN114598428A (en) * 2022-05-10 2022-06-07 北京中科大洋科技发展股份有限公司 Redundancy flow pushing method based on SRT protocol
US11388068B1 (en) * 2020-10-21 2022-07-12 Sprint Communications Company L.P. Service record tracker network function
CN115103146A (en) * 2022-06-15 2022-09-23 中移(杭州)信息技术有限公司 Video playback method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020086452A1 (en) * 2018-10-22 2020-04-30 Radiant Communications Corporation Low-latency video internet streaming for management and transmission of multiple data streams
US11100197B1 (en) * 2020-04-10 2021-08-24 Avila Technology Llc Secure web RTC real time communications service for audio and video streaming communications
US11388068B1 (en) * 2020-10-21 2022-07-12 Sprint Communications Company L.P. Service record tracker network function
CN112333268A (en) * 2020-11-02 2021-02-05 中国联合网络通信集团有限公司 Data transmission method and device
CN114598428A (en) * 2022-05-10 2022-06-07 北京中科大洋科技发展股份有限公司 Redundancy flow pushing method based on SRT protocol
CN115103146A (en) * 2022-06-15 2022-09-23 中移(杭州)信息技术有限公司 Video playback method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SRT(secure reliable transport);井坂一喜;《映像情報メディア学会誌》;第第74卷卷(第第1号期);全文 *
浅谈SRT传输协议在广播电视信号传输中的应用;张博力;;现代电视技术(05);全文 *

Also Published As

Publication number Publication date
CN116896546A (en) 2023-10-17

Similar Documents

Publication Publication Date Title
JP6648211B2 (en) Method and apparatus for performing extended file distribution in multicast communication or broadcast communication
US7913293B2 (en) Method and communication unit for communicating between communication apparatuses
US7904521B2 (en) Method for transferring chat messages by establishing chat room data transfer channel
KR101366807B1 (en) A method and system for remotely accessing devices in a network
CN108696772B (en) Real-time video transmission method and device
CN106210924B (en) Video network transmission control method and system
US20070099637A1 (en) Voice instant messaging between mobile and computing devices
US9413797B2 (en) Data communication system and method
US20190273773A1 (en) Method for managing communication in mission critical data (mcdata) communication system
WO2007033549A1 (en) An offline message transmission method
CN111770140A (en) Communication method, user equipment and proxy server cluster
KR20160003024A (en) Data communication system and method
US8095116B2 (en) Method for delivering multimedia files
CA2387913A1 (en) Transmitting data reliably and efficiently
WO2011015020A1 (en) File transmission method, system and client
CN101702728B (en) Streaming media transmission system for mobile communication equipment terminal and application method thereof
CN116896546B (en) Visual intercom method, system and storage medium based on SRT communication protocol
CN106130746B (en) Data transmission method and device
WO2008003217A1 (en) A method and appratus and system for transfering short message
CN113014855B (en) Video conference acceleration method, system and video conference acceleration platform
CN113489786A (en) Long connection network weak network reconnection method and retransmission method
CN116032998A (en) Data transmission method, data transmission device, computer readable storage medium and electronic equipment
CN112073403A (en) AP isolation state network distribution method, terminal and readable storage medium
CN107172179B (en) Bilateral acceleration transmission method and system
KR101328028B1 (en) System and method for message transmission based on session

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