CN110007894A - For sending the method and device of audio-frequency information - Google Patents

For sending the method and device of audio-frequency information Download PDF

Info

Publication number
CN110007894A
CN110007894A CN201910252848.6A CN201910252848A CN110007894A CN 110007894 A CN110007894 A CN 110007894A CN 201910252848 A CN201910252848 A CN 201910252848A CN 110007894 A CN110007894 A CN 110007894A
Authority
CN
China
Prior art keywords
audio
packet
audio packet
main
backup
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.)
Granted
Application number
CN201910252848.6A
Other languages
Chinese (zh)
Other versions
CN110007894B (en
Inventor
郭启行
王兵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910252848.6A priority Critical patent/CN110007894B/en
Publication of CN110007894A publication Critical patent/CN110007894A/en
Application granted granted Critical
Publication of CN110007894B publication Critical patent/CN110007894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Embodiment of the disclosure discloses the method and device for sending audio-frequency information.One specific embodiment of this method includes: that audio-frequency information to be sent is divided into the first audio packet sequence according to setting duration;For the audio pack in above-mentioned first audio packet sequence, which is compressed into main audio packet and Backup audio packet respectively;By the main audio packet of the correspondence audio pack in above-mentioned first audio packet sequence and Backup audio encapsulation at being sent after audio transmission packet.This embodiment improves the transmitting efficiency of audio-frequency information, the completeness and efficiency for sending audio-frequency information is improved.

Description

For sending the method and device of audio-frequency information
Technical field
Embodiment of the disclosure is related to technical field of data processing, and in particular to for sending the method and dress of audio-frequency information It sets.
Background technique
With the development of science and technology, the intelligent level of terminal device is higher and higher.People can be set by voice and terminal It is standby to interact, and the information of terminal device feedback is obtained, improve the convenience for obtaining information.
Summary of the invention
Embodiment of the disclosure proposes the method and device for sending audio-frequency information.
In a first aspect, embodiment of the disclosure provides a kind of method for sending audio-frequency information, this method comprises: will Audio-frequency information to be sent is divided into the first audio packet sequence according to setting duration;For the audio in above-mentioned first audio packet sequence Packet, is compressed into main audio packet and Backup audio packet for the audio pack respectively;By the correspondence audio in above-mentioned first audio packet sequence The main audio packet of packet and Backup audio encapsulation after audio transmission packet at sending.
In some embodiments, the compression ratio of above-mentioned main audio packet is less than the compression ratio of Backup audio packet.
In some embodiments, the above method includes: to inquire the sound for the audio pack in above-mentioned first audio packet sequence Audio content data in frequency packet is that priority tag, above-mentioned priority is arranged in the audio pack according to above-mentioned audio content data The content of label includes high priority or low priority.
In some embodiments, above-mentioned by the main audio packet of the correspondence audio pack in above-mentioned first audio packet sequence and spare Audio pack is sent after being packaged into an audio transmission packet, comprising: is determined the main audio packet to be sent at currently transmitted moment, and is obtained The corresponding Backup audio packet to be sent of previous sending instant main audio packet, wherein above-mentioned previous sending instant main audio packet and to It sends Backup audio packet and corresponds to the same audio pack;By above-mentioned main audio packet to be sent and above-mentioned Backup audio encapsulation to be sent At being sent after an audio transmission packet.
In some embodiments, the above method further include: in response to receiving retransmission request, sent out according to above-mentioned retransmission request Corresponding retransmission of audio transmission packet is sent, above-mentioned retransmission request includes the serial number of retransmission of audio transmission packet.
Second aspect, embodiment of the disclosure provide a kind of method for obtaining audio-frequency information, this method comprises: from Main audio packet and Backup audio packet are extracted in received audio transmission packet of the current time of reception;In response to the master of the previous time of reception Audio pack exists, and the main audio packet of the correspondence current time of reception is imported the second audio packet sequence, otherwise, is currently connect by correspondence The Backup audio packet that time receiving carves restores the main audio packet of the previous time of reception, and will restore according to the sequencing of the time of reception The main audio packet arrived imports the second audio packet sequence, wherein above-mentioned second audio packet sequence is for constructing audio-frequency information
In some embodiments, restore the above-mentioned previous time of reception above by the Backup audio packet of the current time of reception Main audio packet, comprising: inquire the priority tag of the Backup audio packet of the current time of reception, the content packet of above-mentioned priority tag Include high priority or low priority;It is high priority in response to above-mentioned priority tag, passes through the spare sound of the current time of reception Frequency packet restores the main audio packet of the above-mentioned previous time of reception.
In some embodiments, the above method further include: in response at least continuous two times of reception main audio packet not In the presence of the retransmission request of packet is transmitted in transmission for obtaining the retransmission of audio of corresponding main audio packet, and above-mentioned retransmission request includes retransmitting The serial number of audio transmission packet.
The third aspect, embodiment of the disclosure provide a kind of for sending the device of audio-frequency information, which includes: sound Frequency division unit is configured to audio-frequency information to be sent being divided into the first audio packet sequence according to setting duration;Audio compression Unit, for the audio pack in above-mentioned first audio packet sequence, be configured to for the audio pack being compressed into respectively main audio packet and Backup audio packet;Audio transmission unit is configured to the main audio packet of the correspondence audio pack in above-mentioned first audio packet sequence With Backup audio encapsulation at being sent after audio transmission packet.
In some embodiments, the compression ratio of above-mentioned main audio packet is less than the compression ratio of Backup audio packet.
In some embodiments, above-mentioned apparatus includes: priority tag setting unit, for above-mentioned first audio packet sequence In audio pack, be configured to inquire the audio content data in the audio pack, according to above-mentioned audio content data be the audio Packet setting priority tag, the content of above-mentioned priority tag includes high priority or low priority.
In some embodiments, above-mentioned audio transmission unit includes: that audio pack to be sent determines subelement, is configured to really The main audio packet to be sent of settled preceding sending instant, and obtain the corresponding Backup audio to be sent of previous sending instant main audio packet Packet, wherein above-mentioned previous sending instant main audio packet and Backup audio packet to be sent correspond to the same audio pack;Audio sends son Unit, after being configured to above-mentioned main audio packet to be sent and above-mentioned Backup audio encapsulating to be sent dressing up an audio transmission packet It sends.
In some embodiments, above-mentioned apparatus further include: audio retransmission unit is matched in response to receiving retransmission request It is set to and corresponding retransmission of audio transmission packet is sent according to above-mentioned retransmission request, above-mentioned retransmission request includes retransmission of audio transmission packet Serial number.
Fourth aspect, embodiment of the disclosure provide a kind of for obtaining the device of audio-frequency information, which includes: sound Frequency packet extraction unit is configured to extract main audio packet and Backup audio from received audio transmission packet of the current time of reception Packet;Audio pack sequence construct unit exists in response to the main audio packet of the previous time of reception, is configured to that current reception will be corresponded to The main audio packet at moment imports the second audio packet sequence, otherwise, before being restored by the Backup audio packet of the correspondence current time of reception The main audio packet of one time of reception, and the second audio is imported by obtained main audio packet is restored according to the sequencing of the time of reception Packet sequence, wherein above-mentioned second audio packet sequence is for constructing audio-frequency information.
In some embodiments, above-mentioned audio pack sequence construct unit includes: priority tag inquiry subelement, is configured At the priority tag for the Backup audio packet for inquiring current time of reception, the content of above-mentioned priority tag include high priority or Low priority;Main audio packet restores subelement, and being configured in response to above-mentioned priority tag is high priority, by currently connecing The Backup audio packet that time receiving carves restores the main audio packet of the above-mentioned previous time of reception.
In some embodiments, above-mentioned apparatus further include: retransmission request transmission unit, in response at least continuous two receptions The main audio packet at moment is not present, and the re-transmission for being configured to send the retransmission of audio transmission packet for obtaining corresponding main audio packet is asked It asks, above-mentioned retransmission request includes the serial number of retransmission of audio transmission packet.
5th aspect, embodiment of the disclosure provide a kind of electronic equipment, comprising: one or more processors;Storage Device is stored thereon with one or more programs, when said one or multiple programs are executed by said one or multiple processors, So that said one or multiple processors execute above-mentioned first aspect for sending the method or second aspect of audio-frequency information Method for obtaining audio-frequency information.
6th aspect, embodiment of the disclosure provide a kind of computer-readable medium, are stored thereon with computer program, It is characterized in that, the program realizes the method or second for being used to send audio-frequency information of above-mentioned first aspect when being executed by processor The method for obtaining audio-frequency information of aspect.
The method and device for being used to send audio-frequency information that embodiment of the disclosure provides, first by audio-frequency information to be sent The first audio packet sequence is divided into according to setting duration;Then audio pack is compressed into main audio packet and Backup audio packet;Finally The main audio packet of correspondence audio pack in first audio packet sequence and Backup audio encapsulating are dressed up into an audio transmission Bao Houfa It send.Technical scheme improves the transmitting efficiency of audio-frequency information, improves the completeness and efficiency for sending audio-frequency information.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the disclosure is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that one embodiment of the disclosure can be applied to exemplary system architecture figure therein;
Fig. 2 is the flow chart according to one embodiment of the method for sending audio-frequency information of the disclosure;
Fig. 3 is the schematic diagram according to an application scenarios of the method for sending audio-frequency information of the disclosure;
Fig. 4 is the flow chart according to one embodiment of the method for obtaining audio-frequency information of the disclosure;
Fig. 5 is the structural schematic diagram according to one embodiment of the device for sending audio-frequency information of the disclosure;
Fig. 6 is the structural schematic diagram according to one embodiment of the device for obtaining audio-frequency information of the disclosure;
Fig. 7 is adapted for the electronic devices structure schematic diagram for realizing embodiment of the disclosure.
Specific embodiment
The disclosure is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure can phase Mutually combination.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can be using embodiment of the disclosure for sending the method for audio-frequency information or for sending audio The exemplary system architecture 100 of the device of information.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105. Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out Send message etc..Various telecommunication customer end applications can be installed on terminal device 101,102,103, such as interactive voice application, Web browser applications, shopping class application, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 101,102,103 can be hardware, be also possible to software.When terminal device 101,102,103 is hard When part, the various electronic equipments of interactive voice, including but not limited to smart phone, plate are can be with display screen and supported Computer, pocket computer on knee and desktop computer etc..When terminal device 101,102,103 is software, can install In above-mentioned cited electronic equipment.Multiple softwares or software module may be implemented into (such as providing distributed clothes in it Business), single software or software module also may be implemented into, be not specifically limited herein.
Server 105 can be to provide the server of various services, such as to the sound that terminal device 101,102,103 is sent Keep pouring in the server that defeated packet is handled.Server can carry out the processing such as analyzing to data such as the audio transmission packets received, And obtain corresponding audio-frequency information.
It should be noted that the method provided by embodiment of the disclosure for sending audio-frequency information is generally set by terminal Standby 101,102,103 execute, and correspondingly, the device for sending audio-frequency information is generally positioned at terminal device 101,102,103 In.
It should be noted that server can be hardware, it is also possible to software.When server is hardware, may be implemented At the distributed server cluster that multiple servers form, individual server also may be implemented into.It, can when server is software To be implemented as multiple softwares or software module (such as providing Distributed Services), single software or software also may be implemented into Module is not specifically limited herein.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the stream of one embodiment of the method for sending audio-frequency information according to the disclosure is shown Journey 200.This be used for send audio-frequency information method the following steps are included:
Step 201, audio-frequency information to be sent is divided into the first audio packet sequence according to setting duration.
In the present embodiment, for sending executing subject (such as the terminal device shown in FIG. 1 of the method for audio-frequency information 101, wired connection mode can 102,103) be passed through or radio connection receives audio-frequency information to be sent.Wherein, pending It is obtained after sending audio-frequency information to can be the speech signal analysis that executing subject issues the user received.It may be noted that Be, above-mentioned radio connection can include but is not limited to 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection and other currently known or exploitation in the future radio connections.
In the prior art, when user and terminal device carry out interactive voice, terminal device can believe the voice received Breath is sent to server by network.It in practice, may be due to transmission side when terminal device sends voice messaging to server A variety of interference such as formula, network interferences so that voice messaging can not in time, it is complete, effectively reach server.
For this purpose, the executing subject of the application after getting audio-frequency information to be sent, first presses audio-frequency information to be sent It is divided into audio pack according to the duration of setting, and obtains the first audio packet sequence according to the sequencing that audio pack divides.
Step 202, for the audio pack in above-mentioned first audio packet sequence, which is compressed into main audio packet respectively With Backup audio packet.
In order to send audio-frequency information, executing subject can compress the audio pack in the first audio packet sequence.This reality The executing subject for applying example can be by the same audio pack boil down to main audio packet and Backup audio packet.Wherein, the pressure of main audio packet Compression ratio of the shrinkage less than Backup audio packet, i.e., closer and audio pack, information loss are also smaller.Therefore, audio letter to be sent The recipient of breath mainly obtains audio-frequency information to be sent by main audio packet.The compression ratio of Backup audio packet is than main audio packet Compression ratio is big, and the information lost in compression process is more, but the data volume of Backup audio packet is smaller, and it is negative can to reduce network transmission Lotus.Since audio pack has been compressed into main audio packet and Backup audio packet respectively, so main audio packet and Backup audio packet all include The information of the audio pack.
In some optional implementations of the present embodiment, the above method may include: for above-mentioned first audio pack Audio pack in sequence inquires the audio content data in the audio pack, is that the audio pack is set according to above-mentioned audio content data Set priority tag.
Audio content data in audio pack can be useful information (such as can be phonetic order information etc.), can also be with It is garbage (such as can be noise information, voiceless sound information etc.).For this purpose, executing subject can inquire the sound in audio pack Frequency content information, and be that priority tag is arranged in the audio pack according to audio content data.Wherein, priority tag can be used for Characterize the importance of audio pack.When needing to retransmit audio pack, it can be determined according to the priority tag of audio pack It is fixed whether to retransmit audio pack.Priority tag can be high priority or low priority etc..Since audio pack is compressed into Main audio packet and Backup audio packet, so, main audio packet and Backup audio packet also include the priority tag of corresponding audio pack.
Step 203, by the main audio packet and Backup audio encapsulation of the correspondence audio pack in above-mentioned first audio packet sequence At being sent after audio transmission packet.
After obtaining main audio packet and Backup audio packet, executing subject can be by the main audio packet of corresponding audio pack and spare After audio pack is packaged into an audio transmission packet, send audio-frequency information receiving end (such as can be server 105).
In some optional implementations of the present embodiment, the above-mentioned correspondence audio by above-mentioned first audio packet sequence Main audio packet and the Backup audio encapsulating of packet are sent after dressing up an audio transmission packet, may comprise steps of:
The first step, determines the main audio packet to be sent at currently transmitted moment, and obtains previous sending instant main audio packet pair The Backup audio packet to be sent answered.
The audio transmission packet of the application includes a main audio packet to be sent and a Backup audio packet to be sent.Its In, main audio packet main audio packet to be sent and Backup audio packet to be sent be not corresponding with the same audio pack.Specifically, executing Main body can determine the main audio packet to be sent at currently transmitted moment first, in accordance with the sequence of audio pack in the first audio packet sequence, Then it is corresponding to be sent standby previous sending instant main audio packet to be obtained according still further to the sequence of audio pack in the first audio packet sequence Use audio pack.That is, previous sending instant main audio packet and Backup audio packet to be sent correspond to the same audio pack.
Above-mentioned main audio packet to be sent and above-mentioned Backup audio encapsulating to be sent are dressed up an audio transmission packet by second step After send.
In this way, the audio transmission packet that executing subject is sent contains the corresponding audio pack of two sending instants.In previous hair When the audio transmission packet at moment being sent to go out active, audio-frequency information receiving end can be obtained by the audio transmission packet at currently transmitted moment Get the main audio packet that previous sending instant is lost.In this way, improving the completeness and efficiency for sending audio-frequency information, avoid The multiple transmission of audio-frequency information, reduces network consumption.
In some optional implementations of the present embodiment, the above method can also include: to retransmit in response to receiving Request sends corresponding retransmission of audio transmission packet according to above-mentioned retransmission request.
When the continuous multiple audio transmission packets for occurring sending are not received, audio-frequency information receiving end can Xiang Benshi The executing subject for applying example sends retransmission request.Retransmission request may include the information such as the serial number of retransmission of audio transmission packet.Re-transmission is asked It asks to be used to indicate and retransmits corresponding audio transmission packet (i.e. retransmission of audio transmission packet).Wherein, the serial number of audio transmission packet can To be the corresponding audio pack of main audio packet serial number in the first audio packet sequence in audio transmission packet.Corresponding, retransmission of audio passes The serial number of defeated packet can be retransmission of audio transmission and wrap the corresponding audio pack serial number in the first audio packet sequence of interior main audio packet.
It is one of the application scenarios of the method according to the present embodiment for sending audio-frequency information with continued reference to Fig. 3, Fig. 3 Schematic diagram.In the application scenarios of Fig. 3, user sends audio-frequency information to server 105 by terminal device 102.Terminal device The transmission audio-frequency information received (i.e. the voice messaging of user's sending) is divided into the first audio packet sequence A=[a by 1021,a2, ax...], wherein x be serial number of the audio pack in the first audio packet sequence A, x=1,2,3 ...;Then, terminal device 102 will Each audio pack in first audio packet sequence A is compressed into corresponding main audio packet ax 1With Backup audio packet ax 2;Finally, terminal Equipment 102 is in x-th of sending instant, by main audio packet ax 1With Backup audio packet ax-1 2It is sent after being packaged into audio transmission packet.Its In, the serial number of audio pack can also be corresponding with sending instant.That is, x sending instant all corresponds to the main audio packet at currently transmitted moment ax 1With the Backup audio packet a of previous sending instantx-1 2
Audio-frequency information to be sent is divided into the according to setting duration first by the method provided by the above embodiment of the disclosure One audio packet sequence;Then audio pack is compressed into main audio packet and Backup audio packet;It finally will be in the first audio packet sequence The main audio packet of corresponding audio pack and Backup audio encapsulating are sent after dressing up an audio transmission packet.Technical scheme improves The transmitting efficiency of audio-frequency information improves the completeness and efficiency for sending audio-frequency information.
With further reference to Fig. 4, it illustrates the processes 400 of another embodiment of the method for obtaining audio-frequency information. This is used to obtain the process 400 of the method for audio-frequency information, comprising the following steps:
Step 401, main audio packet and Backup audio packet are extracted from received audio transmission packet of the current time of reception.
It in the present embodiment, can for obtaining the method executing subject (such as server 105 shown in FIG. 1) of audio-frequency information To receive audio transmission packet by wired connection mode or radio connection.
The executing subject of the present embodiment, can be from audio transmission Bao Zhongti after the current time of reception receives audio transmission packet Get main audio packet and Backup audio packet.
Step 402, exist in response to the main audio packet of the previous time of reception, by the main audio packet of the correspondence current time of reception The second audio packet sequence is imported, otherwise, restores the master of the previous time of reception by the Backup audio packet of the correspondence current time of reception Audio pack, and the second audio packet sequence is imported by obtained main audio packet is restored according to the sequencing of the time of reception.
Executing subject can inquire the main audio packet with the presence or absence of the previous time of reception.If it is present explanation receives Audio transmission packet do not lose.At this point, the main audio packet of the current time of reception can be imported the second audio pack by executing subject Sequence.Wherein, above-mentioned second audio packet sequence can be used for constructing audio-frequency information.It is corresponding if there is no the previous time of reception Main audio packet, executing subject can restore the main audio packet of the previous time of reception by the Backup audio packet of the current time of reception, And the second audio packet sequence is imported by obtained main audio packet is restored according to the sequencing of the time of reception.In this way, reducing sound The transmission times for keeping pouring in defeated packet improves the completeness and efficiency for obtaining audio-frequency information.
After the executing subject of the present embodiment obtains the second audio packet sequence, the second audio packet sequence can be counted in real time Data are carried out again according to processing, or after the second audio pack sequential reception to whole corresponding main audio packets of audio-frequency information to be sent Processing, it is specific depending on actual needs.
In some optional implementations of the present embodiment, restore above by the Backup audio packet of the current time of reception The main audio packet of the above-mentioned previous time of reception, may comprise steps of:
The first step inquires the priority tag of the Backup audio packet of the current time of reception.
Before the main audio packet for restoring the above-mentioned previous time of reception by Backup audio packet, executing subject can be looked into first Ask the priority tag of the Backup audio packet of the current time of reception.
Second step is high priority in response to above-mentioned priority tag, extensive by the Backup audio packet of the current time of reception The main audio packet of the multiple above-mentioned previous time of reception.
When priority tag is high priority, executing subject can be restored by the Backup audio packet of the current time of reception The main audio packet of the above-mentioned previous time of reception.When priority tag is low priority, executing subject can not restore previous and connect The main audio packet that time receiving carves.In this way, the hair of audio transmission packet can be reduced to avoid the main audio packet for repeating transmission low priority Number is sent, the completeness and efficiency for obtaining audio-frequency information is improved.
In some optional implementations of the present embodiment, the above method can also include: in response at least continuous two The main audio packet of a time of reception is not present, and the re-transmission for sending the retransmission of audio transmission packet for obtaining corresponding main audio packet is asked It asks.
Audio transmission packet may include serial number.It is corresponding that the serial number of audio transmission packet can be main audio packet in audio transmission packet Audio pack in the first audio packet sequence serial number.When the serial number and the second audio pack of the audio transmission packet that executing subject receives The corresponding audio pack of main audio packet of previous time of reception serial number in the first audio packet sequence is discontinuous in sequence, and discontinuous Serial number be more than or equal to two when, illustrate that the main audio packet of at least continuous two times of reception is not present.At this point, executing subject can To send the retransmission request that the retransmission of audio for obtaining corresponding main audio packet transmits packet, wherein above-mentioned retransmission request can wrap Include the serial number of retransmission of audio transmission packet.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, present disclose provides one kind for sending sound One embodiment of the device of frequency information, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which specifically may be used To be applied in various electronic equipments.
As shown in figure 5, the present embodiment may include: audio division unit for sending the device 500 of audio-frequency information 501, audio compressing unit 502 and audio transmission unit 503.Wherein, audio division unit 501 is configured to audio to be sent Information is divided into the first audio packet sequence according to setting duration;Audio compressing unit 502, in above-mentioned first audio packet sequence Audio pack, be configured to for the audio pack to be compressed into main audio packet and Backup audio packet respectively;Audio transmission unit 503 is matched It is set to the main audio packet of the correspondence audio pack in above-mentioned first audio packet sequence and Backup audio encapsulation into audio transmission packet After send.
In some optional implementations of the present embodiment, the compression ratio of above-mentioned main audio packet is less than Backup audio packet Compression ratio.
In some optional implementations of the present embodiment, the above-mentioned device 500 for sending audio-frequency information be can wrap Include: priority tag setting unit (not shown) is configured to look into for the audio pack in above-mentioned first audio packet sequence The audio content data in the audio pack is ask, is that priority tag is arranged in the audio pack according to above-mentioned audio content data, it is above-mentioned The content of priority tag includes high priority or low priority.
In some optional implementations of the present embodiment, above-mentioned audio transmission unit 503 may include: sound to be sent Frequency, which wraps, determines subelement (not shown) and audio transmission sub-unit (not shown).Wherein, audio pack to be sent determines Subelement is configured to determine the main audio packet to be sent at currently transmitted moment, and it is corresponding to obtain previous sending instant main audio packet Backup audio packet to be sent, wherein above-mentioned previous sending instant main audio packet and Backup audio packet to be sent correspond to same Audio pack;Audio transmission sub-unit is configured to dress up above-mentioned main audio packet to be sent and above-mentioned Backup audio encapsulating to be sent It is sent after one audio transmission packet.
In some optional implementations of the present embodiment, the above-mentioned device 500 for sending audio-frequency information can be with Include: audio retransmission unit (not shown), in response to receiving retransmission request, is configured to be sent out according to above-mentioned retransmission request Corresponding retransmission of audio transmission packet is sent, above-mentioned retransmission request includes the serial number of retransmission of audio transmission packet.
With further reference to Fig. 6, as the realization to method shown in above-mentioned each figure, present disclose provides one kind for obtaining sound One embodiment of the device of frequency information, the Installation practice is corresponding with embodiment of the method shown in Fig. 4, which specifically may be used To be applied in various electronic equipments.
As shown in fig. 6, the present embodiment may include: audio pack extraction unit for obtaining the device 600 of audio-frequency information 601 and audio pack sequence construct unit 602.Wherein, audio pack extraction unit 601 is configured to received from the current time of reception Main audio packet and Backup audio packet are extracted in audio transmission packet;Audio pack sequence construct unit 602, in response to the previous time of reception Main audio packet exist, be configured to correspond to the current time of reception main audio packet import the second audio packet sequence, otherwise, lead to It crosses and corresponds to the Backup audio packet of the current time of reception and restore the main audio packet of the previous time of reception, and is according to the time of reception successive Sequence imports the second audio packet sequence for obtained main audio packet is restored, wherein above-mentioned second audio packet sequence is for constructing sound Frequency information.
In some optional implementations of the present embodiment, above-mentioned audio pack sequence construct unit 602 may include: excellent First grade tag queries subelement (not shown) and main audio packet restore subelement (not shown).Wherein, priority mark Label inquiry subelement is configured to inquire the priority tag of the Backup audio packet of the current time of reception, above-mentioned priority tag Content includes high priority or low priority;Main audio packet restores subelement and is configured in response to above-mentioned priority tag as height Priority restores the main audio packet of the above-mentioned previous time of reception by the Backup audio packet of the current time of reception.
In some optional implementations of the present embodiment, the above-mentioned device 600 for obtaining audio-frequency information can be with Include: retransmission request transmission unit (not shown), be not present in response to the main audio packet of at least continuous two times of reception, It is configured to send the retransmission request of the retransmission of audio transmission packet for obtaining corresponding main audio packet, above-mentioned retransmission request includes weight Pass the serial number of audio transmission packet.
The present embodiment additionally provides a kind of electronic equipment, comprising: one or more processors;Memory is stored thereon with One or more programs, when said one or multiple programs are executed by said one or multiple processors, so that said one Or multiple processors execute the above-mentioned method for sending audio-frequency information or the method for obtaining audio-frequency information.
The present embodiment additionally provides a kind of computer-readable medium, is stored thereon with computer program, and the program is processed Device realizes the above-mentioned method for sending audio-frequency information or the method for obtaining audio-frequency information when executing.
Below with reference to Fig. 7, it illustrates the electronic equipments for being suitable for being used to realize embodiment of the disclosure (for example, in Fig. 1 Server 105) computer system 700 structural schematic diagram.Electronic equipment shown in Fig. 7 is only an example, should not be right The function and use scope of embodiment of the disclosure bring any restrictions.
As shown in fig. 7, electronic equipment 700 may include processing unit (such as central processing unit, graphics processor etc.) 701, random access can be loaded into according to the program being stored in read-only memory (ROM) 702 or from storage device 708 Program in memory (RAM) 703 and execute various movements appropriate and processing.In RAM 703, it is also stored with electronic equipment Various programs and data needed for 700 operations.Processing unit 701, ROM 702 and RAM703 are connected with each other by bus 704. Input/output (I/O) interface 705 is also connected to bus 704.
In general, following device can connect to I/O interface 705: including such as touch screen, touch tablet, keyboard, mouse, taking the photograph As the input unit 706 of head, microphone, accelerometer, gyroscope etc.;Including such as liquid crystal display (LCD), loudspeaker, vibration The output device 707 of dynamic device etc.;Storage device 708 including such as tape, hard disk etc.;And communication device 709.Communication device 709, which can permit electronic equipment 700, is wirelessly or non-wirelessly communicated with other equipment to exchange data.Although Fig. 7 shows tool There is the electronic equipment 700 of various devices, it should be understood that being not required for implementing or having all devices shown.It can be with Alternatively implement or have more or fewer devices.Each box shown in Fig. 7 can represent a device, can also root According to needing to represent multiple devices.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communication device 709, or from storage device 708 It is mounted, or is mounted from ROM 702.When the computer program is executed by processing unit 701, the implementation of the disclosure is executed The above-mentioned function of being limited in the method for example.
It is situated between it should be noted that the above-mentioned computer-readable medium of embodiment of the disclosure can be computer-readable signal Matter or computer readable storage medium either the two any combination.Computer readable storage medium for example can be with System, device or the device of --- but being not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, or it is any more than Combination.The more specific example of computer readable storage medium can include but is not limited to: have one or more conducting wires Electrical connection, portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type are programmable Read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic are deposited Memory device or above-mentioned any appropriate combination.In embodiment of the disclosure, computer readable storage medium, which can be, appoints What include or the tangible medium of storage program that the program can be commanded execution system, device or device use or and its It is used in combination.And in embodiment of the disclosure, computer-readable signal media may include in a base band or as carrier wave The data-signal that a part is propagated, wherein carrying computer-readable program code.The data-signal of this propagation can be adopted With diversified forms, including but not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal is situated between Matter can also be any computer-readable medium other than computer readable storage medium, which can be with It sends, propagate or transmits for by the use of instruction execution system, device or device or program in connection.Meter The program code for including on calculation machine readable medium can transmit with any suitable medium, including but not limited to: electric wire, optical cable, RF (radio frequency) etc. or above-mentioned any appropriate combination.
Above-mentioned computer-readable medium can be included in above-mentioned electronic equipment;It is also possible to individualism, and not It is fitted into the electronic equipment.Above-mentioned computer-readable medium carries one or more program, when said one or more When a program is executed by the electronic equipment, so that the electronic equipment: audio-frequency information to be sent is divided into the according to setting duration One audio packet sequence;For the audio pack in above-mentioned first audio packet sequence, by the audio pack be compressed into respectively main audio packet and Backup audio packet;By the main audio packet of the correspondence audio pack in above-mentioned first audio packet sequence and Backup audio encapsulation at audio It is sent after transmission packet.
The behaviour for executing embodiment of the disclosure can be write with one or more programming languages or combinations thereof The computer program code of work, above procedure design language include object oriented program language-such as Java, Smalltalk, C++ further include conventional procedural programming language-such as " C " language or similar program design language Speech.Program code can be executed fully on the user computer, partly be executed on the user computer, as an independence Software package execute, part on the user computer part execute on the remote computer or completely in remote computer or It is executed on server.In situations involving remote computers, remote computer can pass through the network of any kind --- packet It includes local area network (LAN) or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as benefit It is connected with ISP by internet).
Flow chart and block diagram in attached drawing illustrate system, method and the computer of the various embodiments according to the disclosure The architecture, function and operation in the cards of program product.In this regard, each box in flowchart or block diagram can be with A part of a module, program segment or code is represented, a part of the module, program segment or code includes one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer The combination of order is realized.
Being described in unit involved in embodiment of the disclosure can be realized by way of software, can also be passed through The mode of hardware is realized.Described unit also can be set in the processor, for example, can be described as: a kind of processor Including audio division unit, audio compressing unit and audio transmission unit.Wherein, the title of these units is under certain conditions simultaneously The restriction to the unit itself is not constituted, for example, audio transmission unit is also described as " for sending audio transmission packet Unit ".
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (18)

1. a kind of method for sending audio-frequency information, comprising:
Audio-frequency information to be sent is divided into the first audio packet sequence according to setting duration;
For the audio pack in the first audio packet sequence, which is compressed into main audio packet and Backup audio respectively Packet;
By the main audio packet of the correspondence audio pack in the first audio packet sequence and Backup audio encapsulation at audio transmission packet After send.
2. according to the method described in claim 1, wherein, the compression ratio of the main audio packet is less than the compression of Backup audio packet Rate.
3. according to the method described in claim 1, wherein, which comprises
For the audio pack in the first audio packet sequence, the audio content data in the audio pack is inquired, according to the sound Frequency content information is that the audio pack is arranged priority tag, and the content of the priority tag includes high priority or low preferential Grade.
4. according to the method described in claim 1, wherein, the master by the correspondence audio pack in the first audio packet sequence Audio pack and Backup audio encapsulating are sent after dressing up an audio transmission packet, comprising:
Determine the main audio packet to be sent at currently transmitted moment, and it is corresponding to be sent standby to obtain previous sending instant main audio packet With audio pack, wherein the previous sending instant main audio packet and Backup audio packet to be sent correspond to the same audio pack;
It is sent after the main audio packet to be sent and the Backup audio encapsulating to be sent are dressed up an audio transmission packet.
5. the method according to claim 1, wherein the method also includes:
In response to receiving retransmission request, corresponding retransmission of audio transmission packet is sent according to the retransmission request, the re-transmission is asked Seek the serial number including retransmission of audio transmission packet.
6. a kind of method for obtaining audio-frequency information, comprising:
Main audio packet and Backup audio packet are extracted from received audio transmission packet of the current time of reception;
Exist in response to the main audio packet of the previous time of reception, the main audio packet of the correspondence current time of reception is imported into the second audio Otherwise packet sequence restores the main audio packet of the previous time of reception by the Backup audio packet of the correspondence current time of reception, and according to The sequencing of the time of reception imports the second audio packet sequence for obtained main audio packet is restored, wherein second audio pack Sequence is for constructing audio-frequency information.
7. according to the method described in claim 6, wherein, before the Backup audio packet by the current time of reception restores described The main audio packet of one time of reception, comprising:
The priority tag of the Backup audio packet of the current time of reception is inquired, the content of the priority tag includes high priority Or low priority;
It is high priority in response to the priority tag, restores described by the Backup audio packet of the current time of reception and previous connect The main audio packet that time receiving carves.
8. according to method described in claim 6 to 7 any one, wherein the method also includes:
It is not present in response to the main audio packet of at least continuous two times of reception, sends the re-transmission for obtaining corresponding main audio packet The retransmission request of audio transmission packet, the retransmission request include the serial number of retransmission of audio transmission packet.
9. a kind of for sending the device of audio-frequency information, comprising:
Audio division unit is configured to audio-frequency information to be sent being divided into the first audio packet sequence according to setting duration;
Audio compressing unit is configured to respectively compress the audio pack for the audio pack in the first audio packet sequence At main audio packet and Backup audio packet;
Audio transmission unit is configured to the main audio packet and spare sound of the correspondence audio pack in the first audio packet sequence Frequency encapsulation after audio transmission packet at sending.
10. device according to claim 9, wherein the compression ratio of the main audio packet is less than the compression of Backup audio packet Rate.
11. device according to claim 9, wherein described device includes:
Priority tag setting unit is configured to inquire the audio pack for the audio pack in the first audio packet sequence Interior audio content data is that priority tag, the priority tag is arranged in the audio pack according to the audio content data Content include high priority or low priority.
12. device according to claim 9, wherein the audio transmission unit includes:
Audio pack to be sent determines subelement, is configured to determine the main audio packet to be sent at currently transmitted moment, and before acquisition The corresponding Backup audio packet to be sent of one sending instant main audio packet, wherein the previous sending instant main audio packet and pending Backup audio packet is sent to correspond to the same audio pack;
Audio transmission sub-unit is configured to the main audio packet to be sent and the Backup audio encapsulating to be sent dressing up one It is sent after a audio transmission packet.
13. according to device described in claim 9 to 12 any one, wherein described device further include:
Audio retransmission unit is configured to send corresponding re-transmission according to the retransmission request in response to receiving retransmission request Audio transmission packet, the retransmission request include the serial number of retransmission of audio transmission packet.
14. a kind of for obtaining the device of audio-frequency information, comprising:
Audio pack extraction unit is configured to extract main audio packet and spare from received audio transmission packet of the current time of reception Audio pack;
Audio pack sequence construct unit exists in response to the main audio packet of the previous time of reception, is configured to correspond to and currently connects The main audio packet that time receiving carves imports the second audio packet sequence, otherwise, is restored by the Backup audio packet of the correspondence current time of reception The main audio packet of the previous time of reception, and the second sound is imported by obtained main audio packet is restored according to the sequencing of the time of reception Frequency packet sequence, wherein the second audio packet sequence is for constructing audio-frequency information.
15. device according to claim 14, wherein the audio pack sequence construct unit includes:
Priority tag inquires subelement, is configured to inquire the priority tag of the Backup audio packet of the current time of reception, institute The content for stating priority tag includes high priority or low priority;
Main audio packet restores subelement, and being configured in response to the priority tag is high priority, when by currently receiving The Backup audio packet at quarter restores the main audio packet of the previous time of reception.
16. device described in 4 to 15 any one according to claim 1, wherein described device further include:
Retransmission request transmission unit is not present in response to the main audio packet of at least continuous two times of reception, is configured to send Retransmission of audio for obtaining corresponding main audio packet transmits the retransmission request of packet, and the retransmission request includes retransmission of audio transmission packet Serial number.
17. a kind of electronic equipment, comprising:
One or more processors;
Memory is stored thereon with one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors Any method in any method or claim 6 to 8 in perform claim requirement 1 to 5.
18. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the program is executed by processor Method as described in Shi Shixian is any in the method or claim 6 to 8 as described in any in claim 1 to 5.
CN201910252848.6A 2019-03-29 2019-03-29 Method and device for transmitting audio information Active CN110007894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910252848.6A CN110007894B (en) 2019-03-29 2019-03-29 Method and device for transmitting audio information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910252848.6A CN110007894B (en) 2019-03-29 2019-03-29 Method and device for transmitting audio information

Publications (2)

Publication Number Publication Date
CN110007894A true CN110007894A (en) 2019-07-12
CN110007894B CN110007894B (en) 2021-01-15

Family

ID=67169040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910252848.6A Active CN110007894B (en) 2019-03-29 2019-03-29 Method and device for transmitting audio information

Country Status (1)

Country Link
CN (1) CN110007894B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040001553A1 (en) * 2002-07-01 2004-01-01 Jack Steentra Communication using audible tones
CN1968137A (en) * 2006-04-30 2007-05-23 华为技术有限公司 Media stream checking system and code stream generation node checking device
CN101562630A (en) * 2008-04-16 2009-10-21 大唐移动通信设备有限公司 Method and device for transmitting signaling messages of wireless network layer
CN103065635A (en) * 2013-01-15 2013-04-24 哈尔滨工程大学 Stable, high-quality and real-time voice frequency transmission method based on the third generation telecommunication (3G) network
CN104270684A (en) * 2014-09-24 2015-01-07 北京中科大洋科技发展股份有限公司 Video and audio data network transmission system and method oriented to real-time application
CN104700837A (en) * 2013-12-09 2015-06-10 国民技术股份有限公司 Method and device for sending and receiving audio signals
CN106231226A (en) * 2015-09-21 2016-12-14 零度智控(北京)智能科技有限公司 Audio-visual synthetic method, Apparatus and system
CN108459837A (en) * 2017-02-22 2018-08-28 深圳市中兴微电子技术有限公司 A kind of audio data processing method and device
US20180329670A1 (en) * 2017-05-15 2018-11-15 MIXHalo Corp. Systems and methods for providing real-time audio and data

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040001553A1 (en) * 2002-07-01 2004-01-01 Jack Steentra Communication using audible tones
CN1968137A (en) * 2006-04-30 2007-05-23 华为技术有限公司 Media stream checking system and code stream generation node checking device
CN101562630A (en) * 2008-04-16 2009-10-21 大唐移动通信设备有限公司 Method and device for transmitting signaling messages of wireless network layer
CN103065635A (en) * 2013-01-15 2013-04-24 哈尔滨工程大学 Stable, high-quality and real-time voice frequency transmission method based on the third generation telecommunication (3G) network
CN104700837A (en) * 2013-12-09 2015-06-10 国民技术股份有限公司 Method and device for sending and receiving audio signals
CN104270684A (en) * 2014-09-24 2015-01-07 北京中科大洋科技发展股份有限公司 Video and audio data network transmission system and method oriented to real-time application
CN106231226A (en) * 2015-09-21 2016-12-14 零度智控(北京)智能科技有限公司 Audio-visual synthetic method, Apparatus and system
CN108459837A (en) * 2017-02-22 2018-08-28 深圳市中兴微电子技术有限公司 A kind of audio data processing method and device
US20180329670A1 (en) * 2017-05-15 2018-11-15 MIXHalo Corp. Systems and methods for providing real-time audio and data

Also Published As

Publication number Publication date
CN110007894B (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN107079331B (en) Method and apparatus for controlling traffic of electronic device in wireless communication system
CN109714332B (en) Protocol conversion method and device based on Thrift and syntax tree analysis
CN101889427A (en) Distribution method,operation method and system of application system in mobile communication network
US11868707B2 (en) Information interaction method and apparatus, server, system, and storage medium
JP2006520938A (en) System and method for creating and communicating with component-based wireless applications
CN103780972A (en) Server, client device, and control methods thereof
CN102904959A (en) Network accelerating method and gateway
CN108696899A (en) Sip message transmits and method of reseptance and transmission and reception device
CN110535659A (en) Method and apparatus for handling request of data
CN108696649A (en) Image processing method, device, equipment and computer readable storage medium
JP2011521486A (en) How to process non-Bluetooth signals using the Bluetooth module
CN107707972A (en) For the data processing method of Screen sharing, device, system and electronic equipment
CN110020966A (en) Data processing method and device applied to smart grid
CN110535661A (en) Method for processing business, device, electronic equipment and storage medium based on block chain
CN110290398A (en) Video delivery method, device, storage medium and electronic equipment
CN107968848A (en) A kind of method, terminal device and storage medium for obtaining IP address
CN107645597A (en) The synchronous method and terminal of application program
CN110275736A (en) Obtain operation data method, apparatus, equipment and the readable medium of application program
CN110007894A (en) For sending the method and device of audio-frequency information
CN110719233B (en) Method and device for transmitting information
CN107872472A (en) A kind of method and system interacted by web interface with vehicle device
CN110225135A (en) Connection method, device, electronic equipment and the storage medium of server
CN109783409A (en) Method and apparatus for handling data
CN109005250A (en) Method and apparatus for accessing server-side
CN108062956A (en) A kind of audio recognition method and system of single host multiple terminals

Legal Events

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