CN105281842A - Coding and decoding methods and devices of sound wave communicaiton - Google Patents

Coding and decoding methods and devices of sound wave communicaiton Download PDF

Info

Publication number
CN105281842A
CN105281842A CN201410355327.0A CN201410355327A CN105281842A CN 105281842 A CN105281842 A CN 105281842A CN 201410355327 A CN201410355327 A CN 201410355327A CN 105281842 A CN105281842 A CN 105281842A
Authority
CN
China
Prior art keywords
frequency
data
data cell
modulating
waveform
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
CN201410355327.0A
Other languages
Chinese (zh)
Other versions
CN105281842B (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.)
Fujian Star Net eVideo Information Systems Co Ltd
Original Assignee
Fujian Star Net eVideo Information Systems 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 Fujian Star Net eVideo Information Systems Co Ltd filed Critical Fujian Star Net eVideo Information Systems Co Ltd
Priority to CN201410355327.0A priority Critical patent/CN105281842B/en
Publication of CN105281842A publication Critical patent/CN105281842A/en
Application granted granted Critical
Publication of CN105281842B publication Critical patent/CN105281842B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Digital Transmission Methods That Use Modulated Carrier Waves (AREA)

Abstract

The invention discloses a frequency modulation coding method of sound wave communication. The frequency modulation coding method comprises the steps: splitting to-be-coded data to obtain a plurality of data units; for each data unit, adding a reference frequency corresponding to the data unit to a frequency offset to obtain a modulation frequency for modulating the data unit; and modulating each data unit using the corresponding modulation frequency to generate a data waveform. The invention further discloses a corresponding decoding method and coding and decoding devices. Interferences of a reflection wave is solved through frequency offset operation, and data reliability is effectively improved through usage of multiple groups of frequencies to perform coding.

Description

A kind of coding of acoustic communication, the method and apparatus of decoding
Technical field
The present invention relates to communication encoding and decoding technique field, relate more specifically to a kind of coding of acoustic communication, the method for decoding and device thereof.
Background technology
Acoustic current wave communication has obtained extensively universal in the electronic apparatus application systems such as iOS and android, and its embody rule has the sound wave of Alipay to pay, and millet passes soon.The principle of acoustic communication is in fact fairly simple, mainly encode to data with the voice signal of fixed frequency, then play the sound of these fixed frequencies, recipient is after collecting voice data, identify the frequency information wherein comprised, then decode data according to frequency.Such as: frequency can be the corresponding numeral 0 of sine wave of 1000HZ by we, frequency is the corresponding numeral 1 of sine wave of 1100HZ, and frequency is the corresponding numeral 2 of sine wave of 1200HZ.So numeric string 2102 just corresponding 4 sections of sine waves, specify that every section of sine wave continues 50ms, then the acoustic segment of corresponding 200 milliseconds of numeric string 2102.Recipient's recorded voice, resolves the sound received, identifies 1200HZ, and 1100HZ, 1000HZ, 1200HZ tetra-sections of sine wave freuqencies, then search code book, the numeric string decoded is exactly 2102.
Realizing in process of the present invention, inventor finds, with acoustic communication system and the means of communication for this system in prior art, have employed the coding techniquess such as such as dual-tone multifrequency (DTMF).Because dual-tone multifrequency technology designs for telephone system at first, dialing information is transmitted by the analog of telephone line of voice-bearer, do not consider that sound wave is subject to the problem of noise jamming, when being applied directly to acoustic communication, very easily be subject to the interference of various noise, cause the unreliable of transfer of data in practical application.In existing application, encountering barrier in the transmitting procedure of sound wave can reflect, and reflected wave and original ripple are superimposed, and can cause interference to the decoding of receiver.
Summary of the invention
The technical problem that for this reason will solve is to provide a kind of acoustic communication coding, the method for decoding and the device with height reliability and antijamming capability.
For solving the problems of the technologies described above, the technical scheme that we take is as follows:
A coding method for acoustic communication, comprises step:
Obtain several data cells;
To a data cell, the reference frequency corresponding with this data cell being added with frequency offset, obtaining the modulating frequency for modulating this data cell;
Use described modulating frequency to modulate this data cell, generate data waveform.
Further, in the coding method of described acoustic communication,
Split data to be encoded, obtain several data cells;
Described frequency offset is obtained by following steps:
Split the corresponding sequence number of each data cell that data to be encoded obtain, by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
Further, in the coding method of described acoustic communication, described fractionation data to be encoded specifically comprise: be that element length splits data to be encoded with n-bit, and wherein n is positive integer;
The determination of the described reference frequency corresponding with data cell comprises the following steps: select 2 nindividual Candidate Frequency alternatively group of frequencies; To each data cell, from Candidate Frequency group, select a frequency as the reference frequency for modulating this data cell respectively.
Further, in the coding method of described acoustic communication, described 2 nin individual Candidate Frequency, be anharmonic wave relation between any two Candidate Frequencies; Or be anharmonic wave relation between any 2 modulating frequencies.
Further, in the coding method of described acoustic communication, the reference frequency corresponding with this data cell " to a data cell, being added with frequency offset, obtaining the modulating frequency for modulating this data cell by step; Use described modulating frequency to modulate this data cell, generate data waveform " be specially:
To a data cell, from m frequency range, each frequency of selecting forms reference frequency combination for characterizing this data cell respectively, wherein m be more than or equal to 2 positive integer;
The m of an one data cell reference frequency being added with frequency offset respectively, obtaining m for modulating the modulating frequency of this data cell;
Use m modulating frequency to modulate this data cell respectively, generate data waveform;
Superpose the m data waveform generated through modulation.
A coding/decoding method for acoustic communication, comprises the following steps:
Receive an acoustic signals, analysis waveform obtains the signal frequency of this acoustic signals;
Signal frequency deducts frequency offset and obtains reference frequency, obtains the data cell corresponding with reference frequency according to reference frequency;
Data splitting unit obtains data.
Further, in the coding/decoding method of described acoustic communication, frequency offset is obtained by following steps:
By the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
Further, in the coding/decoding method of described acoustic communication, the signal frequency that analysis waveform obtains this acoustic signals specifically comprises: analyze the data waveform received, the frequency that weight is maximum in m group Candidate Frequency is as the signal frequency of this acoustic signals.
A code device for acoustic communication, comprises data cell acquisition module, modulation module and sound wave sending module;
Described data cell acquisition module, for splitting data to be encoded, obtains several data cells;
Described modulation module is used for a data cell, reference frequency corresponding for this data cell is added with frequency offset, obtain the modulating frequency for modulating this data cell, and use described modulating frequency to modulate this data cell, generate data waveform;
Described sound wave sending module is used for the form of data waveform sound wave to send.
Further, in the code device of described acoustic communication, the reference frequency corresponding with a data cell is added with frequency offset and is specially by described modulation module:
Modulation module determination frequency offset;
The mode of modulation module determination frequency offset is: split the corresponding sequence number of each data cell that data to be encoded obtain, by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
Further, in the code device of described acoustic communication, the reference frequency corresponding with a data cell is added with frequency offset and is specially by described modulation module:
Modulation module determination reference frequency;
The mode of modulation module determination reference frequency is: select 2 nindividual Candidate Frequency alternatively group of frequencies; To each data cell, from Candidate Frequency group, select a frequency as the reference frequency for modulating this data cell respectively;
Described 2 nin individual Candidate Frequency, be anharmonic wave relation between any two Candidate Frequencies; Or be anharmonic wave relation between any 2 modulating frequencies.
Further, the code device of described acoustic communication also comprises laminating module;
Modulation module is to a data cell, and from m frequency range, each frequency of selecting forms reference frequency combination for characterizing this data cell respectively, wherein m be more than or equal to 2 positive integer; The m of an one data cell reference frequency being added with frequency offset respectively, obtaining m for modulating the modulating frequency of this data cell; Use m modulating frequency to modulate this data cell respectively, generate data waveform;
Laminating module is for superposing the m data waveform generated through above-mentioned modulation.
A decoding device for acoustic communication, comprises receiver module and parsing module;
Described receiver module is for receiving acoustic signals;
Parsing module is for analyzing the waveform of described acoustic signals and obtaining its signal frequency; Signal frequency frequency offset is obtained reference frequency, obtains the data cell corresponding with reference frequency according to reference frequency; And data splitting unit obtains data.
Further, in the decoding device of described acoustic communication, the mode of parsing module determination frequency offset is: by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
Further, in the decoding device of described acoustic communication, the signal frequency that parsing module analysis waveform obtains this acoustic signals specifically comprises: analyze the data waveform received, the frequency that weight is maximum in m group Candidate Frequency is as the signal frequency of this acoustic signals.
The technique effect of technique scheme is the interference being solved reflected wave by frequency shift (FS) operation: sound wave is encountered barrier and can be reflected in transmitting procedure, and reflected wave and original ripple are superimposed, and can cause interference to the decoding of receiver.By adopting frequency shift (FS) operation, different frequency shift (FS)s being done to a few blocks of data of continuous print waveform, ensures that the reflected wave of last piece of sound wave can not cause interference to next block or lower several pieces, solve the interference problem of reflected wave.
In addition, reliability by using many class frequencys effectively can also promote data: because in actual applications, if only adopt one group of Candidate Frequency to carry out the coding of data sound wave, the sound wave of modulation is very easily subject to the interference of noise, thus causes the problem of receiver None-identified.The present invention, by selecting such one group of Candidate Frequency respectively at low-frequency range, Mid Frequency and high band (being not limited to three frequency ranges), when modulating data waveform, uses frequency corresponding in this many group Candidate Frequency simultaneously.Receiver can do comprehensive analysis to the voice data received on these three groups of Candidate Frequencies, obtains the target frequency that weight is maximum, carries out actual decoding with it, have effective jamproof effect.
Accompanying drawing explanation
Fig. 1 is the flow chart of the coding method of acoustic communication described in first embodiment of the invention;
Fig. 2 is the high-level schematic functional block diagram of the code device of acoustic communication described in second embodiment of the invention;
Fig. 3 is the flow chart of the coding/decoding method of acoustic communication described in third embodiment of the invention;
Fig. 4 is the high-level schematic functional block diagram of the decoding device of acoustic communication described in four embodiment of the invention;
The frequency shift (FS) schematic diagram that Fig. 5 circulates for the base 4 in the coding method for illustration of acoustic communication described in first embodiment of the invention.
Description of reference numerals:
1-data cell acquisition module
2-modulation module
3-sound wave sending module
4-laminating module
5-receiver module
6-parsing module
Embodiment
By describing technology contents of the present invention, structural feature in detail, realized object and effect, accompanying drawing is coordinated to be explained in detail below in conjunction with execution mode.
Referring to Fig. 1, is the flow chart of the FM encoding method of acoustic communication described in first embodiment of the invention.The FM encoding method of described acoustic communication comprises the steps:
S11, fractionation data to be encoded, obtain several data cells;
S12, to a data cell, the reference frequency corresponding with this data cell being added with frequency offset, obtaining the modulating frequency for modulating this data cell;
S13, use described modulating frequency to modulate this data cell, generate data waveform.
Further, split data to be encoded described in step S11 and specifically comprise: be that element length splits data to be encoded with n-bit, wherein n is positive integer.
Further, in step S12, described frequency offset is obtained by following steps: split the corresponding sequence number of each data cell that data to be encoded obtain, by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
Further, in step S12, the determination of the described reference frequency corresponding with data cell comprises the following steps: select 2 nindividual Candidate Frequency alternatively group of frequencies; To each data cell, from Candidate Frequency group, select a frequency as the reference frequency for modulating this data cell respectively.Further, described 2 nin individual Candidate Frequency, be anharmonic wave relation between any two Candidate Frequencies; Or be anharmonic wave relation between any 2 modulating frequencies.
In another embodiment, also further many class frequencys modulation treatment is carried out to a certain data cell after splitting, concrete modulation system after described many class frequencys modulation treatment is combined with the first execution mode is: to a data cell, from m frequency range, each frequency of selecting forms reference frequency combination for characterizing this data cell respectively, wherein m be more than or equal to 2 positive integer; The m of an one data cell reference frequency being added with deviation frequency amount respectively, obtaining m for modulating the modulating frequency of this data cell; Use m modulating frequency to modulate this data cell respectively, generate data waveform; Superpose the m data waveform generated through modulation.
The use procedure of this method is described below by way of an object lesson:
First, determine the sample rate SampleRate (sampling number per second) modulating sound wave, determine total size of data to be encoded, suppose that its bit number is N, be that the data to be encoded of N are divided into N/n data cell in units of n-bit by bit number, then need the Candidate Frequency number used to be 2 to these data to be encoded n.Certainly, Candidate Frequency number is 2 nbe a kind of preferred implementation that Candidate Frequency quantity is enough that ensures, also can adopt in other embodiments and be greater than 2 ncandidate Frequency number, as long as can guarantee not duplicate for the frequency of each data cell through splitting in modulation band coded data.
Determine in a particular application the numerical value of n normally select n be 2 power side, this does not mainly produce remainder to make fractionation be formed after data cell as far as possible; And it is limited to further contemplate frequency range, usual more options n is 2 bits or 4 bits, and due to the size of data at initial to be 8 bits the be multiple to adopting during the packing of band coded data, can not remainder be produced with 2 bits or 4 bits for just ensureing to divide exactly when splitting data unit size.
Each data cell split out can with [sequence, nbit] as the mark of uniqueness, and wherein sequence is the sequence number of this split cells of mark, and its numerical value is from 0 to N/n the positive integer of (N/n-1).The binary string that nbit comprises for this data cell.
For each data cell [sequence, nbit], the decimal value i of its correspondence is calculated according to its binary string nbit, combination of frequency [the fli for characterizing this data cell is selected respectively in low-frequency range Candidate Frequency group, Mid Frequency Candidate Frequency group and high band Candidate Frequency group, fmi, fhi].Use this modulating frequency group to modulate this data cell, generate sinusoidal wave and merge.Concrete formula is:
X=[0,1,2,…,BlockSize-1]
Wave0=AMP*sin(2PI*X*fli/SampleRate)
Wave1=AMP*sin(2PI*X*fmi/SampleRate)
Wave2=AMP*sin(2PI*X*fhi/SampleRate)
Wave=wave0+Wave1+Wave2
Further, for each data cell [sequence, nbit], the decimal value i of its correspondence is calculated according to its binary string nbit, to the frequency [fi] for characterizing this data cell (when adopting many class frequencys modulation treatment, for characterizing the frequency of this data cell for [fli, fmi, fhi]), calculate its side-play amount in the mode of the skew that circulates.The mode of described circulation skew is specially: select certain offset period, if offset period is 4, then to being numbered 0, and 1,2,3,4,5,6,7,8 ... data cell, frequency shift (FS) multiple required is respectively 0,1,2,3,0,1,2,3 ... namely sequence is numbered 0, and 4,8,12 ... data cell, skew multiple be 0; Sequence is numbered 1,5,9,13 ... data cell, skew multiple be 1; Sequence is numbered 2, and 6,10,14 ... data cell, skew multiple be 2; Sequence is numbered 3, and 7,11,15 ... data cell, skew multiple be 3.Referring to Fig. 5, is the frequency shift (FS) schematic diagram circulated for illustration of the base 4 in the FM encoding method of acoustic communication described in first embodiment of the invention.
To the combination of frequency [fi] for characterizing a certain data cell, adding the frequency offset of its corresponding skew multiple, obtaining the modulating frequency group [fk] for modulating, and use this modulating frequency to modulate this data cell, generating sinusoidal wave.Concrete formula is:
X=[0,1,2,…,BlockSize-1]
Wave=AMP*sin(2PI*X*fk/SampleRate)
Wherein, BlockSize represents the sampling number that every blocks of data unit uses, known in conjunction with sample rate SampleRate, and the time span that every blocks of data unit is corresponding is BlockSize/SampleRate; AMP represents sinusoidal wave peak value.
Then in step s 5, the data waveform that all data cells generate through modulation is connected.Specifically, 0,1,2 is numbered for Sequence ..., this N/n data cell of (N/n-1), generates N/n data waveform respectively through above-mentioned modulation step, connects in this step to this N/n data waveform.
Send in present embodiment be connect after data waveform, different pieces of information waveform sends by the mode that pulse also can be adopted to send in other embodiments respectively, carries out resolving or synthesizing at receiving terminal.
The technique effect of the FM encoding method of acoustic communication described in present embodiment is the interference being solved reflected wave by frequency shift (FS) operation: sound wave is encountered barrier and can be reflected in transmitting procedure, reflected wave and original ripple are superimposed, and can cause interference to the decoding of receiver.By adopting frequency shift (FS) operation, different frequency shift (FS)s being done to a few blocks of data of continuous print waveform, ensures that the reflected wave of last piece of sound wave can not cause interference to next block or lower several pieces, solve the interference problem of reflected wave.
In addition, reliability by using many class frequencys effectively can also promote data: because in actual applications, if only adopt one group of Candidate Frequency to carry out the FM encoding of data sound wave, the sound wave of modulation is very easily subject to the interference of noise, thus causes the problem of receiver None-identified.The present invention, by selecting such one group of Candidate Frequency respectively at low-frequency range, Mid Frequency and high band (being not limited to three frequency ranges), when modulating data waveform, uses frequency [fli, fmi, fhi] corresponding in these three groups of Candidate Frequencies simultaneously.Receiver can do comprehensive analysis to the voice data received on these three groups of Candidate Frequencies, obtains the maximum target frequency of weight [flj, fmj, fhj], and the data of actual decoding are exactly N position binary string corresponding to decimal value j.
Referring to Fig. 2, is a kind of in second embodiment of the invention high-level schematic functional block diagram of FM encoding device of acoustic communication.Described FM encoding device comprises data cell acquisition module 1, modulation module 2, sound wave sending module 3 and laminating module 4.
Described data cell acquisition module 1, for splitting data to be encoded, obtains several data cells;
Described modulation module 2 is for a data cell, reference frequency corresponding for this data cell is added with deviation frequency amount, obtain the modulating frequency for modulating this data cell, and use described modulating frequency to modulate this data cell, generate data waveform;
Described sound wave sending module 3 is for sending the form of data waveform sound wave.
Further, the working method that the reference frequency corresponding with a data cell is added with deviation frequency amount is specially by described modulation module 2: modulation module 2 determines deviation frequency amount, concrete mode is: split the corresponding sequence number of each data cell that data to be encoded obtain, by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the deviation frequency amount corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
Further, the reference frequency corresponding with a data cell is added with deviation frequency amount and is specially by described modulation module 2: modulation module 2 determines reference frequency, and concrete mode is: select 2 nindividual Candidate Frequency alternatively group of frequencies; To each data cell, from Candidate Frequency group, select a frequency as the reference frequency for modulating this data cell respectively; Described 2 nin individual Candidate Frequency, be anharmonic wave relation between any two Candidate Frequencies; Or be anharmonic wave relation between any 2 modulating frequencies.
In another embodiment, modulation module 2 also also carries out many class frequencys modulation treatment further by a certain data cell after splitting, concrete modulation system is: to a data cell, from m frequency range, each frequency of selecting forms reference frequency combination for characterizing this data cell respectively, wherein m be more than or equal to 2 positive integer; The m of an one data cell reference frequency being added with deviation frequency amount respectively, obtaining m for modulating the modulating frequency of this data cell; Use m modulating frequency to modulate this data cell respectively, generate data waveform; Superpose the m data waveform generated through modulation.
Further, the FM encoding device of described acoustic communication also comprises laminating module 4; Modulation module 2 is to a data cell, and from m frequency range, each frequency of selecting forms reference frequency combination for characterizing this data cell respectively, wherein m be more than or equal to 2 positive integer; The m of an one data cell reference frequency being added with deviation frequency amount respectively, obtaining m for modulating the modulating frequency of this data cell; Use m modulating frequency to modulate this data cell respectively, generate data waveform; Then laminating module 4 superposes the m data waveform generated through above-mentioned modulation.
Illustrate that this FM encoding device realizes the process of FM encoding below by way of an object lesson:
First, data cell acquisition module 1 determines the sample rate SampleRate (sampling number per second) modulating sound wave, determine total size of data to be encoded, suppose that its bit number is N, be that the data to be encoded of N are divided into N/n data cell in units of n-bit by bit number, then need the Candidate Frequency number used to be 2 to these data to be encoded n.Certainly, Candidate Frequency number is 2 nbe a kind of preferred implementation that Candidate Frequency quantity is enough that ensures, also can adopt in other embodiments and be greater than 2 ncandidate Frequency number, as long as can guarantee not duplicate for the frequency of each data cell through splitting in modulation band coded data.
Determine in a particular application the numerical value of n normally select n be 2 power side, this does not mainly produce remainder to make fractionation be formed after data cell as far as possible; And it is limited to further contemplate frequency range, usual more options n is 2 bits or 4 bits, and due to the size of data at initial to be 8 bits the be multiple to adopting during the packing of band coded data, can not remainder be produced with 2 bits or 4 bits for just ensureing to divide exactly when splitting data unit size.
Each data cell split out can with [sequence, nbit] as the mark of uniqueness, and wherein sequence is the sequence number of this split cells of mark, and its numerical value is from 0 to N/n the positive integer of (N/n-1).The binary string that nbit comprises for this data cell.
For each data cell [sequence, nbit], modulation module 2 calculates the decimal value i of its correspondence according to its binary string nbit, combination of frequency [the fli for characterizing this data cell is selected respectively in low-frequency range Candidate Frequency group, Mid Frequency Candidate Frequency group and high band Candidate Frequency group, fmi, fhi].Use this modulating frequency group to modulate this data cell, generate sinusoidal wave and merge.Concrete formula is:
X=[0,1,2,…,BlockSize-1]
Wave0=AMP*sin(2PI*X*fli/SampleRate)
Wave1=AMP*sin(2PI*X*fmi/SampleRate)
Wave2=AMP*sin(2PI*X*fhi/SampleRate)
Wave=wave0+Wave1+Wave2
Further, for each data cell [sequence, nbit], modulation module 2 calculates the decimal value i of its correspondence according to its binary string nbit, to the frequency [fi] for characterizing this data cell (when adopting many class frequencys modulation treatment, for characterizing the frequency of this data cell for [fli, fmi, fhi]), calculate its side-play amount in the mode of the skew that circulates.The mode of described circulation skew is specially: select certain offset period, if offset period is 4, then to being numbered 0, and 1,2,3,4,5,6,7,8 ... data cell, frequency shift (FS) multiple required is respectively 0,1,2,3,0,1,2,3 ... namely sequence is numbered 0, and 4,8,12 ... data cell, skew multiple be 0; Sequence is numbered 1,5,9,13 ... data cell, skew multiple be 1; Sequence is numbered 2, and 6,10,14 ... data cell, skew multiple be 2; Sequence is numbered 3, and 7,11,15 ... data cell, skew multiple be 3.To the combination of frequency [fi] for characterizing a certain data cell, adding the frequency offset of its corresponding skew multiple, obtaining the modulating frequency group [fk] for modulating, and use this modulating frequency to modulate this data cell, generating sinusoidal wave.Concrete formula is:
X=[0,1,2,…,BlockSize-1]
Wave=AMP*sin(2PI*X*fk/SampleRate)
Wherein, BlockSize represents the sampling number that every blocks of data unit uses, known in conjunction with sample rate SampleRate, and the time span that every blocks of data unit is corresponding is BlockSize/SampleRate; AMP represents sinusoidal wave peak value.
Then sound wave sending module 3 connects the data waveform that all data cells generate through modulation.Specifically, 0,1,2 is numbered for Sequence ..., this N/n data cell of (N/n-1), generates N/n data waveform respectively through above-mentioned modulation step, connects in this step to this N/n data waveform.
What in present embodiment, sound wave sending module 3 sent is connect after data waveform, different pieces of information waveform sends by sound wave sending module 3 also can adopt pulse to send in other embodiments mode respectively, carries out resolving or synthesizing at receiving terminal.
The technique effect of the FM encoding method of acoustic communication described in present embodiment is the interference being solved reflected wave by frequency shift (FS) operation: sound wave is encountered barrier and can be reflected in transmitting procedure, reflected wave and original ripple are superimposed, and can cause interference to the decoding of receiver.By adopting frequency shift (FS) operation, different frequency shift (FS)s being done to a few blocks of data of continuous print waveform, ensures that the reflected wave of last piece of sound wave can not cause interference to next block or lower several pieces, solve the interference problem of reflected wave.
In addition, reliability by using many class frequencys effectively can also promote data: because in actual applications, if only adopt one group of Candidate Frequency to carry out the FM encoding of data sound wave, the sound wave of modulation is very easily subject to the interference of noise, thus causes the problem of receiver None-identified.The present invention, by selecting such one group of Candidate Frequency respectively at low-frequency range, Mid Frequency and high band (being not limited to three frequency ranges), when modulating data waveform, uses frequency [fli, fmi, fhi] corresponding in these three groups of Candidate Frequencies simultaneously.Receiver can do comprehensive analysis to the voice data received on these three groups of Candidate Frequencies, obtains the maximum target frequency of weight [flj, fmj, fhj], and the data of actual decoding are exactly N position binary string corresponding to decimal value j.
The technique effect of the FM encoding device of acoustic communication described in present embodiment is the interference being solved reflected wave by frequency shift (FS) operation: sound wave is encountered barrier and can be reflected in transmitting procedure, reflected wave and original ripple are superimposed, and can cause interference to the decoding of receiver.By adopting frequency shift (FS) operation, different frequency shift (FS)s being done to a few blocks of data of continuous print waveform, ensures that the reflected wave of last piece of sound wave can not cause interference to next block or lower several pieces, solve the interference problem of reflected wave.
Referring to Fig. 3, is the flow chart of the frequency modulation coding/decoding method of acoustic communication described in third embodiment of the invention.Described method comprises the steps:
S31, receive an acoustic signals, analysis waveform obtains the signal frequency of this acoustic signals;
S32, signal frequency deduct deviation frequency and measure reference frequency, obtain the data cell corresponding with reference frequency according to reference frequency;
S33, data splitting unit obtain data.
Further, the signal frequency that in step S31, analysis waveform obtains this acoustic signals specifically comprises: analyze the data waveform received, the frequency that weight is maximum in m group Candidate Frequency is as the signal frequency of this acoustic signals.
Further, described in step s 32 deviation frequency amount is obtained by following steps:
By the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the deviation frequency amount corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
Specifically, in decode procedure, every blocks of data size waveforms that the data unit size correspondence first defined according to cataloged procedure generates splits the data waveform received, and obtains N/n data waveform; Then Fourier transform is carried out to each blocks of data waveform, obtain corresponding frequency-domain waveform.For the situation taking many class frequencys coded treatment in cataloged procedure, also need in decode procedure calculate energy to each frequency-domain waveform and determine the class frequency [flk, fmk, fhk] that Σ [fli, fmi, fhi] is maximum, wherein i ∈ [0,2 n).And then decimal value k is converted to the binary string of n position, the n-bit data cell that reduction obtains in original encoding process.Finally, the n-bit serial data of each blocks of data waveform reduction gained is coupled together the data obtaining original transmission.
Referring to Fig. 4, is the high-level schematic functional block diagram of the frequency modulation decoding device of acoustic communication described in four embodiment of the invention.Described frequency modulation decoding device comprises receiver module 5 and parsing module 6; Described receiver module 5 is for receiving acoustic signals; Parsing module 6 is for analyzing the waveform of described acoustic signals and obtaining its signal frequency; Signal frequency shift frequency quantity is obtained reference frequency, obtains the data cell corresponding with reference frequency according to reference frequency; And data splitting unit obtains data.
Further, parsing module 6 determines that the mode of deviation frequency amount is: by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the deviation frequency amount corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.Further, the signal frequency that parsing module 6 analysis waveform obtains this acoustic signals specifically comprises: analyze the data waveform received, the frequency that weight is maximum in m group Candidate Frequency is as the signal frequency of this acoustic signals.
Specifically, in the decode procedure of this frequency modulation decoding device, every blocks of data size waveforms that the data unit size correspondence that parsing module 6 defines according to cataloged procedure generates splits the data waveform received, and obtains N/n data waveform; Then Fourier transform is carried out to each blocks of data waveform, obtain corresponding frequency-domain waveform.For the situation taking many class frequencys coded treatment in cataloged procedure, also need in the decode procedure of parsing module 6 calculate energy to each frequency-domain waveform and determine Σ [fli, fmi, fhi] a maximum class frequency [flk, fmk, fhk], wherein i ∈ [0,2 n).And then decimal value k is converted to the binary string of n position, the n-bit data cell that reduction obtains in original encoding process.Finally, the n-bit serial data of each blocks of data waveform reduction gained is coupled together the data obtaining original transmission.
The hardware that all or part of step in the method that above-described embodiment relates to can carry out instruction relevant by program has come, described program can be stored in the storage medium that computer equipment can read, for performing all or part of step described in the various embodiments described above method.Described computer equipment, such as: personal computer, server, the network equipment, intelligent mobile terminal, intelligent home device, wearable intelligent equipment, vehicle intelligent equipment etc.; Described storage medium, such as: the storage of RAM, ROM, magnetic disc, tape, CD, flash memory, USB flash disk, portable hard drive, storage card, memory stick, the webserver, network cloud storage etc.
The foregoing is only embodiments of the invention; not thereby scope of patent protection of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.

Claims (15)

1. a coding method for acoustic communication, is characterized in that, comprises step:
Obtain several data cells;
To a data cell, the reference frequency corresponding with this data cell being added with frequency offset, obtaining the modulating frequency for modulating this data cell;
Use described modulating frequency to modulate this data cell, generate data waveform.
2. the coding method of acoustic communication according to claim 1, is characterized in that,
By splitting data to be encoded, get several data cells;
Described frequency offset is obtained by following steps:
Split the corresponding sequence number of each data cell that data to be encoded obtain, by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
3. the coding method of acoustic communication as claimed in claim 1 or 2, it is characterized in that, described fractionation data to be encoded specifically comprise: be that element length splits data to be encoded with n-bit, and wherein n is positive integer;
The determination of the described reference frequency corresponding with data cell comprises the following steps: select 2 nindividual Candidate Frequency alternatively group of frequencies; To each data cell, from Candidate Frequency group, select a frequency as the reference frequency for modulating this data cell respectively.
4. the coding method of acoustic communication as claimed in claim 3, is characterized in that, described 2 nin individual Candidate Frequency, be anharmonic wave relation between any two Candidate Frequencies; Or be anharmonic wave relation between any 2 modulating frequencies.
5. the coding method of acoustic communication as claimed in claim 1 or 2, it is characterized in that, the reference frequency corresponding with this data cell " to a data cell, being added with frequency offset, obtaining the modulating frequency for modulating this data cell by step; Use described modulating frequency to modulate this data cell, generate data waveform " be specially:
To a data cell, from m frequency range, each frequency of selecting forms reference frequency combination for characterizing this data cell respectively, wherein m be more than or equal to 2 positive integer;
The m of an one data cell reference frequency being added with frequency offset respectively, obtaining m for modulating the modulating frequency of this data cell;
Use m modulating frequency to modulate this data cell respectively, generate data waveform;
Superpose the m data waveform generated through modulation.
6. a coding/decoding method for acoustic communication, is characterized in that, comprises the following steps:
Receive an acoustic signals, analysis waveform obtains the signal frequency of this acoustic signals;
Signal frequency deducts frequency offset and obtains reference frequency, obtains the data cell corresponding with reference frequency according to reference frequency;
Data splitting unit obtains data.
7. the coding/decoding method of acoustic communication according to claim 6, is characterized in that, frequency offset is obtained by following steps:
By the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
8. the coding/decoding method of acoustic communication according to claim 6, it is characterized in that, the signal frequency that analysis waveform obtains this acoustic signals specifically comprises: analyze the data waveform received, the frequency that weight is maximum in m group Candidate Frequency is as the signal frequency of this acoustic signals.
9. a code device for acoustic communication, is characterized in that, comprises data cell acquisition module, modulation module and sound wave sending module;
Described data cell acquisition module is used for obtaining several data cells;
Described modulation module is used for a data cell, reference frequency corresponding for this data cell is added with frequency offset, obtain the modulating frequency for modulating this data cell, and use described modulating frequency to modulate this data cell, generate data waveform;
Described sound wave sending module is used for the form of data waveform sound wave to send.
10. the code device of acoustic communication as claimed in claim 9, it is characterized in that, described data cell acquisition module, for splitting data to be encoded, obtains several data cells;
The reference frequency corresponding with a data cell is added with frequency offset and is specially by described modulation module:
Modulation module determination frequency offset;
The mode of modulation module determination frequency offset is: split the corresponding sequence number of each data cell that data to be encoded obtain, by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
The code device of 11. acoustic communication as described in claim 9 or 10, it is characterized in that, the reference frequency corresponding with a data cell is added with frequency offset and is specially by described modulation module:
Modulation module determination reference frequency;
The mode of modulation module determination reference frequency is: select 2 nindividual Candidate Frequency alternatively group of frequencies; To each data cell, from Candidate Frequency group, select a frequency as the reference frequency for modulating this data cell respectively;
Described 2 nin individual Candidate Frequency, be anharmonic wave relation between any two Candidate Frequencies; Or be anharmonic wave relation between any 2 modulating frequencies.
The code device of 12. acoustic communication as described in claim 9 or 10, is characterized in that, also comprise laminating module;
Modulation module is to a data cell, and from m frequency range, each frequency of selecting forms reference frequency combination for characterizing this data cell respectively, wherein m be more than or equal to 2 positive integer; The m of an one data cell reference frequency being added with frequency offset respectively, obtaining m for modulating the modulating frequency of this data cell; Use m modulating frequency to modulate this data cell respectively, generate data waveform;
Laminating module is for superposing the m data waveform generated through above-mentioned modulation.
The decoding device of 13. 1 kinds of acoustic communication, is characterized in that, comprises receiver module and parsing module;
Described receiver module is for receiving acoustic signals;
Parsing module is for analyzing the waveform of described acoustic signals and obtaining its signal frequency; Signal frequency frequency offset is obtained reference frequency, obtains the data cell corresponding with reference frequency according to reference frequency; And data splitting unit obtains data.
The decoding device of 14. acoustic communication as claimed in claim 13, it is characterized in that, the mode of parsing module determination frequency offset is: by the sequence number of data cell to a remainder number, the remainder obtained is multiplied obtains the frequency offset corresponding with this data cell with the unit offset amount preset, described a be more than or equal to 2 positive integer.
The decoding device of 15. acoustic communication as described in claim 13 or 14, it is characterized in that, the signal frequency that parsing module analysis waveform obtains this acoustic signals specifically comprises: analyze the data waveform received, the frequency that weight is maximum in m group Candidate Frequency is as the signal frequency of this acoustic signals.
CN201410355327.0A 2014-07-24 2014-07-24 The encoding of a kind of acoustic communication, decoded method and apparatus Active CN105281842B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410355327.0A CN105281842B (en) 2014-07-24 2014-07-24 The encoding of a kind of acoustic communication, decoded method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410355327.0A CN105281842B (en) 2014-07-24 2014-07-24 The encoding of a kind of acoustic communication, decoded method and apparatus

Publications (2)

Publication Number Publication Date
CN105281842A true CN105281842A (en) 2016-01-27
CN105281842B CN105281842B (en) 2018-10-16

Family

ID=55150255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410355327.0A Active CN105281842B (en) 2014-07-24 2014-07-24 The encoding of a kind of acoustic communication, decoded method and apparatus

Country Status (1)

Country Link
CN (1) CN105281842B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105790854A (en) * 2016-03-01 2016-07-20 济南中维世纪科技有限公司 Short distance data transmission method and device based on sound waves
CN105846909A (en) * 2016-03-17 2016-08-10 海信集团有限公司 Acoustic wave signal sending and receiving method and device, and system thereof
CN107657958A (en) * 2017-09-13 2018-02-02 厦门声连网信息科技有限公司 A kind of music recognition system, device and music management server and method
CN108964786A (en) * 2018-06-13 2018-12-07 厦门声连网信息科技有限公司 A kind of acoustic signals coding, decoded method and device
CN109150320A (en) * 2018-07-26 2019-01-04 厦门声连网信息科技有限公司 A kind of acoustic signals coding, coding/decoding method and device
CN109600331A (en) * 2019-01-30 2019-04-09 北京智芯微电子科技有限公司 Frequency deviation synchronous method in cordless communication network
CN109831280A (en) * 2019-02-28 2019-05-31 深圳市友杰智新科技有限公司 A kind of sound wave communication method, apparatus and readable storage medium storing program for executing
CN109840776A (en) * 2017-11-27 2019-06-04 汇智通讯有限公司 Utilize the transaction certificate authentication method and transaction verification method of ultrasonic wave identifying code
CN110379204A (en) * 2019-06-28 2019-10-25 深圳市元征科技股份有限公司 Vehicle collision avoidance method, apparatus and electronic equipment
CN111970558A (en) * 2020-10-19 2020-11-20 深圳乐播科技有限公司 Screen projection method, device, equipment and storage medium based on sound wave communication
CN113131968A (en) * 2021-04-15 2021-07-16 江南造船(集团)有限责任公司 Method and system for avoiding air collision and frequency hopping of wireless signals

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1879375A (en) * 2003-11-06 2006-12-13 株式会社建伍 Modulating apparatus, mobile communication system, modulating method, and communication method
CN101810009A (en) * 2007-10-02 2010-08-18 株式会社M.I.研究所 Speaker system
CN102291205A (en) * 2011-09-19 2011-12-21 朱建 High-reliability data transmission method and device based on multi-frequency sound waves
CN103903139A (en) * 2014-04-10 2014-07-02 福建联迪商用设备有限公司 Sound wave payment method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1879375A (en) * 2003-11-06 2006-12-13 株式会社建伍 Modulating apparatus, mobile communication system, modulating method, and communication method
CN101810009A (en) * 2007-10-02 2010-08-18 株式会社M.I.研究所 Speaker system
CN102291205A (en) * 2011-09-19 2011-12-21 朱建 High-reliability data transmission method and device based on multi-frequency sound waves
CN103903139A (en) * 2014-04-10 2014-07-02 福建联迪商用设备有限公司 Sound wave payment method and system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105790854A (en) * 2016-03-01 2016-07-20 济南中维世纪科技有限公司 Short distance data transmission method and device based on sound waves
CN105846909A (en) * 2016-03-17 2016-08-10 海信集团有限公司 Acoustic wave signal sending and receiving method and device, and system thereof
CN105846909B (en) * 2016-03-17 2018-05-08 海信集团有限公司 Acoustic signals sending and receiving methods, device and its system
CN107657958A (en) * 2017-09-13 2018-02-02 厦门声连网信息科技有限公司 A kind of music recognition system, device and music management server and method
CN107657958B (en) * 2017-09-13 2020-06-23 厦门声连网信息科技有限公司 Music identification system, device, music management server and method
CN109840776A (en) * 2017-11-27 2019-06-04 汇智通讯有限公司 Utilize the transaction certificate authentication method and transaction verification method of ultrasonic wave identifying code
CN109840776B (en) * 2017-11-27 2021-08-13 汇智通讯有限公司 Transaction certificate authentication method and transaction verification method using ultrasonic verification code
WO2019237972A1 (en) * 2018-06-13 2019-12-19 厦门声连网信息科技有限公司 Acoustic wave signal encoding and decoding method and device
CN108964786A (en) * 2018-06-13 2018-12-07 厦门声连网信息科技有限公司 A kind of acoustic signals coding, decoded method and device
CN108964786B (en) * 2018-06-13 2020-10-02 厦门声连网信息科技有限公司 Method and device for coding and decoding sound wave signal
CN109150320A (en) * 2018-07-26 2019-01-04 厦门声连网信息科技有限公司 A kind of acoustic signals coding, coding/decoding method and device
WO2020019879A1 (en) * 2018-07-26 2020-01-30 厦门声连网信息科技有限公司 Acoustic wave signal encoding and decoding methods and device
CN109600331A (en) * 2019-01-30 2019-04-09 北京智芯微电子科技有限公司 Frequency deviation synchronous method in cordless communication network
CN109600331B (en) * 2019-01-30 2020-09-15 北京智芯微电子科技有限公司 Frequency deviation synchronization method in wireless communication network
CN109831280A (en) * 2019-02-28 2019-05-31 深圳市友杰智新科技有限公司 A kind of sound wave communication method, apparatus and readable storage medium storing program for executing
CN110379204A (en) * 2019-06-28 2019-10-25 深圳市元征科技股份有限公司 Vehicle collision avoidance method, apparatus and electronic equipment
CN111970558A (en) * 2020-10-19 2020-11-20 深圳乐播科技有限公司 Screen projection method, device, equipment and storage medium based on sound wave communication
CN113131968A (en) * 2021-04-15 2021-07-16 江南造船(集团)有限责任公司 Method and system for avoiding air collision and frequency hopping of wireless signals

Also Published As

Publication number Publication date
CN105281842B (en) 2018-10-16

Similar Documents

Publication Publication Date Title
CN105281842A (en) Coding and decoding methods and devices of sound wave communicaiton
CN104243052A (en) Sound wave communication coding and decoding method and device
CA2687236A1 (en) Orthogonal spread-spectrum waveform generation with non-contiguous spectral occupancy for use in cdma communications
CN105324651A (en) A method of measuring elongation of a fastener with ultrasound, performed by a power tool, and a power tool
CN103928029A (en) Audio signal coding method, audio signal decoding method, audio signal coding apparatus, and audio signal decoding apparatus
RU2549188C1 (en) Method of transmitting information in communication system with noise-like signals
CN105846909A (en) Acoustic wave signal sending and receiving method and device, and system thereof
CN103262160B (en) Method and apparatus for downmixing multi-channel audio signals
CN103033705A (en) Test method and test system of electronic equipment
CN109412703B (en) Time delay difference coding method utilizing short pulse short-time energy spectrum timing
CN102737637A (en) Method for data transmission by using voice-like modulation and demodulation
CN103928031A (en) Encoding method, decoding method, encoding device and decoding device
CN101534276B (en) Enhanced method for demodulating constant-amplitude multi-code biorthogonal modulation signals
JP5798257B2 (en) Apparatus and method for composite coding of signals
JPH06104793A (en) Pulse communication system
CN114448523B (en) Ultrasonic communication method and system based on frequency domain modulation PWAM
CN101563848B (en) Audio encoding and decoding apparatus and method thereof
CN109150320B (en) Sound wave signal encoding and decoding methods and devices
CN103326981A (en) Method for modulating control signals of power line carrier communication based on OFDM
KR20090059405A (en) Ultra-wide bandwidth signal transmission device and method using pulse position modulation scheme
RU2635552C1 (en) Method of information transmission in communication system with noise signals
CN109831280A (en) A kind of sound wave communication method, apparatus and readable storage medium storing program for executing
RU2609525C1 (en) Method of generating signals and transmitting information in radar identification system
TW527781B (en) Method for communication between a transmitter and a receiver
CN101866649B (en) Coding processing method and device, decoding processing method and device, communication system

Legal Events

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