Specific embodiment
It is illustrated with reference to the accompanying drawing with specific embodiment.
Referring to Fig. 1, Fig. 1 is the flow chart of one embodiment of method of the wireless acoustic communication of the application.Present embodimentIn, it sends terminal and receives terminal by wireless acoustic communication, sound wave letter is generated by the loudspeaker of itself for example, sending terminalNumber, it receives terminal and carries out acoustic communication in such a way that microphone receives acoustic signals.Specifically, method includes the following steps:
S101: it is pre- that the terminal acquisition pilot data of the first preset length, the lead data of the second preset length, third are sentIf the synchronous code and load data of length, wherein the pilot data is the data lower than preset threshold, for indicating logicalThe starting of letter data, the lead data is for determining intersymbol boundary in load data, and the synchronous code is for verifying rootWhether the intersymbol boundary determined according to the lead data is correct.
The application sends terminal and carries out the data frame of wireless acoustic communication by the pilot tone of the first preset length with receiving terminalData, the lead data of the second preset length, the synchronous code of third preset length and load data are constituted.For example, when sendingWhen terminal needs to carry the load data of information to reception terminal transmission, the pilot number that terminal generates the first preset length is sentAccording to, the lead data of the second preset length, the synchronous code of third preset length.Wherein, the pilot data, lead data, sameWalk code, load data is logical data.Generally, the first, second preset length is 8-16 symbol lengths, and preferably 8 accord withNumber length, third preset length is preferably 8 symbol lengths.Certainly, the first, second, third preset length is not limited to above-mentionedSymbol lengths can be set as needed as other symbol lengths, be not limited thereto in other embodiments.Additionally, it is preferred thatThe length on ground, load data may be configured as regular length.
Specifically, the pilot data is as the communication data i.e. starting of the data frame, according to receive the scheduled agreement of terminal,The amplitude that pilot data is arranged is to detect that first of the data lower than preset threshold preset when receiving terminal lower than preset thresholdWhen the data of length, it is determined that the data are the starting of data frame, i.e. pilot data.During sonic transmissions, be easy byTo the influence of outside noise, so as to cause the data distortion in data frame, therefore the number of derivatives of the second preset length are arranged in the applicationAccording to determine the character boundary of data frame.Also, for the accurate positionin for guaranteeing character boundary, also set up third preset lengthSynchronous code, to examine determining character boundary whether correct.
S102: terminal is sent by the pilot data, lead data, synchronous code and load data and is modulated into acoustic signals.
For example, send after terminal generates pilot data, lead data, synchronous code and load data, to pilot data, leadingData, synchronous code use but are not limited to phase-shift keying (PSK) (English: Phase-Shift Keying, abbreviation: PSK) or frequency shift keying(English: Frequency-shift keying, referred to as: FSK) coding mode is modulated, by pilot data, lead data,Synchronous code and load data are loaded on communication carrier respectively, obtain being loaded with pilot data, lead data, synchronous code and loadThe acoustic signals of data.
S103: the acoustic signals that terminal will be loaded with pilot data, lead data, synchronous code and load data respectively are sentIt is sent to reception terminal.
It sends terminal and the acoustic signals for being loaded with pilot data, lead data, synchronous code and load data is passed through into soundOutput module such as loudspeaker is sent to reception terminal, and the voice input module such as microphone for receiving terminal, which receives, sends terminal transmissionAcoustic signals.Wherein, the frequency for the acoustic signals which sends, i.e., communication carrier frequency is preferred but is not limited to 2KHz~6KHz can effectively receive the acoustic signals of this frequency range to guarantee all terminal devices by voice input module, andAnd part noise jamming can be prevented.
It is understood that due to pilot data indicate communication data starting, therefore generally can by pilot data prior toLead data, synchronous code and load data are sent.And lead data, synchronous code in the wireless acoustic communication data of the application and negativeCarrying the transmission sequence of data preferably but not limiting is sequentially lead data, synchronous code and load data.In different application, this ShenPlease the transmission sequence of above-mentioned each component part in wireless acoustic communication data can be configured according to actual needs, and sendIt terminal and receives terminal and can first pass through communication protocol in advance and reached an agreement on the sequence of each component part, and sent out according to the good sequence of agreementIt send, or receives and parses through to obtain each component part.
The starting that present embodiment is communicated by sending pilot data prompt, and it is true according to the lead data and synchronous codeThe character boundary of fixed load data, the accuracy that the symbol of proof load data is distinguished, and then solve wireless sound wave communication bandThe problem of width, load data is easy error, the validity of load data is improved, so that communication efficiency is high.
Referring to Fig. 2, Fig. 2 is the flow chart of another embodiment of method of the wireless acoustic communication of the application.This embodiment partyIn formula, sends terminal and reception terminal passes through wireless acoustic communication.Specifically, method includes the following steps:
S201: it sends terminal to the reception terminal and sends configuration acoustic signals, wherein the configuration acoustic signals includeThe optimal communication band information for sending terminal, so that the reception terminal configures certainly according to the optimal communication band informationThe communications band of body.
Terminal is sent in present embodiment and receives terminal and carries out frequency response adaptive process, improves the steady of wireless acoustic communicationIt is qualitative.For example, sending terminal when being communicated for the first time with reception terminal and initiating primary communication, wherein transmission terminal initial communication carriesWave frequency rate is preferred but the unlimited high frequency 2KHz~6KHz for being set as sound wave, passes through microphone with the mobile terminal device for guaranteeing allThe acoustic signals of this frequency range can effectively be received.It sends terminal and initiates the data frame packet of communication containing the best logical of the transmission terminalThis information is sent to reception terminal by sound wave as most preferably sent and received frequency range by letter band information.
S202: it sends terminal and receives believing comprising the configured communications band of the reception terminal for the reception terminal feedbackThe acoustic signals of breath, and optimal communication frequency range is arranged according to the configured communications band of the reception terminal.
It receives terminal to receive comprising sending terminal optimal communication band information, if transmission terminal can be matched by receiving terminalFrequency response, just adjust equipment of itself receptions frequency range meet transmission terminal transmission frequency range, adjust the transmission frequency range of equipment of itselfMeet the reception frequency range for sending terminal.If the frequency response for sending terminal cannot be matched by receiving terminal, initial communication frequency range is kept to matchIt sets.Receive the communications band information write-in that after terminal configured and itself send and receive communications band, itself is sent and receivedIn response message, and acoustic signals are modulated to by initial communication carrier wave frequency range, are sent by sound output module such as loudspeakerGive transmission terminal.
After transmission terminal receives response message, so that it may the communications band negotiated according to transmission terminal and reception terminalOptimal communications band is arranged in information, obtains optimal communication effect, and can match different terminal devices to greatest extent.If for example, receiving the configured communications band of terminal in the optimal communication frequency range for sending terminal, being arranged and receiving terminalConfigure identical communications band.
It is understood that sending terminal and receiving terminal may not limit in the communications band information of adaptive process interactionIncluding sending frequency range and receiving frequency range, it is only used as sender sending terminal, receives the embodiment that terminal is only used as recipientIn, the best band information that sends can only be sent to terminal is received by sending terminal, and the reception frequency range for receiving terminal in feedback configuration is believedIt ceases and gives transmission terminal, therefore transmission terminal and reception terminal are not made specifically in the communications band information of adaptive process interaction at thisIt limits.
In addition, sending terminal for the anti-interference of raising communication and receiving terminal and itself lead to what adaptive process configuredBelieve frequency range preferably in 2KHz~6KHz.
S203: it is pre- that the terminal acquisition pilot data of the first preset length, the lead data of the second preset length, third are sentIf the synchronous code and load data of length, wherein the pilot data is the data lower than preset threshold, for indicating logicalThe starting of letter data, the lead data is for determining intersymbol boundary in load data, and the synchronous code is for verifying rootWhether the intersymbol boundary determined according to the lead data is correct.
Wherein, the pilot data, lead data, synchronous code, load data are logical data.Generally, first, second is pre-If length is 8-16 symbol lengths, and preferably 8 symbol lengths, third preset length are preferably 8 symbol lengths.WhenSo, the first, second, third preset length is not limited to above-mentioned symbol lengths, in other embodiments, can be set as neededFor other symbol lengths, it is not limited thereto.Furthermore it is preferred that the length of load data may be configured as regular length.
S204: terminal is sent by the pilot data, lead data, synchronous code and load data and is modulated into acoustic signals.
For example, send terminal of pilot data, lead data, synchronous code use but be not limited to PSK or FSK coding mode intoRow modulation, pilot data, lead data, synchronous code and load data are loaded into respectively on communication carrier, are loaded withPilot data, lead data, synchronous code and load data acoustic signals.Wherein, the frequency of communication carrier exists in transmission terminalIn the optimal communication frequency range being arranged in above-mentioned steps S202, can effectively it be connect with guaranteeing to receive terminal by voice input moduleThe acoustic signals for receiving this frequency range obtain optimal communication effect.
S205: the check code that terminal generates the 4th preset length according to the load data is sent.
Present embodiment sends terminal and carries out the data frame of wireless acoustic communication by the first preset length with receiving terminalPilot data, the lead data of the second preset length, the synchronous code of third preset length, load data and composition.To guaranteeThe integrality of load data sends the check code that terminal generates the 4th preset length according to load data, such as cyclic redundancy check,Wherein, the 4th preset length is preferred but is not limited to two symbol lengths.
It is understood that in the present embodiment, check code is successively walked with pilot data, lead data, synchronous CDMAIt is rapid to obtain, but be not limited thereto and determine.In other embodiments, check code and pilot data, lead data, synchronous code can be withIt obtains synchronous, alternatively, first obtain verification obtains pilot data, lead data, synchronous code again, therefore transmission terminal is obtained at thisCheck code, pilot data, lead data, the sequence of synchronous code are not especially limited.
S206: pilot data, lead data, synchronous code, load data and check code will be loaded with respectively by sending terminalAcoustic signals are sent to reception terminal.
For example, sending the sound wave that terminal will be loaded with pilot data, lead data, synchronous code, load data and check codeSignal is sent to reception terminal by sound output module such as loudspeaker, and the voice input module such as microphone for receiving terminal receivesSend the acoustic signals that terminal is sent.Wherein, the frequency for the acoustic signals which sends, i.e. communication carrier frequency are preferredBut it is not limited to 2KHz~6KHz, to guarantee that all terminal devices can effectively receive this frequency range by voice input moduleAcoustic signals, and part noise jamming can be prevented.
The sound output module of present embodiment using terminal such as loudspeaker generates acoustic signals, voice input terminal such as wheatThe mode that gram wind receives acoustic signals carries out sound wave communication, transmits data between terminal devices, does not need additional radioReceiver And Transmitter.Meanwhile the present invention designs unique coding mode, the association of data frame institutional framework and communication interactionIt is narrow that quotient's mode solves wireless sound wave communication bandwidth, is easy disturbed, the problem of communication stability difference.
Referring to Fig. 3, Fig. 3 is the flow chart of the method a further embodiment of the wireless acoustic communication of the application.This embodiment partyIt in formula, sends terminal and receives terminal by wireless acoustic communication, sound wave is generated by the loudspeaker of itself for example, sending terminalSignal receives terminal and carries out acoustic communication in such a way that microphone receives acoustic signals.Specifically, this method includes following stepIt is rapid:
S301: the acoustic signals that end-on receives are received and are demodulated to obtain solution adjusting data, detect the solution adjusting dataIn whether comprising the first preset length and be lower than preset threshold pilot data.
It receives terminal and receives the acoustic signals for sending terminal and sending by voice input module such as microphone, sound wave is believedIt number is demodulated to obtain the digital signal for indicating information and also referred to as solves adjusting data.According to send the scheduled agreement of terminal: pilot toneStarting of the data as efficient communication data frame, and the amplitude of pilot data is lower than preset threshold.Receive terminal judgement demodulation numberWith the presence or absence of the data of the first preset length lower than preset threshold in, if it is, determining that the data are pilot data, i.e.,For the starting with transmission terminal efficient communication data frame.
Optimally, it is that can prevent part noise jamming, receives the reception frequency range of terminal preferably but be not limited to 2KHz~6KHz.
S302: if comprising, it receives terminal and determines that the solution adjusting data originated from the pilot data is communication data, andThe lead data that the second preset length is obtained from the communication data detects intersymbol boundary in the lead data.
If receiving terminal detects the pilot data comprising the first preset length lower than preset threshold in solution adjusting data,It determines and is originated from the pilot data, the data demodulated from the acoustic signals that the transmission terminal receives are efficient communicationThe data of data frame.Receive terminal according in advance with send the transmissions of the good each data of terminal protocol sequentially, from pilot data itLead data, synchronous code and load data are obtained in solution adjusting data afterwards.In order to more preferably illustrate, present embodiment and below implementationMode is sequentially that pilot data, lead data, synchronous code, load data are with the transmissions of wireless acoustic communication data sequenceExample, but transmission sequence should not be construed as the restriction to the application.
Therefore it receives terminal and directly acquires demodulating after the pilot data from the acoustic signals that the transmission terminal receivesThe data of the second obtained preset length detect the intersymbol boundary in the lead data as lead data.Wherein,The intersymbol boundary is the intersection between each symbol included in data.For example, in the sampled value of the dataThe smallest sampled point of absolute value is that symbol has a common boundary lower than the sampled point of preset value.
S303: the synchronous code that terminal obtains third preset length from the communication data is received, according to the intersymbolBoundary the synchronous code is divided into multiple symbols, judge that the value of each symbol of the synchronous code is corresponding with pre-determined synchronization codeWhether value of symbol is identical.
It receives terminal and obtains what the demodulation from the acoustic signals that the transmission terminal receives after the lead data obtainedThe data of third preset length are as synchronous code.According to the character boundary that S302 is determined, as determined every 5th sampled point in dataFor character boundary, terminal is received by the sampled point in synchronous code every 5 same periods and is divided into a symbol, obtains multiple symbols,And the value for example logic 1 or 0 of each symbol is determined according to the amplitude situation of each symbol.Terminal is received to obtain with sending terminalThe pre-determined synchronization code of the good third preset length of agreement compares the logical value and pre-determined synchronization of each symbol of synchronous code in dataWhether the logical value of the correspondence bit sign of code is all the same.
S304: if it is, receiving terminal determines that the intersymbol boundary is the character boundary in load data, and fromLoad data is obtained in the communication data, each symbol in the load data is distinguished according to the character boundary, to realizeParsing to the load data.
If it is determined that logical value and the logical value of the corresponding symbol of pre-determined synchronization code of each symbol of synchronous code obtained are notIdentical, then the character boundary for determining that S302 is detected is incorrect, and receiving terminal terminates process, and resumes waiting for obtaining and sendThe pilot data that terminal is sent.If it is determined that logical value and the corresponding symbol of pre-determined synchronization code of each symbol of synchronous code obtainedLogical value it is all the same, then the character boundary detected S302 is determined as the character boundary in load data.Terminal is received to obtainTaking the data demodulated from the acoustic signals that the transmission terminal receives after the synchronous code is load data, wherein shouldLoad data can be in the data or load data of regular length comprising termination of the end mark to determine load data.It connectsAfter receiving terminal acquisition load data, according to determining character boundary, such as the 5th sampled point every in data is character boundary, is receivedLoad data is divided into multiple symbols, root in such a way that the sampled point in every 5 same periods is divided into a symbol by terminalIts logical value 1 or 0 is determined according to the amplitude of each symbol, and then constitutes the logical message of load data, for example 8 symbol lengths" 10011101 " receive terminal and are parsed according to logical message of the communication protocol to load data to load data, bornCarry information represented by data.
Present embodiment passes through the starting for judging pilot data prompt communication, and true according to the lead data and synchronous codeThe character boundary of fixed load data, the accuracy that the symbol of proof load data is distinguished, and then solve wireless sound wave communication bandThe problem of width, load data is easy error, the validity of load data is improved, so that communication efficiency is high.
Referring to Fig. 4, Fig. 4 is the method for the wireless acoustic communication of the application and the flow chart of a further embodiment.This implementationIn mode, sends terminal and reception terminal passes through wireless acoustic communication, wherein the transmission sequence of wireless acoustic communication data is sequentiallyFor pilot data, lead data, synchronous code, load data, specifically, method includes the following steps:
401: receiving terminal and receive the configuration acoustic signals sent to the transmission terminal, according to the optimal communication frequency rangeThe communications band of information configuration itself, wherein the configuration acoustic signals include the optimal communication frequency range letter for sending terminalBreath.
Terminal is sent in present embodiment and receives terminal and carries out frequency response adaptive process, improves the steady of wireless acoustic communicationIt is qualitative.For example, sending terminal when being communicated for the first time with reception terminal and initiating primary communication, wherein transmission terminal initial communication carriesWave frequency rate is preferred but the unlimited high frequency 2KHz~6KHz for being set as sound wave, passes through microphone with the mobile terminal device for guaranteeing allThe acoustic signals of this frequency range can effectively be received.It sends terminal and initiates the data frame packet of communication containing the best logical of the transmission terminalThis information is sent to reception terminal by sound wave as most preferably sent and received frequency range by letter band information.
It receives terminal to receive comprising sending terminal optimal communication band information, if transmission terminal can be matched by receiving terminalFrequency response, just adjust equipment of itself receptions frequency range meet transmission terminal transmission frequency range, adjust the transmission frequency range of equipment of itselfMeet the reception frequency range for sending terminal.If the frequency response for sending terminal cannot be matched by receiving terminal, initial communication frequency range is kept to matchIt sets.
S402: receiving terminal to the transmission terminal and feed back the acoustic signals comprising configured communications band information, withMake the transmission terminal that optimal communication frequency range is set according to terminal configured communications band is received.
Receive the communications band information that after terminal configured and itself send and receive communications band, itself is sent and receivedIt is written in response message, and acoustic signals is modulated to by initial communication carrier wave frequency range, pass through sound output module such as loudspeakerIt is sent to transmission terminal.After transmission terminal receives response message, so that it may according to transmission terminal and receive what terminal was negotiatedOptimal communications band is arranged in communications band information, obtains optimal communication effect, and can match different ends to greatest extentEnd equipment.If being arranged and connecing for example, receiving the configured communications band of terminal in the optimal communication frequency range for sending terminalIt receives terminal and configures identical communications band.
It is understood that sending terminal and receiving terminal may not limit in the communications band information of adaptive process interactionIncluding sending frequency range and receiving frequency range, it is only used as sender sending terminal, receives the embodiment that terminal is only used as recipientIn, the best band information that sends can only be sent to terminal is received by sending terminal, and the reception frequency range for receiving terminal in feedback configuration is believedIt ceases and gives transmission terminal, therefore transmission terminal and reception terminal are not made specifically in the communications band information of adaptive process interaction at thisIt limits.
In addition, sending terminal for the anti-interference of raising communication and receiving terminal and itself lead to what adaptive process configuredBelieve frequency range preferably in 2KHz~6KHz.
S403: the acoustic signals that end-on receives are received and are demodulated to obtain solution adjusting data, detect the solution adjusting dataIn whether comprising the first preset length and be lower than preset threshold pilot data.
It receives terminal and receives the acoustic signals for sending terminal and sending by voice input module such as microphone, sound wave is believedIt number is demodulated to obtain solution adjusting data.According to send the scheduled agreement of terminal, receive terminal judge solution adjusting data in whether depositIn the data of the first preset length lower than preset threshold, if it is, determining that the data are pilot data, as eventually with transmissionHold the starting of efficient communication data frame.
S404: if comprising, it receives terminal and determines that the solution adjusting data originated from the pilot data is communication data, andThe lead data of the second preset length after the pilot data is obtained, and N is carried out to each symbol of the lead dataThe absolute value of the n-th sampled value of each symbol is added up respectively, obtains n-th of He by secondary sampling, and wherein n is followed successively by 1 and arrives N'sInteger value, N are the integer greater than 1, and the N number of and middle minimum and corresponding m sampled point acquired is as the lead dataIntersymbol boundary, the m are 1 to any one integer between M.
If receiving terminal detects the pilot data comprising the first preset length lower than preset threshold in solution adjusting data,The data of the second preset length after the pilot data are then obtained as lead data.Terminal is received to the lead dataEach symbol carries out n times sampling, and sampling period T, N are the integer greater than 1.Receive 1st sampling of the terminal by each symbolThe absolute value of value is cumulative, obtain the 1st and, the absolute value of the 2nd sampled value of each symbol is added up, obtains the 2ndWith ... until the absolute value of the n-th sampled value of each symbol added up, obtain n-th and.Receive the N that terminal acquiresA and middle minimum and corresponding sampled point, for example m-th of sampled point, i.e., accord with using every m-th of sampled point as the lead dataBoundary between number, wherein the m is 1 to any one integer between M.For example, respectively by the of symbol each in lead dataSame number sampled value is cumulative obtaining and sequentially includes: 5,9,7,0,10, then makees the smallest 0 corresponding every 4th sampled pointFor character boundary.
S405: receiving terminal and obtain the synchronous code of the third preset length after the lead data, and with it is described beforeDerivative samples the synchronous code according to the identical sampling period, to divide a symbol every the m sampled point, according toIn each symbol near p intermediate sampled value and determine that value of symbol is 0 or 1, and judge each symbol of the synchronous codeWhether identical it is worth value of symbol corresponding with pre-determined synchronization code, wherein p is the integer less than or equal to m.
For example, it is identical with lead data to the synchronous code progress of the third preset length after lead data to receive terminalThe sampling of sampling period T, by synchronous code to divide a symbol, such as every 4th sampled point of above-mentioned determination every m sampled pointIt, i.e., will be to divide a symbol every 4 sampled points as character boundary.Since the sampled point in symbol closer to boundary malfunctionsRate is bigger, it is possible to boundary demarcation is incorrect, actually the sampled value be adjacent-symbol amplitude, therefore receive terminal preferably onlyThe value of the symbol is determined near intermediate sampled value according to each symbol.For example, receive terminal obtain in each symbol nearThe nearly intermediate sum less than or equal to m sampled value, such as sampled value of each symbol are 4,5,6,7, obtain intermediate two i.e.: 5,6And be 11, acquire the sum average value be 5.5.According to predefined communication protocol, reception terminal determines that sampled value belongs to for 5.5 and patrolsValue 0 or 1 is collected, and using determining logical value as the logical value of the symbol.The logical value of all symbols in obtaining synchronous codeAfterwards, receive terminal judges whether each value of symbol of synchronous code value of symbol corresponding with pre-determined synchronization code is identical.
S406: it if it is, receiving terminal determines that the intersymbol boundary is the character boundary in load data, and obtainsThe load data after the synchronous code is taken, each symbol in the load data is distinguished according to the character boundary, to realizeParsing to the load data.
If it is determined that logical value and the logical value of the corresponding symbol of pre-determined synchronization code of each symbol of synchronous code obtained are notIdentical, then the character boundary for determining that S404 is detected is incorrect, and receiving terminal terminates process, and resumes waiting for obtaining and sendThe pilot data that terminal is sent.If it is determined that logical value and the corresponding symbol of pre-determined synchronization code of each symbol of synchronous code obtainedLogical value it is all the same, then the character boundary detected S404 is determined as the character boundary in load data.Terminal is received to obtainTake the load data after the synchronous code, wherein the load data can for regular length data or load data in wrapThe termination of load data is determined containing end mark.After receiving terminal acquisition load data, according to determining character boundary, it will loadData are divided into multiple symbols, determine its logical value 1 or 0 according to the amplitude of each symbol, and then constitute the logic of load dataInformation receives terminal and is parsed according to logical message of the communication protocol to load data to load data, obtains load dataRepresented information.
Optimally, the data frame that present embodiment sends that terminal carries out wireless acoustic communication with reception terminal is preset by firstThe pilot data of length, the lead data of the second preset length, the synchronous code of third preset length, load data and composition.It further include the check code of the 4th preset length, such as cyclic redundancy check after load data for the integrality of proof load dataDeng, wherein the 4th preset length is preferred but is not limited to two symbol lengths.Terminal is received according to the check code to the loadData are verified, if verification passes through, are parsed according to the character boundary to each symbol in the load data.If do not passed through, it is determined that the load data is invalid, does not parse to load data, and continues waiting for sending terminal hair next timeThe pilot data sent.
The sound output module of present embodiment using terminal such as loudspeaker generates acoustic signals, voice input terminal such as wheatThe mode that gram wind receives acoustic signals carries out sound wave communication, transmits data between terminal devices, does not need additional radioReceiver And Transmitter.Meanwhile the present invention designs unique coding mode, the association of data frame institutional framework and communication interactionIt is narrow that quotient's mode solves wireless sound wave communication bandwidth, is easy disturbed, the problem of communication stability difference.
Referring to Fig. 5, Fig. 5 is the structural schematic diagram that the application sends terminal.In present embodiment, terminal and reception are sentTerminal passes through wireless acoustic communication.Specifically, which includes obtaining module 510, modulation module 520 and sending module 530.
Module 510 is obtained for obtaining the pilot data of the first preset length, the lead data of the second preset length, thirdThe synchronous code and load data of preset length, and be sent to the modulation module 520, wherein the pilot data be lower thanThe data of preset threshold, for indicating the starting of communication data, the lead data is intersymbol in load data for determiningWhether boundary, the synchronous code are used to verify the intersymbol boundary determined according to the lead data correct.
The application sends terminal and carries out the data frame of wireless acoustic communication by the pilot tone of the first preset length with receiving terminalData, the lead data of the second preset length, the synchronous code of third preset length and load data are constituted.For example, when sendingWhen terminal needs to carry the load data of information to reception terminal transmission, obtains module 510 and generate leading for the first preset lengthFrequency evidence, the lead data of the second preset length, the synchronous code of third preset length.Wherein, the pilot data, the number of derivativesAccording to, synchronous code, load data be logical data.Generally, the first, second preset length is 8-16 symbol lengths, and preferably 8A symbol lengths, third preset length are preferably 8 symbol lengths.Certainly, the first, second, third preset length is not limited toAbove-mentioned symbol lengths can be set as needed as other symbol lengths, be not limited thereto in other embodiments.In addition,Preferably, the length of load data may be configured as regular length.
Specifically, the pilot data is as the communication data i.e. starting of the data frame, according to receive the scheduled agreement of terminal,The amplitude that pilot data is arranged is to detect that first of the data lower than preset threshold preset when receiving terminal lower than preset thresholdWhen the data of length, it is determined that the data are the starting of data frame, i.e. pilot data.During sonic transmissions, be easy byTo the influence of outside noise, so as to cause the data distortion in data frame, therefore the number of derivatives of the second preset length are arranged in the applicationAccording to determine the character boundary of data frame.Also, for the accurate positionin for guaranteeing character boundary, also set up third preset lengthSynchronous code, to examine determining character boundary whether correct.
Modulation module 520 is used to for the pilot data, lead data, synchronous code and load data to be modulated into sound wave letterNumber, and it is sent to the sending module 530.
For example, after obtaining the generation of module 510 pilot data, lead data, synchronous code and load data, modulation module 520Pilot data, lead data, synchronous code are used but is not limited to PSK or FSK coding mode and is modulated, by pilot data,Lead data, synchronous code and load data are loaded on communication carrier respectively, obtain being loaded with pilot data, lead data, sameWalk the acoustic signals of code and load data.
Sending module 530 is used to be loaded with the sound wave letter of pilot data, lead data, synchronous code and load data respectivelyNumber it is sent to reception terminal.
The acoustic signals for being loaded with pilot data, lead data, synchronous code and load data are passed through sound by sending module 530Sound output module such as loudspeaker is sent to reception terminal, and the voice input module such as microphone for receiving terminal, which receives, sends terminal hairThe acoustic signals sent.Wherein, the frequency for the acoustic signals which sends, i.e., communication carrier frequency is preferred but is not limited to2KHz~6KHz can effectively receive the sound wave letter of this frequency range to guarantee all terminal devices by voice input moduleNumber, and part noise jamming can be prevented.In other embodiments, which can also include sound output module.
Preferably, terminal is sent in the application and receives terminal can also carry out frequency response adaptive process, improve wireless soundThe stability of wave communication.Specifically, sending terminal further includes receiving module, and sending module is also used to send out to the reception terminalAcoustic signals are set in delivery, wherein the configuration acoustic signals include the optimal communication band information for sending terminal, so that instituteIt states and receives the communications band that terminal configures itself according to the optimal communication band information.
For example, sending module initiates primary communication when communicating for the first time with reception terminal, communicated wherein sending terminal initialCarrier frequency is preferred but the unlimited high frequency 2KHz~6KHz for being set as sound wave, passes through Mike with the mobile terminal device for guaranteeing allWind can effectively receive the acoustic signals of this frequency range.Sending module initiates the data frame packet of communication containing the best of the transmission terminalThis information is sent to reception terminal by sound wave as most preferably sent and received frequency range by communications band information.
Receiving module is used to receive believing comprising the configured communications band of the reception terminal for the reception terminal feedbackThe acoustic signals of breath, and optimal communication frequency range is arranged according to the configured communications band of the reception terminal.
For example, the configured communications band information of optimal communication band information that terminal is sent according to terminal is sent is received,Itself configured communications band information is modulated to acoustic signals, and transmission is sent to by sound output module such as loudspeakerTerminal.After receiving module receives the acoustic signals, according to the communications band information that transmission terminal and reception terminal were negotiated, ifOptimal communications band is set, obtains optimal communication effect, and different terminal devices can be matched to greatest extent.
Wherein, it is the anti-interference of raising communication, sends terminal and receive terminal and itself lead to what adaptive process configuredBelieve frequency range preferably in 2KHz~6KHz.
Preferably, it is the integrality of proof load data, obtains module and be also used to generate the 4th according to the load dataThe check code of preset length, wherein the 4th preset length is preferred but is not limited to two symbol lengths.Sending module is also used to sequentiallyThe acoustic signals for being loaded with pilot data, lead data, synchronous code, load data and check code respectively are sent to reception eventuallyEnd.
The sound output module of present embodiment using terminal such as loudspeaker generates acoustic signals, voice input terminal such as wheatThe mode that gram wind receives acoustic signals carries out sound wave communication, transmits data between terminal devices, does not need additional radioReceiver And Transmitter.Meanwhile the present invention designs unique coding mode, the association of data frame institutional framework and communication interactionIt is narrow that quotient's mode solves wireless sound wave communication bandwidth, is easy disturbed, the problem of communication stability difference.
Referring to Fig. 6, Fig. 6 is the structural schematic diagram that the application receives one embodiment of terminal.In present embodiment, receiveTerminal includes demodulation module 610, first detection module 620, the second detection module 630, judgment module 640 and discriminating module 650.
Demodulation module 610 is used to be demodulated to obtain to the acoustic signals received solution adjusting data, and by the demodulation numberAccording to being sent to the first detection module 620.
Demodulation module 610 receives the acoustic signals for sending terminal and sending by voice input module such as microphone, to soundWave signal is demodulated to obtain the digital signal for indicating information also referred to as solution adjusting data.It optimally, is that partial noise can be prevented dryIt disturbs, receive the reception frequency range of terminal preferably but is not limited to 2KHz~6KHz.Moreover, in other embodiments, the demodulation moduleIt can also include voice input module.
First detection module 620 be used to detect in the solution adjusting data whether comprising the first preset length and lower than defaultThe pilot data of threshold value, and the first testing result is sent to second detection module 630.
According to send the scheduled agreement of terminal: starting of the pilot data as efficient communication data frame, and pilot dataAmplitude be lower than preset threshold.It is pre- with the presence or absence of first lower than preset threshold in the judgement solution adjusting data of first detection module 620If the data of length, if it is, determining of the data for pilot data, as with transmission terminal efficient communication data frameBegin.
Second detection module 630 is used for comprising the first preset length and lower than preset threshold in the solution adjusting dataWhen pilot data, determine that the solution adjusting data originated from the pilot data is communication data, and obtain from the communication dataThe lead data of second preset length detects intersymbol boundary in the lead data, and the intersymbol boundary hairGive the judgment module 640.
For example, the second detection module 630 is in detecting solution adjusting data comprising the first preset length lower than preset thresholdPilot data when, that is, determine and originated from the pilot data, demodulation is obtained from the acoustic signals that the transmission terminal receivesData are the data of efficient communication data frame.Being connect from the transmission terminal after the second detection module 630 acquisition pilot dataThe data of the second preset length demodulated in the acoustic signals received detect in the lead data as lead dataIntersymbol boundary.Wherein, the intersymbol boundary is the intersection between each symbol included in data.ExampleThe smallest sampled point of absolute value or the sampled point lower than preset value are that symbol has a common boundary for example in the sampled value of the data.
Judgment module 640 from the communication data for obtaining the synchronous code of third preset length, according to the symbolBetween boundary the synchronous code is divided into multiple symbols, judge that the value of each symbol of the synchronous code is corresponding with pre-determined synchronization codeValue of symbol it is whether identical, and the judging result is sent to the discriminating module 650.
For example, being solved from the acoustic signals that the transmission terminal receives after the acquisition of judgment module 640 lead dataAdjust the data of obtained third preset length as synchronous code.According to the character boundary that the second detection module 630 determines, such as determineEvery 5th sampled point is character boundary in data, and the sampled point in synchronous code every 5 same periods is divided by judgment module 640One symbol obtains multiple symbols, and the value for example logic 1 or 0 of each symbol is determined according to the amplitude situation of each symbol.Judgment module 640 obtains the pre-determined synchronization code with sending the good third preset length of terminal protocol, compares the synchronous code in dataWhether the logical value of each symbol and the logical value of the corresponding bit sign of pre-determined synchronization code are all the same.
Discriminating module 650 is used for identical in the value value of symbol corresponding with pre-determined synchronization code of each symbol of the synchronous codeWhen, determine that the intersymbol boundary is the character boundary in load data, and obtain load data from the communication data,Each symbol in the load data is distinguished according to the character boundary, to realize the parsing to the load data.
For example, discriminating module 650 is corresponding with pre-determined synchronization code in the logical value for determining each symbol of synchronous code obtainedWhen the logical value of symbol is not exactly the same, the character boundary for determining that the second detection module 630 detects is incorrect.It is obtained determiningThe each symbol of synchronous code logical value and the logical value of the corresponding symbol of pre-determined synchronization code all the same when, by the second detection module630 character boundaries detected are determined as the character boundary in load data.Discriminating module 650 obtain the synchronous code after fromThe data demodulated in the acoustic signals that the transmission terminal receives are load data, and wherein the load data can be fixationThe termination of load data is determined in the data or load data of length comprising end mark.Discriminating module 650 obtains load numberAccording to rear, according to determining character boundary, such as the 5th sampled point every in data is character boundary, receives terminal with every 5 same weeksThe sampled point of phase is divided into the mode of a symbol, and load data is divided into multiple symbols, according to the amplitude of each symbolIt determines its logical value 1 or 0, and then constitutes the logical message of load data, receive terminal according to communication protocol to load dataLogical message parses load data, obtains information represented by load data.
Preferably, terminal is sent in the application and receives terminal can also carry out frequency response adaptive process, improve wireless soundThe stability of wave communication.Specifically, receiving terminal further includes receiving module and sending module.
Receiving module is used to receive the configuration acoustic signals sent to the transmission terminal, according to the optimal communication frequency rangeThe communications band of information configuration itself, wherein the configuration acoustic signals include the optimal communication frequency range letter for sending terminalBreath.
For example, sending terminal when being communicated for the first time with reception terminal and initiating primary communication, wherein transmission terminal initial communicationCarrier frequency is preferred but the unlimited high frequency 2KHz~6KHz for being set as sound wave.It sends terminal and initiates the data frame packet of communication containing the hairMake arrangements for his funeral end optimal communication band information as most preferably sent and received frequency range, this information is sent to reception terminal by sound wave.
Receive terminal receiving module receive comprising send terminal optimal communication band information, if receive terminal canThe frequency response at end of making arrangements for his funeral is allotted, the reception frequency range for just adjusting equipment of itself meets the transmission frequency range for sending terminal, adjusts equipment of itselfTransmission frequency range meet send terminal reception frequency range.If the frequency response for sending terminal cannot be matched by receiving terminal, keep initialCommunications band configuration.Wherein, in other embodiments, which may include voice input module.
Sending module is used for the acoustic signals of the transmission terminal feedback comprising configured communications band information, so thatOptimal communication frequency range is arranged according to the configured communications band of terminal is received in the transmission terminal.
For example, itself is sent and is connect by the sending module for receiving terminal after configuration itself sends and receives communications band wellIn the communications band information write-in response message of receipts, and acoustic signals are modulated to by initial communication carrier wave frequency range, pass through soundOutput module such as loudspeaker is sent to transmission terminal.After transmission terminal receives response message, optimal communications band is set, is obtainedOptimal communication effect is obtained, and different terminal devices can be matched to greatest extent.
Wherein, it is the anti-interference of raising communication, sends terminal and receive terminal and itself lead to what adaptive process configuredBelieve frequency range preferably in 2KHz~6KHz.In addition, in other embodiments, which may include sound output mouldBlock.
Preferably, the second detection module is also used to carry out n times sampling to each symbol of the lead data, respectively will be everyThe absolute value of the n-th sampled value of a symbol is cumulative, obtains n-th of He, and wherein n is followed successively by 1 integer value for arriving N, and N is greater than 1Integer, the N number of and middle minimum and corresponding m sampled point acquired is as the intersymbol boundary of the lead data, instituteM is stated as 1 to any one integer between M.
For example, the second detection module leading comprising the first preset length lower than preset threshold in detecting solution adjusting dataFrequency according to when, then obtain the data of the second preset length after the pilot data as lead data.Second detection module pairEach symbol of the lead data carries out n times sampling, and sampling period T, N are the integer greater than 1.Terminal is received by each symbolNumber the 1st sampled value absolute value it is cumulative, obtain the 1st and, the absolute value of the 2nd sampled value of each symbol is added up,Obtain the 2nd and ... until the absolute value of the n-th sampled value of each symbol is added up, obtain n-th and.Second detection mouldN number of and middle minimum and the corresponding sampled point, for example m-th of sampled point that block acquires, i.e., using every m-th of sampled point as instituteState the intersymbol boundary of lead data, wherein the m is 1 to any one integer between M.
Preferably, judgment module is also used to adopt the synchronous code with the sampling period identical with the lead dataSample, to divide a symbol every the m sampled point, according in each symbol near p intermediate sampled value and trueDetermining value of symbol is 0 or 1, and judges whether each value of symbol of synchronous code value of symbol corresponding with pre-determined synchronization code is identical,In, p is the integer less than or equal to m.
For example, judgment module is identical with lead data to the synchronous code progress of the third preset length after lead dataThe sampling of sampling period T, by synchronous code to divide a symbol, such as every 4th sampled point of above-mentioned determination every m sampled pointIt, i.e., will be to divide a symbol every 4 sampled points as character boundary.Since the sampled point in symbol closer to boundary malfunctionsRate is bigger, it is possible to which boundary demarcation is incorrect, actually the sampled value amplitude that is adjacent-symbol, therefore judgment module is preferably onlyThe value of the symbol is determined near intermediate sampled value according to each symbol.For example, judgment module obtain in each symbol nearThe close intermediate sum less than or equal to m sampled value, according to predefined communication protocol, reception terminal is according to the sampled value of acquisition and trueThe logical value of the fixed symbol is 0 or 1.In obtaining synchronous code after the logical value of all symbols, judgment module judges described sameWhether identical walk each value of symbol of code value of symbol corresponding with pre-determined synchronization code.
Preferably, it is the integrality of proof load data, further includes the verification of the 4th preset length after load dataCode, such as cyclic redundancy check, wherein the 4th preset length is preferred but is not limited to two symbol lengths.Discriminating module is also used to basisThe check code verifies the load data, if verification passes through, according to the character boundary to the load numberEach symbol is parsed in.
Through the above scheme, the sound output module of using terminal such as loudspeaker generates acoustic signals, voice input terminalMode as microphone receives acoustic signals carries out sound wave communication, transmits data between terminal devices, does not need additional nothingLine electricity Receiver And Transmitter.Meanwhile the application uses and includes pilot tone, leading and synchronous code unique data frame knot of tissueStructure solves the problem of wireless sound wave communication bandwidth is narrow, and load data is easy error, improves the validity of load data, makeIt is high to obtain communication efficiency.Further, also communications band is arranged in 2KHz-6KHz by the application, improves the anti-interference of communication,In addition frequency response adaptive process is also set up, communication stability is improved.
In several embodiments provided herein, it should be understood that disclosed system, device and method canTo realize by another way.For example, device embodiments described above are only schematical, for example, the mouldThe division of block or unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multipleUnit or assembly can be combined or can be integrated into another system, or some features can be ignored or not executed.It is anotherPoint, shown or discussed mutual coupling, direct-coupling or communication connection can be through some interfaces, device orThe indirect coupling or communication connection of unit can be electrical property, mechanical or other forms.
In addition, each functional unit in each embodiment of the application can integrate in one processing unit, it can alsoTo be that each unit physically exists alone, can also be integrated in one unit with two or more units.It is above-mentioned integratedUnit both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent productWhen, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantiallyThe all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other wordsIt embodies, which is stored in a storage medium, including some instructions are used so that a computerIt is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute the applicationThe all or part of the steps of embodiment the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory(ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or diskEtc. the various media that can store program code.