摘要 |
The invention provides a data decoding method and device, and relates to the technical field of electrons. The method includes the steps that a sine wave is received through an audio interface, wherein the sine wave includes a waveform of at least one cycle, and different cycles represent different bit values; the sine wave is processed to form a first square wave, wherein the first square wave carries data to be decoded; whether the first square wave includes a glitch waveform or not is judged based on the preset threshold; or whether the first square wave includes the glitch waveform or not is judged based on a self-adaption threshold, wherein the self-adaption threshold is obtained by conducting calculation according to synchronization header data carried in the sine wave; if the first square wave includes the glitch waveform, the glitch waveform removing processing is conducted on the first square wave to obtain a second square wave; the second square wave is decoded to obtain decoded data. According to the data decoding method and device, data decoding accuracy can be improved, and the data decoding success rate can be increased. |