An ultrasonic communication decoding method, encoding method and related devices

By using deep learning models for packet header detection and encoding classification in ultrasonic communication, the problems of anti-interference and device dependence in ultrasonic communication decoding methods are solved, enabling longer-distance and more stable communication.

CN115865219BActive Publication Date: 2026-05-01SUZHOU QIMENGZHE NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU QIMENGZHE NETWORK TECH CO LTD
Filing Date
2022-11-15
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing ultrasonic communication decoding methods have weak anti-interference capabilities, limited transmission distance, and high equipment dependence.

Method used

A packet header detection and ultrasonic coding classification method based on a deep learning model is adopted. By framing the received ultrasonic signal and extracting spectral energy features, the packet header detection model and ultrasonic coding classification model are used to decode the data packets, thereby improving anti-interference and reducing dependence on equipment and distance.

Benefits of technology

It significantly improves the anti-interference capability of ultrasonic communication, reduces dependence on transmission distance and equipment, supports parallel coding, and can encode multiple symbols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115865219B_ABST
    Figure CN115865219B_ABST
Patent Text Reader

Abstract

The application provides an ultrasonic communication decoding method, an encoding method and related devices, wherein the decoding method comprises: framing a received ultrasonic signal, and extracting a frequency spectrum energy feature of each frame; sending the frequency spectrum energy feature of each frame into a packet header detection model for classification; if the classification results of T consecutive frames are all packet headers, it is considered that a data packet starts, otherwise, detection is continued; if it is detected that the data packet starts, an ultrasonic encoding classification model is used to classify subsequent data frames; for each data frame, the output of the ultrasonic encoding classification model is M nodes, corresponding to M ultrasonic frequency bands; and the classification result of a frame with the maximum posterior probability in each ultrasonic encoding bit interval is selected in turn as the decoding result of the encoding bit. Since the packet header detection and bit decoding in the decoding process both adopt a model-based classification method, the anti-interference performance of ultrasonic wave communication can be obviously improved, and the dependence on distance and equipment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to acoustic communication technology, and more particularly to an ultrasonic communication decoding method, encoding method, and related apparatus. Background Technology

[0002] Acoustic communication, a near-field communication (NFC) solution that has emerged in recent years, is favored by electronics developers due to its low cost and ease of deployment. Ultrasonic communication, in particular, is popular because of its discreet nature. Ultrasonic communication uses a high-frequency carrier wave to encode the data to be transmitted before sending it. During decoding, the traditional method involves detecting the encoded information in each frequency band using a frequency domain energy threshold to recover the transmitted data. However, traditional ultrasonic communication decoding methods suffer from weak anti-interference capabilities, limited transmission distance, and device dependence. Summary of the Invention

[0003] The purpose of this invention is to provide an ultrasonic communication decoding method, encoding method, and related apparatus, which can significantly improve the anti-interference capability of ultrasonic communication and reduce dependence on distance and equipment.

[0004] The following provides a brief overview of one or more aspects to offer a basic understanding of them. This overview is not an exhaustive summary of all conceived aspects, nor is it intended to identify key or decisive elements of all aspects, nor to define the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form to prepare for the more detailed descriptions that follow.

[0005] According to a first aspect of the present invention, an ultrasonic communication decoding method is provided for decoding ultrasonic coded data packets, wherein the ultrasonic coded data packets consist of N coded bits, wherein the packet header is n1 bits, the data is n2 bits, and the check bit is n3 bits, and each coded bit consists of M ultrasonic frequency bands. The ultrasonic communication decoding method includes:

[0006] The received ultrasound signal is segmented into frames, and the spectral energy characteristics of each frame are extracted.

[0007] The spectral energy features of each frame are fed into the packet header detection model for classification. If the classification results of T consecutive frames are all packet headers, the data packet is considered to have started; otherwise, the detection continues.

[0008] If the start of a data packet is detected, an ultrasonic coding classification model is used to classify subsequent data frames;

[0009] For each data frame, the output of the ultrasound coding classification model consists of M nodes, corresponding to M ultrasound frequency bands. If the output of a node is 1, it means that the data frame contains that frequency band; otherwise, it means that it does not.

[0010] The classification result of the frame with the highest posterior probability is selected from each ultrasound coding bit interval as the decoding result of that coding bit.

[0011] In one embodiment, the head detection model and the ultrasonic coding classification model are deep learning models.

[0012] In one embodiment, the head detection model employs a lower complexity structure and a smaller step size than the ultrasonic coding classification model.

[0013] In one embodiment, the training data for the head detection model and the ultrasonic coding classification model includes: various transmission distances, various signal transmission intensities, various types of transmitting and receiving devices, different relative orientations of receiving and transmitting devices, and real and simulated data collected under various noise environments.

[0014] In one embodiment, extracting the spectral energy features of each frame includes:

[0015] Perform FFT processing on each frame of the signal to extract the spectral energy features F of each frequency band. i ;

[0016] Only the spectral energy characteristics within a specific frequency band are retained;

[0017] Using the spectral energy of a fixed-frequency ultrasonic signal as a reference F ref Spectral energy F for other frequency components i Normalization is performed using the following formula:

[0018]

[0019] Wherein: F ref The reference frequency band's spectral energy is represented by i, where i is the frequency band number.

[0020] Extracting normalized spectral energy features This serves as the spectral energy characteristic of the frame.

[0021] In one embodiment, when no interval bits are set between the encoded bits of the ultrasonic encoded data packet, the interval of each encoded bit is determined with reference to the detected packet header position;

[0022] When there are interval bits between the encoded bits of the ultrasonic encoded data packet, the interval bits are detected by the ultrasonic encoding classification model to distinguish different encoded bits.

[0023] According to a second aspect of the present invention, an ultrasonic communication coding method is provided, comprising:

[0024] The frequency band of each coded bit is divided into M sub-bands, and a symbol is encoded in groups of m sub-bands, where m ≤ M;

[0025] The N-bit encoding bits are used to form an ultrasonic encoded data packet, which consists of a header of n1 bits, data of n2 bits, and a check bit of n3 bits.

[0026] In one embodiment, the first subband of each coded bit is an empty subband, used to separate subband groups.

[0027] According to a third aspect of the present invention, an ultrasonic communication decoding device is provided, comprising:

[0028] The receiving module is used to receive ultrasonic coded data packets, which consist of N coded bits, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits. Each coded bit consists of M ultrasonic frequency bands.

[0029] The feature extraction module is used to segment the received ultrasound signal into frames and extract the spectral energy features of each frame.

[0030] The packet header detection module is used to input the spectral energy features of each frame into the packet header detection model for classification. If the classification results of T consecutive frames are all packet headers, the data packet is considered to have started; otherwise, the detection continues.

[0031] The bit decoding module is used to classify subsequent data frames using an ultrasonic coding classification model when the start of a data packet is detected. The output of the ultrasonic coding classification model for each data frame is M nodes, corresponding to M ultrasonic frequency bands. If the output of a node is 1, it means that the data frame contains the frequency band; otherwise, it means that it does not contain it. The result of the frame with the highest classification probability is selected from each ultrasonic coding bit interval as the decoding result of that coding bit.

[0032] According to a fourth aspect of the present invention, an ultrasonic communication encoding device is provided, comprising:

[0033] The encoding module is used to generate ultrasonic encoded data packets. The frequency band of each encoded bit of the ultrasonic encoded data packet is divided into M sub-bands. Each m sub-band is grouped into a symbol, where m ≤ M. N encoded bits form an ultrasonic encoded data packet, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits.

[0034] The transmitting module is used to transmit ultrasonic coded data packets.

[0035] The beneficial effects of this invention are: both packet header detection and bit decoding in the decoding process adopt a model-based classification method, which can significantly improve the anti-interference capability of ultrasonic communication and reduce dependence on distance and equipment. The encoding process supports parallel encoding and can encode multiple symbols with one encoding bit. Attached Figure Description

[0036] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0037] The above-described features and advantages of the present invention will be better understood after reading the following detailed description of embodiments of the present disclosure in conjunction with the accompanying drawings. In the drawings, components are not necessarily drawn to scale, and components having similar related characteristics or features may have the same or similar reference numerals.

[0038] Figure 1 This is a flowchart of the decoding method according to an embodiment of this application;

[0039] Figure 2 This is a schematic diagram of the encoding principle of an embodiment of this application;

[0040] Figure 3 This is a schematic diagram of the encoded ultrasonic spectrum;

[0041] Figure 4 This is a schematic diagram of the module of the decoding device according to an embodiment of this application;

[0042] Figure 5 This is a schematic diagram of the encoding device according to an embodiment of this application. Detailed Implementation

[0043] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. It should be noted that the aspects described below with reference to the accompanying drawings and specific embodiments are merely exemplary and should not be construed as limiting the scope of protection of the present invention in any way.

[0044] like Figure 1 As shown in the figure, this application provides an ultrasonic communication decoding method for decoding ultrasonic coded data packets. The ultrasonic coded data packets consist of N coded bits, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits. Each coded bit consists of M ultrasonic frequency bands. The ultrasonic communication decoding method includes:

[0045] The received ultrasound signal is segmented into frames, and the spectral energy features of each frame are extracted. First, each frame is processed using FFT (Fast Fourier Transform) to extract the spectral energy features of each frequency band. Then, only the spectral energy features within a specific frequency band are retained, typically 16kHz to 24kHz. For example, if the ultrasound encoded data packet uses the 16kHz-18kHz frequency band for signal encoding, only the spectral energy features between 16kHz and 18kHz are extracted and retained. Next, using the spectral energy of a fixed-frequency ultrasound signal as a reference, the spectral energy of other frequency components is analyzed. i Normalization is performed using the following formula:

[0046]

[0047] Wherein: F ref The spectral energy is for the reference frequency band.

[0048] Extract the normalized spectral energy features as the spectral energy features of the frame. Feed the spectral energy features of each frame into the packet header detection model for classification. If it is a packet header, output 1; otherwise, output 0. If the classification results of T consecutive frames are all packet headers, then a data packet is considered to have started; otherwise, continue detection.

[0049] If the start of a data packet is detected, an ultrasonic coding classification model is used to classify subsequent data frames.

[0050] For each data frame, the output of the ultrasound coding classification model consists of M nodes, corresponding to M ultrasound frequency bands. If the output of a node is 1, it means that the data frame contains that frequency band; otherwise, it means that it does not. In other words, the classification model operates on a frame-by-frame basis, outputting M 0 / 1 values ​​for each frame, and these M 0 / 1 values ​​represent one coded symbol.

[0051] The classification result of the frame with the highest posterior probability is selected from each ultrasound coding bit interval as the decoding result of that coding bit.

[0052] Figure 2 This is a schematic diagram of an encoding. f1 and f2 represent two different frequency components. The horizontal axis represents time, indicating the moment and duration of the frequency component's occurrence, which can be used to represent different information. The bottom part represents the 0 / 1 information bits. Figure 3 An encoded ultrasonic spectrum is displayed.

[0053] Preferably, both the packet head detection model and the ultrasonic coding classification model used in this method are deep learning models. For example, basic DNN / CNN / CNN+DNN structure models, encoder / decoder structure models, or more complex structure models can be used, depending on the computing power of the deployment platform and the complexity of the application environment. The packet head detection model should use a lower complexity structure and a smaller step size than the ultrasonic coding classification model.

[0054] The Baotou detection model and ultrasonic coding classification model were pre-trained. The training data included: various transmission distances, various signal transmission intensities, various types of transmitting and receiving devices, the relative orientations of different receiving and transmitting devices, and a large amount of real and simulated data under various noise environments, in order to improve the anti-interference capability of the passage.

[0055] In this method, when no interval bits are set between the coding bits of the ultrasonic coded data packet, the detected packet header position is used as a reference to determine the interval of each coding bit; when an interval bit is set between the coding bits of the ultrasonic coded data packet, the interval bit is detected by the ultrasonic coding classification model to distinguish different coding bits. The code interval interval is equivalent to the region where the energy of all ultrasonic frequency bands is zero, and the M nodes output by the model are all 0.

[0056] The following is a specific decoding example:

[0057] Each bit of the ultrasonic coded data packet encodes one symbol, with a duration of 0.04s. It consists of 8 frequency sub-bands, using the 16kHz-18kHz frequency band for signal encoding. The data packet header consists of 1 bit, the data bits are 8 bits, the CRC check bit is 1 bit, and the received ultrasonic signal is sampled at 48kHz.

[0058] First, frame segmentation is performed with a frame length of 1024 and a frame shift of 256. Then, FFT processing is performed on each frame to extract the spectral energy features of each frequency band. Only the spectral energy features between 16000Hz and 18000Hz are retained. The spectral energy of all spectral energy features is normalized using the spectral energy of the frequency band closest to 16200Hz (frequency band number: 345), and the spectral energy features between 16200Hz and 18000Hz are extracted as the final features. This feature is fed into a pre-trained packet header detection model with a step size of 256. If three consecutive frames detect a packet header, data reception begins; otherwise, detection continues. Taking the second frame with detected packet header as a reference, the model steps forward by 7 + 8*i frames (i = 0, ..., 8, where i is the number of encoding bits), and the corresponding frame features are fed into the ultrasonic coding classification model to obtain the symbol code and check bit corresponding to each data bit. A CRC check is performed to confirm that the data is correct, and the corresponding encoded symbol is output.

[0059] In the above embodiment, after FFT, the frequency band energy between numbers 343 and 383 is extracted, corresponding to the ultrasonic energy features between 16100Hz and 18000Hz. A total of 41-dimensional spectral energy features are extracted. The Baotou detection model adopts a 4-layer DNN model of 16*16*8*2, while the ultrasonic coding classification model adopts a 2-layer 2D-CNN + 2-layer DNN structure.

[0060] like Figure 2 and Figure 3 As shown in the embodiments of this application, an ultrasonic communication coding method is also provided, including:

[0061] The frequency band of each coded bit is divided into M sub-bands, and a symbol is encoded in groups of m sub-bands, where m ≤ M;

[0062] The N-bit encoding bits are used to form an ultrasonic encoded data packet, which consists of a header of n1 bits, data of n2 bits, and a check bit of n3 bits.

[0063] The first subband of each coding bit is an empty subband, used to separate subband groups.

[0064] The following is a specific encoding example:

[0065] The frequency band from 16kHz to 24kHz is evenly divided into 40 sub-bands at 200Hz intervals. Each group of 10 sub-bands encodes one symbol. The functions of the 10 sub-bands are allocated as follows: Let the starting frequency be f. The first sub-band is empty and used to separate sub-band groups; the second sub-band has a center frequency of (f+400)Hz and contains an ultrasonic signal with a frequency of (f+400)Hz, used as a sub-band energy reference; the center frequencies of the third to tenth sub-bands are (f+600)Hz, ..., (f+2000)Hz, corresponding to an 8-bit binary code for a character. If the binary code is 1, the sub-band frequency signal is included; if the binary code is 0, the sub-band frequency signal is not included. Thus, four characters can be encoded in one bit. During decoding, the corresponding frequency band intervals are sequentially divided according to the pre-set sub-band groupings, and then bit-by-bit decoding is performed.

[0066] The subbands in the frequency band can be divided uniformly or non-uniformly. In another embodiment, the frequency band from 16 kHz to 24 kHz is non-uniformly divided into 40 subbands with variable intervals, and each group of 10 subbands is encoded as a symbol.

[0067] like Figure 4 As shown, this application embodiment provides an ultrasonic communication decoding device 300, including:

[0068] The receiving module 301 is used to receive ultrasonic coded data packets, which consist of N coded bits, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits. Each coded bit consists of M ultrasonic frequency bands. The receiving module 301 can be a receiving device such as a microphone.

[0069] The feature extraction module 302 is used to segment the received ultrasound signal into frames and extract the spectral energy features of each frame.

[0070] The packet header detection module 303 is used to input the spectral energy features of each frame into the packet header detection model for classification. If the classification results of T consecutive frames are all packet headers, the data packet is considered to have started; otherwise, the detection continues.

[0071] The bit decoding module 304 is used to classify subsequent data frames using an ultrasonic coding classification model when the start of a data packet is detected. The output of the ultrasonic coding classification model for each data frame is M nodes, corresponding to M ultrasonic frequency bands. If the output of a node is 1, it means that the data frame contains the frequency band; otherwise, it means that it does not contain it. The result of the frame with the highest classification probability is selected from each ultrasonic coding bit interval as the decoding result of the coding bit.

[0072] The feature extraction module 302, the packet header detection module 303, and the bit decoding module 304 can be integrated into the processor in software.

[0073] like Figure 5 As shown in the figure, this application embodiment also provides an ultrasonic communication encoding device 400, including:

[0074] Encoding module 401 is used to generate ultrasonic coded data packets. The frequency band of each coded bit of the ultrasonic coded data packet is divided into M sub-bands. Each group of m sub-bands is used to encode a symbol, where m ≤ M. N coded bits constitute the ultrasonic coded data packet, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits. Encoding module 401 can be integrated into the processor in software form.

[0075] Transmitting module 402 is used to transmit ultrasonic encoded data packets. Transmitting module 402 can be a speaker or an ultrasonic generator, etc.

[0076] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0077] The prior description of this disclosure is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to this disclosure will be apparent to those skilled in the art, and the general principles defined herein may be applied to other variations without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not intended to be limited to the examples and designs described herein, but should be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0078] The above description is merely a preferred example of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application shall be included within the scope of protection of this application.

Claims

1. An ultrasonic communication decoding method for decoding ultrasonic coded data packets, characterized in that, The ultrasonic coded data packet consists of N coded bits, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits. Each coded bit consists of M ultrasonic frequency bands. The ultrasonic communication decoding method includes: The received ultrasound signal is segmented into frames, and the spectral energy characteristics of each frame are extracted. The spectral energy features of each frame are fed into the packet header detection model for classification. If the classification results of T consecutive frames are all packet headers, the data packet is considered to have started; otherwise, the detection continues. If the start of a data packet is detected, an ultrasonic coding classification model is used to classify subsequent data frames; For each data frame, the output of the ultrasound coding classification model consists of M nodes, corresponding to M ultrasound frequency bands. If the output of a node is 1, it means that the data frame contains that frequency band; otherwise, it means that it does not. The classification result of the frame with the highest posterior probability is selected sequentially from each ultrasound coding bit interval as the decoding result of that coding bit; The head detection model and the ultrasonic coding classification model are deep learning models; the head detection model adopts a 4-layer DNN model, while the ultrasonic coding classification model adopts a 2-layer 2D-CNN + 2-layer DNN structure. The extraction of spectral energy features for each frame includes: Perform FFT processing on each frame of the signal to extract the spectral energy features of each frequency band. ; Only the spectral energy characteristics within a specific frequency band are retained; Using the spectral energy of a fixed-frequency ultrasonic signal as a reference Spectral energy of other frequency components Normalization is performed using the following formula: ; in: The spectral energy of the reference frequency band, Frequency band number; Extracting normalized spectral energy features As the spectral energy characteristic of this frame; When no interval bits are set between the encoded bits of the ultrasonic encoded data packet, the interval of each encoded bit is determined with reference to the detected packet header position; When there are interval bits between the encoded bits of the ultrasonic encoded data packet, the interval bits are detected by the ultrasonic encoding classification model to distinguish different encoded bits.

2. The ultrasonic communication decoding method according to claim 1, characterized in that: The described detection model for the head uses a lower complexity structure and a smaller step size than the ultrasonic coding classification model.

3. The ultrasonic communication decoding method according to claim 1, characterized in that, The training data for the Baotou detection model and the ultrasonic coding classification model include: various transmission distances, various signal transmission intensities, various types of transmitting and receiving devices, different relative orientations of receiving and transmitting devices, and real and simulated data collected under various noise environments.

4. An ultrasonic communication coding method, characterized in that: The frequency band of each coded bit is divided into M sub-bands, and a symbol is encoded in groups of m sub-bands, where m ≤ M; The N-bit encoding bits are used to form an ultrasonic encoded data packet, wherein the packet header is n1 bits, the data is n2 bits, and the check bit is n3 bits. The ultrasonic encoded data packet is decoded by the ultrasonic communication decoding method described in claim 1.

5. The ultrasonic communication coding method according to claim 4, characterized in that: The first subband of each coding bit is an empty subband, used to separate subband groups.

6. An ultrasonic communication decoding device, comprising: The receiving module is used to receive ultrasonic coded data packets, which consist of N coded bits, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits. Each coded bit consists of M ultrasonic frequency bands. The feature extraction module is used to segment the received ultrasound signal into frames and extract the spectral energy features of each frame. The packet header detection module is used to input the spectral energy features of each frame into the packet header detection model for classification. If the classification results of T consecutive frames are all packet headers, the data packet is considered to have started; otherwise, the detection continues. The bit decoding module is used to classify subsequent data frames using an ultrasonic coding classification model when the start of a data packet is detected. The output of the ultrasonic coding classification model for each data frame is M nodes, corresponding to M ultrasonic frequency bands. If the output of a node is 1, it means that the data frame contains that frequency band; otherwise, it means that it does not. The result of the frame with the highest classification probability is selected from each ultrasonic coding bit interval as the decoding result of that coding bit. The head detection model and the ultrasonic coding classification model are deep learning models; the head detection model adopts a 4-layer DNN model, while the ultrasonic coding classification model adopts a 2-layer 2D-CNN + 2-layer DNN structure. The extraction of spectral energy features for each frame includes: Perform FFT processing on each frame of the signal to extract the spectral energy features of each frequency band. ; Only the spectral energy characteristics within a specific frequency band are retained; Using the spectral energy of a fixed-frequency ultrasonic signal as a reference Spectral energy of other frequency components Normalization is performed using the following formula: ; in: The spectral energy of the reference frequency band, Frequency band number; Extracting normalized spectral energy features As the spectral energy characteristic of this frame; When no interval bits are set between the encoded bits of the ultrasonic encoded data packet, the interval of each encoded bit is determined with reference to the detected packet header position; When there are interval bits between the encoded bits of the ultrasonic encoded data packet, the interval bits are detected by the ultrasonic encoding classification model to distinguish different encoded bits.

7. An ultrasonic communication encoding device, comprising: The encoding module is used to generate ultrasonic encoded data packets. The frequency band of each encoded bit of the ultrasonic encoded data packet is divided into M sub-bands. Each m sub-band is grouped into a symbol, where m ≤ M. N encoded bits form an ultrasonic encoded data packet, including a header of n1 bits, data of n2 bits, and a check bit of n3 bits. The transmitting module is used to transmit ultrasonic coded data packets; The ultrasonic encoded data packet is decoded by the ultrasonic communication decoding device according to claim 6.

Citation Information

Patent Citations

  • Encoding method, decoding method, encoding device, decoding device and household appliance

    CN107769860A

  • Communication method and system based on sound waves, and computer readable storage medium

    CN108777596A