CN114040130A - Method, system and computer readable storage medium for dynamically switching single and double sound channels - Google Patents

Method, system and computer readable storage medium for dynamically switching single and double sound channels Download PDF

Info

Publication number
CN114040130A
CN114040130A CN202111308825.6A CN202111308825A CN114040130A CN 114040130 A CN114040130 A CN 114040130A CN 202111308825 A CN202111308825 A CN 202111308825A CN 114040130 A CN114040130 A CN 114040130A
Authority
CN
China
Prior art keywords
packet loss
loss rate
sound channel
type
channel
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
CN202111308825.6A
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.)
Shenzhen Rayvision Technology Co ltd
Original Assignee
Shenzhen Rayvision 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 Shenzhen Rayvision Technology Co ltd filed Critical Shenzhen Rayvision Technology Co ltd
Priority to CN202111308825.6A priority Critical patent/CN114040130A/en
Publication of CN114040130A publication Critical patent/CN114040130A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/268Signal distribution or switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • H04N7/147Communication arrangements, e.g. identifying the communication as a video-communication, intermediate storage of the signals

Abstract

The application relates to a method, a system and a computer readable storage medium for dynamically switching single and double sound channels, belonging to the field of communication, wherein the method comprises the steps of continuously detecting the network state and obtaining the packet loss rate of the network under the condition that a calling party and a called party establish a conversation; then, based on the packet loss rate and the type of the sound channel used in the current call, the relationship between the packet loss rate and a preset first packet loss rate threshold and a preset second packet loss rate threshold is determined as follows: under the condition that the type of the sound channel used for the current call is a single sound channel, judging whether the packet loss rate is smaller than the first packet loss rate threshold value, if so, switching the single sound channel into a double sound channel; and under the condition that the type of the sound channel used for the current call is a double-sound channel, judging whether the packet loss rate is greater than the second packet loss rate threshold value, and if so, switching the double-sound channel into a single-sound channel. The method and the device have the advantages that the real-time dynamic switching of the single track and the double tracks is realized, and therefore the effect of user experience is improved.

Description

Method, system and computer readable storage medium for dynamically switching single and double sound channels
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a system, and a computer-readable storage medium for dynamically switching between a single channel and a dual channel.
Background
In a traditional real-time audio and video system, two parties of a call negotiate in advance before the call to exchange and determine a single channel and a double channel used by the call, a corresponding coding and decoding format and the like, the single channel and the double channel used by the call are generally not changed after the call is determined, and if the single channel and the double channel need to be changed, the negotiation is needed again, and the process is complex.
Aiming at the related technologies, the inventor finds that the adaptability of the method to the network is poor, and under the condition that a wired network and a wireless network commonly exist, if a dual-channel is used in a weak network, the code rate is too large, packet loss is serious, and the conversation quality is influenced; in a wired network with a good network, if a single channel is used, the bandwidth cannot be fully utilized, so that the improvement of voice quality is limited, and the user experience is poor.
Disclosure of Invention
In order to realize real-time dynamic switching of a single channel and a double channel so as to improve user experience, the application provides a method, a system and a computer readable storage medium for dynamically switching the single channel and the double channel.
In a first aspect, the present application provides a method for dynamically switching between a mono channel and a binaural channel, which adopts the following technical scheme:
a method of dynamically switching between mono and binaural channels, comprising:
under the condition that a calling party establishes a call with a called party, continuously detecting the network state and obtaining the packet loss rate of the network;
under the condition that the type of the sound channel used for the current call is a single sound channel, judging whether the packet loss rate is smaller than a preset first packet loss rate threshold value or not, and if so, switching the single sound channel into a double sound channel;
and under the condition that the type of the sound channel used for the current call is a double sound channel, judging whether the packet loss rate is greater than a preset second packet loss rate threshold value, and if so, switching the double sound channel into a single sound channel.
By adopting the technical scheme, the network state is continuously detected in the process of the two-party conversation, and the relation between the packet loss rate and the preset first packet loss rate threshold and second packet loss rate threshold is judged according to the obtained packet loss rate of the network and the type of the sound channel used by the current conversation; if the type of the sound channel used for the current call is a single sound channel and the packet loss rate is smaller than a first packet loss rate threshold value, switching the single sound channel into a double sound channel; if the current sound channel type is a double sound channel and the packet loss rate is greater than a second packet loss rate threshold value, switching the double sound channel into a single sound channel;
in the process of communication, the automatic switching between the single channel and the double channels can be realized according to the network condition, so that the condition that the double channels are used in the weak network and the single channel is used in the good network is avoided, the real-time dynamic switching between the single channel and the double channels is realized, and the user experience is improved.
Optionally, the step of determining the type of the sound channel used by the current call includes:
receiving an RTP data packet;
determining the sound channel type of the voice frame based on the RTP data packet;
determining the type of the sound channel used by the current call based on the determined type of the sound channel of the voice frame, and decoding and playing the obtained voice data; wherein the voice data is included in the RTP data packet.
Optionally, the step of determining the channel type of the speech frame includes:
detecting whether an extension mark is included in the RTP data packet;
if not, omitting the RTP standard header, and determining the sound channel type of the voice frame as the sound channel type negotiated by the calling party and the called party in advance;
if yes, determining the sound channel type of the voice frame according to the channel number in the RTP extension header.
By adopting the technical scheme, whether the RTP data packet comprises the extension mark or not is detected to determine the sound channel type of the voice frame, so that the method is convenient.
Optionally, the method for dynamically switching between mono and binaural channels further includes:
judging whether the switched sound channel type is the same as the sound channel type initially negotiated by the calling party and the called party;
if yes, omitting the RTP standard header;
and if not, adding an RTP extension header in the RTP data packet.
By adopting the technical scheme, for example, the initially negotiated sound channel type is a single sound channel, if the switched sound channel type is a double sound channel, an RTP extension head part must be added in an RTP data packet, so that the sound channel types of a calling party and a called party are both double sound channels; if the switched channel type is a mono channel, since the channel type is the same as the initially negotiated channel type, the RTP standard header may be omitted, so that the calling party and the called party perform encoding and decoding according to the negotiated channel type.
Optionally, the step of obtaining a packet loss ratio of the network includes:
receiving a fed back RTCP receiver report;
calculating an average packet loss rate within X seconds based on the RTCP receiver report; wherein X is greater than or equal to 1.
By adopting the technical scheme, the average packet loss rate in X seconds is taken as the actual packet loss rate of the network, so that the error of the calculation of the packet loss rate can be reduced.
Optionally, the average packet loss rate in X seconds = 60% of the packet loss rate in the (X-1) th second + 40 of the packet loss rate in the xth second.
Optionally, the RTP packet packing format includes an RTP standard header, an RTP extension header, and RTP data; wherein the RTP standard header is packaged according to the definition of RFC3550, the RTP extension header is packaged according to the definition of RFC5285, and the RTP data comprises 20 ms voice.
In a second aspect, the present application provides a system for dynamically switching between a single channel and a dual channel, which adopts the following technical solutions:
a dynamically switched monaural and binaural system, comprising:
the packet loss rate acquisition module is used for continuously detecting the network state and acquiring the packet loss rate of the network under the condition that a calling party and a called party establish a call;
the first judging module is used for judging whether the packet loss rate is smaller than a preset first packet loss rate threshold value or not on the basis of the packet loss rate and under the condition that the type of the sound channel used for the current call is a single sound channel; under the condition that the type of the sound channel used for the current call is a dual sound channel, judging whether the packet loss rate is greater than a preset second packet loss rate threshold value or not;
the sound channel switching module is used for switching the single sound channel into the double sound channels under the condition that the packet loss rate is smaller than the first packet loss rate threshold value; and switching the dual-channel to the single channel under the condition that the packet loss rate is greater than the second packet loss rate threshold value.
By adopting the technical scheme, under the condition that a calling party and a called party establish a call, the packet loss rate acquisition module can continuously detect the network state to acquire the packet loss rate of the network, and then based on the packet loss rate, under the condition that the type of a sound channel used by the current call is a single sound channel, the first judgment module judges whether the packet loss rate is smaller than a first packet loss rate threshold value or not, if so, the sound channel switching module switches the single sound channel into a double sound channel; if the type of the sound channel used for the current call is a double-sound channel, the first judging module judges whether the packet loss rate is greater than a second packet loss rate threshold value, and if so, the sound channel switching module switches the double-sound channel into a single sound channel;
in the process of communication, the automatic switching between the single channel and the double channels can be realized according to the network condition, so that the condition that the double channels are used in the weak network and the single channel is used in the good network is avoided, the real-time dynamic switching between the single channel and the double channels is realized, and the experience of a user is improved.
In a third aspect, the present application provides a computer device, which adopts the following technical solution:
a computer device, comprising:
a memory for storing the program for dynamically switching the mono and the binaural;
and the processor is used for executing the program for dynamically switching the single and double channels stored in the memory so as to realize the steps of the method for dynamically switching the single and double channels.
In a fourth aspect, the present application provides a computer-readable storage medium, which relates to the following technical solutions:
a computer readable storage medium storing a computer program that can be loaded by a processor and executed to perform the above-described method of dynamically switching between mono and binaural channels.
Drawings
FIG. 1 is a block diagram of a flow chart of a monophonic channel in an embodiment of a method of the present application;
FIG. 2 is a block diagram of a flow chart for a binaural case in an embodiment of a method of the present application;
FIG. 3 is a block flow diagram of another implementation of a method embodiment of the present application;
FIG. 4 is a block flow diagram of one embodiment of step S220 in FIG. 3;
FIG. 5 is a block flow diagram of another implementation of a method embodiment of the present application;
FIG. 6 is a block flow diagram of another implementation of a method embodiment of the present application;
FIG. 7 is a block diagram of an implementation of an embodiment of the system of the present application;
FIG. 8 is a block diagram of another implementation of an embodiment of the system of the present application;
FIG. 9 is a block diagram of another implementation of an embodiment of the system of the present application;
FIG. 10 is a block diagram of another implementation of an embodiment of the system of the present application.
Description of reference numerals: 110. a packet loss rate obtaining module; 120. a first judgment module; 130. a sound channel switching module; 140. an RTP data packet packing and sending module; 150. an RTP data packet receiving module; 160. an extension flag detection module; 170. a channel type selection module; 180. a playing module; 190. a second judgment module; 210. an RTP extension header addition module; 220. an RTCP receiver report transmission unit; 230. an RTCP receiver report receiving unit; 240. and an average packet loss rate calculation unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to fig. 1 to 10 of the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The application provides a network architecture based on a method for dynamically switching single and double sound channels, which comprises a sending end and a receiving end, wherein the sending end and the receiving end realize communication connection through a wired network or a wireless network (such as wife, 5G and the like), and the adopted network transmission protocol can be an RTP protocol and an RTCP control protocol; the sending end and the receiving end can be two independent devices capable of realizing audio and video communication, such as intelligent terminal devices such as a notebook computer and an intelligent mobile phone. The sending end can be a calling party or a called party, and correspondingly, the receiving end can be a called party or a calling party. For example, after the sending end initiates a call request, the receiving end receives the call request, so that the sending end and the receiving end establish a call. Before the two parties establish a call, namely a calling stage, the sending end and the receiving end can encode and decode voice data according to the negotiated channel number, namely, the sending end sends a single-channel signaling to the receiving end, and the receiving end determines that the type of a sound channel is single-channel after identifying the single-channel signaling; or, the sending end sends the two-channel signaling to the receiving end, and the receiving end determines the type of the channel as the two-channel after identifying the two-channel signaling.
An embodiment of the present application discloses a method for dynamically switching a mono channel and a binaural channel, and referring to fig. 1 and fig. 2, as an implementation of the method for dynamically switching a mono channel and a binaural channel, the method for dynamically switching a mono channel and a binaural channel may include steps S110 to S130:
s110, under the condition that a calling party and a called party establish a call, continuously detecting the network state and obtaining the packet loss rate of the network;
s120, under the condition that the type of the sound channel used for the current call is a single sound channel, judging whether the packet loss rate is smaller than a preset first packet loss rate threshold value, if so, switching the single sound channel into a double sound channel;
for example, if the first packet loss rate threshold is set to 5%, the mono channel is switched to the binaural channel as long as the packet loss rate is less than 5%; of course, even when the packet loss rate is 0, that is, when there is no packet loss, the monaural channel is switched to the binaural channel.
And S130, under the condition that the type of the sound channel used for the current call is the double sound channel, judging whether the packet loss rate is greater than a preset second packet loss rate threshold value, and if so, switching the double sound channel into a single sound channel.
For example, the second packet loss rate threshold is set to 20%, and the binaural channel is switched to the monaural channel as long as the packet loss rate is greater than 20%. It should be noted that step S120 and step S130 are executed separately.
Referring to fig. 3, further, one embodiment of determining the type of the channel used in the current call includes steps S210 to S230:
s210, receiving an RTP data packet;
under the condition that a call is established between a sending end and a receiving end, the sending end sends an RTP data packet to the receiving end. The RTP data packet-packing format can comprise an RTP standard header, an RTP extended header and RTP data; wherein, the RTP standard header is packaged according to the definition of RFC3550, the RTP extension header is packaged according to the definition of RFC5285, and the RTP data comprises 20 ms voice.
The RTP packetization format described above is shown in table 1:
Figure DEST_PATH_IMAGE002
TABLE 1
S220, determining the sound channel type of the voice frame based on the RTP data packet;
s230, determining the type of the sound channel used by the current call based on the determined type of the sound channel of the voice frame, and decoding and playing the obtained voice data; wherein the voice data may be included in the RTP data.
Referring to fig. 4, as an embodiment of step S220, step S220 includes steps S221 to S223:
s221, detecting whether an RTP data packet comprises an extension mark;
an X 'bit exists in the RTP standard header, and if the detected X' is 1, the RIP data packet comprises an extension mark.
S222, if not, omitting the RTP standard header, and determining the sound channel type of the voice frame as the sound channel type negotiated by the calling party and the called party in advance;
if the receiving end does not detect the extension mark, determining the type of the sound channel according to the number of the channels negotiated in advance; for example, if the number of channels negotiated in advance is 1, it is determined that the current channel type is a mono channel; and if the number of the channels is 2, determining that the current channel type is a dual channel.
And S223, if yes, determining the sound channel type of the voice frame according to the channel number in the RTP extension header.
If the receiving end detects the extension mark, the receiving end identifies the number of channels in the RTP extension header, and if the number of the channels is 1, the receiving end determines that the type of the sound channel of the voice frame is a single sound channel; and if the number of the channels is 2, determining that the sound channel type of the voice frame is a double sound channel.
The contents of an embodiment of the RTP extension header are shown in table 2:
Figure DEST_PATH_IMAGE004
TABLE 2
Where, 0xBE and OxDE: a fixed value is taken to represent one-byte expansion;
length is data Length, 2 bytes, because the format is already fixed, can take the value as 2;
ID, namely ID of the extended parameter, 4bit, which can be fixed to be 1;
l: the length of the extended parameter, 4bit, is fixed to be 1;
data is used for representing the number of sound channels, the value of 1 represents a single sound channel, and the value of 2 represents a double sound channel;
filling and aligning: the extension header requires 32bit alignment and is filled with 0 when the data length is not sufficient.
In addition, referring to fig. 5, the method for dynamically switching between mono and bi channels may further include steps S310 to S330:
s310, judging whether the switched sound channel type is the same as the sound channel type initially negotiated by the calling party and the called party;
the judging mode can be that whether the current sound channel type is the same as the initially negotiated sound channel type is determined according to the times of sound channel type switching; for example, when the first call is made, the type of the sound channel negotiated by the calling party and the called party is a single sound channel, after the first switch is made, the type of the sound channel is a double sound channel, and at this time, the types of the sound channels of the sending end and the receiving end are both double sound channels; and switching again, wherein the type of the sound channel is monaural.
S320, if yes, omitting the RTP standard header;
after the second switching, the sound channel type of the sending end is the same as the initial sound channel type, so that after the receiving end receives the RTP data packet, the RTP standard header can be omitted, and the voice data is directly decoded and played according to the negotiated sound channel type.
S330, if not, adding an RTP extension header in the RTP data packet.
After one switching, the channel type of the sending end is two channels and the initial channel type is single channel, so the RTP extension header needs to be added in the RTP data packet to be sent, the number of channels in the RTP extension header is 2, and after the receiving end receives the RTP extension header, the type of the voice frame is determined to be two channels according to the number of channels in the RTP extension header, so as to decode and play the voice data.
In addition, referring to fig. 6, an embodiment of obtaining the packet loss ratio may include steps S410 to S420:
s410, receiving the feedback RTCP receiver report;
s420, calculating the average packet loss rate in X seconds based on the RTCP receiver report; wherein X is greater than or equal to 1.
Calculating the packet loss rate of the sending end according to an RTCP Receiver Report (RR) fed back by the receiving end, wherein the frequency of the RTCP receiver report fed back by the receiving end is 1 time per second, and the sending end calculates the packet loss rate once every time the sending end receives the RTCP receiver report; then, the average packet loss rate in X seconds is calculated, where X may be a positive integer greater than 1, for example, 5 seconds.
The calculation formula may be: average packet loss rate in X seconds = 60% packet loss rate in (X-1) th second + 40 packet loss rate in xth second. For example, an average packet loss rate within 5 seconds is calculated, and the average packet loss rate within 5 seconds = 60% for the 4 th second packet loss rate + 40% for the 5 th second packet loss rate.
In addition, the packet loss rate calculated by the receiving end = 100% of the number of packets lost/the total number of packets to be received within 1 second of the round; the current round can be understood as the whole conversation process of switching the sound channel type once to the next.
The implementation principle of the embodiment of the application is as follows:
in the process of the communication between the sending end and the receiving end, continuously detecting the network state, and judging the relation between the packet loss rate and a preset first packet loss rate threshold and a second packet loss rate threshold according to the obtained packet loss rate of the network and the type of a sound channel used by the current communication; if the type of the sound channel used for the current call is a single sound channel and the packet loss rate is smaller than a first packet loss rate threshold value, switching the single sound channel into a double sound channel; and if the current sound channel type is a double sound channel and the packet loss rate is greater than a second packet loss rate threshold value, switching the double sound channel into a single sound channel.
Based on the above method embodiment, another embodiment of the present application provides a system for dynamically switching between a single channel and a dual channel, where the system is respectively built in a transmitting end and a receiving end; referring to fig. 7, as an embodiment of the dynamic switching mono/binaural system, the dynamic switching mono/binaural system may include, built in the transmitting end:
a packet loss rate obtaining module 110, configured to continuously detect a network state and obtain a packet loss rate of a network when a calling party and a called party establish a call;
the first determining module 120 determines, based on the packet loss rate and under the condition that the type of the sound channel used for the current call is a mono channel, whether the packet loss rate is smaller than a preset first packet loss rate threshold; judging whether the packet loss rate is greater than a preset second packet loss rate threshold or not under the condition that the type of the sound channel used for the current call is a dual sound channel;
the sound channel switching module 130 is configured to switch the mono channel to the binaural channel when the packet loss rate is smaller than the first packet loss rate threshold; and under the condition that the packet loss rate is greater than a second packet loss rate threshold value, switching the two channels into a single channel.
Referring to fig. 8, another embodiment of the dynamic switching mono/binaural system may further include:
an RTP packet packing and transmitting module 140, which is built in the transmitting end, and is used for packing the RTP data and transmitting an RTP packet;
an RTP packet receiving module 150, which is internally disposed at the receiving end and is used for receiving an RTP packet;
an extension flag detection module 160, which is arranged in the receiving end and is used for detecting whether the RTP data packet includes an extension flag;
a sound channel type selection module 170, which is arranged in the receiving end, and determines the sound channel type of the voice frame according to the sound channel type negotiated in advance under the condition that the RTP data packet does not include the extension mark; under the condition that the RTP data packet comprises an extension mark, determining the sound channel type of the voice frame according to the number of channels in an RTP extension header;
and the playing module 180 is installed at the receiving end, and decodes and plays the obtained voice data based on the determined sound channel type of the voice frame. The playing module 180 may be a speaker, etc.
In addition, referring to fig. 9, the dynamic switching monaural and binaural system may further include, built in the transmitting end:
a second judging module 190, configured to judge whether the switched channel type is the same as a channel type initially negotiated by the calling party and the called party; the second determining module 190 may be the same module as the first determining module 120, or may be an independent module.
The RTP extension header adding module 210 adds an RTP extension header to the RTP packet based on the switched channel type being different from the initially negotiated channel type.
Referring to fig. 10, as an embodiment of the packet loss rate obtaining module 110, the packet loss rate obtaining module 110 may include:
an RTCP receiver report receiving unit 230, which is built in the transmitting end, for receiving an RTCP receiver report;
an average packet loss rate calculation unit 240, which is built in the transmitting end, and calculates an average packet loss rate within X seconds based on an average packet loss rate calculation formula; wherein X is greater than or equal to 1, and the average packet loss rate in X seconds = 60% packet loss rate in (X-1) th second + 40% packet loss rate in X th second;
in addition, the dynamic switching monaural and binaural system further includes:
the RTCP receiver report transmission unit 220 is built in the receiver and transmits an RTCP receiver report.
The implementation principle of the embodiment is as follows:
under the condition that a call is established between a calling party and a called party, the packet loss rate obtaining module 110 continuously detects a network state to obtain a packet loss rate of the network, and then based on the packet loss rate, under the condition that a sound channel type used by the current call is a single channel, the first judging module 120 judges whether the packet loss rate is smaller than a first packet loss rate threshold value; the sound channel switching module 130 switches the mono channel to the binaural channel when the first determining module 120 determines that the packet loss rate is below the first packet loss rate threshold; if the type of the sound channel used for the current call is a dual sound channel, the first determining module 120 determines whether the packet loss rate is greater than a second packet loss rate threshold; the audio channel switching module 130 switches the dual audio channels to the single audio channel when the first determining module 120 determines that the packet loss rate is greater than the second packet loss rate threshold.
Another embodiment of the present application further provides a computer device, which may include: a memory and a processor;
the memory is used for storing the program for dynamically switching the single channel and the double channels;
the processor is used for executing the program for dynamically switching the mono and the bi channels stored in the memory so as to realize the steps of the method for dynamically switching the mono and the bi channels.
The memory may be in communication connection with the processor through a communication bus, which may be an address bus, a data bus, a control bus, or the like.
Additionally, the memory may include Random Access Memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk memory.
And the processor may be a general-purpose processor including a Central Processing Unit (CPU), a Network Processor (NP), etc.; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, etc.
Another embodiment of the present application further provides a computer-readable storage medium storing a computer program capable of being loaded by a processor and executing the method for dynamically switching between mono and binaural channels.
The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. Among other things, the available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tape), optical media (e.g., DVDs), or semiconductor media (e.g., solid state disks).
The foregoing is a preferred embodiment in its own right and not intended to limit the scope of the application, and any feature disclosed in this specification (including the abstract and drawings) may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.

Claims (10)

1. A method for dynamically switching between mono and binaural channels, comprising:
under the condition that a calling party establishes a call with a called party, continuously detecting the network state and obtaining the packet loss rate of the network;
under the condition that the type of the sound channel used for the current call is a single sound channel, judging whether the packet loss rate is smaller than a preset first packet loss rate threshold value or not, and if so, switching the single sound channel into a double sound channel;
and under the condition that the type of the sound channel used for the current call is a double sound channel, judging whether the packet loss rate is greater than a preset second packet loss rate threshold value, and if so, switching the double sound channel into a single sound channel.
2. The method of claim 1, wherein the step of determining the type of the channel used by the current call comprises:
receiving an RTP data packet;
determining the sound channel type of the voice frame based on the RTP data packet;
determining the type of the sound channel used by the current call based on the determined type of the sound channel of the voice frame, and decoding and playing the obtained voice data; wherein the voice data is included in the RTP data packet.
3. The method as claimed in claim 2, wherein the step of determining the channel type of the speech frame comprises:
detecting whether an extension mark is included in the RTP data packet;
if not, omitting the RTP standard header, and determining the sound channel type of the voice frame as the sound channel type negotiated by the calling party and the called party in advance;
if yes, determining the sound channel type of the voice frame according to the channel number in the RTP extension header.
4. The method of claim 3, wherein the method of dynamically switching between mono and binaural channels further comprises:
judging whether the switched sound channel type is the same as the sound channel type initially negotiated by the calling party and the called party;
if yes, omitting the RTP standard header;
and if not, adding an RTP extension header in the RTP data packet.
5. The method of claim 1, wherein the step of obtaining a packet loss ratio of the network comprises:
receiving a fed back RTCP receiver report;
calculating an average packet loss rate within X seconds based on the RTCP receiver report; wherein X is greater than or equal to 1.
6. The method according to claim 5, wherein the average packet loss rate in X seconds = 60% in (X-1) th second + 40 in X th second.
7. The method of any of claims 2-6, wherein the RTP packet packing format comprises an RTP standard header, an RTP extension header, and RTP data; wherein the RTP standard header is packaged according to the definition of RFC3550, the RTP extension header is packaged according to the definition of RFC5285, and the RTP data comprises 20 ms voice.
8. A dynamically switched monaural and binaural system, comprising:
the packet loss rate acquisition module (110) is used for continuously detecting the network state and acquiring the packet loss rate of the network under the condition that a calling party and a called party establish a call;
a first judging module (120) which judges whether the packet loss rate is smaller than a preset first packet loss rate threshold value or not based on the packet loss rate and under the condition that the type of the sound channel used for the current call is a single sound channel; under the condition that the type of the sound channel used for the current call is a dual sound channel, judging whether the packet loss rate is greater than a preset second packet loss rate threshold value or not;
a sound channel switching module (130) for switching the mono channel to the binaural channel when the packet loss rate is smaller than the first packet loss rate threshold; and switching the dual-channel to the single channel under the condition that the packet loss rate is greater than the second packet loss rate threshold value.
9. A computer device, comprising:
a memory for storing a program for dynamically switching between one channel and two channels;
a processor for executing a program for dynamically switching mono and binaural channels stored on said memory for implementing the steps of the method for dynamically switching mono and binaural channels according to any of claims 1 to 7.
10. A computer-readable storage medium storing a computer program that can be loaded by a processor and that can perform the method of dynamically switching between mono and binaural channels according to any of claims 1 to 7.
CN202111308825.6A 2021-11-05 2021-11-05 Method, system and computer readable storage medium for dynamically switching single and double sound channels Pending CN114040130A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111308825.6A CN114040130A (en) 2021-11-05 2021-11-05 Method, system and computer readable storage medium for dynamically switching single and double sound channels

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111308825.6A CN114040130A (en) 2021-11-05 2021-11-05 Method, system and computer readable storage medium for dynamically switching single and double sound channels

Publications (1)

Publication Number Publication Date
CN114040130A true CN114040130A (en) 2022-02-11

Family

ID=80143126

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111308825.6A Pending CN114040130A (en) 2021-11-05 2021-11-05 Method, system and computer readable storage medium for dynamically switching single and double sound channels

Country Status (1)

Country Link
CN (1) CN114040130A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005202052A (en) * 2004-01-14 2005-07-28 Nec Corp Channel number variable audio distribution system, audio distribution device, and audio receiving device
US20080195748A1 (en) * 2007-02-09 2008-08-14 Melodeo Inc. Data delivery
CN101483494A (en) * 2008-01-07 2009-07-15 中兴通讯股份有限公司 Method and system for encoding and decoding algorithm dynamic negotiation of SIP terminal
CN102301744A (en) * 2009-01-29 2011-12-28 高通股份有限公司 Audio coding selection based on device operating condition
CN103259945A (en) * 2013-05-20 2013-08-21 苏州洲际传书信息科技有限公司 Method for achieving speech coding dynamic switching in voip conversation according to network condition
US20130230057A1 (en) * 2010-11-10 2013-09-05 Panasonic Corporation Terminal and coding mode selection method
CN105323529A (en) * 2015-10-19 2016-02-10 掌赢信息科技(上海)有限公司 Method for switching between audio call and video call, and electronic equipment
CN107360166A (en) * 2017-07-15 2017-11-17 深圳市华琥技术有限公司 A kind of audio data processing method and its relevant device
CN108881780A (en) * 2018-07-17 2018-11-23 聚好看科技股份有限公司 Method, the server of clarity mode are dynamically adjusted in video calling
CN109756692A (en) * 2019-01-08 2019-05-14 Oppo广东移动通信有限公司 Video data handling procedure, device, mobile device, computer readable storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005202052A (en) * 2004-01-14 2005-07-28 Nec Corp Channel number variable audio distribution system, audio distribution device, and audio receiving device
US20080195748A1 (en) * 2007-02-09 2008-08-14 Melodeo Inc. Data delivery
CN101483494A (en) * 2008-01-07 2009-07-15 中兴通讯股份有限公司 Method and system for encoding and decoding algorithm dynamic negotiation of SIP terminal
CN102301744A (en) * 2009-01-29 2011-12-28 高通股份有限公司 Audio coding selection based on device operating condition
US20130230057A1 (en) * 2010-11-10 2013-09-05 Panasonic Corporation Terminal and coding mode selection method
CN103259945A (en) * 2013-05-20 2013-08-21 苏州洲际传书信息科技有限公司 Method for achieving speech coding dynamic switching in voip conversation according to network condition
CN105323529A (en) * 2015-10-19 2016-02-10 掌赢信息科技(上海)有限公司 Method for switching between audio call and video call, and electronic equipment
CN107360166A (en) * 2017-07-15 2017-11-17 深圳市华琥技术有限公司 A kind of audio data processing method and its relevant device
CN108881780A (en) * 2018-07-17 2018-11-23 聚好看科技股份有限公司 Method, the server of clarity mode are dynamically adjusted in video calling
CN109756692A (en) * 2019-01-08 2019-05-14 Oppo广东移动通信有限公司 Video data handling procedure, device, mobile device, computer readable storage medium

Similar Documents

Publication Publication Date Title
US7006456B2 (en) Method and apparatus for packet-based media communication
EP1715648B1 (en) Method of providing video call service in mobile station in a weak signal environment
US10454811B2 (en) Apparatus and method for de-jitter buffer delay adjustment
JP5528811B2 (en) Receiver operation and implementation for efficient media handling
WO2008110930A2 (en) Method of transmitting data in a communication system
CN108847248B (en) Bluetooth device audio processing method, system, readable storage medium and Bluetooth device
TWI435583B (en) Method of and apparatus for decoding audio content and associated computer program product
US20060089838A1 (en) Method of streaming multimedia data
US20210399829A1 (en) Codec configuration adaptation based on packet loss rate
US7986634B2 (en) Apparatus and method for measuring quality of sound encoded with a variable band multi-codec
CN112449208B (en) Voice processing method and device
JP2000270024A (en) Method for exchanging capability of frame packet processing size in internet phone, terminal utilizing internet phone and medium recording program of internet phone
CN107770473A (en) A kind of audio, video data transfer control method and device
CN114040130A (en) Method, system and computer readable storage medium for dynamically switching single and double sound channels
EP4050931A1 (en) Media stream delivery quality notification method and session border controller entity
JP4714074B2 (en) Transmission device, transmission device, and reception device
US9437203B2 (en) Error concealment for speech decoder
KR100850735B1 (en) Apparatus and method for reporting loss packet and retransmitting request in a wireless communication system for data transmission
US7586937B2 (en) Receiving device and method
US20090059806A1 (en) Method, system and apparatus for providing signal based packet loss concealment for memoryless codecs
CN107154913B (en) IP telephone terminal communication method
KR100545655B1 (en) Internet phone system for selecting voice compression type by internet protocol network peculiarity and thereof method
CN116260539A (en) Audio data synchronization method, digital broadcasting system and electronic equipment
JP2005244751A (en) Voice communication system and mobile station
JP4339654B2 (en) Relay system and configuration information notification method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220211

RJ01 Rejection of invention patent application after publication