CN105099571B - A kind of audio communication method - Google Patents
A kind of audio communication method Download PDFInfo
- Publication number
- CN105099571B CN105099571B CN201510404885.6A CN201510404885A CN105099571B CN 105099571 B CN105099571 B CN 105099571B CN 201510404885 A CN201510404885 A CN 201510404885A CN 105099571 B CN105099571 B CN 105099571B
- Authority
- CN
- China
- Prior art keywords
- bit
- character
- data
- coding
- bits
- 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.)
- Active
Links
Landscapes
- Detection And Prevention Of Errors In Transmission (AREA)
- Communication Control (AREA)
Abstract
The embodiment of the invention discloses a kind of audio communication method, applied to the communications field.In the embodiment of the present invention, methods described includes:Initial data waiting for transmission is split in units of character, performing coding step to each character obtains new data;Using the corresponding new data of each character according to being used as transmission data after the sequential combination of each character described in initial data.The present invention is by the way that binary number is recompiled, the alternating for realizing 01 is propagated, it is to avoid the transmission of some data continuous 1 or continuous 0 and be withdrawn into the problem of 0 line causes data transmission fault by force, improve the interference free performance of data transfer.Because the use of check bit also achieves the verification to sending data, the reliability of data transfer is improved.
Description
Technical field
The present invention relates to the communications field, more particularly to a kind of audio communication method.
Background technology
At present, mobile phone and some equipment for possessing sound card all have collection and the playing function of audio in general above.Wherein,
The collection of audio is exactly that analog quantity is changed into digital quantity to be stored or handled, and playing function is then under audio format
Digital quantity exported by analog quantity.
The cooperation that voice communication agreement is coded and decoded is needed by audio transmission data, and in the prior art often
Some voice communication agreements are due to the output high level or low level that (are more than 60ms) for a long time on tone frequency channel wire, audio hardware knot
Structure can pull it back 0 line of acquiescence so that data transmission fault, and reliability is typically relatively low.
Accordingly, it would be desirable to which a kind of audio communication method solves the above problems.
The content of the invention
It is an object of the invention to solve the problem of mistake occur in audio transmission data of the prior art.
In view of this, the present invention provides a kind of audio communication method, it may include:
Initial data waiting for transmission is split in units of character, performing coding step to each character is newly counted
According to;
Wherein, the coding step includes:Search ascii table and determine corresponding 8 bit of each character;Will
0 coding of the corresponding binary number of each character, which turns into 01,1 coding, turns into 10, corresponding to obtain each character
Coded data position;The addition start bit 10 before coded data position, adds check bit, to obtain behind coded data position
The corresponding new data of each character;
By the corresponding new data of each character according to the sequential combination of each character described in initial data after
It is used as transmission data.
As can be seen from the above technical solutions, the present invention has advantages below:
In the present invention, the problem of there is mistake for audio transmission data of the prior art, it is proposed that a kind of audio is led to
Letter method.This method is by the way that binary number is recompiled, the alternating for realizing 01 is propagated, it is to avoid some data continuous 1 or
Continuous 0 transmission and be withdrawn into the problem of 0 line causes data transmission fault by force, improve the anti-interference of data transfer
Energy.Because the use of check bit also achieves the verification to sending data, the reliability of data transfer is improved.
Brief description of the drawings
Fig. 1 is a kind of audio communication method flow chart of the invention;
Fig. 2 is coding step flow chart in a kind of audio communication method of the present invention;
Fig. 3 is a kind of real process figure of audio communication method of the present invention;
Description of reference numerals:301- initial data;The single characters of 302- corresponding hexadecimal number in ascii table;
Corresponding 8 bit of the single characters of 303-;304-0, which is encoded into 01,1 and is encoded into after 10, regroups number;305- is again
New data after coding;The data composition of tri- groups of spare bits of 306- and one group of start bit;Three groups of spare bits of 307- check bit sums
Data are constituted.
Embodiment
The embodiments of the invention provide a kind of audio communication method, audio transmission data appearance in the prior art can solve the problem that
The problem of mistake.
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people
The every other embodiment that member is obtained under the premise of creative work is not made, should all belong to the model that the present invention is protected
Enclose.
Referring to Fig. 1, a kind of flow chart of the audio communication method embodiment 1 provided for the present invention, can by Fig. 1 and Fig. 2
To find out, this method includes:
S101, initial data waiting for transmission split in units of character, performing coding step to each character obtains
To new data;
S102, by order group of the corresponding new data of each character according to each character described in initial data
Transmission data are used as after conjunction;
Wherein, the S101 is the coding step including sub-step:
S201, lookup ascii table determine corresponding 8 bit of each character;
S202,0 coding of the corresponding binary number of each character is turned into 01,1 coding turn into 10, it is described to obtain
The corresponding coded data position of each character;
S203, the addition start bit 10 before coded data position, check bit is added behind coded data position, with
To the corresponding new data of each character.
Specifically, in voice data transmission to be carried out, first will initial data to be passed split, be with character
Being split for unit turns into single character, then performs coding step to each character, wherein, in the coding step, due to
Each character can find its corresponding 8 bit in ASCII coding schedules, so by compareing ASCII character table search
Go out 8 bits corresponding to each character, then by 8 bit corresponding to each character again
Regrouped, be specially that 0 coding in 8 bit is turned into 01,1 coding to turn into 10, pass through this coding
Mode obtains the corresponding coded data position of each character after encoding, addition 10 is used as starting before coded data position
Position, adds check bit, so described data bit and the start bit and common group of the check bit behind the data bit
Into the corresponding new data of each character, by by the corresponding new data of each character according in initial data
The order of each character is combined obtained result and is transmitted as transmission data.
The embodiment of the present invention, the problem of mistake occur for audio transmission data of the prior art, it is proposed that Yi Zhongyin
Frequency communication means.This method is by the way that binary number is recompiled, the alternating for realizing 01 is propagated, it is to avoid some data are continuous
1 or continuous 0 transmission and be withdrawn into the problem of 0 line causes data transmission fault by force, improve the anti-interference of data transfer
Performance.Because the use of check bit also achieves the verification to sending data, the reliability of data transfer is improved.
A kind of beneficial effect of clinical assay devices for the ease of providing the present invention has a more intuitively understanding, this
Invention additionally provides embodiment 2, with reference to the flow chart and a kind of Fig. 2 audio communication methods of a kind of audio communication methods of Fig. 1
The real process figure of coding step flow chart and a kind of audio communication methods of Fig. 3 is described in detail.
As shown in Fig. 1 and Fig. 2, methods described may include:
S101, initial data waiting for transmission split in units of character, performing coding step to each character obtains
To new data;
Specifically, the initial data for being ready for voice communication transmission is split in units of character as single character,
Then coding step is performed to each character.
It is preferred that, as shown in Figure 3, one group of initial data that will carry out voice communication transmission has been split into single word
Symbol, is encoded to each character therein, and such as " ABCDEFG1243 " is to be split into single character in Fig. 3, below with it
In character " E " exemplified by explanation.
With reference to shown in Fig. 2, the coding step includes:
S201, lookup ascii table determine corresponding 8 bit of each character;
Specifically, each character can find its corresponding 8 bit in ascii table, so passing through control
Ascii table determines corresponding 8 bit of the single character.
It should be noted that the lookup ascii table determines that corresponding 8 bit of each character includes lookup
The ascii table determines the corresponding hexadecimal number of each character, determines that described 8 two are entered by the hexadecimal number
Number processed.
It is preferred that, shown in Fig. 3, the character " E " finds out hexadecimal corresponding to it by compareing ascii table
Number is 0X45, then obtains the corresponding hexadecimal number of the character " E " for 0X45, the corresponding hexadecimal number of the character " E "
The binary number that 0X45 is converted into 8 is 01000101, so finally determining corresponding 8 bit of the character " E "
For 01000101.
S202,0 coding of the corresponding binary number of each character is turned into 01,1 coding turn into 10, it is described to obtain
The corresponding coded data position of each character;
Specifically, being recompiled to 8 bit, i.e., described 8 bit passes through complete by therein 0
Portion's coding turns into 01, and it is each character that therein 1 whole codings are turned into the sixteen-bit binary number obtained after 10, coding
Corresponding coded data position.
It is preferred that, shown in Fig. 3, coding is re-started by the binary number of 8,0 coding is turned into 01,1 coding turns into 10,
The sixteen bit two for turning into 0110010101100110,0110010101100110 just to be obtained after coding by 01000101 coding
The coded data position corresponding to character " E " in system number, that is, voice communication transmission data.
S203, the addition start bit 10 before coded data position, check bit is added behind coded data position, with
To the corresponding new data of each character;
Specifically, addition 10 is as start bit before the data bit obtained above, the start bit is 2 two and entered
Number processed, the effect of the start bit is to be used to data are identified when decoding.Check bit is added behind the data bit,
Obtain the corresponding new data of each character.
It should be noted that the check bit is 2 bits, and check bit used is even parity check in the present invention, is used
In the accuracy of verification data.The determination of check bit is by judging that in 8 bit 1 number is odd number or idol
Number is come what is determined, if 1 number is odd number in 8 bit, check bit is 01, if 1 in 8 bit
Number be even number, then check bit be 10.
It should also be noted that, the corresponding new data of each character, which is additionally included in before the start bit, adds idle
Position and the spare bits added below in the check bit, the spare bits of addition are also institute in 2 bits, and a new data
It can also be multigroup that the group number for stating spare bits, which can be one group,.
In addition, order of the obtained new data that can carry out audio transmission in transmission is the spare bits, institute
Start bit, the data bit, the stop bits and the check bit are stated, the stop bits can be replaced with the check bit.
It is preferred that, as shown in Figure 3, start bit 10, institute are added before the data bit 0110010101100110 of 16
The number for stating in 8 bits 01,000,101 1 is 3, is odd number, it is possible to which it is 01 to determine check bit, in the starting
Three groups of spare bits 01 are above added in position 10, that is, add 010101, three groups of spare bits 01 are added behind the check bit 01, that is, are added
Plus 010101, obtain final to carry out the new bit of audio transmission
01010110011001010110011001010101, the stop bits in the embodiment is replaced with the check bit.
S102, by order group of the corresponding new data of each character according to each character described in initial data
Transmission data are used as after conjunction;
After execution of step S203, return continues executing with step S102, specifically, to each in the step S101
The new data that character execution coding step is finally obtained is according to the original progress that puts in order of each character in initial data
It is transmitted after combination as last transmission data.
It is preferred that, shown in Fig. 3, after the character " E " new data is obtained, other characters have also been obtained in this way
Such as " A ", the new data of " B ", these new datas still according to ABCDEFG1243 put in order combination after as transmission data
To be transmitted.
Heretofore described binary digit 1 is presented as 725 microsecond high level, the binary digit in transmitted waveform
0 is presented as 725 microsecond low levels in transmitted waveform, the low and high level both for audio publicly for.Institute of the present invention
The audio communication method stated, which recompiles the transmission new data finally obtained, also only can be up to two 1 or two 0 progress
Superposition.According to cycle regular time using 1 as high level, using 0 as low level send when, at most in each code element
At the time of middle, the once conversion of level so ensures to obtain preferable interference free performance.
In the present invention, the problem of there is mistake for audio transmission data of the prior art, it is proposed that a kind of audio is led to
Letter method.This method is by the way that binary number is recompiled, the alternating for realizing 01 is propagated, it is to avoid some data continuous 1 or
Continuous 0 transmission and be withdrawn into the problem of 0 line causes data transmission fault by force, improve the anti-interference of data transfer
Energy.Because the use of check bit also achieves the verification to sending data, the reliability of data transfer is improved.
Term " first ", " second ", " the 3rd " " in description and claims of this specification and above-mentioned accompanying drawing
The (if present)s such as four " are for distinguishing similar object, without for describing specific order or precedence.It should manage
The data that solution is so used can be exchanged in the appropriate case, so that the embodiments described herein can be with except illustrating herein
Or the order beyond the content of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that
Covering is non-exclusive to be included, for example, containing process, method, system, product or the equipment of series of steps or unit need not limit
In those steps or unit for clearly listing, but may include not list clearly or for these processes, method, production
Product or the intrinsic other steps of equipment or unit.
Described above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although with reference to before
Embodiment is stated the present invention is described in detail, it will be understood by those within the art that:It still can be to preceding
State the technical scheme described in each embodiment to modify, or equivalent substitution is carried out to which part technical characteristic;And these
Modification is replaced, and the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (8)
1. a kind of audio communication method, it is characterised in that methods described includes:
Initial data waiting for transmission is split in units of character, performing coding step to each character obtains new data;
Wherein, the coding step includes:Search ascii table and determine corresponding 8 bit of each character;Will be described
0 coding of the corresponding binary number of each character, which turns into 01,1 coding, turns into 10, to obtain the corresponding coding of each character
Data bit;The addition start bit 10 before coded data position, check bit is added behind coded data position, described to obtain
The corresponding new data of each character;
The check bit is even parity check, if 1 number is odd number in 8 bit, check bit is 01, if described 8
1 number is even number in bit, then check bit is 10;
Using the corresponding new data of each character according to after the sequential combination of each character described in initial data as
Transmit data.
2. according to the method described in claim 1, it is characterised in that the new data also includes being separately positioned on the start bit
Spare bits after preceding and described check bit.
3. method according to claim 2, it is characterised in that the spare bits are 2 bits, the data bit is
16 bits, the start bit is 2 bits, and the check bit is 2 bits.
4. according to the method described in claim 1, it is characterised in that the lookup ascii table determines each character correspondence
8 bits include searching the ascii table and determine the corresponding hexadecimal number of each character, pass through described 16
System number determines 8 bit.
5. according to the method described in claim 1, it is characterised in that 0 coding, which turns into 01, to be included 8 bit
In 0 all coding turn into 01, it is described 1 coding turn into 10 include by 8 bit 1 all coding turn into 10.
6. according to the method described in claim 1, it is characterised in that the start bit, which is used to decode, to be recognized.
7. according to the method described in claim 1, it is characterised in that order of the new data in transmission is the start bit
Preceding spare bits, the start bit, the data bit, stop bits and the check bit.
8. method according to claim 7, it is characterised in that the stop bits is replaced with the check bit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510404885.6A CN105099571B (en) | 2015-07-10 | 2015-07-10 | A kind of audio communication method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510404885.6A CN105099571B (en) | 2015-07-10 | 2015-07-10 | A kind of audio communication method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105099571A CN105099571A (en) | 2015-11-25 |
CN105099571B true CN105099571B (en) | 2017-10-31 |
Family
ID=54579244
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510404885.6A Active CN105099571B (en) | 2015-07-10 | 2015-07-10 | A kind of audio communication method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105099571B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109830242B (en) * | 2019-03-20 | 2021-11-05 | 蔡冠业 | Method and system for coding communication by using audio |
CN113358139B (en) * | 2021-04-30 | 2023-04-07 | 威胜信息技术股份有限公司 | Method for encoding by using adjacent distorted pulse current signals in power frequency communication |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120201326A1 (en) * | 2009-07-14 | 2012-08-09 | Apollo Fire Detectors Limited | Signal and devices for wired networks |
US20130087614A1 (en) * | 2011-10-10 | 2013-04-11 | Mag Tek, Inc. | Audio jack coupled secure magnetic card reader |
CN203182894U (en) * | 2013-04-09 | 2013-09-11 | 浙江铭众生物医学创业投资有限公司 | Ear type thermometer based on audio interface communication |
CN103379397A (en) * | 2012-04-26 | 2013-10-30 | 国民技术股份有限公司 | Data transmission method, data processing method, and signal processing method and module based on audio interface |
-
2015
- 2015-07-10 CN CN201510404885.6A patent/CN105099571B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120201326A1 (en) * | 2009-07-14 | 2012-08-09 | Apollo Fire Detectors Limited | Signal and devices for wired networks |
US20130087614A1 (en) * | 2011-10-10 | 2013-04-11 | Mag Tek, Inc. | Audio jack coupled secure magnetic card reader |
CN103379397A (en) * | 2012-04-26 | 2013-10-30 | 国民技术股份有限公司 | Data transmission method, data processing method, and signal processing method and module based on audio interface |
CN203182894U (en) * | 2013-04-09 | 2013-09-11 | 浙江铭众生物医学创业投资有限公司 | Ear type thermometer based on audio interface communication |
Also Published As
Publication number | Publication date |
---|---|
CN105099571A (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105790853B (en) | A kind of method and device of sonic transmissions character data | |
CN104081701A (en) | Communication method, system and device for optical network system | |
CN101702639B (en) | Check value calculation method and device of cyclic redundancy check | |
CN109194337A (en) | A kind of Polar code encoding method, device | |
CN108347302A (en) | A kind of coding and decoding method and terminal | |
FI2297856T3 (en) | Method for encoding a symbol, method for decoding a symbol, method for transmitting a symbol from a transmitter to a receiver, encoder, decoder and system for transmitting a symbol from a transmitter to a receiver | |
CN104123364A (en) | Method and device for transmitting and receiving data through mobile terminal | |
CN104579360B (en) | A kind of method and apparatus of data processing | |
HK1148876A1 (en) | A method and an apparatus of receiving data transmitted from a source over a communications channel | |
US11955992B2 (en) | Rate matching method and apparatus for polar code | |
CN108694918A (en) | Coding method and device, coding/decoding method and device and display device | |
CN110445860A (en) | A kind of file transmitting method, device, terminal device and storage medium | |
CN105740215A (en) | Data communication coding and decoding method | |
EP2421187A3 (en) | Method for transmitting control information in a wireless communication system and apparatus therefor | |
CN111865952B (en) | Data processing method, data processing device, storage medium and electronic equipment | |
CN103368582A (en) | Data coding and decoding method and device | |
CN105391514B (en) | Character code coding/decoding method and device | |
CN105099571B (en) | A kind of audio communication method | |
CN103312458A (en) | Hybrid coding method | |
CN103414663B (en) | Morse signal self-adaptive identification method based on backtracking method | |
CN104467865B (en) | Serial communication protocol controller, byte split circuit and 8b10b encoders | |
CN109741756B (en) | Method and system for transmitting operation signal based on USB external equipment | |
CN102694598A (en) | Coding method and transmission method of visible light signals | |
CN107707329A (en) | Sparse Code multiple access system and its multi-user test method | |
CN109347605A (en) | A kind of coding method, coding/decoding method and device, computer readable storage medium |
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 | ||
CP03 | Change of name, title or address |
Address after: Room 1310, 13 / F, building 7, No. 37, Chaoqian Road, science and Technology Park, Changping District, Beijing 102200 Patentee after: Beijing Lepu Mingshi Technology Co.,Ltd. Address before: No. 37, Chaoqian Road, Changping District, Beijing 102200 Patentee before: BEIJING E-CARE CENTURY TECHNOLOGY Co.,Ltd. |
|
CP03 | Change of name, title or address |