摘要 |
A data decoding method and apparatus, relating to the technical field of electronics, said method comprising: receiving a sinusoidal wave by means of an audio interface, said sinusoidal wave comprising at least one waveform period, different waveform periods representing different bit values (101); processing the sinusoidal wave into a first square wave, said square wave carrying data to be decoded (102); on the basis of a preset threshold, judging whether the first square wave includes a glitch waveform; or, on the basis of a self-adaptive threshold, judging whether the first square wave includes a glitch waveform, wherein said self-adaptive threshold is calculated on the basis of the synchronisation header data carried in the sinusoidal wave (103); if the first square wave includes a glitch waveform, performing glitch waveform removal processing on the first square wave to obtain a second square wave (104); and performing decoding on the second square wave to obtain decoded data (105). The present method and apparatus can improve the accuracy and success rate of data decoding. |