CN104935527A - Data packing method of audio communication - Google Patents

Data packing method of audio communication Download PDF

Info

Publication number
CN104935527A
CN104935527A CN201510323252.2A CN201510323252A CN104935527A CN 104935527 A CN104935527 A CN 104935527A CN 201510323252 A CN201510323252 A CN 201510323252A CN 104935527 A CN104935527 A CN 104935527A
Authority
CN
China
Prior art keywords
data
data field
length
byte
check
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.)
Pending
Application number
CN201510323252.2A
Other languages
Chinese (zh)
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 Newland Computer Co Ltd
Original Assignee
Fujian Newland Computer 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 Newland Computer Co Ltd filed Critical Fujian Newland Computer Co Ltd
Priority to CN201510323252.2A priority Critical patent/CN104935527A/en
Publication of CN104935527A publication Critical patent/CN104935527A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a data packing method of audio communication. The data packing method comprises the steps as follows: storing the data to be transmitted to a data field formed by data elements, appending length bits for storing length data of the data field at the front of the data field, appending CRC8 check bits for storing a check value obtained by performing CRC check on the length bits and the data field at the back of the data field to ensure the accuracy of the data in the data field; respectively appending a frame head with relative high resolution and a frame tail with relative high resolution on an analog waveform at the beginning and at the ending of the data package during packing; in addition, performing odd-even check on each byte and appending the check value at the back of the byte after packing to effectively ensure the accuracy of the data of each byte. The analog waveform of the invention has excellent resolution and reliable performance for data recognition and decoding, thereby reducing the error rate. The data packing method of audio communication of the invention improves compatibility between an audio POS and an intelligent device. The coding and decoding of the software are easy to realize and the code consumption is small.

Description

A kind of data group bag method of voice communication
Technical field
The present invention relates to data transmission system, particularly relate to a kind of data group bag method of voice communication.
Background technology
Along with going deep into of E-business applications, market needs to meet more carries out near field by mobile terminals such as mobile phones and to conclude the business the technology accepted.And between smart machine and POS based on the communication technology of audio frequency gradually by people are known well.Specifically, smart machine is provided with the APP of audio data coding, data are play by outputting to audio port after the coded format coding of agreement, realizing digital signal transition is that analog signal represents, audio frequency POS receives and processes this analog signal, and convert digital signal to, and then decoding is carried out to digital signal obtain data, vice versa.
Current audio frequency POS major part have employed ready-made serial communication mode, as Manchester's code mode; Although the communication code mode of maturation is widely applied, but due to the otherness of intelligent platform, the diversification of operating system, in addition the more fragmentation of the current Android ecosphere, cause coded system poor compatibility traditional under smart machine platform, the error rate is high, traditional communication coded system needs the relative normalization of hardware, makes it really cannot meet smart machine and communicates with the stability and high efficiency of audio frequency POS.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, the data group packet mode of the voice communication that a kind of resolving power is good, the error rate is low, compatibility is good is provided.
The technical solution used in the present invention is:
A data group bag method for voice communication, it comprises the following steps:
1) data field is defined: described data field stores data to be transmitted, and data field is made up of data element;
2) a length position is defined: described length position stores data field length, and before described length position is attached to data field, described data field length is the total bytes of data field;
3) frame head is defined: the highest order of described frame head is 1;
4) postamble is defined: the lowest order of described postamble is 1;
5) a CRC8 check digit is defined: described CRC8 check digit stores carries out the check value after CRC check, after CRC8 check digit is attached to data field to length position and data field;
6) bag data are organized: frame head, length position, data field, CRC8 check bit sum postamble are organized bag successively;
7) parity check: odd-even check is carried out to each byte of the data after group bag, and add the parity check bit that stores the parity values of this byte after each byte.
In described step 1), the length of data element is a byte.
In described step 3), the length of length position is two.
In described step 4), the length of frame head is a byte.
In described step 5), the length of postamble is a byte.
The present invention adopts above technical scheme, data waiting for transmission are stored in the data field be made up of data element, and before data field the length position of additional storage data field length data, and after data field, additional storage carries out the check value after CRC check to length position and data field, can ensure the correctness of the data of this data field; And respectively when organizing bag the beginning of packet and most afterbody be attached to the frame head and postamble analog waveform with reasonable distinguishable power; In addition, parity check carried out to each byte after group bag and after being additional to this byte, effectively ensure that the correctness of the data of each byte; Tool of the present invention has the following advantages: the coding cost that 1, link layer is minimum, makes under same analog waveform speed, and the data volume of transmission maximizes.2, the distinguishable power of analog waveform is good, brings reliable data identification, decoding, reduces the error rate, improves the compatibility between audio frequency POS and smart machine.3, the encoding and decoding of software easily realize, and code consumes little.
Accompanying drawing explanation
Below in conjunction with the drawings and specific embodiments, the present invention is described in further details;
The flow chart of the data group bag method of a kind of voice communication of Fig. 1 the present invention;
The data structure schematic diagram of the data group bag method of a kind of voice communication of Fig. 2 the present invention.
Embodiment
As shown in the figures 1 and 2, the present invention its comprise the following steps:
1) data field is defined: described data field stores data to be transmitted, and data field is made up of data element;
2) a length position is defined: described length position stores data field length, and before described length position is attached to data field, described data field length is the total bytes of data field; The length of length position can determine byte number according to actual conditions, and the length of length position is the highest can reach 65536, and high-byte portion is used for formulation and unpacks and retransmission protocol, and in the present embodiment, the length of length position is two.
3) frame head is defined: the highest order of described frame head is 1; The length of frame head is a byte.Namely whole frame head has the pattern of " 1XXXXXXX ", makes this frame head on analog waveform, have reasonable distinguishable power.
4) postamble is defined: the lowest order of described postamble is 1; The length of postamble is a byte.Namely whole postamble has the pattern of " XXXXXXX1 ", makes this postamble on analog waveform, have reasonable distinguishable power.
5) a CRC8 check digit is defined: described CRC8 check digit stores carries out the check value after CRC check, after CRC8 check digit is attached to data field to length position and data field;
6) bag data are organized: frame head, length position, data field, CRC8 check bit sum postamble are organized bag successively.
7) odd-even check is carried out to each byte of the data after group bag, and add the parity check bit that stores the parity values of this byte after each byte.
The present invention adopts above technical scheme, data waiting for transmission are stored in the data field be made up of data element, and before data field the length position of additional storage data field length data, and after data field, additional storage carries out the check value after CRC check to length position and data field, can ensure the correctness of the data of this data field; And respectively when organizing bag the beginning of packet and most afterbody be attached to the frame head and postamble analog waveform with reasonable distinguishable power; In addition, parity check carried out to each byte after group bag and after being additional to this byte, effectively ensure that the correctness of the data of each byte.

Claims (5)

1. a data group bag method for voice communication, is characterized in that: it comprises the following steps:
1) data field is defined: described data field stores data to be transmitted, and data field is made up of data element;
2) a length position is defined: described length position stores data field length, and before described length position is attached to data field, described data field length is the total bytes of data field;
3) frame head is defined: the highest order of described frame head is 1;
4) postamble is defined: the lowest order of described postamble is 1;
5) a CRC8 check digit is defined: described CRC8 check digit stores carries out the check value after CRC check, after CRC8 check digit is attached to data field to length position and data field;
6) bag data are organized: frame head, length position, data field, CRC8 check bit sum postamble are organized bag successively;
7) parity check: odd-even check is carried out to each byte of the data after group bag, and add the parity check bit that stores the parity values of this byte after each byte.
2. the data group bag method of a kind of voice communication according to claim 1, is characterized in that: in described step 1), the length of data element is a byte.
3. the data group bag method of a kind of voice communication according to claim 1, is characterized in that: in described step 3), the length of length position is two.
4. the data group bag method of a kind of voice communication according to claim 1, is characterized in that: in described step 4), the length of frame head is a byte.
5. the data group bag method of a kind of voice communication according to claim 1, is characterized in that: in described step 5), the length of postamble is a byte.
CN201510323252.2A 2015-06-12 2015-06-12 Data packing method of audio communication Pending CN104935527A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510323252.2A CN104935527A (en) 2015-06-12 2015-06-12 Data packing method of audio communication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510323252.2A CN104935527A (en) 2015-06-12 2015-06-12 Data packing method of audio communication

Publications (1)

Publication Number Publication Date
CN104935527A true CN104935527A (en) 2015-09-23

Family

ID=54122501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510323252.2A Pending CN104935527A (en) 2015-06-12 2015-06-12 Data packing method of audio communication

Country Status (1)

Country Link
CN (1) CN104935527A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897513A (en) * 2016-05-18 2016-08-24 北京精密机电控制设备研究所 Data transmission method including time parameters
CN106341213A (en) * 2016-08-29 2017-01-18 福建新大陆支付技术有限公司 Data packeting method for communication between intelligent device and POS machine with audio interface
CN107004418A (en) * 2017-03-08 2017-08-01 深圳市汇顶科技股份有限公司 A kind of digital communication method and device based on voice-grade channel
CN107863109A (en) * 2017-11-03 2018-03-30 深圳大希创新科技有限公司 A kind of mute control method and system for suppressing noise
CN109729105A (en) * 2019-03-26 2019-05-07 黄策 A kind of data packing method
CN111711609A (en) * 2020-05-21 2020-09-25 重庆川仪自动化股份有限公司 Protocol design method in serial port communication
WO2021184246A1 (en) * 2020-03-18 2021-09-23 黄策 Data packaging method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916242A (en) * 2012-12-30 2014-07-09 北京握奇数据系统有限公司 Encryption and decryption method of transmission data based on audio interface

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916242A (en) * 2012-12-30 2014-07-09 北京握奇数据系统有限公司 Encryption and decryption method of transmission data based on audio interface

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105897513A (en) * 2016-05-18 2016-08-24 北京精密机电控制设备研究所 Data transmission method including time parameters
CN105897513B (en) * 2016-05-18 2019-01-15 北京精密机电控制设备研究所 A kind of data transmission method containing time-parameters
CN106341213A (en) * 2016-08-29 2017-01-18 福建新大陆支付技术有限公司 Data packeting method for communication between intelligent device and POS machine with audio interface
CN107004418A (en) * 2017-03-08 2017-08-01 深圳市汇顶科技股份有限公司 A kind of digital communication method and device based on voice-grade channel
WO2018161277A1 (en) * 2017-03-08 2018-09-13 深圳市汇顶科技股份有限公司 Audio channel-based digital communication method and apparatus
CN107863109A (en) * 2017-11-03 2018-03-30 深圳大希创新科技有限公司 A kind of mute control method and system for suppressing noise
CN107863109B (en) * 2017-11-03 2020-07-03 深圳大希创新科技有限公司 Mute control method and system for suppressing noise
CN109729105A (en) * 2019-03-26 2019-05-07 黄策 A kind of data packing method
WO2021184246A1 (en) * 2020-03-18 2021-09-23 黄策 Data packaging method
CN111711609A (en) * 2020-05-21 2020-09-25 重庆川仪自动化股份有限公司 Protocol design method in serial port communication

Similar Documents

Publication Publication Date Title
CN104935527A (en) Data packing method of audio communication
CN108989708A (en) The low speed signal photoelectric conversion module of all-purpose belt multimedia interface
EP2966823B1 (en) Encoding and decoding methods and apparatuses of ethernet physical layer
CN104301521B (en) A kind of modulation system based on mobile audio interface, telecommunication circuit and communication means thereof
CN103220428A (en) Audio signal data communication method for cell phone
CN102832968A (en) Method for performing communication between mobile phone and equipment by using audio interface
CN104081701A (en) Communication method, system and device for optical network system
CN104135345A (en) Cross-layer coding and decoding method applied to long-term evolution system
CN102932012B (en) A kind of deletion RS code blind identification method for coding parameters of error-tolerant code
CN110838893A (en) Communication system based on Beidou system and communication method thereof
CN109525370A (en) Data packet sending method based on zigbee
CN103812610B (en) A kind of data communications method, terminal and information safety devices
CN202436213U (en) Safety helmet based on wireless networking technology
CN103731241B (en) Encoding system and method for improving spectrum efficiency of communication system
CN102571540A (en) Decompression method and device
CN106549921B (en) Data transmission method and device
CN106656415A (en) Data superframe generation method of adaptive transmission channel
CN107004418A (en) A kind of digital communication method and device based on voice-grade channel
CN103716127B (en) TTCN-3 based compression coding and decoding method and system
CN105808651A (en) Android WeChat based silk_v3 voice file format decoding method
CN100444595C (en) A method of master-slave equipment communication
CN104202312A (en) Rapid and stable data transmission method based on mobile phone audio channels
CN104735809A (en) Method for communication between terminal and external equipment and terminal
CN104281632B (en) Coding-decoding method and system based on Object Protocol mapping
CN111339020A (en) Serial port data receiving and transmitting method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150923