Audio and video communication method and device, equipment, medium and product
By determining the target communication protocol and configuration information on the Freeswitch platform and establishing a communication transmission channel, the problem that the native mod_h323 module of the Freeswitch platform cannot support H264 video communication is solved, the audio and video communication of the H323 client in the video conference is realized, and the data is ensured Transmission accuracy and efficiency.
Patent Information
- Application Number
- CN202410924860.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2024-10-01
AI Technical Summary
The native mod_h323 module of the Freeswitch platform only supports audio communication and cannot support H264 video communication. As a result, the H323 client can only perform audio communication in video conferences.
By determining the target communication protocol and communication configuration information, a communication transmission channel is established, and audio and video data are transmitted based on the channel to realize audio and video communication. Specific steps include receiving communication requests, determining target communication protocols and configuration information, initializing communication ports, establishing data encoders, and transmitting audio and video data through data transmission channels.
It realizes audio and video communication through the H323 protocol on the Freeswitch platform, ensuring the accuracy and efficiency of data transmission during the communication process, and avoiding data loss and resource waste.
Smart Images

Figure CN118740807A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, in particular to technical fields such as cloud computing and big data, and specifically to audio and video communication methods, devices, equipment, media and products. Background Art
[0002] Freeswitch is an open source telephone software switching platform. It is a cross-platform, highly scalable, multi-protocol telephone software switching platform.
[0003] With the help of Freeswitch platform, H323 clients can access real-time communication (RTC) video conferences. However, the mod_h323 module natively provided by Freeswitch platform only supports audio communication, but not common H264 video communication. This means that when H323 clients join TRC video conferences, they can only communicate with other participants in the conference through audio. Summary of the invention
[0004] The present disclosure provides an audio and video communication method, device, equipment, medium and product.
[0005] According to a first aspect of the present disclosure, there is provided an audio and video communication method, comprising:
[0006] Determine, according to the received communication request, a target communication protocol and communication configuration information corresponding to the target communication protocol;
[0007] Establish a communication transmission channel according to the target communication protocol and communication configuration information;
[0008] Transmit audio and video data based on communication transmission channels.
[0009] In some embodiments, the above-mentioned determining the target communication protocol and the communication configuration information corresponding to the target communication protocol according to the received communication request includes:
[0010] Determine, based on the received communication request, the terminal communication protocol, terminal encoding information, and terminal communication port supported by the sender of the communication request;
[0011] According to the terminal communication protocol, determine the target communication protocol from the candidate protocol set;
[0012] Determine communication configuration information corresponding to the target communication protocol based on the target communication protocol, terminal encoding information and terminal communication port.
[0013] In some embodiments, the communication configuration information includes a target communication port, and establishing a communication transmission channel according to the target communication protocol and the communication configuration information includes:
[0014] Initialize the target communication port;
[0015] A communication transmission channel is established according to the target communication protocol and the initialized target communication port.
[0016] In some embodiments, the communication configuration information includes a communication coding format, and the method further includes:
[0017] Determine and initialize the target data encoder according to the communication encoding format.
[0018] In some embodiments, the above-mentioned transmission of audio and video data based on the data transmission channel includes:
[0019] Processing the audio and video data received through the data transmission channel based on the target encoder to obtain encoded data;
[0020] The encoded data is sent using a data transmission channel.
[0021] In some embodiments, the above method includes:
[0022] In response to receiving the key frame acquisition request, determining a counterparty indicated by the key frame acquisition request;
[0023] Forward the key frame acquisition request to the counterparty;
[0024] In response to receiving the key frame data returned by the counterparty in response to the key frame acquisition request, the key frame data is sent to the sender of the key frame acquisition request.
[0025] According to a second aspect of the present disclosure, there is provided an audio and video communication device, comprising:
[0026] The protocol determination module is configured to determine the target communication protocol and the communication configuration information corresponding to the target communication protocol according to the received communication request;
[0027] A channel establishment module is configured to establish a communication transmission channel according to a target communication protocol and communication configuration information;
[0028] The data transmission module is configured to transmit audio and video data based on a communication transmission channel.
[0029] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0030] at least one processor; and
[0031] a memory communicatively connected to at least one processor; wherein,
[0032] The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to execute the method provided by the first aspect.
[0033] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, where the computer instructions are used to cause a computer to execute the method provided in the first aspect.
[0034] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method provided according to the first aspect when executed by a processor.
[0035] According to the audio and video communication method provided by the present disclosure, the execution subject first determines the target communication protocol for responding to the communication request and the communication configuration information corresponding to the target communication protocol according to the received communication request; then establishes a communication transmission channel according to the target communication protocol and the communication configuration information, and uses the established communication transmission channel to transmit audio and video data to achieve audio and video communication. In this solution, the execution subject accurately determines the target communication protocol and its corresponding communication configuration information, performs resource configuration and establishes a communication transmission channel according to the target communication protocol and the communication configuration information to transmit audio and video data, achieve audio and video communication, and ensure the accuracy of audio and video data transmission during the communication process to avoid data loss or resource waste.
[0036] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0038] Figure 1 is an exemplary system architecture diagram to which the audio and video communication method of the present disclosure can be applied;
[0039] Figure 2 is a schematic diagram of a first embodiment of an audio and video communication method according to the present disclosure;
[0040] Figure 3 is a schematic diagram of a second embodiment of the audio and video communication method according to the present disclosure;
[0041] Figure 4 is a schematic diagram of an application scenario of the audio and video communication method according to the present disclosure;
[0042] Figure 5 is a schematic diagram of an embodiment of an audio and video communication device according to the present disclosure;
[0043] Figure 6 It is a block diagram of an electronic device used to implement the audio and video communication method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0044] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0045] Freeswitch is an open source, cross-platform real-time communication framework with high scalability, stability, compatibility, ease of use and customizability. It is widely used in the field of real-time communication, such as online meetings involving multiple parties.
[0046] H323 is a protocol for multimedia communication, which is a protocol developed by ITU-T (International Telecommunication Union Telecommunication Standardization Sector). H323 is mainly aimed at multimedia communication on local area networks (LANs), including audio, video, data, etc.
[0047] The present invention provides an audio and video communication method, which can be applied to a Freeswitch platform and implemented through an H323 protocol.
[0048] It should be pointed out that in the technical solution of the present disclosure, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0049] Figure 1 An exemplary system architecture 100 is shown to which an embodiment of the audio / video communication method or apparatus of the present disclosure can be applied.
[0050] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The network 102 is used to provide a communication link between the terminal device 101 and the server 103, and may include various connection types, such as a wired communication link, a wireless communication link or an optical fiber cable.
[0051] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send information, etc. Various client applications can be installed on the terminal device 101, such as social applications, human-computer interaction applications, leisure or entertainment applications, etc.
[0052] The terminal device 101 can be hardware or software. When the terminal device 101 is hardware, it can be various electronic devices, including but not limited to independent electronic devices such as smart phones, tablet computers, laptop computers and desktop computers. When the terminal device 101 is software, it can be installed in the above electronic devices. It can be implemented as multiple software or software modules, or as a single software or software module. No specific limitation is made here.
[0053] The server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or as a single software or software module. No specific limitation is made here.
[0054] The audio and video communication method provided in the embodiments of the present disclosure is generally executed by the server 103 , and accordingly, the audio and video communication device is generally disposed in the server 103 .
[0055] It should be noted that Figure 1 The number of terminal devices 101, networks 102 and servers 103 in the embodiment is only for illustration. Any number of terminal devices 101, networks 102 and servers 103 may be provided according to implementation requirements.
[0056] Figure 2 A process 200 of an embodiment of the audio and video communication method according to the present disclosure is shown, referring to Figure 2 As shown, the audio and video communication method includes the following steps:
[0057] Step S201: determining a target communication protocol and communication configuration information corresponding to the target communication protocol according to a received communication request.
[0058] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1 The server 103 shown determines, based on the received communication request, a target communication protocol to be used for communicating with the communication requester and communication configuration information corresponding to the target communication protocol.
[0059] The execution subject may receive the communication request by receiving signaling. The communication request is a signal from a terminal device (e.g. Figure 1 Sent by the terminal device 101) shown in the figure.
[0060] Exemplarily, the communication request may be a request to join a meeting, a request to create an online meeting, or other requests for online communication.
[0061] After receiving the communication request, the above-mentioned execution entity parses and processes the communication request, for example, after parsing, performs signaling negotiation with the sender of the communication request to determine the target communication protocol used for communication between the execution entity and the sender and the communication configuration information corresponding to the target communication protocol.
[0062] In some implementations of the embodiments of the present disclosure, a target communication protocol and communication configuration information corresponding to the target communication protocol are determined based on a received communication request, including: determining, based on the received communication request, a terminal communication protocol, terminal encoding information, and a terminal communication port supported by the sender of the communication request; determining, based on the terminal communication protocol, a target communication protocol from a set of candidate protocols; and determining, based on the target communication protocol, the terminal encoding information, and the terminal communication port, the communication configuration information corresponding to the target communication protocol.
[0063] In this implementation, after receiving the communication request, the execution subject parses the received communication request to determine the terminal communication protocol, terminal encoding information and terminal communication port supported by the sender of the communication request.
[0064] In some implementations, the sender of the communication request supports only one terminal communication protocol, for example, the H323 protocol.
[0065] In some implementations, the terminal communication protocols supported by the sender of the communication request may include more than two communication protocols, for example, SIP (Session Initiation Protocol) protocol and H323 protocol.
[0066] In some implementations, the terminal coding information supported by the sender of the communication request includes, but is not limited to, data coding format, first data payload, call rate, etc. The data coding format includes at least an audio coding format and a video coding format. The first data payload refers to the data transmission payload supported by the sender of the communication request, including at least an audio transmission payload and a video transmission payload. The call rate is the data transmission speed of the sender of the communication request during the communication process.
[0067] Exemplarily, the above-mentioned execution subject can determine the communication coding format executed by the execution subject during the communication process by determining the data coding format supported by the sender of the communication request; by determining the first data payload supported by the sender of the communication request, the payload for identifying data during the communication process can be adaptively configured to avoid data loss due to insufficient configuration resources or resource waste due to excessive resource configuration; by determining the call rate supported by the sender of the communication request, the code rate of data encoding in subsequent communication processes can be determined to ensure data coding efficiency during the communication process.
[0068] In this solution, the communication protocols supported by the execution subject include multiple types, and the multiple communication protocols supported by the execution subject can constitute a candidate protocol set. After receiving a communication request and determining the terminal communication protocol supported by the sender of the communication request, the execution subject determines the target communication protocol for communicating with the sender from its candidate protocol set according to the terminal communication protocol supported by the sender of the communication request through signaling negotiation.
[0069] Exemplarily, the target communication protocol determined by the execution subject is adapted to the terminal communication protocol supported by the sender. For example, the two may be the same (for example, both the terminal communication protocol and the target communication protocol are H323 protocols).
[0070] After determining the target communication protocol, the execution subject determines the communication configuration information required for the execution subject to communicate with the sender using the target communication protocol based on the target communication protocol and the terminal encoding information and terminal communication port supported by the sender.
[0071] Exemplarily, the communication configuration information includes but is not limited to at least one of the following: communication coding format, data coding rate, data identification load, target communication port, etc. Among them, the communication coding format includes but is not limited to audio coding format and video coding format. The data coding rate is adapted to the call rate of the sender of the communication request, for example, the data coding rate of the execution subject can be greater than or equal to the call rate of the sender. The data identification load is adapted to the first data load of the sender of the communication request, for example, the data identification load can be greater than or equal to the first data load of the sender. Exemplarily, the data identification load includes at least an audio identification load and a video identification load. Among them, the target communication port is used to adapt to the terminal communication port of the sender of the communication request so as to establish a data transmission channel between the two.
[0072] In this solution, the execution entity parses the communication request to determine the terminal communication protocol, terminal coding information and terminal communication port supported by the sender of the communication request, and determines the target communication protocol from the candidate protocol set based on the terminal communication protocol; then, based on the target communication protocol, terminal coding information and terminal communication port, the communication configuration information corresponding to the target communication protocol is determined, so as to accurately configure communication resources according to the communication configuration information, ensure the data transmission efficiency and accuracy with the sender of the communication request during the communication process, and avoid data loss and resource waste.
[0073] Step S202: establishing a communication transmission channel according to the target communication protocol and communication configuration information.
[0074] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1The server 103 shown establishes a communication transmission channel according to the target communication protocol and communication configuration information determined in step S201.
[0075] In some implementations of the embodiments of the present disclosure, the communication configuration information includes a target communication port, and establishing a communication transmission channel according to the target communication protocol and the communication configuration information includes: initializing the target communication port; establishing a communication transmission channel according to the target communication protocol and the initialized target communication port.
[0076] Exemplarily, the target communication port includes at least an RTP (Real-Time Transport Protocol) port and an RTCP (Real-Time Control Protocol) port, wherein the RTP port may include an audio transmission port and a video transmission port.
[0077] In the process of determining the communication configuration information corresponding to the target communication protocol in step S201, the execution subject determines the target communication port used by the execution subject to communicate with the sender of the communication request, and then initializes each transmission port (such as RTP port, RTCP port, etc.) in the target communication port, and then establishes a communication transmission channel between the execution subject and the sender of the communication request based on the initialized target transmission ports according to the requirements or needs of the target communication protocol. For example, a communication transmission channel is established between the target transmission port and the terminal communication port of the sender of the communication request.
[0078] In some implementations, the above-mentioned execution entity establishes a first transmission channel between a module port supporting the target communication protocol and a target transmission port within itself according to the target communication protocol, and then establishes a communication transmission channel between the target transmission port and a terminal communication port of the sender of the communication request, and realizes audio and video data transmission during the communication process under the target communication protocol through the internal first transmission channel and the external communication transmission channel.
[0079] In the embodiment of the present disclosure, the execution entity initializes the target communication port after determining the target communication port, and establishes a communication transmission channel in combination with the target communication protocol, to ensure that audio and video communication with the sender of the communication request is achieved through the communication transmission channel under the target communication protocol, and effectively ensure the stability of data transmission during the audio and video communication process under the target protocol.
[0080] Step S203: transmitting audio and video data based on the communication transmission channel.
[0081] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1The server 103 shown transmits audio and video data based on the communication transmission channel established in step S202 to achieve audio and video communication.
[0082] The communication transmission channel is a bidirectional transmission channel or a data transmission channel including transmission in two directions, which can receive audio and video data as well as send audio and video data. Exemplarily, the communication transmission channel can be used to receive communication data such as audio data and video data from the sender of the communication request, and can also be used to send communication data received from other communication participants to the sender of the communication request.
[0083] In some implementations of the embodiments of the present disclosure, the audio and video communication method is applied to the Freeswitch platform, the determined target communication protocol includes the H323 communication protocol, and the established communication transmission channel includes an audio transmission channel and a video transmission channel.
[0084] In this implementation, the above audio and video communication method is applied to the Freeswitch platform, for example, its execution subject may be a Freeswitch server.
[0085] Exemplarily, in this solution, the sender of the communication request may be an H323 client, for example, a terminal device that only supports the H323 communication protocol. Accordingly, the terminal communication protocol in the communication request sent by the terminal device is the H323 communication protocol.
[0086] According to the communication request, the target communication protocol determined by the execution subject includes the H323 communication protocol and the first coding format supported by the communication request sender, the terminal communication port and other information. According to the target communication protocol, the execution subject determines that the module for executing the communication protocol is mod_h323, and according to the configuration information in mod_h323, combined with the first coding format supported by the communication request sender, the first communication format and other information, determines the communication coding format and target communication port corresponding to the target communication protocol, such as the communication coding format such as the audio coding format and the video coding format, and the target communication port such as the RTP port and the RTCP port. Then, according to the target communication protocol, the communication coding format, the target communication port and other information, establish the corresponding communication transmission channel such as the audio transmission channel and the video transmission channel.
[0087] In the actual communication process, audio data is transmitted through the audio transmission channel and video data is transmitted through the video transmission channel between the execution subject and the sender of the communication request.
[0088] In some implementations of the embodiments of the present disclosure, the communication configuration information includes a communication coding format; and the audio and video communication method further includes: determining and initializing a target data encoder according to the communication coding format.
[0089] In this implementation, the above-mentioned execution subject determines the communication coding format in the communication process during the process of determining the communication configuration information; then before data transmission, it determines the target data encoder used in the communication process according to the communication coding format and initializes the target data encoder.
[0090] Exemplarily, the communication coding format includes an audio coding format and a video coding format. Correspondingly, the target data encoder includes an audio encoder and a video encoder. The execution subject determines and initializes the audio encoder according to the audio coding format, and determines and initializes the video encoder according to the video coding format.
[0091] In this scheme, after determining the target communication protocol, the executing entity determines the communication coding format supported under the target communication protocol according to the target communication protocol, and then determines the target data encoder to be used in the communication process, and initializes the target data encoder to provide data coding guarantees during the audio and video transmission process, ensure the accuracy of the data coding format, ensure that the data is encoded in an accurate format and sent during the audio and video communication process, thereby ensuring that the data is effectively received by the participants in the audio and video communication.
[0092] In some implementations of the embodiments of the present disclosure, transmitting audio and video data based on a communication transmission channel includes: processing the audio and video data received through the communication transmission channel based on a target data encoder to obtain encoded data; and sending the encoded data using the communication transmission channel.
[0093] In this scheme, the execution subject uses the initialized target data encoder to encode the audio and video data received through the communication transmission channel to obtain encoded data, and then uses the communication transmission channel to send the encoded data to each participant in the audio and video communication process.
[0094] Exemplarily, the target data encoder includes an audio encoder and a video encoder, and accordingly, the obtained encoded data includes audio encoded data and video encoded data.
[0095] According to the audio and video communication method provided by the embodiment of the present disclosure, the execution subject parses the received communication request, determines the target communication protocol for communicating with the sender of the communication request and the communication configuration information corresponding to the target communication protocol, and establishes a communication transmission channel based on the target communication protocol to transmit audio and video data. In this solution, the execution subject accurately determines the target communication protocol and its corresponding communication configuration information, configures resources according to the target communication protocol and the communication configuration information, and establishes a communication transmission channel to transmit audio and video data, realize audio and video communication, and ensure the accuracy of audio and video data transmission during the communication process to avoid data loss or resource waste.
[0096] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as communication ports, audio and video data, etc.) are all carried out with the user's knowledge and explicit authorization, comply with the relevant laws and regulations, and do not violate public order and good morals.
[0097] Figure 3 The process 300 of the second embodiment of the audio and video communication method according to the present disclosure is shown. Figure 3 As shown, the audio and video communication method includes the following steps:
[0098] Step S301: determining a target communication protocol and communication configuration information corresponding to the target communication protocol according to a received communication request.
[0099] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1 The server 103 shown determines, based on the received communication request, a target communication protocol to be used for communicating with the communication requester and communication configuration information corresponding to the target communication protocol.
[0100] Step S301 and Figure 2 Step S201 of the illustrated embodiment is basically the same, and the specific implementation method can refer to the above description of step S201, which will not be repeated here.
[0101] Step S302: establishing a communication transmission channel according to the target communication protocol and communication configuration information.
[0102] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1 The server 103 shown establishes a communication transmission channel according to the target communication protocol and communication configuration information determined in step S301.
[0103] Step S302 and Figure 2 Step S202 of the illustrated embodiment is basically the same, and the specific implementation method can refer to the above description of step S202, which will not be repeated here.
[0104] Step S303: transmitting audio and video data based on the communication transmission channel.
[0105] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1 The server 103 shown transmits audio and video data based on the communication transmission channel established in step S302 to achieve audio and video communication.
[0106] Step S303 and Figure 2 Step S203 of the illustrated embodiment is basically the same, and the specific implementation method can refer to the above description of step S203, which will not be repeated here.
[0107] Step S304: in response to receiving the key frame acquisition request, determining a counterparty indicated by the key frame acquisition request.
[0108] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1 The server 103 shown, in the process of transmitting audio and video data with each terminal, responds to receiving a key frame acquisition request from any party, parses the key frame acquisition request, and determines the counterparty indicated by the key frame acquisition request.
[0109] The counterparty of the key frame acquisition request refers to the initial source of the key frame data to be acquired.
[0110] For example, four persons, A, B, C, and D, realize audio and video communication through the execution subject of the present invention. During this process, the audio and video data received by A about B becomes stuck, and A sends a key frame acquisition request about B to the execution subject, and the key frame acquisition request carries the data port of B. After receiving the key frame acquisition request, the execution subject parses and determines that the counterparty of the key frame acquisition request is B, and then forwards the key frame acquisition request to B or the mixed stream server, and sends the received data returned for this key frame acquisition request to A.
[0111] Step S305: forward the key frame acquisition request to the counterparty.
[0112] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1 The server 103 shown, after determining the counterparty of the key frame acquisition request, forwards the received key frame acquisition request to the counterparty.
[0113] In some implementations, the execution subject transmits audio and video data between multiple audio and video communication participants according to their corresponding data ports. The execution subject only encodes and forwards the audio data and video data in the communication process, and does not perform other processing. Therefore, after receiving the key frame data acquisition request, the process of regenerating or extracting the key frame data is not executed. After determining the counterparty of the key frame acquisition request, the key frame acquisition request is directly forwarded to the counterparty, and the counterparty returns the key frame data in response according to the key frame acquisition request.
[0114] Exemplarily, the execution subject determines the data port carried in the key frame acquisition request by parsing the key frame acquisition request, and determines the counterparty of the key frame acquisition request accordingly.
[0115] In some implementations, when the audio and video data of multiple participants in audio and video communication are distributed to other participants through the execution subject, the audio and video data of each participant are mixed by the mixing server, and the audio data of each participant is mixed into one audio data stream, and the video data of each participant is mixed into one video data stream, and then the mixed audio data stream and video data stream are distributed to each participant through the execution subject. In this case, the execution subject parses the key frame acquisition request, determines that the request is a key frame acquisition request, and then determines that the counterparty of the key frame acquisition request is the mixing server, and then forwards the key frame acquisition request to the mixing server, and the mixing server parses the key frame data port and other information in the key frame acquisition request, and then extracts or generates the corresponding key frame data and returns it to the execution subject.
[0116] Step S306: in response to receiving the key frame data returned by the counterparty in response to the key frame acquisition request, the key frame data is sent to the sender of the key frame request.
[0117] In the embodiment of the present disclosure, the execution subject of the audio and video communication method, for example Figure 1 The server 103 shown, after forwarding the key frame acquisition request to the counterparty, in response to receiving the key frame data returned by the counterparty, forwards the key frame data to the sender of the key frame acquisition request, thereby completing the key frame data re-acquisition process.
[0118] According to the audio and video communication method provided by the embodiment of the present disclosure, after determining the target communication protocol and the corresponding communication configuration information, a communication transmission channel is established for audio and video transmission to realize audio and video communication. In this process, after receiving a key frame acquisition request, the counterparty of the key frame acquisition request is determined, and then the key frame acquisition request is conveyed to the counterparty. After the counterparty returns the corresponding key frame data, the key frame data is sent to the sender of the key frame acquisition request, thereby ensuring the accuracy of key frame data acquisition, improving audio and video communication effects, and enhancing user experience.
[0119] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as communication ports, audio and video data, etc.) are all carried out with the user's knowledge and explicit authorization, comply with the relevant laws and regulations, and do not violate public order and good morals. Figure 4 An application scenario 400 of the audio and video communication method according to the present disclosure is shown, referring to Figure 4As shown, in this scenario, taking an online meeting as an example, the H323 device 410 is a terminal device that can only communicate through the H323 communication protocol. As one of the participants in the online meeting, the H323 device 410 participates in the online meeting through the Freeswitch platform 430. Among them, the Gnugk gatekeeper 420 is an open source H.323Gatekeeper (gatekeeper) that can run in multiple environments such as Linux, Windows, and Unix. The H323 device 410 establishes a connection with the Freeswitch platform 430 through the Gnugk gatekeeper 420 and realizes communication.
[0120] In this scenario, the specific process of the H323 device 410 participating in the online conference for audio and video communication is as follows:
[0121] Before the H323 device 410 performs audio and video communication through the Freeswitch platform 430, it needs to register on the Freeswitch platform 430 through the Gnugk gatekeeper 420. After completing the registration, the signaling of the communication request can be sent to the Freeswitch platform 430 through the Gnugk gatekeeper 420. After receiving the signaling of the communication request, the Freeswitch platform 430 parses the signaling to determine that the terminal communication protocol supported by the H323 device 410 is the H323 communication protocol and the data encoding format it supports (for example, the video encoding format is H264), and parses the audio and video payload of the H323 device 410, as well as the call rate of the H323 device 410; then the Freeswitch platform 430 determines the target communication protocol as the H323 communication protocol and the communication encoding format supported by both parties (for example, the video encoding format is H264) based on the communication protocol and data encoding format supported by itself and the information obtained by parsing the above signaling; then the Freeswitch platform 430 and the H323 device 410 determine the RTP port and RTCP port of both parties through signaling negotiation.
[0122] After the signaling negotiation is completed, the Freeswitch platform 430 determines and initializes the target data encoder according to the previously determined communication coding format, and initializes the negotiated RTP port and RTCP port and the corresponding channels, and accordingly establishes the corresponding RTP channel and RTCP channel with the H323 device 410 as the communication transmission channel to transmit media data and realize audio and video communication involving the H323 device 410.
[0123] In the process of establishing the communication transmission channel, the Freeswitch platform 430 calls the internal interface of the mod_h323 module 431 for the H323 communication protocol and the external interface of the Freeswitch platform 430, and connects with the corresponding port of the H323 device 410 to form a communication transmission channel.
[0124] When the Freeswitch platform 430 receives communication data and forwards it to other participants, it calls the forwarding function in the mod_h323 module 431 to implement data forwarding under the H323 communication protocol.
[0125] In the related art, the mod_h323 module natively provided by the Freeswitch platform only supports audio communication, but cannot support common H264 video communication. In this solution, the configuration information in the mod_h323 module is improved and perfected, such as adding configuration information related to the encoding, transmission and reception of video data, so that the improved mod_h323 module 431 can support video communication and audio and video communication with H323 devices.
[0126] Exemplarily, this solution adds information such as the encoding format of the video data (such as H264-Base, H264-Main and H264-High, etc.), video data transmission port, video data identification and encoding speed in the mod_h323 module 431, so that the mod_h323 module 431 can support the H323 device 410 for h264 video communication, and combine its original audio access capability to effectively realize the audio and video communication of the H323 device under the H323 communication protocol.
[0127] It should be pointed out that in the technical solution of the present invention, the acquisition, storage and application of user personal information (such as communication ports, audio and video data, etc.) are all carried out with the user's knowledge and explicit authorization, comply with the relevant laws and regulations, and do not violate public order and good morals.
[0128] As an implementation of the audio and video communication method shown in the above figures, Figure 5 An embodiment of an audio and video communication device according to the present disclosure is shown. Figure 2 Corresponding to the method embodiment shown, the device can be applied to various electronic devices or servers.
[0129] Reference Figure 5As shown, the audio and video communication device 500 provided by the embodiment of the present disclosure includes: a protocol determination module 501, a channel establishment module 502 and a data transmission channel 503. Among them, the protocol determination module 501 is configured to determine the target communication protocol and the communication configuration information corresponding to the target communication protocol according to the received communication request; the channel establishment module 502 is configured to establish a communication transmission channel according to the target communication protocol and the communication configuration information; the data transmission module 503 is configured to transmit audio and video data based on the communication transmission channel.
[0130] In the audio and video communication device 500 of the embodiment of the present disclosure, the specific processing of the protocol determination module 501, the channel establishment module 502 and the data transmission channel 503 and the technical effects thereof can be referred to in detail. Figure 2 The relevant descriptions of steps S201-S203 in the corresponding embodiment are not repeated here.
[0131] In some implementations of the embodiments of the present disclosure, the protocol determination module is configured to: determine, based on a received communication request, the terminal communication protocol, terminal encoding information, and terminal communication port supported by the sender of the communication request; determine, based on the terminal communication protocol, the target communication protocol from a set of candidate protocols; and determine, based on the target communication protocol, the terminal encoding information, and the terminal communication port, the communication configuration information corresponding to the target communication protocol.
[0132] In some implementations of the embodiments of the present disclosure, the communication configuration information includes a target communication port, and the channel establishment module is configured to: initialize the target communication port; and establish a communication transmission channel according to the target communication protocol and the initialized target communication port.
[0133] In some implementations of the embodiments of the present disclosure, the communication configuration information includes a communication coding format, and the audio and video communication device also includes an encoder determination module, which is configured to determine and initialize a target data encoder according to the information coding format.
[0134] In some implementations of the embodiments of the present disclosure, the data transmission channel is configured to process the audio and video data received through the data transmission channel based on the target data encoder to obtain encoded data; and send the encoded data using the data transmission channel.
[0135] In some implementations of the embodiments of the present disclosure, the audio and video communication device also includes a request processing module, which is configured to, in response to receiving a key frame acquisition request, determine the counterparty indicated by the key frame acquisition request; forward the key frame acquisition request to the counterparty; and in response to receiving the key frame data returned by the counterparty in response to the key frame acquisition request, send the key frame data to the sender of the key frame acquisition request.
[0136] In the audio and video communication device of the present disclosure, the specific processing of the request processing module and the technical effects thereof can be referred to in Figure 3 The relevant descriptions of steps S304-S306 in the corresponding embodiment are not repeated here.
[0137] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0138] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0139] like Figure 6 As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from a storage unit 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0140] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0141] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 601 performs the various methods and processes described above, such as audio and video communication methods. For example, in some embodiments, the audio and video communication method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the audio and video communication method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the audio and video communication method in any other appropriate manner (e.g., by means of firmware).
[0142] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0143] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0144] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0145] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0146] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0147] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0148] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0149] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An audio and video communication method, comprising: Determining a target communication protocol and communication configuration information corresponding to the target communication protocol according to the received communication request; Establishing a communication transmission channel according to the target communication protocol and the communication configuration information; The audio and video data are transmitted based on the communication transmission channel.
2. The method according to claim 1, wherein: The step of determining a target communication protocol and communication configuration information corresponding to the target communication protocol according to the received communication request includes: Determining, according to the received communication request, a terminal communication protocol, terminal encoding information, and terminal communication port supported by the sender of the communication request; Determining a target communication protocol from a set of candidate protocols according to the terminal communication protocol; Communication configuration information corresponding to the target communication protocol is determined according to the target communication protocol, the terminal encoding information and the terminal communication port.
3. The method according to claim 1, wherein: The communication configuration information includes a target communication port, and The establishing of a communication transmission channel according to the target communication protocol and the communication configuration information comprises: Initialize the target communication port; A communication transmission channel is established according to the target communication protocol and the initialized target communication port.
4. The method according to claim 1, wherein: The communication configuration information includes a communication coding format, and The method further comprises: A target data encoder is determined and initialized according to the communication encoding format.
5. The method according to claim 4, wherein: The transmitting of audio and video data based on the data transmission channel comprises: Processing the audio and video data received through the data transmission channel based on the target data encoder to obtain encoded data; The encoded data is sent using the data transmission channel.
6. The method according to claim 1, further comprising: In response to receiving a key frame acquisition request, determining a counterparty indicated by the key frame acquisition request; forwarding the key frame acquisition request to the counterparty; In response to receiving the key frame data returned by the counterparty in response to the key frame acquisition request, the key frame data is sent to the sender of the key frame acquisition request.
7. The method according to any one of claims 1 to 6, wherein: The method is applied to the Freeswitch platform, the target communication protocol includes the H323 communication protocol, and the data transmission channel includes an audio transmission channel and a video transmission channel.
8. An audio and video communication device, comprising: A protocol determination module, configured to determine a target communication protocol and communication configuration information corresponding to the target communication protocol according to a received communication request; A channel establishment module, configured to establish a communication transmission channel according to the target communication protocol and the communication configuration information; The data transmission module is configured to transmit audio and video data based on the communication transmission channel.
9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-7.
11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.
