CN105099571A - Audio communication method - Google Patents
Audio communication method Download PDFInfo
- Publication number
- CN105099571A CN105099571A CN201510404885.6A CN201510404885A CN105099571A CN 105099571 A CN105099571 A CN 105099571A CN 201510404885 A CN201510404885 A CN 201510404885A CN 105099571 A CN105099571 A CN 105099571A
- Authority
- CN
- China
- Prior art keywords
- character
- bits
- data
- coding
- check digit
- 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
Links
Landscapes
- Communication Control (AREA)
- Detection And Prevention Of Errors In Transmission (AREA)
Abstract
The embodiment of the invention discloses an audio communication method and is applied to the communication field. The method comprises the steps follows: splitting original data to be transmitted by using a character as unit; executing a coding step to each character to obtain new data; and combining the new data corresponding to each character according to the sequence of each character in the original data and then using the new data as the transmission data. The method of the invention realizes the alternative transmission of 01 by re-coding a binary number to solve the problem that data transmission is wrong because some data is forcefully pulled back to 0 line while transmitting in the format of continuous 1 line and continuous 0 line, thereby improving anti-disturbance performance of data transmission. Because the use of check bit, the method of the invention realizes the check of transmitted data and improves the reliability of data transmission.
Description
Technical field
The present invention relates to the communications field, particularly relate to a kind of audio communication method.
Background technology
At present, generally all there is above mobile phone and equipment that some possess sound card collection and the playing function of audio frequency.Wherein, analog quantity is changed into digital quantity and carries out storing or processing by the collection of audio frequency exactly, and playing function is then that the digital quantity under audio format is exported by analog quantity.
Voice communication agreement is needed to carry out the cooperation of Code And Decode by audio transmission data, and in prior art often some voice communication agreements due to the output high level of long-time (being greater than 60ms) on tone frequency channel wire or low level, audio hardware structure can be retracted 0 line of acquiescence, make data transmission fault, and reliability is general lower.
Therefore, a kind of audio communication method is needed to solve the problems referred to above.
Summary of the invention
The object of the invention is to solve the problem that mistake appears in audio transmission data of the prior art.
In view of this, the invention provides a kind of audio communication method, can comprise:
Initial data waiting for transmission is split in units of character, coding step is performed to each character and obtains new data;
Wherein, described coding step comprises: search ascii table and determine 8 bits that described each character is corresponding; 0 of binary number corresponding for described each character coding is become 01,1 coding and becomes 10, to obtain coded data bit corresponding to described each character; Before described coded data bit, add start bit 10, after described coded data bit, add check digit, to obtain new data corresponding to described each character;
Using described new data corresponding for described each character according to after the sequential combination of character each described in initial data as transmission data.
As can be seen from the above technical solutions, the present invention has the following advantages:
In the present invention, there is the problem of mistake for audio transmission data of the prior art, propose a kind of audio communication method.The method by by binary number recompile, achieves 01 alternately propagate, and avoids the transmission of some data continuous 1 or continuous 0 and is withdrawn into 0 line by force and causes the problem of data transmission fault, improve the interference free performance of transfer of data.Use due to check digit also achieves the verification to sending data, improves the reliability of transfer of data.
Term " first ", " second ", " the 3rd " " 4th " etc. (if existence) in specification of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.The embodiments described herein should be appreciated that the data used like this can be exchanged in the appropriate case, so that can be implemented with the order except the content except here diagram or description.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
The above, above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.
Accompanying drawing explanation
Fig. 1 is a kind of audio communication method flow chart of the present invention;
Fig. 2 is coding step flow chart in a kind of audio communication method of the present invention;
Fig. 3 is the real process figure of a kind of audio communication method of the present invention;
Description of reference numerals: 301-initial data; The hexadecimal number that the single character of 302-is corresponding in ascii table; 8 bits that the single character of 303-is corresponding; 304-0 is encoded into 01,1 and is encoded into and regroups number after 10; New data after 305-recompile; The data composition of 306-tri-groups of spare bits and one group of start bit; The data composition of 307-check bit sum three groups of spare bits.
Embodiment
Embodiments provide a kind of audio communication method, the problem that mistake appears in prior art sound intermediate frequency transmission data can be solved.
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
Refer to Fig. 1, be the flow chart of a kind of audio communication method embodiment 1 provided by the invention, as can be seen from Fig. 1 and Fig. 2, this method comprises:
S101, initial data waiting for transmission to be split in units of character, coding step is performed to each character and obtains new data;
S102, using described new data corresponding for described each character according to after the sequential combination of character each described in initial data as transmission data;
Wherein, described S101 comprises sub-step and described coding step:
S201, search ascii table and determine 8 bits that described each character is corresponding;
S202, by 0 of binary number corresponding for described each character coding become 01,1 coding become 10, to obtain coded data bit corresponding to described each character;
S203, before described coded data bit, add start bit 10, after described coded data bit, add check digit, to obtain new data corresponding to described each character.
Concrete, when audio data transmission will be carried out, first will initial data to be passed split, split to become single character symbol in units of character, then coding step is performed to each character, wherein, in described coding step, because 8 bits of its correspondence can be found in each character in ASCII coding schedule, so find out 8 bits corresponding to described each character by contrast ASCII character table, again described 8 bits corresponding to described each character are regrouped again, be specially and 0 coding in described 8 bits is become 01, 1 coding becomes 10, by obtaining coded data bit corresponding to described each character after this coded system coding, 10 are added as start bit before described coded data bit, check digit is added after described data bit, described like this data bit and described start bit and described check digit constitute new data corresponding to described each character jointly, transmit as transmission data by described new data corresponding for described each character to be carried out combine the result obtained according to the order of character each described in initial data.
, there is the problem of mistake for audio transmission data of the prior art, propose a kind of audio communication method in the embodiment of the present invention.The method by by binary number recompile, achieves 01 alternately propagate, and avoids the transmission of some data continuous 1 or continuous 0 and is withdrawn into 0 line by force and causes the problem of data transmission fault, improve the interference free performance of transfer of data.Use due to check digit also achieves the verification to sending data, improves the reliability of transfer of data.
Understand more intuitively for the ease of there being one to the beneficial effect of a kind of clinical assay devices provided by the invention, present invention also offers embodiment 2, the real process figure of the flow chart of composition graphs 1 one kinds of audio communication methods and the coding step flow chart of a kind of audio communication method of Fig. 2 and a kind of audio communication method of Fig. 3 is described in detail.
Shown in Fig. 1 and Fig. 2, described method can comprise:
S101, initial data waiting for transmission to be split in units of character, coding step is performed to each character and obtains new data;
Concrete, the initial data preparing to carry out audio communication is split in units of character and becomes single character symbol, then coding step is performed to each character.
Preferably, as shown in Figure 3, one group of initial data will carrying out audio communication has been split into single character, encodes to each character wherein, as " ABCDEFG1243 " has been split into single character in Fig. 3, illustrate for character " E " wherein below.
Shown in composition graphs 2, described coding step comprises:
S201, search ascii table and determine 8 bits that described each character is corresponding;
Concrete, 8 bits of its correspondence can be found in each character in ascii table, so determine by contrast ascii table 8 bits that described single character is corresponding.
It should be noted that, described in search 8 bits that ascii table determines that described each character is corresponding and comprise and search described ascii table and determine the hexadecimal number that described each character is corresponding, determine described 8 bits by described hexadecimal number.
Preferably, shown in Fig. 3, described character " E " is 0X45 by the contrast ascii table hexadecimal number found out corresponding to it, the hexadecimal number then obtaining described character " E " corresponding is 0X45, the binary number that the hexadecimal number 0X45 that described character " E " is corresponding converts 8 to is 01000101, so finally determine that 8 bits that described character " E " is corresponding are 01000101.
S202, by 0 of binary number corresponding for described each character coding become 01,1 coding become 10, to obtain coded data bit corresponding to described each character;
Concrete, recompile is carried out to described 8 bits, namely described 8 bits become 01 by all being encoded 0 wherein, and all being encoded 1 wherein becomes 10, and the sixteen-bit binary number obtained after coding is the coded data bit that described each character is corresponding.
Preferably, shown in Fig. 3, coding is re-started by the binary number of 8,0 coding is become 01,1 coding becomes 10, namely become 0110010101100110 by 01000101 coding, 0110010101100110 is just the sixteen-bit binary number obtained after coding, the coded data bit corresponding to character " E " namely in audio communication data.
S203, before described coded data bit, add start bit 10, after described coded data bit, add check digit, to obtain new data corresponding to described each character;
Concrete, before described data bit obtained above, add 10 as start bit, described start bit is 2 bits, identifies when the effect of described start bit is for decoding to data.After described data bit, add check digit, obtain the new data that described each character is corresponding.
It should be noted that, described check digit is 2 bits, and in the present invention, check digit used is even parity check, for the accuracy of checking data.The determination of check digit is by judging that the number of in described 8 bits 1 is that odd number or even number are determined, if the number of 1 is odd number in described 8 bits, then check digit is 01, if the number of 1 is even number in described 8 bits, then check digit is 10.
Also it should be noted that, the new data that described each character is corresponding is also included in the spare bits of adding spare bits before described start bit and adding in described check digit below, the spare bits of adding also is 2 bits, and the group number of spare bits described in a new data can be one group also can for many groups.
In addition, described in the new data that can carry out audio transmission that the obtains order when transmitting be described spare bits, described start bit, described data bit, described stop bits and described check digit, described stop bits can replace by described check digit.
Preferably, as shown in Figure 3, start bit 10 is added before the described data bit 0110010101100110 of 16, in described 8 bits 01000101, the number of 1 is 3, it is odd number, so can determine that check digit is 01, three groups of spare bits 01 are added above in described start bit 10, namely 010101 is added, three groups of spare bits 01 are added below in described check digit 01, namely 010101 is added, obtain the final new bit 01010110011001010110011001010101 can carrying out audio transmission, described stop bits in this embodiment replaces by described check digit.
S102, using described new data corresponding for described each character according to after the sequential combination of character each described in initial data as transmission data;
After execution of step S203, return and continue to perform step S102, concrete, in described step S101 to each character perform described new data that coding step finally obtains according to initial data in each character original put in order combine after transmit as last transmission data.
Preferably, shown in Fig. 3, after the new data obtaining described character " E ", have also been obtained the new data of other characters as " A ", " B " etc. in this way, these new datas still transmit as transmission data according to after the combination that puts in order of ABCDEFG1243.
Binary digit 1 described in the present invention is presented as 725 microsecond high level in transmitted waveform, and described binary digit 0 is presented as 725 microsecond low levels in transmitted waveform, and described low and high level is all for audio frequency publicly.The transmission new data that audio communication method recompile of the present invention finally obtains also only can have at most two 1 or two 0 superpose.According to cycle regular time using 1 as high level, when sending 0 as low level, at most when the middle of each code element, the once conversion of level, like this ensure obtain good interference free performance.
In the present invention, there is the problem of mistake for audio transmission data of the prior art, propose a kind of audio communication method.The method by by binary number recompile, achieves 01 alternately propagate, and avoids the transmission of some data continuous 1 or continuous 0 and is withdrawn into 0 line by force and causes the problem of data transmission fault, improve the interference free performance of transfer of data.Use due to check digit also achieves the verification to sending data, improves the reliability of transfer of data.
Claims (10)
1. an audio communication method, is characterized in that, described method comprises:
Initial data waiting for transmission is split in units of character, coding step is performed to each character and obtains new data;
Wherein, described coding step comprises: search ascii table and determine 8 bits that described each character is corresponding; 0 of binary number corresponding for described each character coding is become 01,1 coding and becomes 10, to obtain coded data bit corresponding to described each character; Before described coded data bit, add start bit 10, after described coded data bit, add check digit, to obtain new data corresponding to described each character;
Using described new data corresponding for described each character according to after the sequential combination of character each described in initial data as transmission data.
2. method according to claim 1, is characterized in that, described new data also comprises the spare bits being separately positioned on before described start bit and after described check digit.
3. method according to claim 2, is characterized in that, described spare bits is 2 bits, and described data bit is 16 bits, and described start bit is 2 bits, and described check digit is 2 bits.
4. method according to claim 1, is characterized in that, described check digit is even parity check.
5. method according to claim 4, is characterized in that, if the number of 1 is odd number in described 8 bits, then check digit is 01, if the number of 1 is even number in described 8 bits, then check digit is 10.
6. method according to claim 1, it is characterized in that, describedly search 8 bits that ascii table determines that described each character is corresponding and comprise and search described ascii table and determine the hexadecimal number that described each character is corresponding, determine described 8 bits by described hexadecimal number.
7. method according to claim 1, is characterized in that, described 0 coding become 01 comprise by 0 in described 8 bits all coding become 01, described 1 coding become 10 comprise by 1 in described 8 bits all coding become 10.
8. method according to claim 1, is characterized in that, described start bit is for identification of decoding.
9. method according to claim 1, is characterized in that, described new data transmit time order be described start bit before spare bits, described start bit, described data bit, stop bits and described check digit.
10. method according to claim 9, is characterized in that, the described check digit of described stop bits replaces.
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 true CN105099571A (en) | 2015-11-25 |
CN105099571B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109830242A (en) * | 2019-03-20 | 2019-05-31 | 蔡冠业 | A kind of method and system carrying out code communication using audio |
CN113358139A (en) * | 2021-04-30 | 2021-09-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 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109830242A (en) * | 2019-03-20 | 2019-05-31 | 蔡冠业 | A kind of method and system carrying out code communication using audio |
CN109830242B (en) * | 2019-03-20 | 2021-11-05 | 蔡冠业 | Method and system for coding communication by using audio |
CN113358139A (en) * | 2021-04-30 | 2021-09-07 | 威胜信息技术股份有限公司 | Method for encoding by using adjacent distorted pulse current signals in power frequency communication |
Also Published As
Publication number | Publication date |
---|---|
CN105099571B (en) | 2017-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106941724A (en) | Data processing method and device | |
CN105790853B (en) | A kind of method and device of sonic transmissions character data | |
CN113676190A (en) | Polar code encoding method and device | |
CN109167750B (en) | Data packet transmission method and device, electronic equipment and storage medium | |
US9998145B2 (en) | Data processing method and device | |
CN101702639B (en) | Check value calculation method and device of cyclic redundancy check | |
CN101350858B (en) | Method for decoding short message and user terminal | |
CN103368582A (en) | Data coding and decoding method and device | |
CN104081701B (en) | Communication means, system and the device of optical network system | |
CN108768587B (en) | Encoding method, apparatus and readable storage medium | |
CN110474711B (en) | Encoding method, apparatus and readable storage medium | |
CN110474709B (en) | Encoding method, apparatus and readable storage medium | |
CN106170934A (en) | Wireless forward pass passive optical network PON system, optical network device and method | |
CN108809486A (en) | Polar code coding/decoding methods and device | |
CN106452607A (en) | Method and device for transmitting and resolving information | |
CN114040030A (en) | Data compression method, device, equipment and medium based on preset rules | |
CN105099571A (en) | Audio communication method | |
CN102694598B (en) | Coding method and transmission method of visible light signals | |
CN107154835A (en) | The sending method and device of data | |
CN110474710B (en) | Encoding method, apparatus and readable storage medium | |
CN104467865B (en) | Serial communication protocol controller, byte split circuit and 8b10b encoders | |
CN107707329B (en) | Sparse code multiple access system and multi-user detection method thereof | |
CN114040028B (en) | Data compression method and data decompression method based on three modes | |
CN113162628B (en) | Data encoding method, data decoding method, terminal and storage medium | |
CN109741756B (en) | Method and system for transmitting operation signal based on USB external equipment |
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 | ||
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. |