CN111787261A - Audio and video data sending method and device, electronic equipment and storage medium - Google Patents

Audio and video data sending method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111787261A
CN111787261A CN202010501587.XA CN202010501587A CN111787261A CN 111787261 A CN111787261 A CN 111787261A CN 202010501587 A CN202010501587 A CN 202010501587A CN 111787261 A CN111787261 A CN 111787261A
Authority
CN
China
Prior art keywords
terminal
communication connection
communication
audio
video
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.)
Pending
Application number
CN202010501587.XA
Other languages
Chinese (zh)
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.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera 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 Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN202010501587.XA priority Critical patent/CN111787261A/en
Publication of CN111787261A publication Critical patent/CN111787261A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/15Conference systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides an audio and video data sending method and device, electronic equipment and a storage medium. According to the method, when a first terminal requests to establish communication connection with a second terminal, the streaming media server firstly obtains communication data corresponding to the second terminal, then directly initiates a request for establishing end-to-end communication connection to the second terminal according to the communication data corresponding to the second terminal, and transmits audio and video data to the second terminal through the end-to-end communication connection after the establishment is successful. On one hand, the end-to-end transmission of the audio and video data can be directly carried out between the terminals, the first terminal in the related technology is prevented from transferring the audio and video data through the streaming media server, and the efficiency of audio and video data transmission is improved. On the other hand, the streaming media server does not transfer the audio and video data between the terminals any more, so that the bandwidth pressure of the streaming media server is obviously reduced, and the capability of the streaming media server for coping with high concurrent audio and video communication services is enhanced.

Description

Audio and video data sending method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to an audio and video data transmission method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of network technologies, bidirectional communications such as video conferences and video teaching are widely popularized in the aspects of life, work, learning and the like of users. In video communication or audio communication of video network, a streaming media server generally establishes connection between two communication parties, and completes forwarding of audio and video data between the two parties through the established connection. For example, the terminal 1 needs to perform video communication with the terminal 2, after the streaming media server establishes the communication connection between the terminal 1 and the terminal 2, the streaming media server obtains the audio and video data generated by the terminal 1 in real time and sends the audio and video data to the terminal 2, and obtains the audio and video data generated by the terminal 2 in real time and sends the audio and video data to the terminal 1.
Because the video communication or the audio communication is real-time communication, a large amount of audio and video data needs to be transmitted in a short time, and the transmission of the audio and video data is usually completed by a streaming media server. Therefore, in a scene of a high-concurrency audio/video communication service, the streaming media server needs to additionally allocate a large amount of bandwidth resources to complete transmission of audio/video data, and thus, the service processing performance of the streaming media server is reduced due to a large bandwidth pressure.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed in order to provide an audiovisual data transmission method, apparatus, electronic device and storage medium that overcome or at least partially solve the above problems.
A first aspect of an embodiment of the present application provides an audio and video data sending method, which is applied to a first terminal, and the method includes:
sending a communication connection request to a streaming media server in communication connection with the first terminal, wherein the communication connection request is used for requesting to establish communication connection with a second terminal;
receiving first communication data sent by the streaming media server, wherein the first communication data is communication data corresponding to the second terminal;
establishing a first communication connection for end-to-end communication with the second terminal based on the first communication data;
and sending audio and video data to the second terminal based on the first communication connection.
Optionally, the method further comprises:
when a second communication connection request sent by the second terminal is received, a response representing that the second communication connection request is approved is returned to the second terminal so as to establish a second communication connection for end-to-end communication with the second terminal;
receiving audio and video data sent by the second terminal based on the second communication connection;
the second communication connection request is sent by the second terminal to the first terminal according to second communication data, and the second communication data is sent by the streaming media server to the second terminal when receiving the first communication connection request.
Optionally, sending, based on the first communication connection, audio and video data to the second terminal, including:
obtaining coding and decoding parameters of the second terminal from the first communication data;
processing the collected audio and video data according to the coding and decoding parameters;
and sending the processed audio and video data to the second terminal based on the first communication connection.
Optionally, establishing a first communication connection for performing end-to-end communication with the second terminal based on the first communication data includes:
obtaining address information of the second terminal from the first communication data;
and sending a communication connection request to the second terminal according to the address information so as to establish a first communication connection for end-to-end communication with the second terminal.
Optionally, after establishing the first communication connection for end-to-end communication with the second terminal, the method further includes:
and sending a message that the first communication connection is successfully established to the streaming media server so that the streaming media server releases the communication connection with the first terminal.
A second aspect of the embodiments of the present application provides an audio and video data sending method, which is applied to a streaming media server, and the method includes:
receiving a communication connection request sent by a first terminal in communication connection with the streaming media server, wherein the communication connection request is used for requesting to establish communication connection between the first terminal and a second terminal;
and sending first communication data corresponding to the second terminal to the first terminal so that the first terminal establishes a first communication connection for end-to-end communication with the second terminal according to the first communication data, and sending audio and video data to the second terminal through the first communication connection.
Optionally, the method further comprises:
responding to a communication connection request sent by a first terminal, sending second communication data corresponding to the first terminal to a second terminal, so that the second terminal establishes second communication connection for end-to-end communication with the first terminal according to the second communication data, and receiving audio and video data sent by the first terminal through the second communication connection.
Optionally, before receiving a communication connection request sent by a first terminal in communication connection with the streaming server, the method further includes:
acquiring login information of the first terminal and login information of the second terminal;
and acquiring second communication data conforming to the video networking audio and video instant communication protocol based on the login information of the first terminal, and acquiring first communication data conforming to the video networking audio and video instant communication protocol based on the login information of the second terminal.
Optionally, the method further comprises:
after receiving the message that the first communication connection is successfully established and sent by the first terminal, releasing the original communication connection with the first terminal;
and after receiving the message of successful establishment of the second communication connection sent by the second terminal, releasing the original communication connection between the second terminal and the original communication connection between the second terminal.
A third aspect of the embodiments of the present application provides an audio and video data transmission device, which is applied to a first terminal, and the device includes:
a first sending module, configured to send a communication connection request to a streaming media server in communication connection with the first terminal, where the communication connection request is used to request a second terminal to establish a communication connection;
a first receiving module, configured to receive first communication data sent by the streaming media server, where the first communication data is communication data corresponding to the second terminal;
a first establishing module, configured to establish a first communication connection for performing end-to-end communication with the second terminal based on the first communication data;
and the second sending module is used for sending the audio and video data to the second terminal based on the first communication connection.
A fourth aspect of the present embodiment provides an audio/video data transmission device, which is applied to a streaming media server, where the device includes:
a third receiving module, configured to receive a communication connection request sent by a first terminal in communication connection with the streaming media server, where the communication connection request is used to request establishment of a communication connection between the first terminal and a second terminal;
and the fourth sending module is used for sending first communication data corresponding to the second terminal to the first terminal so that the first terminal establishes a first communication connection for end-to-end communication with the second terminal according to the first communication data, and sends audio and video data to the second terminal through the first communication connection.
A fifth aspect of the embodiments of the present application provides an electronic device, including a memory, a processor, and a computer program that is stored in the memory and is executable on the processor, where the processor implements the steps in the audio/video data transmission method according to the first aspect or the second aspect when executing the steps.
A sixth aspect of the embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the method for transmitting audio and video data according to the first aspect or the second aspect of the present application.
According to the audio and video data sending method, when the first terminal requests to establish communication connection with the second terminal, the streaming media server firstly obtains communication data corresponding to the second terminal, then directly initiates a request for establishing end-to-end communication connection to the second terminal according to the communication data corresponding to the second terminal, and after the establishment is successful, transmits the audio and video data to the second terminal through the end-to-end communication connection. On one hand, the end-to-end communication connection is established between the terminals through the communication data acquired from the streaming media server, so that the end-to-end transmission of the audio and video data can be directly carried out between the terminals, namely the first terminal directly sends the audio and video data to the second terminal, the situation that the first terminal needs to transfer the audio and video data through the streaming media server in the related technology is avoided, and the efficiency of audio and video data transmission is improved. On the other hand, the streaming media server can establish end-to-end communication connection between the terminals by sending communication data to the terminals, so that end-to-end audio and video transmission can be performed between the terminals, and audio and video data transmission is not performed any more, thereby remarkably reducing the bandwidth pressure of the streaming media server, and enhancing the service processing performance of the streaming media server and the capability of coping with high concurrent audio and video communication services.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a schematic diagram of an implementation environment shown in an embodiment of the present application;
fig. 2 is a flowchart illustrating an audio-video data transmission method according to an embodiment of the present application;
fig. 3 is a schematic process diagram of an audio-video data transmission method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a further method for transmitting audio-video data according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a method of transmitting audio-video data according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a further method for transmitting audio-video data according to an embodiment of the present application;
fig. 7 is a schematic diagram of a complete process of an audio-video data transmission method according to an embodiment of the present application;
fig. 8 is a block diagram illustrating a structure of an audio/video data transmission apparatus according to an embodiment of the present application;
fig. 9 is a block diagram illustrating a structure of another audio-video data transmission apparatus according to an embodiment of the present application;
FIG. 10 is a schematic diagram of an electronic device shown in an embodiment of the present application;
FIG. 11 is a schematic diagram illustrating a networking of a video network according to an embodiment of the present application;
fig. 12 is a schematic diagram illustrating a hardware structure of a node server according to an embodiment of the present application;
fig. 13 is a schematic diagram illustrating a hardware structure of an access switch according to an embodiment of the present application;
fig. 14 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
In view of the problems in the related art, the present application provides an audio/video data transmission method, in an audio/video communication scenario of a video network, a streaming media server is only responsible for establishing an end-to-end communication connection between two communication parties, and after the end-to-end communication connection between the two communication parties is established, the audio/video data is directly transmitted between the two communication parties through the established channel without passing through the streaming media server, so as to reduce the bandwidth pressure of the streaming media server, and further enhance the service processing performance of the streaming media server.
Fig. 1 is a schematic diagram of an implementation environment according to an embodiment of the present application. In fig. 1, the streaming media server is in communication connection with the first terminal and the second terminal, and the streaming media server, the first terminal and the second terminal are all deployed in a video networking environment and perform communication interaction with each other through a video networking protocol.
Of course, the first terminal and/or the second terminal may be deployed in the video network, or may be deployed in the internet (fig. 1 only shows the case where the first terminal and/or the second terminal is deployed in the video network). When the terminals (the first terminal and/or the second terminal) are deployed in the internet, the protocol conversion server is required to be used as an intermediate bridge to establish a communication connection with the streaming media server. Illustratively, when the first terminal is deployed in the internet, the first terminal needs to establish a communication connection with the streaming media server through the protocol conversion server, and since the protocol conversion server supports the internet network card and the video network card, the first terminal can be in communication interaction with the first terminal through the internet protocol, and can also be in communication interaction with the streaming media server through the video network protocol.
Fig. 2 is a flowchart of an audio-video data transmission method according to an embodiment of the present application. The audio/video data transmission method provided by the present application will be described in detail with reference to fig. 2. The method can be applied to the first terminal in fig. 1, and specifically includes the following steps:
step S11: and sending a communication connection request to a streaming media server in communication connection with the first terminal, wherein the communication connection request is used for requesting to establish communication connection with a second terminal.
In this embodiment, the first terminal may establish a video communication connection with the second terminal, or may establish an audio communication connection with the second terminal. When the first terminal requests to establish the video communication connection with the second terminal, a request for establishing the video communication connection is sent to the streaming media server, and when the first terminal requests to establish the audio communication connection with the second terminal, a request for establishing the audio communication connection is sent to the streaming media server. For the convenience of describing the audio/video data transmission method of the present application, it is specifically described herein that the communication connection referred to in the following embodiments is a video communication connection.
Step S12: and receiving first communication data sent by the streaming media server, wherein the first communication data is communication data corresponding to the second terminal.
In this embodiment, the first communication data is used to establish an end-to-end communication connection with the second terminal.
Step S13: and establishing a first communication connection for end-to-end communication with the second terminal based on the first communication data.
In this embodiment, the first terminal may directly establish an end-to-end communication connection with the second terminal through the first communication data, that is: the first terminal can bypass the streaming media server to directly establish the communication connection with the second terminal.
In one embodiment, if the first terminal and the second terminal are both deployed in the video network, the first terminal may directly establish an end-to-end communication connection with the second terminal; in another embodiment, if the first terminal is deployed in the video network and the second terminal is deployed in the internet, the first terminal may establish an end-to-end communication connection with the second terminal through the protocol conversion server.
Step S14: and sending audio and video data to the second terminal based on the first communication connection.
In this embodiment, since the communication connection between the first terminal and the second terminal is an end-to-end communication connection, the first terminal may directly send the audio and video data to the second terminal through the end-to-end communication connection without going through the streaming media server.
Fig. 3 is a schematic process diagram of an audio-video data transmission method according to an embodiment of the present application. The above-described steps S11 to S14 will be exemplarily described with reference to fig. 3.
The terminal A is positioned in the Internet and is in communication connection with the streaming media server through the protocol conversion server, and the terminal B is positioned in the video network and is directly in communication connection with the streaming media server. When terminal a requests video communication with terminal B, a communication connection request is transmitted to the streaming server through the protocol conversion server. And after receiving the communication connection request, the streaming media server acquires the communication data corresponding to the terminal B and sends the communication data corresponding to the terminal B to the terminal A. After receiving the communication data corresponding to the terminal B, the terminal a sends a request for establishing an end-to-end communication connection with the terminal B to the protocol conversion server through the communication data corresponding to the terminal B, so that the protocol conversion server sends the request to the terminal B, and if the terminal B returns a response agreeing to establish a communication connection to the terminal a, the end-to-end communication connection between the terminal a and the terminal B is successfully established, specifically, the communication connection is formed by the terminal a, the protocol conversion server and the terminal B, as shown by a thick line part in fig. 3. And then, the terminal A can send the acquired audio and video stream to the terminal B through the established end-to-end communication connection.
By the audio and video data transmission method of the embodiment, when a first terminal requests to establish communication connection with a second terminal, communication data corresponding to the second terminal is firstly obtained through a streaming media server, then a request for establishing end-to-end communication connection is directly initiated to the second terminal according to the communication data corresponding to the second terminal, and after the establishment is successful, audio and video data are transmitted to the second terminal through the end-to-end communication connection. On one hand, the end-to-end communication connection is established between the terminals through the communication data acquired from the streaming media server, so that the end-to-end transmission of the audio and video data can be directly carried out between the terminals, namely the first terminal directly sends the audio and video data to the second terminal, the situation that the first terminal needs to transfer the audio and video data through the streaming media server in the related technology is avoided, and the efficiency of audio and video data transmission is improved. On the other hand, the streaming media server can establish end-to-end communication connection between the terminals by sending communication data to the terminals, so that end-to-end audio and video transmission can be performed between the terminals, and audio and video data transmission is not performed any more, thereby remarkably reducing the bandwidth pressure of the streaming media server, and enhancing the service processing performance of the streaming media server and the capability of coping with high concurrent audio and video communication services.
In the application, after a first terminal sends a communication connection request to a streaming media server, the streaming media server sends communication data corresponding to a second terminal to the first terminal, so that the first terminal actively establishes end-to-end communication connection with the second terminal; meanwhile, the communication data corresponding to the first terminal is also sent to the second terminal, so that the second terminal actively establishes end-to-end communication connection with the first terminal, and further bidirectional communication connection between the first terminal and the second terminal is realized.
Fig. 4 is a flowchart illustrating a further method for transmitting audio-video data according to an embodiment of the present application. Referring to fig. 4, in addition to the above-mentioned step S11-step S14, the audio-video data transmission method of the present application may further include the following steps:
step S15: and when receiving a second communication connection request sent by the second terminal, returning a response representing that the second communication connection request is approved to the second terminal so as to establish a second communication connection for end-to-end communication with the second terminal.
In this embodiment, the communication connection actively established between the first terminal and the second terminal is a first communication connection, and the first communication connection functions as: and transmitting the audio and video data generated by the first terminal to the second terminal. The communication connection established between the second terminal and the first terminal actively is a second communication connection, and the second communication connection has the following functions: and transmitting the audio and video data generated by the second terminal to the first terminal.
In this embodiment, after receiving the first communication connection request sent by the first terminal, the second terminal returns a response indicating approval of the first communication connection request to the first terminal, and then the first communication connection is established successfully. Similarly, after receiving the second communication connection request sent by the second terminal, the first terminal successfully establishes the second communication connection if a response indicating that the second communication connection request is granted is returned to the second terminal.
Step S16: and receiving audio and video data sent by the second terminal based on the second communication connection.
The second communication connection request is sent by the second terminal to the first terminal according to second communication data, and the second communication data is sent by the streaming media server to the second terminal when receiving the first communication connection request.
In this embodiment, after the second communication connection is successfully established, the second terminal may send the acquired audio/video stream to the first terminal through the second communication connection, that is: the first terminal can receive the audio and video data sent by the second terminal through the second communication connection.
By the audio and video data transmission method, the first terminal and the second terminal can actively request to establish end-to-end communication connection with the opposite terminal, so that bidirectional communication connection is established, audio and video bidirectional transmission is realized, interaction requirements of users in audio and video communication can be effectively met, and use experience of the users is enhanced.
With reference to the foregoing embodiments, in an implementation manner, an embodiment of the present application further provides a method for sending audio and video data, as shown in fig. 5. Fig. 5 is a flowchart illustrating a method for transmitting audio/video data according to an embodiment of the present application. Referring to fig. 5, the step S14 may include:
step S141: and obtaining the coding and decoding parameters of the second terminal from the first communication data.
Step S142: and processing the acquired audio and video data according to the coding and decoding parameters.
Step S143: and sending the processed audio and video data to the second terminal based on the first communication connection.
In the present embodiment, the codec parameters include video coding parameters and audio coding parameters. The frequency encoding parameters may include: video frame rate, video code rate, video resolution, video sampling rate, video sampling precision, video quality and the like. The audio coding parameters may include: audio code rate, audio sampling precision, audio quality, and the like.
In this embodiment, the first terminal may acquire the encoding and decoding capability of the second terminal according to the first communication data, and in order to ensure that the second terminal can decode successfully after receiving the audio and video data sent by the first terminal, after acquiring the audio and video data, the first terminal may encode the acquired audio and video data according to the encoding parameter of the second terminal, and then send the encoded audio and video data to the second terminal.
In practical implementation, the first terminal may set the encoding and decoding device according to the encoding and decoding parameters of the second terminal after obtaining the encoding and decoding parameters of the second terminal, so that the encoding and decoding device and the encoding and decoding device of the second terminal have the same encoding and decoding capabilities, and smooth transmission of audio and video data is ensured.
In this embodiment, when the first terminal requests to establish a communication connection with the second terminal, the first terminal may further obtain the encoding and decoding capabilities of the second terminal according to the first communication data, and then configure the encoding and decoding device of the first terminal as a device having the same encoding and decoding capabilities as the second terminal, so that the second terminal can successfully decode the audio and video data sent by the first terminal, and further ensure the smooth transmission of the audio and video data.
With reference to the foregoing embodiment, in an implementation manner, if the second terminal further establishes a second communication connection with the first terminal, the second terminal may further obtain the codec parameter of the first terminal from the second communication data, process the acquired audio/video data according to the codec parameter, and then send the processed audio/video data to the first terminal based on the second communication connection. Therefore, after the end-to-end communication connection is established between the first terminal and the second terminal, the encoding and decoding processing can be carried out on the audio and video data acquired by the first terminal and the second terminal according to the encoding and decoding parameters of the opposite terminal, and the smooth transmission of the audio and video data is further ensured.
In an implementation manner, with reference to the above embodiment, the present application further provides a method for establishing a first communication connection. Specifically, the step S13 may include:
obtaining address information of the second terminal from the first communication data;
and sending a communication connection request to the second terminal according to the address information so as to establish a first communication connection for end-to-end communication with the second terminal.
In this embodiment, the first terminal obtains address information of the second terminal, such as a MAC address, a TCP port number, a UDP port number, and the like, from the first communication data after receiving the first communication data. And then, according to the address information, sending a communication connection request for establishing the first communication connection to the second terminal.
Accordingly, the second terminal obtains the address information of the first terminal, such as the MAC address, the TCP port number, the UDP port number, and the like, from the second communication data after receiving the second communication data. And then, according to the address information, sending a communication connection request for establishing a second communication connection to the first terminal.
In this embodiment, after receiving the communication connection request sent by the first terminal, the second terminal automatically returns a response agreeing to establish the first communication connection to the first terminal in a default state, or may return a response indicating whether to establish the first communication connection to the first terminal under the operation of the user on the side of the second terminal. Similarly, after receiving the communication connection request sent by the second terminal, the first terminal automatically returns a response agreeing to establish the second communication connection to the second terminal in a default state, or returns a response indicating whether to establish the first communication connection to the second terminal under the operation of the user on the side of the first terminal. This embodiment does not specifically limit this.
In this embodiment, the communication data (including the first communication data and the second communication data) carries address information of the opposite end, so that the first terminal and/or the second terminal can smoothly establish communication connection with the opposite end according to the address information of the opposite end, thereby realizing end-to-end transmission of audio and video data.
In combination with the above embodiment, in an implementation manner, after the step S13, the following steps may be further included:
and sending a message that the first communication connection is successfully established to the streaming media server so that the streaming media server releases the communication connection with the first terminal.
In this embodiment, because the end-to-end communication connection is established between the first terminal and the second terminal, and no streaming media server is needed to participate in the subsequent audio/video data transmission process, after the first terminal determines that the first communication connection is successfully established, a message indicating that the first communication connection is successfully established may be sent to the streaming media server, so that the streaming media server releases the original communication connection with the first terminal, so as to reduce the bandwidth pressure of the streaming media server, and use the bandwidth resource for establishing the communication connection between other terminals, thereby enhancing the service processing performance of the streaming media server.
Accordingly, if a bidirectional communication connection is established between the first terminal and the second terminal, after the second terminal determines that the second communication connection is successfully established, a message indicating that the second communication connection is successfully established may be sent to the streaming media server, so that the streaming media server releases the original communication connection with the second terminal.
In this embodiment, after knowing that the first communication connection is successfully established, the streaming media server releases the original communication connection with the first terminal, thereby reducing the bandwidth pressure of the streaming media server and enhancing the service processing performance of the streaming media server.
The embodiment of the application also provides another audio and video data sending method, as shown in fig. 6. Fig. 6 is a flowchart illustrating a further method for transmitting audio-video data according to an embodiment of the present application. The audio and video data sending method is applied to a streaming media server and comprises the following steps:
step S21: and receiving a communication connection request sent by a first terminal in communication connection with the streaming media server, wherein the communication connection request is used for requesting to establish communication connection between the first terminal and a second terminal.
Step S22: and sending first communication data corresponding to the second terminal to the first terminal so that the first terminal establishes a first communication connection for end-to-end communication with the second terminal according to the first communication data, and sending audio and video data to the second terminal through the first communication connection.
For the description of step S21-step S22, reference may be made to the foregoing description of step S11-step S14, and the description of the embodiments of the present application is not repeated herein.
With reference to the foregoing embodiment, in an implementation manner, the audio/video data sending method according to the present application may further include:
responding to a communication connection request sent by a first terminal, sending second communication data corresponding to the first terminal to a second terminal, so that the second terminal establishes second communication connection for end-to-end communication with the first terminal according to the second communication data, and receiving audio and video data sent by the first terminal through the second communication connection.
For the description of this part, reference may be made to the foregoing description of steps S15-S16, and the description of the embodiments of the present application is omitted here for brevity.
With reference to the foregoing embodiment, in an implementation manner, before step S21, the method for sending audio/video data according to the present application may further include the following steps:
acquiring login information of the first terminal and login information of the second terminal;
and acquiring second communication data conforming to the video networking audio and video instant communication protocol based on the login information of the first terminal, and acquiring first communication data conforming to the video networking audio and video instant communication protocol based on the login information of the second terminal.
In the embodiment, the first terminal and the second terminal support a video networking audio and video instant messaging protocol. The format of the video networking audio and video instant messaging protocol is shown in the following table:
Figure BDA0002525019970000121
in the video networking audio and video instant communication protocol, a version number, CRC check, a host name, a source address (namely a source IP address), a source MAC, a target address (namely a target IP address), a target MAC, a source TCP port, a target TCP port, a source UDP port and a target UDP port are header information of the protocol; the network type, the network bandwidth, the network adoption duration, the maximum network bandwidth and the minimum network bandwidth are the respective network information of two communicated terminals (a source terminal and a target terminal); the CPU model, the CPU size, the CPU utilization rate, the memory model, the memory size, the memory utilization rate, the display card model, the display card size and the display card utilization rate are the encoding and decoding capacity information of the current host; the video protocol, the video frame rate, the video code rate, the video resolution, the video sampling rate, the video sampling precision and the video quality are video coding and decoding parameter information of the current host; the audio protocol, the audio sampling rate, the audio sampling precision and the audio quality are the audio coding and decoding parameter information of the current host. In this embodiment, some devices need to adopt IP addressing (for example, terminals deployed in the internet), and some devices need to adopt MAC addressing (for example, terminals deployed in the video network), so the protocol needs to be provided with an IP address and a MAC address.
In this embodiment, each time the first terminal logs in the streaming media server, the first terminal obtains its own network information, codec capability information, video codec parameter information, and audio codec parameter information, carries the part of data in a login request, and sends the login request to the streaming media server based on an audio/video instant messaging protocol of the video network. After receiving the login request, the streaming media server analyzes the login request to obtain login information, and uses the network information of the first terminal, the coding and decoding capability information of the first terminal, the video coding and decoding parameter information of the first terminal and the audio coding and decoding parameter information of the first terminal in the login information as communication data corresponding to the first terminal, and stores the communication data in a database, wherein the format of the communication data is shown in the following table:
Figure BDA0002525019970000131
similarly, the second terminal obtains its own network information, codec capability information, video codec parameter information, and audio codec parameter information each time it logs in to the streaming media server, carries the part of data in the login request, and sends the login request to the streaming media server based on the video networking audio/video instant messaging protocol. After receiving the login request, the streaming media server analyzes the login request to obtain login information, obtains network information of the second terminal, coding and decoding capability information of the second terminal, video coding and decoding parameter information of the second terminal and audio coding and decoding parameter information of the second terminal from the login information, takes the part of information as communication data corresponding to the second terminal and stores the communication data in a database, wherein the format of the communication data is shown in the following table:
Figure BDA0002525019970000141
when the streaming media server receives a communication connection request sent by a first terminal, communication data corresponding to a second terminal are obtained, the first terminal is used as a target terminal, a target address, a target MAC, a target TCP port and a target UDP port in header information in the communication data are set, and after the setting is successful, the communication data corresponding to the second terminal are sent to the first terminal.
If a bidirectional communication connection needs to be established between the first terminal and the second terminal, the streaming media server obtains communication data corresponding to the first terminal, the second terminal is used as a target terminal, a target address, a target MAC, a target TCP port and a target UDP port in header information in the communication data are set, and after the setting is successful, the communication data corresponding to the first terminal is sent to the second terminal.
In this embodiment, the first terminal and the second terminal actively report their communication data to the streaming media server as backup data during login, so that the streaming media server automatically obtains the communication data corresponding to the second terminal and sends the communication data to the first terminal after receiving a request for establishing an end-to-end communication connection between the first terminal and the second terminal, and obtains the communication data corresponding to the first terminal and sends the communication data to the second terminal, so that the first terminal and the second terminal actively establish a communication connection with an opposite terminal according to the received communication data, and finally realize an end-to-end communication connection independent of the streaming media server, thereby accelerating transmission efficiency of audio and video data and reducing bandwidth pressure of the streaming media server.
With reference to the foregoing embodiment, in an implementation manner, the audio/video data transmission method according to this embodiment may further include the following steps:
after receiving the message that the first communication connection is successfully established and sent by the first terminal, releasing the original communication connection with the first terminal;
and after receiving the message of successful establishment of the second communication connection sent by the second terminal, releasing the original communication connection between the second terminal and the original communication connection between the second terminal.
For the description of this part, please refer to the foregoing, and this embodiment will not be described herein.
Fig. 7 is a schematic diagram of a complete process of an audio-video data transmission method according to an embodiment of the present application. The following describes the audio-video transmission method according to the present application in a specific embodiment with reference to fig. 7.
In fig. 7, a client a is installed in a first terminal, a client B is installed in a second terminal, a user a is located on the client a side, and a user B is located on the client B side. The client A is positioned in the Internet and is in communication connection with the streaming media server through a monitoring access server (the monitoring access server is used for completing protocol conversion between the video network and the Internet, and can also be a protocol conversion server); the client B is positioned in the video network and can be directly connected with the streaming media server in a communication way. The streaming media server is provided with a client online list, all current clients which successfully log in are displayed in the list, and the online client can select one client from all other online clients and initiate audio-video communication.
After the client A logs in the streaming media server, the streaming media server records communication data corresponding to the client A in the login information of the client A and returns a current client online list to the client A; similarly, after the client B logs in the streaming media server, the streaming media server records the communication data corresponding to the client B in the login information of the client B, and returns the current client online list to the client B. At this time, the client a can check that the client B is in the online state, the client B can check that the client a is in the online state, and audio and video communication can be initiated between the two parties.
Taking the example that the client A initiates audio and video communication to the client B, the user A selects the client B from the client online list, the client A generates a communication connection request according to an internet protocol, then sends the communication connection request to the monitoring access server, the monitoring access server encapsulates the communication connection request according to the video networking protocol, then sends the communication connection request to the streaming media server, the streaming media server analyzes the communication connection request to obtain communication data corresponding to the client B, and sends the data to the client A, and meanwhile, obtains the communication data corresponding to the client A, and sends the data to the client B. The client A establishes a first communication connection with the client B according to the communication data corresponding to the client B, and the client B establishes a second communication connection with the client A according to the communication data corresponding to the client A, so that the establishment of the bidirectional communication connection between the client A and the client B is successful.
And then, the client A and the client B can directly carry out bidirectional transmission of audio and video data through the established channel, wherein the monitoring access server is in communication interaction with the client A through an internet instruction and in communication interaction with the client B through a video networking instruction, so that the transmission of the audio and video data between the internet and the video networking is realized. In the process, the audio and video data can be directly transmitted between the client A and the client B, so that the transmission effect of the audio and video data can be remarkably accelerated and the bandwidth pressure of the streaming media server is reduced compared with the original transmission mode which needs the streaming media server as a transfer.
Based on the same inventive concept, the present application further provides an audio/video data transmitting apparatus 800, which is applied to a first terminal, as shown in fig. 8. Fig. 8 is a block diagram illustrating a structure of an audio/video data transmission apparatus according to an embodiment of the present application. Referring to fig. 8, an audio/video data transmission apparatus 800 of the present application may include:
a first sending module 801, configured to send a communication connection request to a streaming media server in communication connection with the first terminal, where the communication connection request is used to request a communication connection to be established with a second terminal;
a first receiving module 802, configured to receive first communication data sent by the streaming media server, where the first communication data is communication data corresponding to the second terminal;
a first establishing module 803, configured to establish a first communication connection for performing peer-to-peer communication with the second terminal based on the first communication data;
a second sending module 804, configured to send, based on the first communication connection, audio and video data to the second terminal.
Optionally, the apparatus 800 further comprises:
a second establishing module, configured to, when receiving a second communication connection request sent by the second terminal, return a response indicating that the second communication connection request is granted to the second terminal, so as to establish a second communication connection for performing end-to-end communication with the second terminal;
the second receiving module is used for receiving the audio and video data sent by the second terminal based on the second communication connection;
the second communication connection request is sent by the second terminal to the first terminal according to second communication data, and the second communication data is sent by the streaming media server to the second terminal when receiving the first communication connection request.
Optionally, the second sending module 804 includes:
a first obtaining submodule, configured to obtain a coding/decoding parameter of the second terminal from the first communication data;
the processing module is used for processing the acquired audio and video data according to the coding and decoding parameters;
and the first sending submodule is used for sending the processed audio and video data to the second terminal based on the first communication connection.
Optionally, the first establishing module 803 includes:
a second obtaining submodule, configured to obtain address information of the second terminal from the first communication data;
and the second sending submodule is used for sending a communication connection request to the second terminal according to the address information so as to establish a first communication connection for end-to-end communication with the second terminal.
Optionally, the apparatus 800 further comprises:
a third sending module, configured to send a message that the first communication connection is successfully established to the streaming media server, so that the streaming media server releases the communication connection with the first terminal.
Based on the same inventive concept, the present application further provides another audio/video data transmission apparatus 900, which is applied to a streaming media server, as shown in fig. 9. Fig. 9 is a block diagram illustrating a structure of another audio-video data transmission device according to an embodiment of the present application. Referring to fig. 9, the audio/video data transmission apparatus 900 of the present application may include:
a third receiving module 901, configured to receive a communication connection request sent by a first terminal in communication connection with the streaming media server, where the communication connection request is used to request to establish a communication connection between the first terminal and a second terminal;
a fourth sending module 902, configured to send first communication data corresponding to the second terminal to the first terminal, so that the first terminal establishes a first communication connection for performing end-to-end communication with the second terminal according to the first communication data, and sends audio and video data to the second terminal through the first communication connection.
Optionally, the apparatus 900 further comprises:
and the fifth sending module is used for responding to the communication connection request sent by the first terminal, sending second communication data corresponding to the first terminal to the second terminal so that the second terminal establishes second communication connection for end-to-end communication with the first terminal according to the second communication data, and receiving the audio and video data sent by the first terminal through the second communication connection.
Optionally, the apparatus 900 further comprises:
a first obtaining module, configured to obtain login information of the first terminal and login information of the second terminal;
and the second obtaining module is used for obtaining second communication data conforming to the video networking audio and video instant communication protocol based on the login information of the first terminal and obtaining first communication data conforming to the video networking audio and video instant communication protocol based on the login information of the second terminal.
Optionally, the apparatus 900 further comprises:
a first release module, configured to release an original communication connection with the first terminal after receiving a message that the first communication connection is successfully established, where the message is sent by the first terminal;
and the second releasing module is used for releasing the original communication connection with the second terminal after receiving the message that the second communication connection is successfully established and sent by the second terminal.
Based on the same inventive concept, another embodiment of the present application provides an electronic device 1000, as shown in fig. 10. Fig. 10 is a schematic diagram of an electronic device according to an embodiment of the present application. The electronic device comprises a memory 1002, a processor 1001 and a computer program stored on the memory and executable on the processor, which when executed performs the steps of the method according to any of the embodiments of the present application.
Based on the same inventive concept, the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, and when the processor executes the computer program, the steps in the audio/video data transmission method according to any of the embodiments of the present application are implemented.
Based on the same inventive concept, the present application provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps in the method for transmitting audio-video data according to any of the above-mentioned embodiments of the present application.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present invention, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network Technology (Network Technology)
Network technology innovation in video networking has improved over traditional Ethernet (Ethernet) to face the potentially enormous video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network circuit Switching (circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media content with super-large capacity and super-large flow, the program information in the server instruction is mapped to the specific hard disk space, the media content is not passed through the server any more, and is directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
Fig. 11 is a networking diagram of a video network according to an embodiment of the present application. As shown in fig. 11, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present invention can be mainly classified into 3 types: servers, switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node servers, access switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
fig. 12 is a schematic diagram illustrating a hardware structure of a node server according to an embodiment of the present application. As shown in fig. 12, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
fig. 13 is a schematic diagram illustrating a hardware structure of an access switch according to an embodiment of the present application. As shown in fig. 13, the network interface module (downlink network interface module 301, uplink network interface module 302), switching engine module 303, and CPU module 304 are mainly included;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the incoming data packet of the CPU module 304 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues, which in this embodiment of the present invention is divided into two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate control module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate control module 308 is configured by the CPU module 304, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate control module 308.
Ethernet protocol conversion gateway
Fig. 14 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to an embodiment of the present application. As shown in fig. 14, the system mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a rate control module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MACSA of the ethernet coordination gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present invention: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved label (R) Payload CRC
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.
Based on the above characteristics of the video network, one of the core concepts of the embodiments of the present invention is provided, following a protocol of the video network, when a first terminal requests to establish a communication connection with a second terminal, a streaming media server first obtains communication data corresponding to the second terminal, then directly initiates a request for establishing an end-to-end communication connection to the second terminal according to the communication data corresponding to the second terminal, and after the establishment is successful, transmits audio and video data to the second terminal through the end-to-end communication connection without passing through the streaming media server.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method, the device, the electronic device and the storage medium for transmitting the audio and video data provided by the invention are introduced in detail, a specific example is applied in the text to explain the principle and the implementation mode of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (13)

1. An audio and video data sending method is applied to a first terminal, and comprises the following steps:
sending a communication connection request to a streaming media server in communication connection with the first terminal, wherein the communication connection request is used for requesting to establish communication connection with a second terminal;
receiving first communication data sent by the streaming media server, wherein the first communication data is communication data corresponding to the second terminal;
establishing a first communication connection for end-to-end communication with the second terminal based on the first communication data;
and sending audio and video data to the second terminal based on the first communication connection.
2. The method of claim 1, further comprising:
when a second communication connection request sent by the second terminal is received, a response representing that the second communication connection request is approved is returned to the second terminal so as to establish a second communication connection for end-to-end communication with the second terminal;
receiving audio and video data sent by the second terminal based on the second communication connection;
the second communication connection request is sent by the second terminal to the first terminal according to second communication data, and the second communication data is sent by the streaming media server to the second terminal when receiving the first communication connection request.
3. The method of claim 1, wherein sending audio-video data to the second terminal based on the first communication connection comprises:
obtaining coding and decoding parameters of the second terminal from the first communication data;
processing the collected audio and video data according to the coding and decoding parameters;
and sending the processed audio and video data to the second terminal based on the first communication connection.
4. The method according to claim 1, wherein establishing a first communication connection for peer-to-peer communication with the second terminal based on the first communication data comprises:
obtaining address information of the second terminal from the first communication data;
and sending a communication connection request to the second terminal according to the address information so as to establish a first communication connection for end-to-end communication with the second terminal.
5. The method of claim 1, wherein after establishing the first communication connection for end-to-end communication with the second terminal, the method further comprises:
and sending a message that the first communication connection is successfully established to the streaming media server so that the streaming media server releases the communication connection with the first terminal.
6. An audio and video data transmission method is applied to a streaming media server, and comprises the following steps:
receiving a communication connection request sent by a first terminal in communication connection with the streaming media server, wherein the communication connection request is used for requesting to establish communication connection between the first terminal and a second terminal;
and sending first communication data corresponding to the second terminal to the first terminal so that the first terminal establishes a first communication connection for end-to-end communication with the second terminal according to the first communication data, and sending audio and video data to the second terminal through the first communication connection.
7. The method of claim 6, further comprising:
responding to a communication connection request sent by a first terminal, sending second communication data corresponding to the first terminal to a second terminal, so that the second terminal establishes second communication connection for end-to-end communication with the first terminal according to the second communication data, and receiving audio and video data sent by the first terminal through the second communication connection.
8. The method according to claim 7, wherein before receiving the communication connection request sent by the first terminal in communication connection with the streaming server, the method further comprises:
acquiring login information of the first terminal and login information of the second terminal;
and acquiring second communication data conforming to the video networking audio and video instant communication protocol based on the login information of the first terminal, and acquiring first communication data conforming to the video networking audio and video instant communication protocol based on the login information of the second terminal.
9. The method of claim 7, further comprising:
after receiving the message that the first communication connection is successfully established and sent by the first terminal, releasing the original communication connection with the first terminal;
and after receiving the message of successful establishment of the second communication connection sent by the second terminal, releasing the original communication connection between the second terminal and the original communication connection between the second terminal.
10. An audio/video data transmission device, applied to a first terminal, the device comprising:
a first sending module, configured to send a communication connection request to a streaming media server in communication connection with the first terminal, where the communication connection request is used to request a second terminal to establish a communication connection;
a first receiving module, configured to receive first communication data sent by the streaming media server, where the first communication data is communication data corresponding to the second terminal;
a first establishing module, configured to establish a first communication connection for performing end-to-end communication with the second terminal based on the first communication data;
and the second sending module is used for sending the audio and video data to the second terminal based on the first communication connection.
11. An audio/video data transmission device, applied to a streaming media server, the device comprising:
a third receiving module, configured to receive a communication connection request sent by a first terminal in communication connection with the streaming media server, where the communication connection request is used to request establishment of a communication connection between the first terminal and a second terminal;
and the fourth sending module is used for sending first communication data corresponding to the second terminal to the first terminal so that the first terminal establishes a first communication connection for end-to-end communication with the second terminal according to the first communication data, and sends audio and video data to the second terminal through the first communication connection.
12. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the method for transmitting audio-visual data according to one of claims 1 to 5 or according to one of claims 6 to 9.
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 when executed implements the steps of the method of claims 1-5 or the method of any of claims 6-9.
CN202010501587.XA 2020-06-04 2020-06-04 Audio and video data sending method and device, electronic equipment and storage medium Pending CN111787261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010501587.XA CN111787261A (en) 2020-06-04 2020-06-04 Audio and video data sending method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010501587.XA CN111787261A (en) 2020-06-04 2020-06-04 Audio and video data sending method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111787261A true CN111787261A (en) 2020-10-16

Family

ID=72753982

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010501587.XA Pending CN111787261A (en) 2020-06-04 2020-06-04 Audio and video data sending method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111787261A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112423012A (en) * 2020-11-18 2021-02-26 青岛华升联信智慧科技有限公司 Multistage-load live broadcast method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364976A (en) * 2007-08-07 2009-02-11 阿里巴巴集团控股有限公司 Method and apparatus for establishing communication channel
US20170195427A1 (en) * 2015-12-31 2017-07-06 Hughes Network Systems, Llc Method and system for automatically bypassing network proxies in the presence of interdependent traffic flows
CN110248134A (en) * 2019-06-19 2019-09-17 视联动力信息技术股份有限公司 A kind of method, apparatus of controlling terminal, electronic equipment and storage medium
CN110691110A (en) * 2018-07-06 2020-01-14 中移(杭州)信息技术有限公司 Communication method, device, system, terminal, equipment and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101364976A (en) * 2007-08-07 2009-02-11 阿里巴巴集团控股有限公司 Method and apparatus for establishing communication channel
US20170195427A1 (en) * 2015-12-31 2017-07-06 Hughes Network Systems, Llc Method and system for automatically bypassing network proxies in the presence of interdependent traffic flows
CN110691110A (en) * 2018-07-06 2020-01-14 中移(杭州)信息技术有限公司 Communication method, device, system, terminal, equipment and medium
CN110248134A (en) * 2019-06-19 2019-09-17 视联动力信息技术股份有限公司 A kind of method, apparatus of controlling terminal, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112423012A (en) * 2020-11-18 2021-02-26 青岛华升联信智慧科技有限公司 Multistage-load live broadcast method

Similar Documents

Publication Publication Date Title
CN110620896B (en) Conference establishing method, system and device
CN109120879B (en) Video conference processing method and system
CN110475090B (en) Conference control method and system
CN110460804B (en) Conference data transmitting method, system, device and computer readable storage medium
CN110545395B (en) Video networking conference switching method and device
CN111478884B (en) Method, device and storage medium for data transmission among different video networks
CN110650171A (en) Video networking service scheduling system and method
CN110138513B (en) Data transmission method and video networking system
CN109347844B (en) Method and device for accessing equipment to Internet
CN111327868A (en) Method, terminal, server, device and medium for setting conference speaking party role
CN109889516B (en) Method and device for establishing session channel
CN110493149B (en) Message processing method and device
CN110446058B (en) Video acquisition method, system, device and computer readable storage medium
CN110336710B (en) Terminal testing method, system and device and storage medium
CN110266577B (en) Tunnel establishment method and video networking system
CN110072154B (en) Video networking-based clustering method and transfer server
CN110087147B (en) Audio and video stream transmission method and device
CN111787261A (en) Audio and video data sending method and device, electronic equipment and storage medium
CN111478940B (en) Data processing method and device
CN110798450B (en) Audio and video data processing method and device and storage medium
CN110536148B (en) Live broadcasting method and equipment based on video networking
CN110233872B (en) Data transmission method based on video network and video network terminal
CN110113563B (en) Data processing method based on video network and video network server
CN110177244B (en) Method and system for polling conference terminal
CN110401807B (en) Communication method and device of video telephone system

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