Audio data processing method and device for acoustic communication and storage medium

By adding a check bit and error correction code to the transmitting end in acoustic communication, and using pulse code modulation and sine wave function to process frequency data, the problem of low success rate in acoustic communication is solved, and more efficient and accurate information transmission is achieved.

CN122268495APending Publication Date: 2026-06-23ZHEJIANG UNIVIEW TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIVIEW TECH CO LTD
Filing Date
2024-12-23
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

The current success rate of acoustic wave communication in distribution networks is low, mainly due to the lack of optimization in encoding and decoding methods, resulting in inaccurate information transmission and low efficiency.

Method used

During the encoding process at the transmitting end, parity bit data and error correction code data are added, and frequency data is generated by processing syllable by syllable through pulse code modulation and sine wave function, so that the volume of each syllable changes in a trend of first increasing and then decreasing, to ensure accurate decoding at the receiving end.

Benefits of technology

It improves the success rate and efficiency of acoustic communication, ensuring the accuracy of information transmission and rapid decoding capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122268495A_ABST
    Figure CN122268495A_ABST
Patent Text Reader

Abstract

The application provides an audio data processing method and device for sound wave communication and a storage medium, which comprises the following steps: obtaining initial communication text to be sent, and performing encoding processing on the initial communication text to determine the encoding data corresponding to the initial communication text; the encoding data comprises at least one of check bit data and error correction code data corresponding to the initial communication text; performing frequency conversion on the encoding data to determine the frequency data corresponding to the encoding data; performing audio generation processing on the frequency data by using a pulse code modulation mode and a sine wave function to determine the audio data corresponding to the frequency data; the audio data comprises multiple syllables, and the volume change trend of each syllable from the beginning to the end is first large and then small; the audio data is sent to a receiving end device; and the audio data is used to enable the receiving end device to decode the audio data and then perform sound wave communication. The technical scheme can improve the success rate of sound wave communication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an audio data processing method, apparatus and storage medium for acoustic wave communication. Background Technology

[0002] With the continuous development of IoT technology, various smart devices are emerging. These smart devices generally require network configuration (or network setup) before use. To facilitate automatic network connection and configuration for smart devices, acoustic communication technology has been proposed. Acoustic communication technology refers to transmitting information over short distances using sound waves. The sending end encodes text information into sound and sends it out. The receiving end decodes the received sound to obtain the text information, and then completes network setup based on the decoded text information.

[0003] Taking the configuration of a Wi-Fi network (i.e., a wireless network) using acoustic communication as an example, the process of acoustic network configuration may include: the transmitting end encodes the Wi-Fi SSID (Service Set Identifier, i.e., wireless network name) and password into audio according to certain rules and then plays it; the receiving end receives the audio and decodes it to obtain relevant information and completes the network configuration.

[0004] However, the above-mentioned technologies suffer from a low success rate in acoustic communication. Summary of the Invention

[0005] This invention provides an audio data processing method, apparatus, and storage medium for acoustic wave communication. It addresses the shortcomings of existing technologies where the transmitting end encodes network distribution information into audio and plays it back to the receiving end for decoding. This, coupled with direct acoustic network distribution after decoding, results in a low success rate for both network distribution and acoustic wave communication. The invention incorporates checksum and error correction code data during the encoding of communication information at the transmitting end to ensure the accuracy of acoustic wave data transmission and subsequent decoding. Furthermore, during audio encoding, the volume change trend of each byte of the audio data from beginning to end is encoded as an initial increase followed by a decrease. This helps the receiving end quickly and accurately decode the corresponding syllables, improving decoding accuracy and efficiency, thereby enhancing the success rate and efficiency of acoustic wave communication.

[0006] In a first aspect, the present invention provides an audio data processing method for acoustic wave communication, applied to a transmitting device, the method comprising: The initial communication text to be sent is obtained, and the initial communication text is encoded to determine the encoded data corresponding to the initial communication text; the encoded data includes at least one of the check bit data and error correction code data corresponding to the initial communication text. Frequency conversion is performed on the encoded data to determine the corresponding frequency data. The frequency data is processed syllably by pulse code modulation and sine wave function to generate audio data. The audio data corresponding to the frequency data is determined. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in the direction of first increasing and then decreasing. The audio data is sent to the receiving device; the audio data is used by the receiving device to decode the audio data and perform sound wave communication.

[0007] According to the audio data processing method for acoustic wave communication provided by the present invention, the above-mentioned encoding processing of the initial communication text to determine the encoded data corresponding to the initial communication text includes: The initial communication text is transcoded to determine the transcoded text corresponding to the initial communication text, and the transcoded text is converted to determine the transcoded data corresponding to the transcoded text. Perform verification processing on the transcoded data to determine the corresponding check bit data; The initial error correction code is transcoded and converted to determine the error correction code data corresponding to the initial error correction code. The transcoded data is concatenated with at least one of the check bit data and error correction code data to determine the encoded data corresponding to the initial communication text.

[0008] According to the audio data processing method for acoustic wave communication provided by the present invention, the above-mentioned frequency conversion of encoded data to determine the frequency data corresponding to the encoded data includes: Based on the number of channels for receiving audio data supported by the receiving device, determine the target number of channels used by the sending device, and divide the encoded data according to the target number of channels to determine the same number of multi-segment encoded data as the target number of channels. Each segment of sub-coded data is frequency-converted to determine the sub-frequency data corresponding to each segment of sub-coded data, and each sub-frequency data is used as the frequency data corresponding to the coded data; each sub-frequency data includes multiple frequencies. Accordingly, the above-mentioned audio generation process, which uses pulse code modulation and a sine wave function to process the frequency data syllable by syllable, to determine the audio data corresponding to the frequency data, includes: The audio generation process is performed on each sub-frequency data by syllable using pulse code modulation and a sine wave function to determine the sub-audio data corresponding to each sub-frequency data, and the audio data corresponding to the frequency data is determined based on each sub-audio data.

[0009] Secondly, the present invention also provides an audio data processing method for acoustic wave communication, applied to a receiving end device, the method comprising: The device receives audio data sent by the transmitting device. The audio data is obtained by the transmitting device after encoding, frequency conversion and syllable-by-syllable audio generation of the initial communication text. The encoded data after encoding the initial communication text includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing. The audio data is decoded to determine the corresponding decoded communication text, and sound wave communication is performed based on the decoded communication text.

[0010] According to the audio data processing method for acoustic wave communication provided by the present invention, the above-mentioned decoding processing of audio data to determine the decoded communication text corresponding to the audio data includes: One syllable is extracted from the audio data at a time and a Fourier transform is performed. The Fourier transform result of each syllable is used to determine whether the start syllable of the audio data has been identified. If the starting syllable of the audio data is currently identified, two syllables are obtained from the position corresponding to the starting syllable in the audio data. Then, a single syllable is obtained point by point within the two syllables and a Fourier transform is performed. The alignment position corresponding to the starting syllable is determined based on the Fourier transform result of each obtained single syllable. Based on the alignment position, one syllable is extracted from the audio data at a time and a Fourier transform is performed. The target frequency corresponding to each syllable is determined based on the Fourier transform result of each syllable, and the decoded communication text corresponding to the audio data is determined based on the target frequency corresponding to each syllable.

[0011] According to an audio data processing method for acoustic communication provided by the present invention, the method for determining the target frequency corresponding to each syllable based on the Fourier transform result of each syllable includes: Obtain the first frequency corresponding to the syllable identified in the current instance and the second frequency corresponding to the syllable identified in the previous instance; the first frequency is the frequency corresponding to the maximum amplitude within the syllable identified in the current instance, and the second frequency is the frequency corresponding to the maximum amplitude within the syllable identified in the previous instance. If the first frequency is the same as the second frequency, then obtain the maximum amplitude and the second largest amplitude within the syllable corresponding to the first frequency, and calculate the difference between the maximum amplitude and the second largest amplitude. If the difference is less than the preset threshold, the target frequency within the syllable corresponding to the first frequency is determined as the frequency corresponding to the second largest amplitude.

[0012] According to the audio data processing method for acoustic wave communication provided by the present invention, before determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable, the method further includes: If the target frequency corresponding to the currently identified syllable is inconsistent with the frequency corresponding to the end syllable, then determine whether the end amplitude corresponding to the frequency of the end syllable is greater than the preset end syllable amplitude threshold. If it is greater, then execute the above steps of determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable. Alternatively, obtain the first amplitude corresponding to the target frequency of the currently recognized syllable and the second amplitude corresponding to the target frequency of the previously recognized syllable. If both the first amplitude and the second amplitude are less than the preset exit amplitude threshold, then perform the above steps of determining the decoded communication text corresponding to the audio data based on the target frequency of each syllable.

[0013] Thirdly, the present invention also provides an audio data processing apparatus for acoustic wave communication, applied to a transmitting end device, the apparatus comprising: The encoding module is used to acquire the initial communication text to be sent, encode the initial communication text, and determine the encoded data corresponding to the initial communication text; the encoded data includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The frequency conversion module is used to perform frequency conversion on the encoded data and determine the frequency data corresponding to the encoded data. The audio generation module is used to process the frequency data syllable by syllable using pulse code modulation and a sine wave function to determine the audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in the direction of first increasing and then decreasing. The audio transmission module is used to send audio data to the receiving device; the audio data is used by the receiving device to decode the audio data and perform sound wave communication.

[0014] Fourthly, the present invention also provides an audio data processing apparatus for acoustic wave communication, applied to a receiving end device, the apparatus comprising: An audio receiving module is used to receive audio data sent by a transmitting device. The audio data is obtained by the transmitting device after encoding, frequency conversion, and syllable-by-syllable audio generation of the initial communication text. The encoded data after encoding the initial communication text includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing. The audio decoding module is used to decode audio data, determine the corresponding decoded communication text, and perform sound wave communication based on the decoded communication text.

[0015] Fifthly, the present invention also provides an apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the audio data processing method for acoustic wave communication as described in the first aspect and / or the audio data processing method for acoustic wave communication as described in the second aspect.

[0016] In a sixth aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the audio data processing method for acoustic wave communication as described in the first aspect and / or the audio data processing method for acoustic wave communication as described in the second aspect.

[0017] In a seventh aspect, the present invention also provides a computer program product, comprising a computer program that, when executed by a processor, implements the audio data processing method for acoustic wave communication as described in the first aspect and / or the audio data processing method for acoustic wave communication as described in the second aspect.

[0018] The present invention provides an audio data processing method, apparatus, and storage medium for acoustic wave communication. The method involves a transmitting end acquiring an initial communication text to be sent and encoding it to determine the corresponding encoded data. Then, the encoded data undergoes frequency conversion to determine the corresponding frequency data. Pulse code modulation and a sine wave function are used to generate audio data syllable-by-syllable based on the frequency data to determine the corresponding audio data. Finally, the audio data is sent to a receiving end device, enabling the receiving end to decode the audio data and perform acoustic wave communication. The encoded data includes at least one of a checksum and error correction code corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a pattern of first increasing and then decreasing. In this method, checksum data and error correction code data can be added when encoding the communication text at the sending end to ensure the accuracy of the communication text during data transmission and subsequent decoding. At the same time, during the audio encoding process, the volume change trend of each byte of the audio data from beginning to end can be encoded as increasing first and then decreasing. This reduces the influence of the previous syllable on the next syllable when decoding the audio data at the receiving end, which helps the receiving end to quickly and accurately decode the corresponding syllable. This improves the accuracy and efficiency of communication text decoding. Therefore, by decoding the more accurate communication text, the success rate of sound wave communication can be improved, and the efficiency of sound wave communication can also be improved. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0020] Figure 1 This is one of the flowcharts illustrating the audio data processing method for acoustic wave communication provided in this embodiment of the invention.

[0021] Figure 2 This is a schematic diagram of the encoded audio data provided in an embodiment of the present invention.

[0022] Figure 3 This is the second flowchart illustrating the audio data processing method for acoustic wave communication provided in this embodiment of the invention.

[0023] Figure 4 This is the third flowchart of the audio data processing method for acoustic wave communication provided in this embodiment of the invention.

[0024] Figure 5 This is one of the structural schematic diagrams of the audio data processing device for acoustic wave communication provided in the embodiments of the present invention.

[0025] Figure 6 This is the second schematic diagram of the audio data processing device for acoustic wave communication provided in the embodiments of the present invention.

[0026] Figure 7 This is a schematic diagram of the device provided in an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0028] Taking acoustic distribution network in acoustic communication as an example, the distribution network information generally needs to be encoded first, and then converted into audio and sent out. The receiving end then receives the audio and decodes it to obtain the distribution network information, thus achieving acoustic distribution network. The encoding process involves acoustic encoding methods, and the decoding process involves acoustic decoding methods. Different acoustic encoding and decoding methods directly affect the success rate of the final acoustic communication. A good acoustic encoding and decoding method can greatly improve the success rate of acoustic communication. Currently, some technologies use JSON and Huffman coding to encode the SSID and password of the distribution network Wi-Fi, and use multi-level hop coding to achieve frequency mapping, clearly defining the length of each syllable (the duration of a single frequency sound wave), reducing the number of data frequency points to 17, which can improve the efficiency and success rate of acoustic communication to a certain extent. However, the above technologies still have the problem of a low success rate in acoustic communication. Based on this, embodiments of the present invention provide an audio data processing method, apparatus, and storage medium for acoustic communication, which can solve the above-mentioned technical problems.

[0029] To better illustrate the technical solutions of the embodiments of the present invention, the application scenarios of the embodiments of the present invention will first be described. The embodiments of the present invention are mainly applied to scenarios involving acoustic communication between at least two devices. Taking two devices as an example, one is a transmitting device, and the other is a receiving device. These two devices can communicate with each other, for example, via short-range communication methods such as Bluetooth. Both the transmitting and receiving devices can be terminals or servers. For terminals, this includes, but is not limited to, mobile phones, tablets, and wearable devices. For servers, this includes independent servers or server clusters. Furthermore, the transmitting device refers to a device that transmits encoded audio data (i.e., sound waves), and the receiving device refers to a device that receives and decodes the encoded audio data transmitted by the transmitting device. The following embodiments will use the transmitting and receiving devices as the execution entities to describe the audio data processing method for acoustic communication according to the embodiments of the present invention.

[0030] In addition, it should be noted that the technical solutions of the embodiments of the present invention can be applied not only to any acoustic communication scenario, such as acoustic distribution network scenario or other short-range acoustic communication scenario.

[0031] The following section will first explain the process of encoding audio data by the transmitting device.

[0032] Figure 1 This is one of the flowcharts illustrating the audio data processing method for acoustic wave communication provided by the present invention, such as... Figure 1 As shown, the method includes the following steps: Step 102: Obtain the initial communication text to be sent, and encode the initial communication text to determine the encoded data corresponding to the initial communication text; the encoded data includes at least one of the check bit data and error correction code data corresponding to the initial communication text.

[0033] Before acoustic communication, the transmitting device can first obtain the communication information it needs to send. This communication information is generally in text form and can be recorded as the initial communication text. This initial communication text is used to represent the information for communication between the receiving and transmitting devices (for example, in acoustic network configuration, it can be network configuration information, including information such as network name and network connection password). Taking Wi-Fi acoustic network configuration as an example, this initial communication text can include the Wi-Fi SSID (wireless network name) and password.

[0034] After obtaining the initial communication text, the sending device can encode it. Specifically, this involves converting the initial communication text into a computer-readable data format and adding corresponding check bits and / or error correction codes to obtain the encoded data corresponding to the initial communication text. The check bits are used to verify the accuracy of the initial communication text during transmission, while the error correction codes are used to correct errors in the initial communication text, ensuring the accuracy of the initial communication text received by the receiving end.

[0035] Step 104: Perform frequency conversion on the encoded data to determine the frequency data corresponding to the encoded data.

[0036] When transmitting and receiving data, the sending and receiving devices usually operate on a certain frequency band. Therefore, it is necessary to convert the encoded data into frequency data first. In other words, the frequency conversion in this step refers to converting the encoded data into frequency data within a set frequency band. For example, converting the number 25 into a frequency between 2000 Hz and 3650 Hz in the set frequency band, that is, mapping the number 25 to a frequency.

[0037] Specifically, after obtaining the encoded data, which may include multiple data points, the entire encoded data can be frequency-converted to obtain the corresponding frequency data. Alternatively, each data point in the encoded data can be frequency-converted individually, and then the converted frequencies of each data point can be combined to obtain the corresponding frequency data. Another option is to divide the encoded data into multiple segments, perform frequency conversion on each segment, and then combine them to obtain the corresponding frequency data. In short, the goal is to obtain the frequency data corresponding to the encoded data.

[0038] It should be noted that the frequency data corresponding to the coded data obtained above may include multiple frequencies, which may be the same or different.

[0039] Step 106: The frequency data is processed by pulse code modulation and sine wave function to generate audio data syllable by syllable to determine the audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in the direction of first increasing and then decreasing.

[0040] Among them, Pulse Code Modulation (PCM) is a waveform coding technique that involves sampling, quantizing, and encoding continuously changing analog signals to generate digital signals.

[0041] In this step, the sampling rate and bit width of the PCM pulse code modulation for sampling the audio signal can be preset, and the length data of a single syllable can be acquired, typically 40 milliseconds. After obtaining the frequency data corresponding to the encoded data, the sampling rate and bit width of the PCM audio signal, as well as the length of a single syllable and the number of sampling points per syllable, can be combined to sample one syllable within a sine wave according to a sine function / formula, obtaining the audio data of one syllable corresponding to each frequency. Then, the audio data of all syllables corresponding to all frequencies in the frequency data are combined to obtain the final audio data, which is the audio data corresponding to the initial communication text mentioned above.

[0042] The PCM sampling rate for the audio signal is 48,000, the bit width is 16, and the length of a single syllable is 40 milliseconds. Therefore, the number of sampling points required for a single syllable (i.e., a sine wave of a single frequency) is 1,920.

[0043] The process of generating audio data corresponding to each frequency in the frequency data can be represented by the following formula: .

[0044] Where index represents the sampling point subscript / index, ranging from [0, 1920); PCM index This represents the PCM result value / digital signal value calculated at the sampling point index; Frequencies represent a frequency in the frequency data; SAMPLE_RATE represents the sampling rate, which is 48000; MAX_FRAME_VALUE is the maximum value of 16-bit PCM sampling, which is 2. 15-1=32767; MAX_VOL represents the volume control coefficient, the value of which can be set according to the actual situation, for example, it can be 0.9; Adj is the volume adjustment factor, the value of which can be calculated based on the index.

[0045] For the specific formula for calculating Adj, please refer to the following formula: .

[0046] Here, UNIT_SAMPLE represents the number of sampling points for a single syllable, which is 1920. It can be seen that the value of the volume adjustment factor Adj gradually increases as the sampling point index increases. Then, as the sampling point index increases further, the value of the volume adjustment factor Adj gradually decreases. That is, the volume adjustment factor first increases and then decreases within a syllable from beginning to end. This also results in the volume of a syllable increasing and then decreasing from beginning to end. When the receiving device decodes the audio data, this processing reduces the influence of the preceding syllable on the following syllable, making it easier to distinguish between the two syllables, resulting in more accurate audio decoding and a more harmonious and pleasant final audio output.

[0047] The above two formulas can generate a PCM value for multiple sampling points corresponding to a sine wave for each frequency in the frequency data. Then, the multiple PCM values ​​corresponding to each frequency are combined to obtain the audio data of a syllable. After that, the audio data of the syllables corresponding to all frequencies in the frequency data are combined to obtain the encoded audio data corresponding to the initial communication text.

[0048] Step 108: Send the audio data to the receiving device; the audio data is used to enable the receiving device to decode the audio data and perform sound wave communication.

[0049] In this step, after the sending end generates the encoded audio data corresponding to the initial communication text through the above steps, it can broadcast the audio data, that is, send it to the receiving end devices around the sending end device.

[0050] After receiving audio data, the receiving end can decode the audio data to obtain the decoded communication text. It then uses this decoded communication text to configure its own communication settings, thereby achieving acoustic communication with the sending device. For example, in acoustic network configuration, the decoded configuration text can be used to configure the network, thus enabling acoustic network distribution.

[0051] Additionally, it should be noted that the terms "sending device" and "receiving device" are relative and can be determined based on the data transmission and reception scenario; they do not constitute a limitation on the device's transmission and reception functions. For example, if device A sends data to device B, then device A can act as the sending device and device B can act as the receiving device. Conversely, if device B sends data to device A, then device B can act as the sending device and device A can act as the receiving device.

[0052] In this embodiment, the sending end obtains the initial communication text to be sent and encodes it to determine the encoded data corresponding to the initial communication text. Then, the encoded data is frequency-converted to determine the frequency data corresponding to the encoded data. Pulse code modulation and a sine wave function are used to generate audio data syllable by syllable to determine the audio data corresponding to the frequency data. The audio data is then sent to the receiving end device so that the receiving end can perform sound wave communication after decoding the audio data. The encoded data includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing. In this method, checksum data and error correction code data can be added when encoding the communication text at the sending end to ensure the accuracy of the communication text during data transmission and subsequent decoding. At the same time, during the audio encoding process, the volume change trend of each byte of the audio data from beginning to end can be encoded as increasing first and then decreasing. This reduces the influence of the previous syllable on the next syllable when decoding the audio data at the receiving end, which helps the receiving end to quickly and accurately decode the corresponding syllable. This improves the accuracy and efficiency of communication text decoding. Therefore, by decoding the more accurate communication text, the success rate of sound wave communication can be improved, and the efficiency of sound wave communication can also be improved.

[0053] The following examples illustrate the process of encoding initial communication text to obtain encoded data.

[0054] In some embodiments, step 102 above, "encoding the initial communication text and determining the encoded data corresponding to the initial communication text," may include the following steps: Step A1: Transcode the initial communication text to determine the transcoded text corresponding to the initial communication text, and perform data conversion processing on the transcoded text to determine the transcoded data corresponding to the transcoded text.

[0055] The transcoding process can be performed using a preset encoding algorithm, such as Base32 encoding or Base64 encoding. In this embodiment, Base64 encoding is preferred for transcoding, which reduces the number of frequencies generated subsequently, ensuring that the amount of data in the original initial communication text does not increase too much, thus supporting more audio channels.

[0056] Taking Wi-Fi acoustic wave network configuration as an example, the source data format of the initial communication text is assumed to be ssid\npassword, where \n represents a newline character, meaning the plaintext information of the initial communication text is separated by newline characters. Using Base64 encoding as an example, this step involves transcoding the initial communication text into Base64. The resulting Base64 encoded text may be padded with '=", but this does not affect decoding. Therefore, the padded '=" can be removed after encoding to obtain the final transcoded text. Next, the transcoded text can undergo data conversion processing, mapping all data in the transcoded text to the range 0~63. Specifically, the conversion can be based on the character's position in Base64, i.e., referring to the order of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+ / ", where character 'A' is converted to 0, character 'B' to 1, and so on, ultimately obtaining the transcoded data after data conversion processing.

[0057] For example, assuming the Wi-Fi SSID is "Test" and the password is "12345678", the initial communication text is "Test\n12345678". After transcoding using the Base64 encoding algorithm, the transcoded text is "VGVzdAoxMjM0NTY3OA". Then, all data is converted to the range of 0~63, and the transcoded data is "21 6 2151 29 0 40 49 12 35 12 52 13 19 24 55 14 0".

[0058] Step A2: Perform verification processing on the transcoded data to determine the corresponding check bit data.

[0059] In this step, after obtaining the transcoded data corresponding to the initial communication text, the transcoded data can be verified to obtain the check bit data.

[0060] For example, continuing with the transcoded data "21 6 21 51 29 0 40 49 12 35 12 52 13 1924 55 14 0", these data can be verified sequentially. For instance, first verify the first number 21 and the second number 6 to obtain a check bit. Then verify this check bit with the third number 21 to obtain another check bit. This process continues until a final check bit is calculated. For example, if the final calculated data is 25, then 25 is the check bit corresponding to the transcoded data.

[0061] Step A3 involves transcoding and data conversion of the initial error correction code to determine the error correction code data corresponding to the initial error correction code.

[0062] In this step, the initial error correction code can be a pre-set error correction code. The specific error correction code can be set according to the actual situation. For example, setting the error correction code method to RS(255,247)with 8-bit symbols will result in an 8-bit error correction code, which can correct up to 4 random errors. These 8 error correction codes are the initial error correction codes here.

[0063] After determining the initial error correction code, the initial error correction code can be transcoded and converted according to step A1 above. For example, the initial error correction code can be converted to data in the range of 0 to 63 using the Base64 encoding algorithm to determine the error correction code data corresponding to the initial error correction code.

[0064] For example, taking the 8-bit error correction code of RS (255,247) as an example, the initial error correction code is "178 178 14 83205 22 149 16". After transcoding and data conversion processing of this 8-bit error correction code, the obtained error correction code data is 11 bits of valid data, namely "4 1 43 35 17 17 25 40 23 34 24".

[0065] Step A4: Concatenate the transcoded data with at least one of the check bit data and error correction code data to determine the encoded data corresponding to the initial communication text.

[0066] In this step, after obtaining the transcoded data, checksum data, and error correction code data corresponding to the initial communication text, the transcoded data and checksum data can be concatenated sequentially to obtain the encoded data corresponding to the initial communication text. Alternatively, the transcoded data and error correction code data can be concatenated sequentially to obtain the encoded data corresponding to the initial communication text. Alternatively, the transcoded data, checksum data, and error correction code data can be concatenated sequentially to obtain the encoded data corresponding to the initial communication text.

[0067] In this embodiment, the transcoded data, check bit data, and error correction code data are concatenated sequentially to obtain the encoded data. This ensures the accuracy of the initial communication text during transmission and performs error correction on the data, effectively improving the accuracy of the initial communication text decoded by the final receiving device.

[0068] For example, continuing with the transcoded data "21 6 21 51 29 0 40 49 12 35 12 52 13 1924 55 14 0", the calculated check bit data is 25, and the error correction code data is "4 1 43 35 17 17 25 40 23 3424". The final encoded data is transcoded data + check bit data + error correction code data, i.e., "21 6 21 51 29 0 4049 12 35 12 52 13 19 24 55 14 0 25 4 1 43 35 17 17 25 40 23 34 24".

[0069] In this embodiment, by transcoding and converting the initial communication text, the number of frequency points when converting the initial communication text into frequency data can be reduced, thereby improving the efficiency and success rate of acoustic communication. At the same time, verification data and error correction code data can be calculated and added to the data after transcoding and data conversion of the initial communication text. This ensures the accuracy of the initial communication text during transmission and performs error correction processing on the data, effectively improving the accuracy of the initial communication text decoded by the final receiving device, and further improving the success rate of acoustic communication.

[0070] In actual encoding, encoding is generally performed on a single audio channel. This results in excessively long audio data, affecting audio data transmission efficiency. To improve audio data transmission efficiency, this embodiment proposes a scheme to divide the encoded data into multiple audio channels supported by the receiving device for audio generation processing. The following embodiment will describe this scheme.

[0071] In some embodiments, step 104 above, "performing frequency conversion on the encoded data to determine the frequency data corresponding to the encoded data," may include the following steps: Step B: Based on the number of channels supported by the receiving device for receiving audio data, determine the target number of channels used by the sending device, and divide the encoded data according to the target number of channels to determine the same number of sub-coded data segments as the target number of channels; perform frequency conversion on each sub-coded data segment to determine the sub-frequency data corresponding to each sub-coded data segment, and use each sub-frequency data segment as the frequency data corresponding to the encoded data; each sub-frequency data segment includes multiple frequencies.

[0072] In this context, the number of channels supported by the receiving device represents its audio data receiving capability. The sending device can obtain this number of channels through network devices or a backend server. The sending device can then directly use this number as its target channel count, which can be greater than or equal to 1. This embodiment primarily describes the case where the target channel count is greater than 1, i.e., multiple channels. If the target channel count is 1, the encoded data in the following steps does not need to be divided; frequency conversion can be performed directly to obtain frequency data. After determining its target channel count, the sending device can uniformly or unevenly divide the obtained encoded data to obtain multiple data segments corresponding to the target channel count. Each data segment can be denoted as a sub-encoded data segment. Optionally, each sub-encoded data segment can include one or more data segments. It should be noted that in the case of uneven division, the lengths of the sub-encoded data segments will not differ significantly. This ensures that the lengths of the audio data generated for each channel will not differ too much, thereby significantly improving the audio data transmission efficiency.

[0073] After obtaining the multi-segment sub-coded data, the frequency band used by the pre-acquired transmitter can be divided into the same number of segments as the multi-segment sub-coded data, i.e., multiple frequency bands identical to the target channel data. Then, each frequency band can be mapped to each segment of sub-coded data; for example, the first segment of sub-coded data corresponds to the first frequency band, the second segment to the second frequency band, and so on. Then, frequency conversion can be performed on the corresponding segment of sub-coded data based on the frequency band corresponding to each segment, i.e., finding the frequency corresponding to the sub-coded data within that frequency band. This completes the frequency conversion for each segment of sub-coded data, obtaining the frequency data corresponding to each segment. Then, a start and end frequency can be added to each segment of frequency data so that the corresponding audio data can be quickly identified during subsequent decoding. This yields the final sub-frequency data corresponding to each segment of sub-coded data. Finally, all the sub-frequency data are combined to form the frequency data corresponding to the encoded data. It is understood that each sub-frequency data generally includes multiple frequencies.

[0074] For example, continuing with the above encoded data as transcoding data + check bit data + error correction code data, i.e., "21 6 2151 29 0 40 49 12 35 12 52 13 19 24 55 14 0 25 4 1 43 35 17 17 25 40 23 34 24", assuming the target number of channels is 3, then the encoded data can be divided into 3 equal segments. The encoded data has a total of 30 data points, and each segment of the sub-encoded data includes 10 data points. Assuming the preset frequency band is 2000Hz~7050Hz, this preset frequency band can be divided into three bands for use by the corresponding channels. For example, the frequency bands used by the three channels are 2000Hz~3650Hz, 3700Hz~5350Hz, and 5400Hz~7050Hz, with each 25Hz corresponding to one data point. The start and end frequencies of each band are non-data frequencies, which serve as the start and end frequencies of each sub-frequency data point, used to distinguish the start and end of audio data during subsequent decoding. Here, we can perform frequency conversion on the sub-coded data of the corresponding segments according to the three frequency bands mentioned above to obtain the sub-frequency data corresponding to each segment of sub-coded data. For example, the sub-frequency data of channel 1 is "2000 2550 2175 2550 3300 2750 2025 3025 3250 2325 2900 3650", the sub-frequency data of channel 2 is "3700 4025 5025 4050 4200 4325 5100 4075 3725 4350 4825 5350", and the sub-frequency data of channel 3 is "5400 6500 5625 5775 5925 6925 6725 5975 6350 5850 5425 7050", all in Hz.

[0075] The following example, using the sub-coded data "21 6 21 51 29 0 40 49 12 35" (corresponding to a frequency band of 2000Hz~3650Hz), illustrates the specific process of frequency conversion. Specifically, the 2000Hz~3650Hz frequency band can be divided into multiple frequencies in 25Hz intervals, and each frequency can be numbered sequentially. For example, it can be divided into (3650-2000) / 25=66 frequencies. Among these 66 frequencies, 2000Hz and 3650Hz are the start and end frequencies, respectively, and are not included in the numbering. Numbering can start from 2025Hz and go up to 3625Hz, with numbers ranging from 0 to 63. Then, the numbers in the sub-coded data can be matched with these numbers to find the frequencies corresponding to the same numbers, thus obtaining the converted frequencies of the sub-coded data. By following this method, the sub-frequency data corresponding to each segment of sub-coded data can be obtained, that is, the multi-segment sub-frequency data corresponding to the coded data can be obtained.

[0076] After obtaining the multi-segment sub-frequency data corresponding to the encoded data, the step 106 above, "using pulse code modulation and a sine wave function to perform audio generation processing on the frequency data syllable by syllable to determine the audio data corresponding to the frequency data," may include the following steps: The audio generation process is performed on each sub-frequency data by syllable using pulse code modulation and a sine wave function to determine the sub-audio data corresponding to each sub-frequency data, and the audio data corresponding to the frequency data is determined based on each sub-audio data.

[0077] Specifically, following the formula in step 106 above, "using pulse code modulation and a sine wave function to perform audio generation processing on the frequency data syllable by syllable to determine the audio data corresponding to the frequency data," each frequency in each sub-frequency data is sampled with a sine wave of one syllable length to obtain one syllable corresponding to each frequency. Then, the syllables corresponding to all frequencies in each sub-frequency data are concatenated as needed to obtain the sub-audio data corresponding to each sub-frequency data. Here, the length of the sub-audio data corresponding to each sub-frequency data can be the same or different, depending on the length of the sub-coded data corresponding to each sub-frequency data.

[0078] For example, see Figure 2 The diagram shown illustrates the encoded audio data, which includes five syllables. The horizontal axis represents time, and the vertical axis represents volume. It can be seen that the volume of each syllable first increases and then decreases. The diagram also clearly shows that this method can effectively distinguish between two adjacent syllables and reduce the influence of the previous syllable on the next syllable during the decoding process, thereby improving decoding accuracy and ultimately increasing the success rate of acoustic communication.

[0079] Furthermore, after obtaining multiple sub-audio data, these multiple sub-audio data can be used as audio data corresponding to all frequency data, and then these multiple sub-audio data can be played / transmitted simultaneously, or these multiple sub-audio data can be combined into a single audio data before playback / transmission. The length of the final played audio data can be greater than or equal to the maximum length of each sub-audio data, and the length of the final played / transmitted audio data will be much smaller than the total data length of all audio data spliced ​​together. Therefore, the length of the played / transmitted audio can be shortened by a factor of two, improving the transmission efficiency of audio data, and the sub-audio data do not affect each other.

[0080] In this embodiment, by dividing the encoded data into multiple segments, converting the frequencies of each segment, and then generating audio data separately, multiple audio segments can be played / transmitted simultaneously or combined into a single audio segment for playback. This method of dividing audio data into multiple channels can significantly shorten the length of the audio data to be played and transmitted, thereby improving the efficiency of audio data transmission.

[0081] The above embodiments illustrate the process of the transmitting device encoding audio data. The following describes the process of the receiving device decoding audio data.

[0082] Figure 3 This is a second schematic flowchart of the audio data processing method for acoustic wave communication provided by the present invention, as shown below. Figure 3 As shown, the method includes the following steps: Step 202: Receive audio data sent by the sending device; the audio data is obtained by the sending device after encoding, frequency conversion and syllable-by-syllable audio generation of the initial communication text. The encoded data after encoding the initial communication text includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing.

[0083] In this process, after the sending device encodes the initial communication text into audio data and sends it to the receiving device, the receiving device can receive the audio data.

[0084] The received audio data is obtained by the sending device through encoding, frequency conversion, and syllable-by-syllable audio generation of the initial communication text. The processes of encoding, frequency conversion, and syllable-by-syllable audio generation can be found in the explanation of the above-described embodiment of the sending device encoding audio data, and will not be repeated here.

[0085] Step 204: Decode the audio data, determine the decoded communication text corresponding to the audio data, and perform sound wave communication based on the decoded communication text.

[0086] In this step, after the receiving device receives the audio data, it can directly perform decoding and translation steps to obtain the communication text included in the received audio data, which can be denoted as the decoded communication text. It should be noted that due to potential data transmission errors during transmission, the final decoded communication text may be the same as the original initial communication text or it may be different. Therefore, the communication text obtained by the receiving device during decoding is denoted as the decoded communication text.

[0087] After decoding the communication text at the receiving end, the device can configure its own communication settings based on this text to achieve acoustic communication with the sending device. For example, in acoustic network configuration, the device can configure its own network by decoding the configuration text, thereby enabling acoustic network configuration.

[0088] In this embodiment, the receiving device can receive audio data sent by the sending device, and decode the audio data to determine the decoded communication text and perform sound wave communication accordingly. The received audio data is obtained by the sending device after encoding, transcoding, and generating syllable audio from the initial communication text. Since check bit data and error correction code data can be added when encoding the communication text at the sending end to ensure the accuracy of the communication text during data transmission and subsequent decoding, and the volume change trend of each byte of the audio data from beginning to end can be encoded as increasing first and then decreasing, the influence of the previous syllable on the next syllable can be reduced when the receiving end decodes the audio data. This helps the receiving end to quickly and accurately decode the corresponding syllable, improving the accuracy and efficiency of communication text decoding. Thus, by decoding the more accurate communication text, the success rate of sound wave communication can be improved, and the efficiency of sound wave communication can also be improved.

[0089] In the audio data encoding stage, a start frequency and an end frequency are added when the encoded data is converted into frequency data. The corresponding encoded sub-audio data includes the start syllable corresponding to the start frequency and the end syllable corresponding to the end frequency. In the decoding stage, in order to facilitate accurate and fast decoding of audio data, this embodiment proposes a technical solution that can first identify and align the start syllable. The following embodiment will explain the process of identifying and aligning the start syllable.

[0090] Figure 4 This is the third flowchart of the audio data processing method for acoustic wave communication provided by the present invention, as shown below. Figure 4 As shown, step 204 above, "decoding the audio data and determining the decoded communication text corresponding to the audio data," may include the following steps: Step 302: Obtain one syllable from the audio data at a time, perform a Fourier transform, and determine whether the start syllable of the audio data has been identified based on the Fourier transform result of each syllable.

[0091] In identifying syllable frequencies in audio data, the sound information is in the time domain, requiring a Fourier transform to obtain information in the frequency domain, and thus the frequency of the syllable. The identification process takes 40 milliseconds of data (i.e., one syllable) at a time, performs a Fourier transform, and then calculates the frequency with the largest amplitude in each frequency band, which is the frequency carried by that syllable.

[0092] Specifically, as mentioned above, the transmitting device can use multiple channels to send audio data, each using a different frequency band. The receiving device can know the frequency band used by each channel of the transmitting device in advance, and then obtain the start frequency of the first syllable and the end frequency of the last syllable of each frequency band. Taking the transmitting device using three channels to send audio data as an example, when the receiving device receives audio data, regardless of whether the audio data is merged into a single segment or multiple channels of audio data played simultaneously, the receiving device receives audio data from all three channels together, making it impossible to distinguish the audio data of a specific channel. In this case, the receiving device can take a syllable from the beginning of the received audio data and then decode that syllable, i.e., perform a Fourier transform, to obtain the spectrum corresponding to that syllable. This spectrum represents the relationship between different frequencies and their corresponding amplitudes. Afterwards, the receiving device can find the frequency band range corresponding to each channel in the spectrum of that syllable, and then find the amplitude (denoted as Amplitude) corresponding to the start frequency of the corresponding channel within each frequency band range. Begin For example, here we can obtain the amplitude corresponding to three starting frequencies, and then sum these three amplitudes with the amplitude threshold of the preset syllable (denoted as Amplitude). Exist (The specific size can be set according to the actual situation) for comparison.

[0093] If at least two of the three amplitudes are greater than the preset amplitude threshold for the presence of a syllable, then the start syllable of the received audio data has been identified, and the following steps can be performed to align the start syllable. If at least two of the three maximum amplitudes are not greater than the preset amplitude threshold, then the start syllable of the received audio data has not been identified, and it is necessary to re-acquire a syllable in sequence and continue the Fourier transform and amplitude comparison process until the start syllable is found.

[0094] Step 304: If the starting syllable of the audio data is currently identified, then two syllables are acquired from the position corresponding to the starting syllable in the audio data, and a single syllable is acquired point by point within the two syllables for Fourier transform. The alignment position corresponding to the starting syllable is determined based on the Fourier transform result of the single syllable acquired each time.

[0095] In this step, after the start syllable is identified, since the identified start syllable may not be a complete start syllable in the original audio data sent by the sender, for example, the first half of the identified start syllable may be noise, and the second half of the start syllable may be the first half of the original start syllable, syllable alignment is required after the start syllable is identified in order to accurately decode it as a single syllable in the future.

[0096] When performing syllable alignment, you can obtain audio data of two syllable lengths starting from the identified beginning syllable position, such as 80 milliseconds of audio data, and then perform syllable alignment using the following steps: 1. Let start and AmplitudeMax be given. Begin Both AlignJump and AmplitudeMax are 0; where start represents the starting sampling point and AmplitudeMax is 0. Begin This indicates the maximum amplitude in the starting syllable; AlignJump is the jump length / number of jump sampling points. 2. Take 40 milliseconds (i.e., the length of one syllable) of audio data starting from the start position, and calculate the amplitude of the starting syllable in each frequency band (i.e., the frequency band corresponding to each channel). Begin ; 3. If Amplitude Begin >AmplitudeMax Begin If so, record AlignJump=start and update AmplitudeMax. Begin =Amplitude Begin The maximum amplitude will be updated to the amplitude of the currently recognized starting syllable; 4. Update start to start+1, and repeat steps 2 and 3 until start is updated to start+UNIT_SAMPLE, where UNIT_SAMPLE is the number of samples per syllable (1920). The final AlignJump is the alignment position. Subsequent syllable recognition must skip the final AlignJump PCM sampling points determined here.

[0097] Step 306: Obtain one syllable from the audio data at a time according to the alignment position, perform Fourier transform, determine the target frequency corresponding to each syllable based on the Fourier transform result of each syllable, and determine the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable.

[0098] In this step, after obtaining the alignment position of the syllables, one syllable at a time can be extracted from the received audio data starting from that alignment position for decoding. Specifically, the decoding process can involve performing a Fourier transform on the data of each syllable (usually time-domain data) to obtain the spectrum corresponding to that syllable. Then, the maximum amplitude and its corresponding frequency are found in the spectrum, and the frequency corresponding to the maximum amplitude is directly used as the target frequency for that syllable. Alternatively, the target frequency can be determined by the amplitude of two adjacent syllables; no specific limitation is made here.

[0099] It should be noted that the decoding calculation may result in errors due to various reasons. Therefore, the determined frequencies need to be aligned. The alignment method can be calculated using the following formula: .

[0100] in, Indicates the base sign, meaning taking the integer value not greater than the calculated value within the square brackets (generally rounded); Frequencies indicates the final target frequency used after alignment with the target frequency; Frequencies tmp This represents the target frequency determined by the frequency in the spectrum calculated through Fourier transform.

[0101] In other words, the target frequency determined above needs to be aligned using the above formula. This can improve the accuracy of the frequency used in the subsequent frequency conversion, thereby improving the accuracy of audio decoding.

[0102] The received audio data can be decoded continuously in the above manner until the last syllable is decoded. After decoding the last syllable, the target frequencies corresponding to each syllable from the beginning to the end can be obtained. These target frequencies can then be translated to obtain the decoded communication text corresponding to the audio data. As an optional embodiment, this translation process may include the following steps: The data from each channel (i.e., the frequency data of each channel) are concatenated in sequence, and the target frequency corresponding to each syllable is subjected to reverse frequency conversion to determine the encoded data. Extract the error correction code data from the end of the encoded data, and perform data conversion and transcoding on the error correction code data to determine the initial error correction code corresponding to the error correction code data; Based on the initial error correction code, decode and correct the remaining data in the encoded data excluding the error correction code data, and determine the error correction result data corresponding to the remaining data; The error correction results are processed through data conversion and transcoding to determine the decoded communication text corresponding to the audio data.

[0103] Specifically, after concatenating the frequency data of each channel (including the target frequency corresponding to each syllable in the corresponding channel), the frequency conversion process in step B of the above-described transmitting end embodiment can be reversed for each target frequency in these frequency data, that is, each target frequency is converted back into encoded data. Continuing with the 8-bit error correction code as an example, 11 bits of data (i.e., the converted data corresponding to the original 8-bit error correction code) can be extracted from the end of the converted encoded data, and these 11 bits of data are converted into the character range corresponding to the Base64 encoding algorithm, that is, referring to the order of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+ / ", where 0 corresponds to the character 'A', 1 corresponds to the character 'B', and so on. These 11 bits of data are then converted into an 8-bit error correction code, and then concatenated to the end of the above encoded data. RS decoding error correction processing is performed on the encoded data to obtain the error-corrected result data. The error correction result data includes transcoded data and checksum data corresponding to the original initial communication text. The checksum data can then be calculated from the transcoded data and compared with the checksum data included in the error correction result data. If they are inconsistent, it indicates a problem with the audio data transmission, and the sound wave communication process ends. If they are consistent, it indicates accurate data transmission. In this case, the checksum data can be removed from the error correction result data, and the remaining transcoded data can be processed in reverse order of step A1 of the sending end embodiment, i.e., reverse data conversion processing and reverse transcoding processing, ultimately obtaining the original data, i.e., the decoded communication text.

[0104] In this embodiment, by identifying the start syllable in the received audio data and aligning the syllables after identification, the accuracy and efficiency of subsequent audio data translation can be improved, thereby increasing the success rate and efficiency of acoustic communication.

[0105] In actual audio decoding, sound waves may be reflected by walls or other objects in acoustic communication scenarios, forming echoes that can affect the decoding results of audio data. Based on this, this embodiment proposes a frequency decision scheme to determine the target frequency of each syllable during the decoding process. The following embodiment describes this process.

[0106] In some embodiments, step 306 above, "determining the target frequency corresponding to each syllable based on the Fourier transform result of each syllable," may include the following steps: Obtain the first frequency corresponding to the syllable identified in the current instance and the second frequency corresponding to the syllable identified in the previous instance; the first frequency is the frequency corresponding to the maximum amplitude within the syllable identified in the current instance, and the second frequency is the frequency corresponding to the maximum amplitude within the syllable identified in the previous instance. If the first frequency is the same as the second frequency, then obtain the maximum amplitude and the second largest amplitude within the syllable corresponding to the first frequency, and calculate the difference between the maximum amplitude and the second largest amplitude. If the difference is less than the preset threshold, the target frequency within the syllable corresponding to the first frequency is determined as the frequency corresponding to the second largest amplitude.

[0107] As mentioned above, after syllable alignment, one syllable at a time can be processed using a Fourier transform to obtain the maximum amplitude and its corresponding frequency for the current syllable, denoted as the first frequency. Simultaneously, the maximum amplitude and its corresponding frequency of the preceding syllable after its Fourier transform can be obtained, denoted as the second frequency. These two frequencies can then be compared. Typically, the frequencies of two adjacent syllables in audio data are not equal. If these two frequencies are equal, the maximum and second-largest amplitudes (i.e., the second-largest amplitudes) in the Fourier transform of the current syllable can be obtained. The difference between these two amplitudes can then be calculated and compared to a preset threshold. If the difference is less than the preset threshold, it indicates that the current syllable may have echo interference. In this case, the frequency corresponding to the second-largest amplitude can be obtained from the Fourier transform result of the current syllable, and the target frequency of the current syllable can be modified to the frequency corresponding to this second-largest amplitude.

[0108] If the difference is not less than the preset threshold, the target frequency of the current syllable will not be modified; that is, the target frequency of the current syllable will remain the first frequency corresponding to the maximum amplitude. Furthermore, the value of the preset threshold can be set according to actual circumstances, and is not specifically limited here.

[0109] In this embodiment, when the frequency of the current syllable is the same as the frequency of the previous syllable, the frequency corresponding to the second largest amplitude in the current syllable is taken as the target frequency of the current syllable. This can reduce or even eliminate the misidentification of frequencies caused by the echo formed by the reflection of audio data through walls or other objects. At the same time, it can also reduce the impact of errors in the syllable alignment process on the frequency identification result, thereby improving the accuracy of the frequency obtained by the final decoding.

[0110] As mentioned above, after identifying the end syllable in the audio data, the identified audio data is translated to obtain the decoded communication text. However, in the actual decoding process, there may be a situation where the end syllable is not identified, which prevents the translation stage from being entered. This embodiment proposes a corresponding solution to this situation, and the following embodiment will explain it.

[0111] In some embodiments, before "determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable" in step 306 above, the method may further include the following steps: If the target frequency corresponding to the currently identified syllable is inconsistent with the frequency corresponding to the end syllable, then determine whether the end amplitude corresponding to the frequency of the end syllable is greater than the preset end syllable amplitude threshold. If it is greater, then execute the above steps of determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable. Alternatively, obtain the first amplitude corresponding to the target frequency of the currently recognized syllable and the second amplitude corresponding to the target frequency of the previously recognized syllable. If both the first amplitude and the second amplitude are less than the preset exit amplitude threshold, then perform the above steps of determining the decoded communication text corresponding to the audio data based on the target frequency of each syllable.

[0112] In one possible scenario, during the syllable-by-syllable frequency identification process, when the receiving device identifies the syllable corresponding to the ending syllable, if the target frequency identified for the current syllable is inconsistent with the ending frequency, but the maximum amplitude of the syllable is greater than the preset ending syllable frequency, there exists an amplitude threshold (denoted as Amplitude). EndExist If the syllable is not identified, it indicates that there may be other noise affecting the ending syllable. In this case, the syllable recognition can be terminated directly and the translation stage can be entered. That is, the step of determining the decoding communication text corresponding to the audio data based on the target frequency corresponding to each syllable in step 306 above is performed by using the target frequency corresponding to the previously identified syllable.

[0113] In another possible scenario, during the process of identifying frequencies syllable by syllable, the receiving device can compare the amplitude corresponding to the target frequency of each syllable with a preset exit amplitude threshold. If the amplitudes corresponding to the target frequencies of two adjacent syllables are both less than the preset exit amplitude threshold, it means that the last syllable has been identified, i.e., it has been missed. This is because under normal circumstances, the amplitude corresponding to the target frequency of each syllable will be greater than or equal to the preset exit amplitude threshold. In this case, the device can directly exit and enter the translation stage. The target frequencies of the syllables identified before these two syllables are used to perform the step 306 above, which involves determining the decoded communication text corresponding to the audio data based on the target frequency of each syllable.

[0114] In this embodiment, the audio data translation can be directly exited if the ending syllable is affected by noise or is missing, in order to obtain the decoded communication text. This can avoid invalid decoding by the receiving device and thus improve the success rate of sound wave communication.

[0115] Taking acoustic distribution networks in acoustic communication as an example, the following shows the success rate of acoustic distribution networks at different distances using the technical solutions of this invention:

[0116] As can be seen from the table above, the technical solution of the present invention has a high success rate of acoustic wave distribution network and can improve the available distance of acoustic wave distribution network (or acoustic wave communication) to a certain extent. That is, acoustic wave distribution network (or acoustic wave communication) can still be carried out when the distance between devices is about 7 meters.

[0117] The audio data processing apparatus for acoustic wave communication provided by the present invention will be described below. The audio data processing apparatus for acoustic wave communication described below can be referred to in correspondence with the audio data processing method for acoustic wave communication described above.

[0118] Figure 5 This is one of the structural schematic diagrams of an audio data processing device for acoustic communication provided in an embodiment of the present invention. This device is applied to a transmitting end device. See [link / reference]. Figure 5 As shown, the device may include: The encoding module 410 is used to acquire the initial communication text to be sent, encode the initial communication text, and determine the encoded data corresponding to the initial communication text; the encoded data includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The frequency conversion module 420 is used to perform frequency conversion on the encoded data and determine the frequency data corresponding to the encoded data. The audio generation module 430 is used to perform audio generation processing on frequency data syllable by syllable using pulse code modulation and a sine wave function to determine the audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in the direction of first increasing and then decreasing. The audio transmission module 440 is used to send audio data to the receiving device; the audio data is used to enable the receiving device to decode the audio data and perform sound wave communication.

[0119] In some embodiments, the encoding module 410 is specifically used to perform transcoding processing on the initial communication text, determine the transcoded text corresponding to the initial communication text, and perform data conversion processing on the transcoded text to determine the transcoded data corresponding to the transcoded text; perform verification processing on the transcoded data to determine the check bit data corresponding to the transcoded data; perform transcoding processing and data conversion processing on the initial error correction code to determine the error correction code data corresponding to the initial error correction code; and concatenate the transcoded data with at least one of the check bit data and the error correction code data to determine the encoded data corresponding to the initial communication text.

[0120] In some embodiments, the frequency conversion module 420 is specifically used to determine the target number of channels used by the transmitting device based on the number of channels for receiving audio data supported by the receiving device, and to segment the encoded data according to the target number of channels to determine a number of sub-encoded data segments equal to the target number of channels; to perform frequency conversion on each sub-encoded data segment to determine the sub-frequency data corresponding to each sub-encoded data segment, and to use each sub-frequency data segment as the frequency data corresponding to the encoded data; each sub-frequency data segment includes multiple frequencies. Accordingly, the audio generation module 430 is specifically used to perform audio generation processing on each sub-frequency data syllable by syllable using pulse code modulation and a sine wave function, to determine the sub-audio data corresponding to each sub-frequency data, and to determine the audio data corresponding to the frequency data based on each sub-audio data.

[0121] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above-described method embodiment of the transmitting device side, and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the method embodiment of the transmitting device side will not be described in detail here.

[0122] Figure 6 This is a second schematic diagram of the audio data processing device for acoustic wave communication provided in this embodiment of the invention. This device is applied to a receiving end device. See [link / reference]. Figure 6 As shown, the device may include: The audio receiving module 510 is used to receive audio data sent by the transmitting device. The audio data is obtained by the transmitting device after encoding, frequency conversion and syllable-by-syllable audio generation of the initial communication text. The encoded data after encoding the initial communication text includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing. The audio decoding module 520 is used to decode audio data, determine the decoded communication text corresponding to the audio data, and perform sound wave communication based on the decoded communication text.

[0123] In some embodiments, the audio decoding module 520 described above may include: The start syllable recognition unit is used to extract one syllable from the audio data at a time, perform Fourier transform, and determine whether the start syllable of the audio data has been recognized based on the Fourier transform result of each syllable. The syllable alignment unit is used to, if the start syllable of the audio data is currently identified, acquire two syllables in the audio data starting from the position corresponding to the start syllable, acquire a single syllable within the two syllables by sampling point, perform Fourier transform, and determine the alignment position corresponding to the start syllable based on the Fourier transform result of each acquired single syllable. The audio decoding unit is used to extract one syllable at a time from the audio data according to the alignment position, perform Fourier transform, determine the target frequency corresponding to each syllable based on the Fourier transform result of each syllable, and determine the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable.

[0124] Optionally, the audio decoding unit is specifically used to obtain a first frequency corresponding to the currently recognized syllable and a second frequency corresponding to the previously recognized syllable; the first frequency is the frequency corresponding to the maximum amplitude within the currently recognized syllable, and the second frequency is the frequency corresponding to the maximum amplitude within the previously recognized syllable; if the first frequency and the second frequency are the same, then the maximum amplitude and the second largest amplitude within the syllable corresponding to the first frequency are obtained, and the difference between the maximum amplitude and the second largest amplitude is calculated; if the difference is less than a preset threshold, then the target frequency within the syllable corresponding to the first frequency is determined as the frequency corresponding to the second largest amplitude.

[0125] In some embodiments, before the audio decoding unit determines the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable, the apparatus further includes: The abnormal termination module is used to determine whether the termination amplitude corresponding to the frequency of the termination syllable is greater than a preset termination syllable amplitude threshold if the target frequency corresponding to the currently identified syllable is inconsistent with the frequency corresponding to the termination syllable. If it is greater, the module executes the above steps of determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable; or, it obtains the first amplitude corresponding to the target frequency of the currently identified syllable and the second amplitude corresponding to the target frequency of the previously identified syllable. If both the first amplitude and the second amplitude are less than the preset exit amplitude threshold, the module executes the above steps of determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable.

[0126] It should be noted that the apparatus provided in this embodiment of the invention can implement all the method steps implemented in the above-described receiving device-side method embodiment and can achieve the same technical effect. Therefore, the parts and beneficial effects that are the same as those in the receiving device-side method embodiment will not be described in detail here.

[0127] Figure 7 This example illustrates the physical structure of a device, which can be either a transmitting device or a receiving device, such as... Figure 7 As shown, the device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640, wherein the processor 610, communications interface 620, and memory 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute an audio data processing method for acoustic communication. This method includes: acquiring initial communication text to be sent, encoding the initial communication text, and determining the encoded data corresponding to the initial communication text; the encoded data includes at least one of check bit data and error correction code data corresponding to the initial communication text; performing frequency conversion on the encoded data to determine the frequency data corresponding to the encoded data; using pulse code modulation and a sine wave function to perform audio generation processing on the frequency data syllable by syllable to determine the audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing; sending the audio data to a receiving device; the audio data is used to enable the receiving device to decode the audio data and perform acoustic communication.

[0128] Alternatively, the method includes: receiving audio data sent by a transmitting device; the audio data is obtained by the transmitting device after encoding, frequency conversion, and syllable-by-syllable audio generation of an initial communication text, wherein the encoded data after encoding the initial communication text includes at least one of check bit data and error correction code data corresponding to the initial communication text, the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing; decoding the audio data to determine the decoded communication text corresponding to the audio data, and performing acoustic communication based on the decoded communication text.

[0129] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0130] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the audio data processing method for acoustic communication provided by the above methods. The method includes: acquiring an initial communication text to be sent, encoding the initial communication text, and determining the encoded data corresponding to the initial communication text; the encoded data includes at least one of check bit data and error correction code data corresponding to the initial communication text; performing frequency conversion on the encoded data to determine the frequency data corresponding to the encoded data; performing audio generation processing on the frequency data syllable by syllable using pulse code modulation and a sine wave function to determine the audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing; sending the audio data to a receiving device; the audio data is used to enable the receiving device to decode the audio data and perform acoustic communication.

[0131] Alternatively, the method includes: receiving audio data sent by a transmitting device; the audio data is obtained by the transmitting device after encoding, frequency conversion, and syllable-by-syllable audio generation of an initial communication text, wherein the encoded data after encoding the initial communication text includes at least one of check bit data and error correction code data corresponding to the initial communication text, the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing; decoding the audio data to determine the decoded communication text corresponding to the audio data, and performing acoustic communication based on the decoded communication text.

[0132] In another aspect, the present invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements an audio data processing method for acoustic communication provided by the methods described above. This method includes: acquiring an initial communication text to be sent, encoding the initial communication text, and determining encoded data corresponding to the initial communication text; the encoded data includes at least one of check bit data and error correction code data corresponding to the initial communication text; performing frequency conversion on the encoded data to determine frequency data corresponding to the encoded data; performing audio generation processing on the frequency data syllable by syllable using pulse code modulation and a sine wave function to determine audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing; sending the audio data to a receiving device; the audio data is used to enable the receiving device to decode the audio data and perform acoustic communication.

[0133] Alternatively, the method includes: receiving audio data sent by a transmitting device; the audio data is obtained by the transmitting device after encoding, frequency conversion, and syllable-by-syllable audio generation of an initial communication text, wherein the encoded data after encoding the initial communication text includes at least one of check bit data and error correction code data corresponding to the initial communication text, the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing; decoding the audio data to determine the decoded communication text corresponding to the audio data, and performing acoustic communication based on the decoded communication text.

[0134] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0135] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An audio data processing method for acoustic wave communication, characterized in that, Applied to transmitting devices, including: The initial communication text to be sent is obtained, and the initial communication text is encoded to determine the encoded data corresponding to the initial communication text; the encoded data includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The encoded data is frequency-converted to determine the frequency data corresponding to the encoded data; The frequency data is processed syllably by pulse code modulation and a sine wave function to generate audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing. The audio data is sent to the receiving device; the audio data is used to enable the receiving device to decode the audio data and perform acoustic communication.

2. The audio data processing method for acoustic wave communication according to claim 1, characterized in that, The step of encoding the initial communication text to determine the encoded data corresponding to the initial communication text includes: The initial communication text is transcoded to determine the transcoded text corresponding to the initial communication text, and the transcoded text is converted to determine the transcoded data corresponding to the transcoded text. The transcoded data is verified to determine the corresponding check bit data. The initial error correction code is subjected to transcoding and data conversion processing to determine the error correction code data corresponding to the initial error correction code. The transcoded data is concatenated with at least one of the check bit data and the error correction code data to determine the encoded data corresponding to the initial communication text.

3. The audio data processing method for acoustic wave communication according to claim 1, characterized in that, The step of performing frequency conversion on the encoded data to determine the frequency data corresponding to the encoded data includes: Based on the number of channels for receiving audio data supported by the receiving device, the target number of channels used by the transmitting device is determined, and the encoded data is segmented according to the target number of channels to determine a number of sub-encoded data segments equal to the target number of channels. Each segment of sub-coded data is frequency-converted to determine the sub-frequency data corresponding to each segment of sub-coded data, and each sub-frequency data is used as the frequency data corresponding to the coded data; each sub-frequency data includes multiple frequencies. Accordingly, the step of using pulse code modulation and a sine wave function to perform audio generation processing on the frequency data syllable by syllable to determine the audio data corresponding to the frequency data includes: The audio generation process is performed on each sub-frequency data by syllable using pulse code modulation and a sine wave function to determine the sub-audio data corresponding to each sub-frequency data, and the audio data corresponding to the frequency data is determined based on each sub-audio data.

4. An audio data processing method for acoustic wave communication, characterized in that, Applied to receiving devices, including: The device receives audio data sent by a transmitting device. The audio data is obtained by the transmitting device after encoding, frequency conversion, and syllable-by-syllable audio generation of the initial communication text. The encoded data after encoding the initial communication text includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing. The audio data is decoded to determine the corresponding decoded communication text, and acoustic communication is performed based on the decoded communication text.

5. The audio data processing method for acoustic wave communication according to claim 4, characterized in that, The step of decoding the audio data to determine the decoded communication text corresponding to the audio data includes: One syllable is extracted from the audio data at a time and a Fourier transform is performed. Based on the Fourier transform result of each syllable, it is determined whether the start syllable of the audio data has been identified. If the starting syllable of the audio data is currently identified, two syllables are acquired from the position corresponding to the starting syllable in the audio data, and a single syllable is acquired point by point within the two syllables for Fourier transform. The alignment position corresponding to the starting syllable is determined based on the Fourier transform result of the single syllable acquired each time. Based on the alignment position, one syllable is obtained from the audio data at a time and a Fourier transform is performed. The target frequency corresponding to each syllable is determined based on the Fourier transform result of each syllable, and the decoded communication text corresponding to the audio data is determined based on the target frequency corresponding to each syllable.

6. The audio data processing method for acoustic wave communication according to claim 5, characterized in that, The step of determining the target frequency corresponding to each syllable based on the Fourier transform result of each syllable includes: Obtain the first frequency corresponding to the syllable identified in the current instance and the second frequency corresponding to the syllable identified in the previous instance; the first frequency is the frequency corresponding to the maximum amplitude within the syllable identified in the current instance, and the second frequency is the frequency corresponding to the maximum amplitude within the syllable identified in the previous instance. If the first frequency is the same as the second frequency, then obtain the maximum amplitude and the second largest amplitude within the syllable corresponding to the first frequency, and calculate the difference between the maximum amplitude and the second largest amplitude; If the difference is less than a preset threshold, then the target frequency within the syllable corresponding to the first frequency is determined as the frequency corresponding to the second largest amplitude.

7. The audio data processing method for acoustic wave communication according to claim 5, characterized in that, Before determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable, the method further includes: If the target frequency corresponding to the currently identified syllable is inconsistent with the frequency corresponding to the end syllable, then it is determined whether the end amplitude corresponding to the frequency of the end syllable is greater than the preset end syllable amplitude threshold. If it is greater, then the step of determining the decoded communication text corresponding to the audio data based on the target frequency corresponding to each syllable is executed. Alternatively, obtain the first amplitude corresponding to the target frequency of the currently identified syllable and the second amplitude corresponding to the target frequency of the previously identified syllable. If both the first amplitude and the second amplitude are less than a preset exit amplitude threshold, then execute the step of determining the decoded communication text corresponding to the audio data based on the target frequency of each syllable.

8. An audio data processing device for acoustic wave communication, characterized in that, Applied to transmitting devices, including: An encoding module is used to acquire an initial communication text to be sent, encode the initial communication text, and determine the encoded data corresponding to the initial communication text; the encoded data includes at least one of check bit data and error correction code data corresponding to the initial communication text. A frequency conversion module is used to perform frequency conversion on the encoded data to determine the frequency data corresponding to the encoded data; The audio generation module is used to perform audio generation processing on the frequency data syllable by syllable using pulse code modulation and a sine wave function to determine the audio data corresponding to the frequency data; the audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing; An audio transmission module is used to send the audio data to a receiving device; the audio data is used by the receiving device to decode the audio data and perform sound wave communication.

9. An audio data processing device for acoustic wave communication, characterized in that, Applied to receiving devices, including: An audio receiving module is used to receive audio data sent by a transmitting device. The audio data is obtained by the transmitting device after encoding, frequency conversion, and syllable-by-syllable audio generation of the initial communication text. The encoded data after encoding the initial communication text includes at least one of the check bit data and error correction code data corresponding to the initial communication text. The audio data includes multiple syllables, and the volume of each syllable changes from beginning to end in a trend of first increasing and then decreasing. An audio decoding module is used to decode the audio data, determine the decoded communication text corresponding to the audio data, and perform sound wave communication based on the decoded communication text.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the audio data processing method for acoustic wave communication as described in any one of claims 1 to 3, or implements the audio data processing method for acoustic wave communication as described in any one of claims 4 to 7.