CN108809442A - A kind of sonic transmissions 2 D code system based on intelligent terminal, method and apparatus - Google Patents
A kind of sonic transmissions 2 D code system based on intelligent terminal, method and apparatus Download PDFInfo
- Publication number
- CN108809442A CN108809442A CN201810352059.5A CN201810352059A CN108809442A CN 108809442 A CN108809442 A CN 108809442A CN 201810352059 A CN201810352059 A CN 201810352059A CN 108809442 A CN108809442 A CN 108809442A
- Authority
- CN
- China
- Prior art keywords
- data
- dimensional code
- data frame
- module
- sound wave
- 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
Links
- 230000005540 biological transmission Effects 0.000 title claims abstract description 44
- 238000000034 method Methods 0.000 title claims abstract description 14
- 239000011159 matrix material Substances 0.000 claims description 56
- 238000006243 chemical reaction Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 5
- 238000012937 correction Methods 0.000 claims description 4
- 230000001360 synchronised effect Effects 0.000 claims description 2
- 229910002056 binary alloy Inorganic materials 0.000 claims 1
- 238000005516 engineering process Methods 0.000 description 2
- 230000003321 amplification Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B11/00—Transmission systems employing sonic, ultrasonic or infrasonic waves
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06K—GRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
- G06K19/00—Record carriers for use with machines and with at least a part designed to carry digital markings
- G06K19/06—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
- G06K19/06009—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
- G06K19/06037—Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/30—Payment architectures, schemes or protocols characterised by the use of specific devices or networks
- G06Q20/32—Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
- G06Q20/327—Short range or proximity payments by means of M-devices
- G06Q20/3272—Short range or proximity payments by means of M-devices using an audio code
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0056—Systems characterized by the type of code used
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0078—Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
- H04L1/0083—Formatting with frames or packets; Protocol or part of protocol for error control
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Strategic Management (AREA)
- General Business, Economics & Management (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
本发明公开了一种基于智能终端的声波传输二维码系统、方法和装置,基于智能终端对二维码进行声波传输,只需用户持有智能终端即可,利用智能终端内部的扬声器和麦克风实现二维码数据帧的传输和拾取,非常方便,即使在无移动网络或无线网络的情况下,依然能有效地进行数据传输,可以应用于酒店、餐馆、购物广场等人数众多的公共场合,免去大家排队扫码的尴尬;本发明可以使用户无需再等待扫码,只需持有智能终端就可以实现二维码获取,有效了提升用户体验,满足用户快速智能的使用需求。
The invention discloses a system, method and device for transmitting a two-dimensional code by sound waves based on an intelligent terminal. The two-dimensional code is transmitted by sound waves based on the intelligent terminal, and only the user needs to hold the intelligent terminal, and the loudspeaker and the microphone inside the intelligent terminal are used. It is very convenient to realize the transmission and pickup of two-dimensional code data frames. Even in the case of no mobile network or wireless network, data transmission can still be carried out effectively. It can be applied to public places with a large number of people, such as hotels, restaurants, shopping malls, etc. It saves everyone from the embarrassment of queuing up to scan codes; the invention allows users to obtain QR codes without waiting for scanning codes, and only needs to hold a smart terminal, which effectively improves user experience and meets users' needs for fast and intelligent use.
Description
技术领域technical field
本发明涉及数据通信领域,尤其是一种基于智能终端的声波传输二维码系统、方法和装置。The invention relates to the field of data communication, in particular to a system, method and device for acoustic wave transmission of two-dimensional codes based on an intelligent terminal.
背景技术Background technique
随着二维码技术在现代生活的广泛应用,通过扫描二维码获取信息给人们的工作和衣食住行提供了极大的帮助。目前二维码的信息传播方式一般是通过使用手机摄像头扫描二维码来获取二维码中的信息,而在一些场合下,比如大型公众场合或者更为庄重的场合里,众人围着含有二维码的图片来打开手机摄像头进行扫描,显得不太方便雅观,而且对于每一个人而言,等待扫码明显使其体验不会太好,满足不了用户快速智能的使用需求。With the wide application of two-dimensional code technology in modern life, obtaining information by scanning two-dimensional codes provides great help to people's work and basic necessities of life. At present, the information dissemination method of QR code is generally to obtain the information in the QR code by scanning the QR code with the camera of the mobile phone. In some occasions, such as large public places or more solemn occasions, people gather around It is inconvenient and elegant to turn on the mobile phone camera to scan the picture of the two-dimensional code, and for everyone, waiting to scan the code obviously makes the experience not very good, and cannot meet the needs of users for fast and intelligent use.
发明内容Contents of the invention
为了解决上述问题,本发明的目的是提供一种基于智能终端的声波传输二维码系统、方法和装置,利用声波传输二维码,使用户无需再等待扫码,只需持有智能终端就可以实现二维码获取,有效了提升用户体验,满足用户快速智能的使用需求。In order to solve the above problems, the object of the present invention is to provide a system, method and device for transmitting two-dimensional codes by sound waves based on smart terminals, which use sound waves to transmit two-dimensional codes, so that users no longer need to wait for scanning codes, and only need to hold the smart terminal It can realize the acquisition of QR code, which effectively improves the user experience and meets the fast and intelligent use needs of users.
为了弥补现有技术的不足,本发明采用的技术方案是:In order to make up for the deficiencies in the prior art, the technical solution adopted in the present invention is:
一种基于智能终端的声波传输二维码系统,包括发送端和接收端,所述发送端包括依次连接设置的二维码矩阵产生模块、声波数据编码模块和声波数据传输模块,所述接收端包括依次连接设置的声波数据解码模块和二维码矩阵转化模块,所述声波数据传输模块连接到声波数据解码模块;An intelligent terminal-based sound wave transmission two-dimensional code system, including a sending end and a receiving end, the sending end includes a two-dimensional code matrix generation module, an acoustic wave data encoding module and an acoustic wave data transmission module connected in sequence, and the receiving end Including a sound wave data decoding module and a two-dimensional code matrix conversion module connected in sequence, the sound wave data transmission module is connected to the sound wave data decoding module;
所述二维码矩阵产生模块,用于扫描或生成二维码,并获取该二维码对应的二维码矩阵;The two-dimensional code matrix generating module is used to scan or generate a two-dimensional code, and obtain a two-dimensional code matrix corresponding to the two-dimensional code;
所述声波数据编码模块,用于对所述二维码矩阵进行声波数据编码,得到编码数据;The acoustic data encoding module is used to encode the acoustic wave data on the two-dimensional code matrix to obtain encoded data;
所述声波数据传输模块,用于利用扬声器将编码数据以各数据帧的形式传送至声波数据解码模块;The acoustic wave data transmission module is used to transmit the encoded data to the acoustic wave data decoding module in the form of each data frame by using a speaker;
所述声波数据解码模块,用于通过麦克风接收各数据帧并对各数据帧进行完全解码,得到解码数据;The sound wave data decoding module is used to receive each data frame through a microphone and completely decode each data frame to obtain decoded data;
所述二维码矩阵转化模块,用于将解码数据转化为二维码矩阵,重新生成对应的二维码并获取该二维码的原始信息。The two-dimensional code matrix conversion module is used to convert the decoded data into a two-dimensional code matrix, regenerate the corresponding two-dimensional code and obtain the original information of the two-dimensional code.
进一步,所述声波数据编码模块,用于对所述二维码矩阵进行声波数据编码,包括:用于对所述二维码矩阵进行信道编码、数字调制和PCM离散化处理。Further, the acoustic wave data encoding module, configured to perform acoustic wave data encoding on the two-dimensional code matrix, includes: performing channel encoding, digital modulation and PCM discretization processing on the two-dimensional code matrix.
进一步,所述声波数据解码模块,用于对各数据帧进行完全解码,包括:用于对各数据帧进行解码,恢复各数据帧的相应信息码字并根据传输控制协议对各数据帧和CRC码进行校验,从而检查是否有数据帧出现丢失或错误的情况;若有,则反馈至声波数据传输模块,执行下列操作:待其它数据帧传输完成后,重新发送出现丢失或错误情况的数据帧。Further, the sound wave data decoding module is used to completely decode each data frame, including: used to decode each data frame, restore the corresponding information codeword of each data frame and perform each data frame and CRC according to the transmission control protocol Check the code to check whether there is a loss or error in the data frame; if there is, it will be fed back to the acoustic data transmission module to perform the following operations: After the transmission of other data frames is completed, resend the lost or error data frame.
一种基于智能终端的声波传输二维码方法,包括以下步骤:A method for acoustically transmitting a two-dimensional code based on an intelligent terminal, comprising the following steps:
S1、扫描或生成二维码,并获取该二维码对应的二维码矩阵;S1. Scanning or generating a two-dimensional code, and obtaining a two-dimensional code matrix corresponding to the two-dimensional code;
S2、对所述二维码矩阵进行声波数据编码,得到编码数据;S2. Perform acoustic wave data encoding on the two-dimensional code matrix to obtain encoded data;
S3、利用扬声器将编码数据以各数据帧的形式传送至外界;S3. Using the loudspeaker to transmit the coded data to the outside in the form of each data frame;
S4、通过麦克风接收各数据帧并对各数据帧进行完全解码,得到解码数据;S4. Receive each data frame through a microphone and completely decode each data frame to obtain decoded data;
S5、将解码数据转化为二维码矩阵,重新生成对应的二维码并获取该二维码的原始信息。S5. Convert the decoded data into a two-dimensional code matrix, regenerate the corresponding two-dimensional code and obtain the original information of the two-dimensional code.
进一步,所述步骤S2对所述二维码矩阵进行声波数据编码,包括:对所述二维码矩阵进行信道编码、数字调制和PCM离散化处理。Further, the step S2 performing acoustic wave data encoding on the two-dimensional code matrix includes: performing channel coding, digital modulation and PCM discretization processing on the two-dimensional code matrix.
进一步,所述步骤S4中,对各数据帧进行完全解码,得到解码数据,包括以下步骤:Further, in the step S4, each data frame is completely decoded to obtain decoded data, including the following steps:
S41、对各数据帧进行解调和译码;S41. Demodulate and decode each data frame;
S42、对各数据帧进行同步;S42. Synchronize each data frame;
S43、判断各数据帧序号是否正确,若正确则读取CRC码,否则标记出正确的数据帧序号并返回步骤S41;S43, judging whether each data frame serial number is correct, if correct, then read the CRC code, otherwise mark the correct data frame serial number and return to step S41;
S44、对CRC码进行校验,判断数据帧的内容是否正确,若是则输出数据帧内容,否则标记出正确的数据帧序号并返回步骤S41。S44. Check the CRC code to determine whether the content of the data frame is correct, if so, output the content of the data frame, otherwise mark the correct serial number of the data frame and return to step S41.
进一步,根据传输控制协议对各数据帧和CRC码进行校验,所述的传输控制协议是基于数据帧及数据帧的译码而制定的;所述的数据帧用二进制表示,所述数据帧包括用于同步数据帧的4位起始频率标志、用于标识数据帧的m2(0<m2≤8)位数据帧序号、m3(36≤m3≤52)位的信息位、m4(8≤m4≤24)位的纠错位、4位间隔位、m6(8≤m2≤16)位CRC码和4位结束频率标志;其中,m3+m4=60。Further, each data frame and CRC code are checked according to the transmission control protocol, and the transmission control protocol is formulated based on the data frame and the decoding of the data frame; the data frame is expressed in binary, and the data frame Including 4-bit start frequency flag for synchronous data frame, m 2 (0<m 2 ≤8) bit data frame sequence number for identifying data frame, m 3 (36≤m 3 ≤52) bit information bit, m 4 (8≤m 4 ≤24) error correction bits, 4 interval bits, m 6 (8≤m 2 ≤16) CRC codes and 4 end frequency flags; among them, m 3 +m 4 =60 .
一种基于智能终端的声波传输二维码装置,包括处理器和用于存储处理器可执行指令的存储器;所述处理器读取可执行指令并执行以下步骤:An intelligent terminal-based acoustic wave transmission two-dimensional code device includes a processor and a memory for storing processor-executable instructions; the processor reads the executable instructions and performs the following steps:
扫描或生成二维码,并获取该二维码对应的二维码矩阵;Scan or generate a QR code, and obtain the QR code matrix corresponding to the QR code;
对所述二维码矩阵进行声波数据编码,得到编码数据;Carrying out acoustic wave data encoding to the two-dimensional code matrix to obtain encoded data;
利用扬声器将编码数据以各数据帧的形式传送至外界;Use the speaker to transmit the encoded data to the outside world in the form of each data frame;
通过麦克风接收各数据帧并对各数据帧进行完全解码,得到解码数据;Receive each data frame through a microphone and completely decode each data frame to obtain decoded data;
将解码数据转化为二维码矩阵,重新生成对应的二维码并获取该二维码的原始信息。Convert the decoded data into a two-dimensional code matrix, regenerate the corresponding two-dimensional code and obtain the original information of the two-dimensional code.
本发明的有益效果是:基于智能终端,对二维码进行声波传输,只需用户持有智能终端即可,利用智能终端内部的扬声器和麦克风实现二维码数据帧的传输和拾取,非常方便,即使在无移动网络或无线网络的情况下,依然能有效地进行数据传输,可以应用于酒店、餐馆、购物广场等人数众多的公共场合,免去大家排队扫码的尴尬;因此,本发明利用声波传输二维码,使用户无需再等待扫码,只需持有智能终端就可以实现二维码获取,有效了提升用户体验,满足用户快速智能的使用需求。The beneficial effect of the present invention is: based on the intelligent terminal, the two-dimensional code is transmitted by sound waves, only the user needs to hold the intelligent terminal, and the speaker and microphone inside the intelligent terminal are used to realize the transmission and pickup of the two-dimensional code data frame, which is very convenient , even if there is no mobile network or wireless network, data transmission can still be carried out effectively, and it can be applied to public places with a large number of people, such as hotels, restaurants, shopping malls, etc. Using sound waves to transmit QR codes, users no longer need to wait for scanning codes, and can obtain QR codes just by holding a smart terminal, which effectively improves user experience and meets users' needs for fast and intelligent use.
附图说明Description of drawings
下面结合附图给出本发明较佳实施例,以详细说明本发明的实施方案。The preferred embodiments of the present invention are given below in conjunction with the accompanying drawings to describe the implementation of the present invention in detail.
图1是本发明的系统的结构示意框图;Fig. 1 is a schematic block diagram of the structure of the system of the present invention;
图2是本发明的数据帧的结构示意图;Fig. 2 is the structural representation of the data frame of the present invention;
图3是本发明的方法的步骤S4的执行流程图。Fig. 3 is a flowchart of execution of step S4 of the method of the present invention.
具体实施方式Detailed ways
参照图1,一种基于智能终端的声波传输二维码系统,其特征在于:包括发送端和接收端,所述发送端包括依次连接设置的二维码矩阵产生模块、声波数据编码模块和声波数据传输模块,所述接收端包括依次连接设置的声波数据解码模块和二维码矩阵转化模块,所述声波数据传输模块连接到声波数据解码模块;With reference to Fig. 1, a kind of sound wave transmission two-dimensional code system based on intelligent terminal is characterized in that: comprise sending end and receiving end, described sending end comprises the two-dimensional code matrix generation module that connects setting successively, sound wave data coding module and sound wave A data transmission module, the receiving end includes a sound wave data decoding module and a two-dimensional code matrix conversion module connected in sequence, and the sound wave data transmission module is connected to the sound wave data decoding module;
所述二维码矩阵产生模块,用于扫描或生成二维码,并获取该二维码对应的二维码矩阵;The two-dimensional code matrix generating module is used to scan or generate a two-dimensional code, and obtain a two-dimensional code matrix corresponding to the two-dimensional code;
所述声波数据编码模块,用于对所述二维码矩阵进行声波数据编码,得到编码数据;The acoustic data encoding module is used to encode the acoustic wave data on the two-dimensional code matrix to obtain encoded data;
所述声波数据传输模块,用于利用扬声器将编码数据以各数据帧的形式传送至声波数据解码模块;The acoustic wave data transmission module is used to transmit the encoded data to the acoustic wave data decoding module in the form of each data frame by using a speaker;
所述声波数据解码模块,用于通过麦克风接收各数据帧并对各数据帧进行完全解码,得到解码数据;The sound wave data decoding module is used to receive each data frame through a microphone and completely decode each data frame to obtain decoded data;
所述二维码矩阵转化模块,用于将解码数据转化为二维码矩阵,重新生成对应的二维码并获取该二维码的原始信息。The two-dimensional code matrix conversion module is used to convert the decoded data into a two-dimensional code matrix, regenerate the corresponding two-dimensional code and obtain the original information of the two-dimensional code.
具体地,发送端和接收端可以实现一对一以及一对多的声波传输,并不限制,可以是手机、平板等设备,只需在这些设备上集成本系统的这些模块即可实现,在技术方面降低了很大的制造难度,便于推广;由于扬声器和麦克风是智能终端上都会集成设置的部件,因此并未对这两个部件作任何限制。Specifically, the sending end and the receiving end can realize one-to-one and one-to-many sound wave transmission, which is not limited. It can be mobile phones, tablets and other devices. It can be realized by integrating these modules of the system on these devices. In terms of technology, it reduces a lot of manufacturing difficulty and facilitates popularization; since the speaker and the microphone are components that will be integrated and set on the smart terminal, there is no restriction on these two components.
由于人耳对高频率的声波信号不是很敏感,这种高频信号不会对人产生干扰,而且现有的智能终端设备内置的扬声器和麦克风的频率响应特性都能满足使用高频声波信号进行数据传输的要求。采用高频声波进行二维码传输无需花费额外的芯片成本以及电路成本,即使在无移动网络或者无线网络的情况下,依然能有效地进行数据传输。该方案可以在酒店、餐馆和购物广场等人数众多的公共场合大显身手,顾客无需扫码,只需在手机内附带该功能的APP中点击按钮接收该声波二维码即可获取相应信息,就如本发明所示的装置,无需打开摄像头扫描,使生活变得更加智能。Since the human ear is not very sensitive to high-frequency sound wave signals, such high-frequency signals will not interfere with people, and the frequency response characteristics of the built-in speakers and microphones of existing smart terminal devices can meet the requirements of high-frequency sound wave signals. Data Transfer Requirements. The use of high-frequency sound waves for two-dimensional code transmission does not require additional chip costs and circuit costs, and data transmission can still be effectively performed even in the absence of a mobile network or wireless network. This solution can be used in public places with a large number of people, such as hotels, restaurants, and shopping malls. Customers do not need to scan the code, but only need to click the button in the APP with this function in the mobile phone to receive the sound wave QR code to obtain the corresponding information, just like The device shown in the present invention does not need to open the camera to scan, making life more intelligent.
进一步,所述声波数据编码模块,用于对所述二维码矩阵进行声波数据编码,包括:用于对所述二维码矩阵进行信道编码、数字调制和PCM离散化处理。Further, the acoustic wave data encoding module, configured to perform acoustic wave data encoding on the two-dimensional code matrix, includes: performing channel encoding, digital modulation and PCM discretization processing on the two-dimensional code matrix.
进一步,所述声波数据解码模块,用于对各数据帧进行完全解码,包括:用于对各数据帧进行解码,恢复各数据帧的相应信息码字并根据传输控制协议对各数据帧和CRC码进行校验,从而检查是否有数据帧出现丢失或错误的情况;若有,则反馈至声波数据传输模块,执行下列操作:待其它数据帧传输完成后,重新发送出现丢失或错误情况的数据帧。Further, the sound wave data decoding module is used to completely decode each data frame, including: used to decode each data frame, restore the corresponding information codeword of each data frame and perform each data frame and CRC according to the transmission control protocol Check the code to check whether there is a loss or error in the data frame; if there is, it will be fed back to the acoustic data transmission module to perform the following operations: After the transmission of other data frames is completed, resend the lost or error data frame.
一种基于智能终端的声波传输二维码方法,包括以下步骤:A method for acoustically transmitting a two-dimensional code based on an intelligent terminal, comprising the following steps:
S1、扫描或生成二维码,并获取该二维码对应的二维码矩阵;S1. Scanning or generating a two-dimensional code, and obtaining a two-dimensional code matrix corresponding to the two-dimensional code;
S2、对所述二维码矩阵进行声波数据编码,得到编码数据;S2. Perform acoustic wave data encoding on the two-dimensional code matrix to obtain encoded data;
S3、利用扬声器将编码数据以各数据帧的形式传送至外界;S3. Using the loudspeaker to transmit the coded data to the outside in the form of each data frame;
S4、通过麦克风接收各数据帧并对各数据帧进行完全解码,得到解码数据;S4. Receive each data frame through a microphone and completely decode each data frame to obtain decoded data;
S5、将解码数据转化为二维码矩阵,重新生成对应的二维码并获取该二维码的原始信息。S5. Convert the decoded data into a two-dimensional code matrix, regenerate the corresponding two-dimensional code and obtain the original information of the two-dimensional code.
进一步,所述步骤S2对所述二维码矩阵进行声波数据编码,包括:对所述二维码矩阵进行信道编码、数字调制和PCM离散化处理。Further, the step S2 performing acoustic wave data encoding on the two-dimensional code matrix includes: performing channel coding, digital modulation and PCM discretization processing on the two-dimensional code matrix.
进一步,参照图3,所述步骤S4中,对各数据帧进行完全解码,得到解码数据,包括以下步骤:Further, with reference to Fig. 3, in the step S4, each data frame is completely decoded to obtain decoded data, including the following steps:
S41、对各数据帧进行解调和译码;S41. Demodulate and decode each data frame;
S42、对各数据帧进行同步;S42. Synchronize each data frame;
S43、判断各数据帧序号是否正确,若正确则读取CRC码,否则标记出正确的数据帧序号并返回步骤S41;S43, judging whether each data frame serial number is correct, if correct, then read the CRC code, otherwise mark the correct data frame serial number and return to step S41;
S44、对CRC码进行校验,判断数据帧的内容是否正确,若是则输出数据帧内容,否则标记出正确的数据帧序号并返回步骤S41。S44. Check the CRC code to determine whether the content of the data frame is correct, if so, output the content of the data frame, otherwise mark the correct serial number of the data frame and return to step S41.
参照图2,根据传输控制协议对各数据帧和CRC码进行校验,所述的传输控制协议是基于数据帧及数据帧的译码而制定的;所述的数据帧用二进制表示,所述数据帧包括用于同步数据帧的4位起始频率标志、用于标识数据帧的m2(0<m2≤8)位数据帧序号、m3(36≤m3≤52)位的信息位、m4(8≤m4≤24)位的纠错位、4位间隔位、m6(8≤m2≤16)位CRC码和4位结束频率标志;其中,m3+m4=60。With reference to Fig. 2, each data frame and CRC code are checked according to transmission control protocol, and described transmission control protocol is based on the decoding of data frame and data frame and formulates; Described data frame is represented by binary, and described The data frame includes a 4-bit start frequency flag for synchronizing the data frame, an m 2 (0<m 2 ≤8) bit data frame sequence number for identifying the data frame, and m 3 (36≤m 3 ≤52) bit information bit, m 4 (8≤m 4 ≤24) bit error correction bit, 4-bit interval bit, m 6 (8≤m 2 ≤16) bit CRC code and 4-bit end frequency flag; among them, m 3 +m 4 =60.
具体地,步骤S1扫描或生成二维码包括进行二维码的扫描或者根据传输的原始数据生成二维码,再获取其矩阵,一般而言,矩阵中“0”对应二维码图片中白色小方块,“1”对应二维码图片中黑色小方块;继续对上一步获得的二维码0/1矩阵数据进行二进制转十六进制处理,将二维码矩阵转化为十六进制码字。Specifically, scanning or generating a two-dimensional code in step S1 includes scanning the two-dimensional code or generating a two-dimensional code according to the transmitted original data, and then obtaining its matrix. Generally speaking, "0" in the matrix corresponds to the white color in the two-dimensional code picture The small square, "1" corresponds to the small black square in the QR code picture; continue to convert the binary to hexadecimal data of the QR code 0/1 matrix obtained in the previous step, and convert the QR code matrix into hexadecimal numbers.
将上述十六进制码字填入数据帧,然后进行声波数据编码,声波数据编码包括RS编码和数字调制,使用扬声器将编码后的数据以数据帧的形式依次播放到外界空气中。Fill the above-mentioned hexadecimal code words into the data frame, and then perform acoustic wave data encoding, which includes RS encoding and digital modulation, and use speakers to play the encoded data in the form of data frames to the outside air in sequence.
数据帧的解码包括信号的放大、带通滤波、解调以及RS纠错码译码。待所有数据帧成功解码后,即重新得到二维码0/1矩阵,从而可重新生成二维码图片,也可以通过二维码解码算法获得二维码的原始信息或者数据流。The decoding of the data frame includes signal amplification, band-pass filtering, demodulation and RS error correction code decoding. After all the data frames are successfully decoded, the two-dimensional code 0/1 matrix can be obtained again, so that the two-dimensional code picture can be regenerated, and the original information or data stream of the two-dimensional code can also be obtained through the two-dimensional code decoding algorithm.
一种基于智能终端的声波传输二维码装置,包括处理器和用于存储处理器可执行指令的存储器;所述处理器读取可执行指令并执行以下步骤:An intelligent terminal-based acoustic wave transmission two-dimensional code device includes a processor and a memory for storing processor-executable instructions; the processor reads the executable instructions and performs the following steps:
扫描或生成二维码,并获取该二维码对应的二维码矩阵;Scan or generate a QR code, and obtain the QR code matrix corresponding to the QR code;
对所述二维码矩阵进行声波数据编码,得到编码数据;Carrying out acoustic wave data encoding to the two-dimensional code matrix to obtain encoded data;
利用扬声器将编码数据以各数据帧的形式传送至外界;Use the speaker to transmit the encoded data to the outside world in the form of each data frame;
通过麦克风接收各数据帧;Receive each data frame through the microphone;
对各数据帧进行完全解码,得到解码数据;Completely decode each data frame to obtain decoded data;
将解码数据转化为二维码矩阵,重新生成对应的二维码并获取该二维码的原始信息。Convert the decoded data into a two-dimensional code matrix, regenerate the corresponding two-dimensional code and obtain the original information of the two-dimensional code.
具体地,该装置可以以软件APP的形式被设计出,从而供各智能终端进行下载,比如发送二维码的智能终端可通过该APP传送二维码,接收二维码的智能终端通过该APP接收并还原二维码,从而实现传输,可见非常方便,只需用智能终端就可实现。Specifically, the device can be designed in the form of a software APP, so as to be downloaded by each smart terminal. For example, a smart terminal sending a QR code can send a QR code through the APP, and a smart terminal receiving a QR code can use the APP to download the QR code. It can be seen that it is very convenient to receive and restore the QR code to realize the transmission, and it can be realized only with a smart terminal.
以上内容对本发明的较佳实施例和基本原理作了详细论述,但本发明并不局限于上述实施方式,熟悉本领域的技术人员应该了解在不违背本发明精神的前提下还会有各种等同变形和替换,这些等同变形和替换都落入要求保护的本发明范围内。The above content has discussed in detail the preferred embodiments and basic principles of the present invention, but the present invention is not limited to the above-mentioned embodiments, and those skilled in the art should understand that there are various other methods without violating the spirit of the present invention. Equivalent modifications and replacements all fall within the scope of the claimed invention.
Claims (8)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810352059.5A CN108809442A (en) | 2018-04-19 | 2018-04-19 | A kind of sonic transmissions 2 D code system based on intelligent terminal, method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810352059.5A CN108809442A (en) | 2018-04-19 | 2018-04-19 | A kind of sonic transmissions 2 D code system based on intelligent terminal, method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108809442A true CN108809442A (en) | 2018-11-13 |
Family
ID=64095636
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810352059.5A Pending CN108809442A (en) | 2018-04-19 | 2018-04-19 | A kind of sonic transmissions 2 D code system based on intelligent terminal, method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108809442A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110011749A (en) * | 2019-04-10 | 2019-07-12 | 中山大学 | A physical layer security communication method based on destructive interference of acoustic waves in multi-carrier modulation |
CN115013581A (en) * | 2022-05-12 | 2022-09-06 | 中国人民解放军国防科技大学 | A method and device for communicating with a water pipe using an intelligent water valve |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120129249A (en) * | 2011-05-19 | 2012-11-28 | 부산대학교 산학협력단 | Method for setting up a WLAN connection and resolving the indoor locastion of a station using the QRQuick Response code and sound wave |
CN102905196A (en) * | 2012-09-28 | 2013-01-30 | 杭州锐昂科技有限公司 | Method and system for sending information from television to mobile terminal |
CN103747012A (en) * | 2013-08-01 | 2014-04-23 | 戴林巧 | Security verification method, device and system of network transaction |
US20150310416A1 (en) * | 2012-11-30 | 2015-10-29 | Rakuten, Inc. | Electronic money system, electronic value transfer method, mobile terminal, method for controlling mobile terminal, program product, and recording medium on which program product is recorded |
CN105980977A (en) * | 2013-09-23 | 2016-09-28 | 帕沃思科技有限公司 | Device and method for outputting sound wave for content synchronization between devices and operation control for external device, and external device |
US9471698B1 (en) * | 2015-12-02 | 2016-10-18 | International Business Machines Corporation | Embedding, transmitting and receiving data in an audio file |
CN106845953A (en) * | 2017-01-23 | 2017-06-13 | 上海讯联数据服务有限公司 | Mobile payment information processor and method of mobile payment and system |
CN107393066A (en) * | 2017-06-30 | 2017-11-24 | 北京康得新创科技股份有限公司 | Unlocking method, terminal, server and the system for unlocking of smart lock |
CN107733532A (en) * | 2017-09-28 | 2018-02-23 | 阿里巴巴集团控股有限公司 | Information interacting method, device and equipment |
-
2018
- 2018-04-19 CN CN201810352059.5A patent/CN108809442A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120129249A (en) * | 2011-05-19 | 2012-11-28 | 부산대학교 산학협력단 | Method for setting up a WLAN connection and resolving the indoor locastion of a station using the QRQuick Response code and sound wave |
CN102905196A (en) * | 2012-09-28 | 2013-01-30 | 杭州锐昂科技有限公司 | Method and system for sending information from television to mobile terminal |
US20150310416A1 (en) * | 2012-11-30 | 2015-10-29 | Rakuten, Inc. | Electronic money system, electronic value transfer method, mobile terminal, method for controlling mobile terminal, program product, and recording medium on which program product is recorded |
CN103747012A (en) * | 2013-08-01 | 2014-04-23 | 戴林巧 | Security verification method, device and system of network transaction |
CN105980977A (en) * | 2013-09-23 | 2016-09-28 | 帕沃思科技有限公司 | Device and method for outputting sound wave for content synchronization between devices and operation control for external device, and external device |
US9471698B1 (en) * | 2015-12-02 | 2016-10-18 | International Business Machines Corporation | Embedding, transmitting and receiving data in an audio file |
CN106845953A (en) * | 2017-01-23 | 2017-06-13 | 上海讯联数据服务有限公司 | Mobile payment information processor and method of mobile payment and system |
CN107393066A (en) * | 2017-06-30 | 2017-11-24 | 北京康得新创科技股份有限公司 | Unlocking method, terminal, server and the system for unlocking of smart lock |
CN107733532A (en) * | 2017-09-28 | 2018-02-23 | 阿里巴巴集团控股有限公司 | Information interacting method, device and equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110011749A (en) * | 2019-04-10 | 2019-07-12 | 中山大学 | A physical layer security communication method based on destructive interference of acoustic waves in multi-carrier modulation |
CN110011749B (en) * | 2019-04-10 | 2021-02-05 | 中山大学 | A physical layer security communication method based on destructive interference of acoustic waves in multi-carrier modulation |
CN115013581A (en) * | 2022-05-12 | 2022-09-06 | 中国人民解放军国防科技大学 | A method and device for communicating with a water pipe using an intelligent water valve |
CN115013581B (en) * | 2022-05-12 | 2024-09-24 | 中国人民解放军国防科技大学 | Method and device for realizing communication with water delivery pipe by using intelligent water valve |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107481709B (en) | Audio data transmission method and device | |
CN203289452U (en) | Wireless audio system based on acoustic wave communication pairing | |
CN104184496B (en) | Bluetooth data/control information transmission module, interactive system and method thereof | |
US20050186993A1 (en) | Communication apparatus for playing sound signals | |
CN103095814B (en) | A kind of closely sharing method, client, server and system of the sound driver based on information network | |
WO2018209851A1 (en) | Translation method and translation system | |
CN112770212B (en) | Wireless earphone, video recording system and method, and storage medium | |
CN108809442A (en) | A kind of sonic transmissions 2 D code system based on intelligent terminal, method and apparatus | |
CN200990664Y (en) | Television set capable of realizing long-distance video frequency conversational function | |
CN100563334C (en) | Method for transmitting image data in video phone mode of wireless terminal | |
CN118413511A (en) | Letter download query method, system and related device in Beidou communication system | |
TW201328226A (en) | Method and device for information transmission | |
KR100800771B1 (en) | Apparatus and method for outputting external audio data through a mobile terminal | |
CN113055713B (en) | Video image super-division method and device, storage medium and electronic equipment | |
CN112802485B (en) | Voice data processing method and device, computer equipment and storage medium | |
CN104427639A (en) | Control method for establishing wireless network connection through modulation tone | |
CN206865562U (en) | Mobile phone extension system using Wi‑Fi network | |
WO2008064541A1 (en) | Method and network for implementing computer voice communication based on wireless communication terminal | |
CN101166279A (en) | Content transmission method and apparatus using video call | |
CN222940809U (en) | A wireless telegraph signal automatic receiving and decoding circuit | |
CN216362348U (en) | NFC conference audio amplifier | |
CN117498892B (en) | UWB-based audio transmission method, device, terminal and storage medium | |
CN101833678B (en) | Data card for computer system and related computer system | |
TW202008752A (en) | Real-time communication system and dynamic expression rendering device | |
CN213485152U (en) | Bluetooth BLE-based one-to-two wireless microphone |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181113 |
|
RJ01 | Rejection of invention patent application after publication |