CN111313979B - Data transmission method and device, electronic equipment and storage medium - Google Patents

Data transmission method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111313979B
CN111313979B CN202010072491.6A CN202010072491A CN111313979B CN 111313979 B CN111313979 B CN 111313979B CN 202010072491 A CN202010072491 A CN 202010072491A CN 111313979 B CN111313979 B CN 111313979B
Authority
CN
China
Prior art keywords
signal
sound wave
amplitude
wave signal
signal frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010072491.6A
Other languages
Chinese (zh)
Other versions
CN111313979A (en
Inventor
张晨
董培
郭亮
陈翔宇
郑羲光
邢文浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010072491.6A priority Critical patent/CN111313979B/en
Publication of CN111313979A publication Critical patent/CN111313979A/en
Application granted granted Critical
Publication of CN111313979B publication Critical patent/CN111313979B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B11/00Transmission systems employing sonic, ultrasonic or infrasonic waves

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure relates to a data transmission method, a data transmission device, electronic equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: the method comprises the steps of determining the amplitude of each sound wave signal frame in sound wave signals according to the amplitude of at least one carrier wave signal frame in the carrier wave signals, obtaining the sound wave signals according to target data to be transmitted and the amplitude of each sound wave signal frame, mixing the carrier wave signals and the sound wave signals at least to obtain transmission signals comprising the carrier wave signals and the sound wave signals, and sending the transmission signals. The amplitude of each sound wave signal frame of the sound wave signals can be determined according to the amplitude of the carrier signal frame of the carrier signals, the sum of the amplitudes of each sound wave signal frame in the sound wave signals can be made to be large enough, the data intensity of target data carried in the sound wave signals is guaranteed to be large enough, the target data can be accurately transmitted, and the accuracy of data transmission is improved.

Description

Data transmission method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a data transmission method and apparatus, an electronic device, and a storage medium.
Background
Data transmission can be achieved between the two devices through sound wave signals, external network connection is not needed, the data transmission device is simple and convenient, and the data transmission device becomes a common data transmission mode at present.
In the related art, when the target data is transmitted by using the acoustic wave signal, the carrier signal and the acoustic wave signal carrying the target data need to be mixed, and the mixed transmission signal is sent. Wherein the amplitude of the carrier signal is fixed. If the amplitude of the acoustic wave signal is small, the data intensity of the target data carried in the acoustic wave signal is small, which results in low accuracy of data transmission. Therefore, how to determine the amplitude of the acoustic wave signal becomes an urgent problem to be solved.
Disclosure of Invention
The present disclosure provides a data transmission method, apparatus, electronic device, and storage medium capable of determining an amplitude of an acoustic wave signal.
According to a first aspect of the embodiments of the present disclosure, there is provided a data transmission method, including:
determining the amplitude of each sound wave signal frame in the sound wave signals according to the amplitude of at least one carrier wave signal frame in the carrier wave signals, so that the amplitude of the signal frame after the carrier wave signals are mixed with the signal frames corresponding to each other in the sound wave signals is not greater than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude;
acquiring the acoustic signals according to target data to be transmitted and the amplitude of each acoustic signal frame, wherein each acoustic signal frame carries the target data;
and at least mixing the carrier signal and the sound wave signal to obtain a transmission signal comprising the carrier signal and the sound wave signal, and sending the transmission signal.
In a possible implementation manner, the determining, according to the amplitude of at least one carrier signal frame in the carrier signals, the amplitude of each acoustic wave signal frame in the acoustic wave signals, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the acoustic wave signals is not greater than a first preset amplitude, and the sum of the amplitudes of each acoustic wave signal frame is not less than a second preset amplitude, includes:
determining a first sound wave amplitude of a first sound wave signal frame according to the amplitude of the first carrier signal frame, so that the amplitude of a signal frame after the first carrier signal frame is mixed with the first sound wave signal frame is not larger than the first preset amplitude;
and if the amplitude of the first sound wave is not smaller than the second preset amplitude, executing the step of acquiring the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame.
In another possible implementation manner, the determining, according to the amplitude of at least one carrier signal frame in the carrier signals, the amplitude of each acoustic wave signal frame in the acoustic wave signals, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the acoustic wave signals is not greater than a first preset amplitude, and the sum of the amplitudes of each acoustic wave signal frame is not less than a second preset amplitude, further includes:
if the first sound wave amplitude is smaller than the second preset amplitude, continuing to determine the amplitude of the next sound wave signal frame according to the amplitude of the next carrier wave signal frame, so that the amplitude of the signal frame after the next carrier wave signal frame is mixed with the next sound wave signal frame is not larger than the first preset amplitude, and executing the step of obtaining the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame when the sum of the amplitudes of each sound wave signal frame in the sound wave signals is not smaller than the second preset amplitude.
In another possible implementation manner, the acquiring the acoustic wave signal according to the target data to be transmitted and the amplitude of each acoustic wave signal frame includes:
and acquiring the sound wave signals according to the target data, the amplitude of each sound wave signal frame, the number of the sound wave signal frames in the sound wave signals and a preset time interval, wherein the preset time interval is a time interval between any two sound wave signal frames.
In another possible implementation manner, the acquiring the acoustic wave signal according to the target data to be transmitted and the amplitude of each acoustic wave signal frame includes:
converting the target data into binary data;
determining at least one frequency band corresponding to the binary data according to a preset mapping relation, wherein the preset mapping relation comprises the mapping relation between the binary data and the at least one frequency band;
and acquiring the sound wave signals according to at least one frequency band corresponding to the binary data and the amplitude of each sound wave signal frame.
In another possible implementation manner, if the frequency band corresponding to the binary data is a frequency band, the acoustic wave signal is a single-frequency acoustic wave signal; alternatively, the first and second electrodes may be,
and if the frequency band corresponding to the binary data comprises a plurality of frequency bands, the sound wave signal is a multi-frequency sound wave signal.
In another possible implementation manner, the mixing the carrier signal and the acoustic wave signal to obtain a transmission signal including the carrier signal and the acoustic wave signal includes:
mixing the carrier signal and the sound wave signal to obtain a first transmission signal;
adding a synchronization signal into the first transmission signal to obtain a second transmission signal, and sending the second transmission signal, wherein the synchronization signal is used for indicating the initial position of the target data in the sound wave signal; alternatively, the first and second electrodes may be,
adding a check signal corresponding to the target data to the first transmission signal to obtain a third transmission signal, and sending the third transmission signal; alternatively, the first and second electrodes may be,
and adding the synchronous signal and the check signal into the first transmission signal to obtain a fourth transmission signal, and sending the fourth transmission signal.
In another possible implementation manner, the determining, according to the amplitude of at least one carrier signal frame in the carrier signals, the amplitude of each acoustic wave signal frame in the acoustic wave signals, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the acoustic wave signals is not greater than a first preset amplitude, and the sum of the amplitudes of each acoustic wave signal frame is not less than a second preset amplitude includes:
and on the premise that the amplitude of at least one carrier signal frame in the carrier signals is not changed, determining the amplitude of each sound wave signal frame in the sound wave signals according to the amplitude of the at least one carrier signal frame, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the sound wave signals is not greater than the first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than the second preset amplitude.
In another possible implementation manner, the sending the transmission signal includes:
encoding the transmission signal to obtain an encoded transmission signal;
and playing the coded transmission signal according to the preset playing times.
According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission apparatus, the apparatus including:
the amplitude determining unit is configured to determine the amplitude of each sound wave signal frame in the sound wave signals according to the amplitude of at least one carrier wave signal frame in the carrier wave signals, so that the amplitude of the signal frame after the carrier wave signals are mixed with the signal frames corresponding to each other in the sound wave signals is not larger than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not smaller than a second preset amplitude;
the acoustic signal acquisition unit is configured to acquire the acoustic signal according to target data to be transmitted and the amplitude of each acoustic signal frame, and each acoustic signal frame carries the target data;
a signal transmitting unit configured to perform mixing processing on at least the carrier signal and the acoustic wave signal to obtain a transmission signal including the carrier signal and the acoustic wave signal, and transmit the transmission signal.
In one possible implementation, the amplitude determining unit is configured to:
determining a first sound wave amplitude of a first sound wave signal frame according to the amplitude of the first carrier signal frame, so that the amplitude of a signal frame after the first carrier signal frame is mixed with the first sound wave signal frame is not larger than the first preset amplitude;
and if the first sound wave amplitude is not smaller than the second preset amplitude, triggering the sound wave signal acquisition unit to execute the step of acquiring the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame.
In another possible implementation manner, the amplitude determining unit is configured to:
if the first sound wave amplitude is smaller than the second preset amplitude, continuing to determine the amplitude of the next sound wave signal frame according to the amplitude of the next carrier wave signal frame, so that the amplitude of the signal frame after the next carrier wave signal frame is mixed with the next sound wave signal frame is not larger than the first preset amplitude, and triggering the sound wave signal acquisition unit to execute the step of acquiring the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame when the sum of the amplitudes of each sound wave signal frame in the sound wave signals is not smaller than the second preset amplitude.
In another possible implementation manner, the acoustic wave signal obtaining unit is further configured to obtain the acoustic wave signal according to the target data, the amplitude of each acoustic wave signal frame, the number of acoustic wave signal frames in the acoustic wave signal, and a preset time interval, where the preset time interval is a time interval between any two acoustic wave signal frames.
In another possible implementation manner, the acoustic wave signal acquiring unit includes:
a data conversion subunit configured to convert the target data into binary data;
a frequency band determining subunit, configured to determine at least one frequency band corresponding to the binary data according to a preset mapping relationship, where the preset mapping relationship includes a mapping relationship between the binary data and the at least one frequency band;
and the sound wave signal acquisition subunit is configured to acquire the sound wave signals according to at least one frequency band corresponding to the binary data and the amplitude of each sound wave signal frame.
In another possible implementation manner, if the frequency band corresponding to the binary data is a frequency band, the acoustic wave signal is a single-frequency acoustic wave signal; alternatively, the first and second electrodes may be,
and if the frequency band corresponding to the binary data comprises a plurality of frequency bands, the sound wave signal is a multi-frequency sound wave signal.
In another possible implementation manner, the signal sending unit includes:
a signal determination subunit, configured to perform mixing processing on the carrier signal and the acoustic wave signal to obtain a first transmission signal;
a first sending subunit, configured to add a synchronization signal to the first transmission signal, obtain a second transmission signal, and send the second transmission signal, where the synchronization signal is used to indicate a starting position of the target data in the acoustic wave signal; alternatively, the first and second electrodes may be,
a second sending determination subunit, configured to add a check signal corresponding to the target data to the first transmission signal to obtain a third transmission signal, and send the third transmission signal; alternatively, the first and second electrodes may be,
a third sending determination subunit, configured to add the synchronization signal and the check signal to the first transmission signal, obtain a fourth transmission signal, and send the fourth transmission signal.
In another possible implementation manner, the amplitude determining unit is configured to:
and on the premise that the amplitude of at least one carrier signal frame in the carrier signals is not changed, determining the amplitude of each sound wave signal frame in the sound wave signals according to the amplitude of the at least one carrier signal frame, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the sound wave signals is not greater than the first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than the second preset amplitude.
In another possible implementation manner, the signal sending unit includes:
an encoding subunit, configured to encode the transmission signal, resulting in an encoded transmission signal;
and the playing subunit is configured to play the encoded transmission signal according to a preset playing time.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device for data transmission, the electronic device including:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to perform the data transmission method of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the data transmission method of the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, wherein instructions of the computer program product, when executed by a processor of an electronic device, enable the electronic device to perform the data transmission method of the first aspect.
The method, the device, the electronic equipment and the storage medium provided by the embodiment of the disclosure determine the amplitude of each sound wave signal frame in the sound wave signal according to the amplitude of at least one carrier wave signal frame in the carrier wave signal, so that the amplitude of the signal frame after the carrier wave signal is mixed with the signal frames corresponding to each other in the sound wave signal is not greater than a first preset amplitude, the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude, obtain the sound wave signal according to target data to be transmitted and the amplitude of each sound wave signal frame, at least mix the carrier wave signal and the sound wave signal to obtain a transmission signal comprising the carrier wave signal and the sound wave signal, and send the transmission signal. The method provided by the embodiment of the disclosure can determine the amplitude of each sound wave signal frame of the sound wave signal according to the amplitude of the carrier signal frame of the carrier signal, can make the sum of the amplitudes of each sound wave signal frame in the sound wave signal large enough, ensure that the data intensity of target data carried in the sound wave signal is large enough, can realize accurate transmission of the target data, and improve the accuracy of data transmission.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flow chart illustrating a method of data transmission according to an example embodiment.
Fig. 2 is a flow chart illustrating another method of data transmission according to an example embodiment.
Fig. 3 is a flow chart illustrating another method of data transmission according to an example embodiment.
Fig. 4 is a block diagram illustrating a data transmission apparatus according to an example embodiment.
Fig. 5 is a block diagram illustrating another data transmission apparatus according to an example embodiment.
Fig. 6 is a block diagram illustrating a terminal according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
It will be understood that the terms "first," "second," and the like as used in this disclosure may be used herein to describe various concepts, which are not limited by these terms unless otherwise specified. These terms are only used to distinguish one concept from another. For example, the first transmission signal may be referred to as a second transmission signal, and the second transmission signal may be referred to as a first transmission signal without departing from the scope of the present application.
Fig. 1 is a flowchart illustrating a data transmission method according to an exemplary embodiment, referring to fig. 1, the method is applied to an electronic device, and includes the following steps:
in step 101, according to the amplitude of at least one carrier signal frame in the carrier signals, the amplitude of each sound wave signal frame in the sound wave signals is determined, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the sound wave signals is not greater than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude.
In step 102, acoustic signals are obtained according to target data to be transmitted and the amplitude of each acoustic signal frame, and each acoustic signal frame carries the target data.
In step 103, at least the carrier signal and the acoustic wave signal are mixed to obtain a transmission signal including the carrier signal and the acoustic wave signal, and the transmission signal is sent.
The method provided by the embodiment of the disclosure determines the amplitude of each sound wave signal frame in the sound wave signal according to the amplitude of at least one carrier wave signal frame in the carrier wave signal, so that the amplitude of the signal frame after the carrier wave signal is mixed with the signal frames corresponding to each other in the sound wave signal is not greater than a first preset amplitude, the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude, obtains the sound wave signal according to target data to be transmitted and the amplitude of each sound wave signal frame, at least performs mixing processing on the carrier wave signal and the sound wave signal to obtain a transmission signal comprising the carrier wave signal and the sound wave signal, and sends the transmission signal. The method provided by the embodiment of the disclosure can determine the amplitude of each sound wave signal frame of the sound wave signal according to the amplitude of the carrier signal frame of the carrier signal, can make the sum of the amplitudes of each sound wave signal frame in the sound wave signal large enough, ensure that the data intensity of target data carried in the sound wave signal is large enough, can realize accurate transmission of the target data, and improve the accuracy of data transmission.
In one possible implementation manner, determining the amplitude of each sound wave signal frame in the sound wave signal according to the amplitude of at least one carrier wave signal frame in the carrier wave signal, so that the amplitude of the signal frame after the carrier wave signal is mixed with the signal frames corresponding to each other in the sound wave signal is not greater than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude, includes:
determining a first sound wave amplitude of the first sound wave signal frame according to the amplitude of the first carrier signal frame, so that the amplitude of the signal frame after the first carrier signal frame and the first sound wave signal frame are mixed is not larger than a first preset amplitude;
and if the first sound wave amplitude is not smaller than the second preset amplitude, executing a step of acquiring sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame.
In another possible implementation manner, determining the amplitude of each sound wave signal frame in the sound wave signal according to the amplitude of at least one carrier wave signal frame in the carrier wave signal, so that the amplitude of the signal frame after the carrier wave signal is mixed with the signal frames corresponding to each other in the sound wave signal is not greater than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude, further includes:
and if the first sound wave amplitude is smaller than the second preset amplitude, continuously determining the amplitude of the next sound wave signal frame according to the amplitude of the next carrier wave signal frame, so that the amplitude of the signal frame after the next carrier wave signal frame is mixed with the next sound wave signal frame is not larger than the first preset amplitude, and executing the step of obtaining the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame when the sum of the amplitudes of each sound wave signal frame in the sound wave signals is not smaller than the second preset amplitude.
In another possible implementation manner, acquiring the acoustic wave signal according to the target data to be transmitted and the amplitude of each acoustic wave signal frame includes:
and acquiring the sound wave signals according to the target data, the amplitude of each sound wave signal frame, the number of the sound wave signal frames in the sound wave signals and a preset time interval, wherein the preset time interval is the time interval between any two sound wave signal frames.
In another possible implementation manner, acquiring the acoustic wave signal according to the target data to be transmitted and the amplitude of each acoustic wave signal frame includes:
converting the target data into binary data;
determining at least one frequency band corresponding to the binary data according to a preset mapping relation, wherein the preset mapping relation comprises the mapping relation between the binary data and the at least one frequency band;
and acquiring the sound wave signals according to at least one frequency band corresponding to the binary data and the amplitude of each sound wave signal frame.
In another possible implementation manner, if the frequency band corresponding to the binary data is a frequency band, the acoustic wave signal is a single-frequency acoustic wave signal; alternatively, the first and second electrodes may be,
if the frequency band corresponding to the binary data includes a plurality of frequency bands, the acoustic wave signal is a multifrequency acoustic wave signal.
In another possible implementation manner, mixing the carrier signal and the acoustic wave signal to obtain a transmission signal including the carrier signal and the acoustic wave signal includes:
mixing the carrier signal and the sound wave signal to obtain a first transmission signal;
adding a synchronous signal into the first transmission signal to obtain a second transmission signal, and sending the second transmission signal, wherein the synchronous signal is used for indicating the initial position of the target data in the sound wave signal; alternatively, the first and second electrodes may be,
adding a check signal corresponding to the target data in the first transmission signal to obtain a third transmission signal, and sending the third transmission signal; alternatively, the first and second electrodes may be,
and adding the synchronous signal and the check signal into the first transmission signal to obtain a fourth transmission signal, and sending the fourth transmission signal.
In another possible implementation manner, determining the amplitude of each sound wave signal frame in the sound wave signal according to the amplitude of at least one carrier wave signal frame in the carrier wave signal, so that the amplitude of the signal frame after the carrier wave signal is mixed with the signal frames corresponding to each other in the sound wave signal is not greater than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude, includes:
on the premise that the amplitude of at least one carrier signal frame in the carrier signals is not changed, the amplitude of each sound wave signal frame in the sound wave signals is determined according to the amplitude of the at least one carrier signal frame, so that the amplitude of the signal frame after the carrier signals and the signal frames corresponding to each other in the sound wave signals are mixed is not larger than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not smaller than a second preset amplitude.
In another possible implementation, sending a transmission signal includes:
encoding the transmission signal to obtain an encoded transmission signal;
and playing the coded transmission signal according to the preset playing times.
The data transmission method provided by the embodiment of the disclosure can be applied to at least two electronic devices, wherein at least one of the at least two electronic devices is a sending device, and the other electronic devices are receiving devices. The sending device obtains a transmission signal carrying target data by adopting the method provided by the embodiment of the disclosure, sends the transmission signal, and the receiving device receives the transmission signal to obtain the target data, thereby realizing data transmission between the sending device and the receiving device. Due to the limitation of the transmission range of the acoustic wave signal, the distance between the at least two electronic devices needs to be not greater than the maximum transmission distance of the acoustic wave signal, so that the receiving device can receive the transmission signal sent by the sending device.
The electronic device may be a terminal, and the terminal may be various types of terminals such as a portable terminal, a pocket terminal, a handheld terminal, and the like, such as a mobile phone, a computer, a tablet computer, and the like.
Fig. 2 is a flowchart illustrating another data transmission method according to an exemplary embodiment, and referring to fig. 2, the method is applied to a transmitting device and a receiving device, and includes the following steps:
in step 201, the transmitting device determines the amplitude of each sound wave signal frame in the sound wave signal according to the amplitude of at least one carrier signal frame in the carrier signal.
The transmitting device is an electronic device that transmits target data, and the receiving device is an electronic device that receives target data transmitted by another transmitting device. The transmitting device transmits the target data by using the sound wave signal, and the receiving device receives the target data by receiving the sound wave signal, so that the transmission of the target data between the transmitting device and the receiving device is realized.
The carrier signal is used for carrying the sound wave signal, and the carrier signal itself can also be the sound wave signal or other signals.
After the carrier signal loads the sound wave signal, the carrier signal and the sound wave signal are mixed, and the amplitude of the obtained signal changes along with the change of the amplitude of the sound wave signal. However, in the embodiment of the present disclosure, considering that the signal amplitude of the carrier signal after loading the acoustic wave signal cannot exceed the preset amplitude, the amplitude of the acoustic wave signal frame of the acoustic wave signal is determined according to the amplitude of the carrier signal frame of the carrier signal, so that the amplitude of the signal frame after mixing the carrier signal and the signal frame corresponding to each other in the acoustic wave signal is not greater than the first preset amplitude. The first preset amplitude is the maximum amplitude after the signal frames are mixed, and the first preset amplitude can realize data transmission of target data. Wherein the carrier signal comprises at least one carrier signal frame.
The acoustic wave signal is a signal determined according to target data to be transmitted. The frequency of the sound wave signal can be any frequency, and correspondingly, the sound wave signal can be an ultrasonic sound wave signal or other sound wave signals.
For example, because the human ear is not sensitive to the acoustic wave signal with the frequency range of 18kHz (kilohertz) -22kHz, and the sampling rate of the electronic device can sample the acoustic wave signal with the frequency range of 18kHz-22kHz, that is, the electronic device can receive the acoustic wave signal with the frequency range of 18kHz-22kHz, when the data is transmitted by using the acoustic wave signal with the frequency range of 18kHz-22kHz, the data can be transmitted under the condition that a user cannot perceive the data, which is more convenient. The sampling rate of the electronic device may be 44.1kHz, 192kHz, etc., among others.
The sound wave signal comprises at least one sound wave signal frame, and the target data carried in each sound wave signal frame is the same for the sound wave signals transmitting the same target data.
In addition, for the acoustic wave signal, since the acoustic wave signal is used to transmit the target data, in order to enable the target data to be transmitted normally, the data intensity of the target data needs to be sufficiently large, and therefore, the sum of the amplitudes of at least one acoustic wave signal frame in the acoustic wave signal is not less than the second preset amplitude. And the second preset amplitude is the minimum amplitude required for realizing the normal transmission of the target data.
Optionally, the second preset amplitude is set according to target data to be transmitted, when the data amount of the target data to be transmitted is large, a larger second preset amplitude may be set, and when the data amount of the target data to be transmitted is small, a smaller second preset amplitude may be set.
For the process of determining the amplitude of each acoustic signal frame of the acoustic signal, the following manner may be employed.
In one possible implementation manner, the sending device determines the first sound wave amplitude of the first sound wave signal frame according to the amplitude of the first carrier signal frame, so that the amplitude of the signal frame after the first carrier signal frame is mixed with the first sound wave signal frame is not greater than a first preset amplitude.
The first carrier signal frame may be any signal frame in the carrier signals, the first carrier signal frame corresponds to the first sound wave signal frame, and when the subsequent carrier signals are mixed with the sound wave signals, the first carrier signal frame is mixed with the first sound wave signal frame.
When the sending device determines the first sound wave amplitude, the amplitude of the first carrier signal frame and a first preset amplitude can be obtained, and the difference between the first preset amplitude and the amplitude of the first carrier signal frame is used as the amplitude of the first sound wave signal frame by the sending device. Or, determining the amplitude of the first sound wave signal frame according to the amplitude of the first carrier signal frame and the first preset amplitude in other manners.
In one possible implementation manner, the amplitude of each sound wave signal frame in the sound wave signal is determined according to the amplitude of at least one carrier signal frame on the premise that the amplitude of at least one carrier signal frame in the carrier signal is not changed.
In the related art, because the signal amplitude after the carrier signal and the acoustic wave signal are mixed cannot exceed the preset amplitude, if the amplitude of the acoustic wave signal is large, the amplitude of the acoustic wave signal occupies the amplitude of the carrier signal, so that the amplitude of the carrier signal is too small to be normally transmitted. When the first sound wave amplitude is determined in the above manner, because the amplitude of the first carrier signal frame is fixed, if the amplitude of the first carrier signal frame is large, the corresponding first sound wave amplitude is small, the first sound wave amplitude does not occupy the amplitude of the first carrier signal frame, the amplitude of the first carrier signal frame is not reduced, and the influence on the transmission of the first carrier signal is avoided.
After the sending equipment determines the amplitude of the first sound wave signal frame, the amplitude of the first sound wave signal frame is compared with a second preset amplitude, and whether the signal amplitude of the sound wave signal is smaller than the second preset amplitude or not is determined.
(1) If the first acoustic amplitude is not less than the second preset amplitude, which indicates that the data strength of the target data carried in the acoustic signal is sufficient to ensure accurate transmission of the target data, the sending device performs the following step 202.
(2) If the first sound wave amplitude is smaller than the second preset amplitude, which indicates that the data intensity of the target data carried in the sound wave signal is not enough to ensure accurate transmission of the target data, the sending device continues to determine the amplitude of the next sound wave signal frame according to the amplitude of the next carrier signal frame, so that the amplitude of the signal frame after the next carrier signal frame is mixed with the next sound wave signal frame is not larger than the first preset amplitude, and when the sum of the amplitudes of each sound wave signal frame in the sound wave signal is not smaller than the second preset amplitude, the subsequent step 202 is executed.
Optionally, after the sending device determines that the amplitude of the first sound wave is smaller than the second preset amplitude, the amplitude of the second sound wave signal frame is determined according to the amplitude of the second carrier signal frame, the sum of the amplitude of the first sound wave signal frame and the amplitude of the second sound wave signal frame is obtained, the sum of the amplitudes is compared with the second preset amplitude, if the sum of the amplitudes is not smaller than the second preset amplitude, step 202 is executed, if the sum of the amplitudes is still smaller than the second preset amplitude, the sending device determines the amplitude of the third sound wave signal frame again according to the amplitude of the third carrier signal frame, and so on, until the sum of the amplitudes of each sound wave signal frame in the sound wave signals is not smaller than the second preset amplitude.
The second carrier signal frame is a next carrier signal frame of the first carrier signal frame, the second acoustic signal frame is a next acoustic signal frame of the first acoustic signal frame, and the second carrier signal frame corresponds to the second acoustic signal frame. The third carrier signal frame is a next carrier signal frame of the second carrier signal frame, the third acoustic signal frame is a next acoustic signal frame of the second acoustic signal frame, and the third carrier signal frame corresponds to the third acoustic signal frame. The second and third acoustic signal frames are determined in a manner similar to that of the first acoustic signal frame described above.
In addition, the transmitting apparatus determines the number of acoustic wave signal frames for transmitting the target data in the acoustic wave signal when determining the amplitude of each acoustic wave signal frame of the acoustic wave signal.
In step 202, the sending device obtains the acoustic signals according to the target data to be transmitted and the amplitude of each acoustic signal frame.
In the embodiment of the present disclosure, the transmitting device determines each acoustic wave signal frame of the acoustic wave signal and the amplitude of each acoustic wave signal frame according to the target data and the amplitude of each acoustic wave signal frame, thereby acquiring the acoustic wave signal. Wherein, each sound wave signal frame of the sound wave signal carries the target data.
In one possible implementation, the sending device obtains the acoustic signal according to the target data, the amplitude of each acoustic signal frame, the number of acoustic signal frames in the acoustic signal, and a preset time interval.
The preset time interval is the time interval between any two sound wave signal frames, the preset time interval can be any duration, and the time intervals between any two sound wave signal frames are the same.
The sending equipment determines the number and amplitude of sound wave signal frames in the sound wave signals and a preset time interval, then generates a corresponding number of sound wave signal frames according to target data and the number of the sound wave signal frames, each generated sound wave signal frame carries the target data, the amplitude of each sound wave signal frame is matched with the amplitude of each sound wave signal frame determined by the sending equipment, and determines the time point of each sound wave signal frame in the sound wave signals, so that the time interval between any two sound wave signal frames is the preset time interval, and the sound wave signals are determined. And the product of the number of sound wave signal frames in the sound wave signal and the preset time interval is the duration of the sound wave signal.
For example, for a sound wave signal, the number of sound wave signal frames of the sound wave signal is 10, and the preset time interval between each sound wave signal frame is 1 second, then the duration may be determined to be 10 seconds.
In one possible implementation manner, the sending device converts the target data into binary data, determines at least one frequency band corresponding to the binary data according to a preset mapping relationship, and acquires the acoustic wave signal according to the at least one frequency band corresponding to the binary data and the amplitude of each acoustic wave signal frame.
The target data may be any form of data other than binary data, for example, the target data may be data in hexadecimal, character string, or the like. The preset mapping relationship comprises a mapping relationship between binary data and at least one frequency band.
The sending device determines at least one frequency band corresponding to the binary data, that is, the binary data can be represented by the at least one frequency band, and according to the at least one frequency band and the amplitude of each sound wave signal frame, at least one sound wave signal of which the frequency band belongs to the at least one frequency band can be obtained, that is, the frequency band of each sound wave signal is the frequency band corresponding to the binary data, and the amplitude of each sound wave signal frame in each sound wave signal is matched with the amplitude of each sound wave signal frame determined by the sending device.
For example, the center frequencies of the two frequency bands corresponding to the target data are respectively 18kHz and 19kHz, after the target data is converted into binary data, the frequency band with the center frequency of 18kHz and the frequency band with the center frequency of 19kHz are the two frequency bands corresponding to the binary data, and the transmitting device acquires the multi-frequency sinusoidal signal corresponding to the binary data according to the two frequency bands to obtain the acoustic wave signal.
And the sending equipment can also acquire the sound wave signals according to the binary data, the amplitude of each sound wave signal frame, the number of the sound wave signal frames in the sound wave signals and the preset time interval.
The transmitting device determines at least one frequency band corresponding to the binary data, i.e. the binary data can be represented by the at least one frequency band. The transmitting device determines the at least one frequency band, the number and amplitude of the sound wave signal frames and the preset time interval, then generates a corresponding number of sound wave signal frames according to the binary data and the number of the sound wave signal frames, each generated sound wave signal frame carries the binary data, the amplitude of each sound wave signal frame is matched with the amplitude of each sound wave signal frame determined by the transmitting device, determines the time point of each sound wave signal frame in the sound wave signal, and makes the time interval between any two sound wave signal frames be the preset time interval, so that the sound wave signal is determined, and the amplitude of each sound wave signal frame in the sound wave signal is matched with the amplitude of each sound wave signal frame determined by the transmitting device.
In addition, if the binary data corresponds to a frequency band, the sound wave signal is a single-frequency sound wave signal; if the binary data corresponds to a plurality of frequency bands, the acoustic wave signal is a multifrequency acoustic wave signal.
When the target data are transmitted by the multi-frequency sound wave signals, a plurality of frequency bands can be set, so that the target data are transmitted in parallel in the plurality of frequency bands, and the data transmission is fast.
For example, when the sending device simultaneously transmits the first target data and the second target data, the center frequency of the first frequency band corresponding to the first target data is 19kHz, and the center frequency of the second frequency band corresponding to the second target data is 20kHz, so that the first frequency band is used for transmitting the first target data, and the second frequency band is used for transmitting the second target data, thereby implementing parallel transmission of the first target data and the second target data, and increasing the transmission speed.
In one possible implementation manner, before the sending device sends the transmission signal to the receiving device, the receiving device may send the current device operating state to the sending device, and the sending device determines whether to transmit using the multifrequency acoustic wave signal according to the device operating state. For example, when the device operating state of the receiving device is good, the sending device may transmit a plurality of target data in parallel, thereby increasing the transmission speed of the target data. When the device operating state of the receiving device is poor, the transmitting device can transmit one target data at a time.
In step 203, the transmitting device performs mixing processing on at least the carrier signal and the acoustic wave signal to obtain a transmission signal including the carrier signal and the acoustic wave signal, and transmits the transmission signal.
In the embodiment of the present disclosure, the sending device performs mixing processing on at least the carrier signal and the acoustic wave signal, and a signal mixer or other manners may be adopted when performing the mixing processing.
In one possible implementation, the transmitting device mixes only the carrier signal and the acoustic wave signal to obtain a transmission signal, and transmits the transmission signal.
In another possible implementation manner, the sending device performs mixing processing on the carrier signal and the acoustic wave signal to obtain a first transmission signal, adds a synchronization signal to the first transmission signal to obtain a second transmission signal, and sends the second transmission signal.
The synchronous signal is used for indicating the initial position of the target data in the sound wave signal, and the synchronous signal is added in front of the sound wave signal, namely when the receiving equipment detects the synchronous signal, the next signal frame can be determined to be the sound wave signal, and therefore the position of starting to analyze the sound wave signal is determined. The synchronization signal may be a synchronization word or other synchronization signal.
In another possible implementation manner, the sending device adds a check signal corresponding to the target data to the first transmission signal to obtain a third transmission signal, and sends the third transmission signal.
The check signal is used to check whether the target data is correct, and may be a value determined according to the target data, and each target data has a unique corresponding check signal. When receiving the first transmission signal and the check signal, the receiving device may obtain the target data in the first transmission signal, obtain the check signal corresponding to the target data in the same manner, and compare the check signal with the check signal sent by the sending device to determine whether the received target data is correct.
In another possible implementation manner, the sending device adds the synchronization signal and the check signal to the first transmission signal to obtain a fourth transmission signal, and sends the fourth transmission signal.
In addition, the sending device may encode the transmission signal to obtain an encoded transmission signal, and play the encoded transmission signal according to a preset number of times of playing.
When the sending device encodes the transmission signal, PCM (Pulse Code Modulation) or other encoding methods may be used.
The preset playing times are set according to needs, and can be 1 time, 2 times or other times.
Optionally, the transmission signal is played by using a speaker of the sending device, and in order to enable the receiving device to receive the transmission signal, the transmission signal may be played cyclically according to a preset number of times during playing, so as to prevent data transmission failure caused by that the receiving device does not receive the transmission signal for the first time.
In step 204, the receiving device receives the transmission signal, and analyzes the transmission signal to obtain the target data.
In the embodiment of the present disclosure, the number of the receiving devices may be 1, or may be multiple, and for one receiving device, the receiving device receives the transmission signal and analyzes the transmission signal, so as to obtain the target data carried in the transmission signal. When analyzing the transmission signal, it is necessary to analyze the transmission signal by using a decoding method corresponding to the encoding method in step 203.
In one possible implementation, when the transmitting device plays the encoded transmission signal using a speaker, the receiving device may receive the transmission signal using a microphone.
In a possible implementation manner, when the transmission signal includes a synchronization signal, the receiving device receives the transmission signal, first detects the synchronization signal included in the transmission signal, determines a start position of the acoustic wave signal according to the detected synchronization signal, and analyzes the transmission signal after the start position to obtain the acoustic wave signal. And further analyzing the sound wave signals to obtain target data.
In addition, when the receiving device analyzes the sound wave signal, the frequency band in the sound wave signal is converted into binary data according to a preset mapping relation, and therefore target data are obtained.
In a possible implementation manner, when the transmission signal includes a check signal, the receiving device analyzes the acoustic wave signal to obtain target data, and then determines whether the target data obtained by analysis is correct according to the check signal included in the transmission data, if so, the receiving device obtains the target data, and if not, the receiving device receives the transmission signal again and obtains the target data again until the correct target data is obtained.
When receiving the transmission signal and the check signal, the receiving device may obtain the target data in the transmission signal, obtain the check signal corresponding to the target data in the same manner, and compare the check signal with the check signal sent by the sending device to determine whether the received target data is correct. For example, if the target data obtained by the analysis is correct target data, the corresponding value of the analyzed target data is the same as that of the verification signal, otherwise, the value is different.
In the embodiment of the disclosure, when the sending device acquires the acoustic wave signal, for the setting process of the signal frame amplitude of the acoustic wave signal, the larger the sum of the frame amplitudes of each acoustic wave signal is, that is, the larger the data intensity in the acoustic wave signal is, the smaller the signal analysis difficulty is when the receiving device receives the transmission signal and analyzes the transmission signal to acquire the target data. And the smaller the sum of the frame amplitudes of each sound wave signal is, the greater the difficulty of signal analysis is.
In addition, referring to fig. 3, a data transmission flow between the sending device and the receiving device is that the sending device obtains target data to be transmitted, converts the target data into binary data, converts the binary data into a multi-frequency sound wave signal according to a preset mapping relationship, mixes a carrier signal and the multi-frequency sound wave signal, adds a synchronization signal and a check signal to obtain a transmission signal, and after the transmission signal is encoded, cyclically plays the transmission signal through a speaker of the sending device.
The receiving equipment receives the transmission signal through the microphone, detects the synchronous signal in the frequency band of the transmission signal, analyzes the multi-frequency sound wave signal behind the synchronous signal, obtains binary data according to a preset mapping relation, determines whether the obtained target data is correct or not according to the verification signal, and if the obtained target data is incorrect, detects the synchronous signal again and obtains the target data again.
According to the method provided by the embodiment of the disclosure, sending equipment determines the amplitude of each sound wave signal frame in a sound wave signal according to the amplitude of at least one carrier wave signal frame in the carrier wave signal, the sending equipment obtains the sound wave signal according to target data to be transmitted and the amplitude of each sound wave signal frame, the sending equipment at least performs mixing processing on the carrier wave signal and the sound wave signal to obtain transmission signals including the carrier wave signal and the sound wave signal, the transmission signals are sent, and receiving equipment receives the transmission signals and analyzes the transmission signals to obtain the target data. The method provided by the embodiment of the disclosure can determine the amplitude of each sound wave signal frame of the sound wave signal according to the amplitude of the carrier signal frame of the carrier signal, can make the sum of the amplitudes of each sound wave signal frame in the sound wave signal large enough, ensure that the data intensity of target data carried in the sound wave signal is large enough, can realize accurate transmission of the target data, and improve the accuracy of data transmission.
In addition, according to the method provided by the embodiment of the disclosure, because the amplitude of the carrier signal frame is fixed, if the amplitude of the carrier signal frame is large, the corresponding amplitude of the acoustic wave signal is small, the amplitude of the acoustic wave signal does not occupy the amplitude of the carrier signal frame, the amplitude of the carrier signal frame is not reduced, and the influence on the transmission of the carrier signal is avoided. The amplitude of the sound wave signal frame and the duration of the sound wave signal can be adjusted adaptively according to the amplitude of the carrier signal frame, so that normal transmission of the carrier signal can be guaranteed, the data intensity of target data carried by the sound wave signal can be guaranteed, and the receiving equipment can be guaranteed to recover the target data correctly.
Fig. 4 is a block diagram illustrating a data transmission apparatus according to an example embodiment. Referring to fig. 4, the apparatus includes:
an amplitude determining unit 401 configured to determine an amplitude of each acoustic wave signal frame in the acoustic wave signal according to an amplitude of at least one carrier wave signal frame in the carrier wave signal, so that an amplitude of a signal frame after the carrier wave signal is mixed with a signal frame corresponding to each other in the acoustic wave signal is not greater than a first preset amplitude, and a sum of the amplitudes of each acoustic wave signal frame is not less than a second preset amplitude;
an acoustic signal acquisition unit 402 configured to acquire an acoustic signal according to target data to be transmitted and an amplitude of each acoustic signal frame, each acoustic signal frame carrying the target data;
a signal transmitting unit 403 configured to perform mixing processing on at least the carrier signal and the acoustic wave signal to obtain a transmission signal including the carrier signal and the acoustic wave signal, and transmit the transmission signal.
The data transmission device provided by the embodiment of the disclosure determines the amplitude of each sound wave signal frame in the sound wave signal according to the amplitude of at least one carrier wave signal frame in the carrier wave signal, so that the amplitude of the signal frame after the carrier wave signal is mixed with the signal frames corresponding to each other in the sound wave signal is not greater than a first preset amplitude, the sum of the amplitudes of each sound wave signal frame is not less than a second preset amplitude, obtains the sound wave signal according to target data to be transmitted and the amplitude of each sound wave signal frame, at least performs mixing processing on the carrier wave signal and the sound wave signal, obtains a transmission signal including the carrier wave signal and the sound wave signal, and sends the transmission signal. The device provided by the embodiment of the disclosure can determine the amplitude of each sound wave signal frame of the sound wave signal according to the amplitude of the carrier signal frame of the carrier signal, can enable the sum of the amplitudes of each sound wave signal frame in the sound wave signal to be large enough, ensure that the data intensity of target data carried in the sound wave signal is large enough, can realize accurate transmission of the target data, and improve the accuracy of data transmission.
In one possible implementation, the amplitude determining unit 401 is configured to:
determining a first sound wave amplitude of the first sound wave signal frame according to the amplitude of the first carrier signal frame, so that the amplitude of the signal frame after the first carrier signal frame and the first sound wave signal frame are mixed is not larger than a first preset amplitude;
if the first sound wave amplitude is not smaller than the second preset amplitude, the sound wave signal obtaining unit 402 is triggered to perform the step of obtaining the sound wave signal according to the target data to be transmitted and the amplitude of each sound wave signal frame.
In another possible implementation, the amplitude determining unit 401 is configured to:
if the first sound wave amplitude is smaller than the second preset amplitude, the amplitude of the next sound wave signal frame is continuously determined according to the amplitude of the next carrier signal frame, so that the amplitude of the signal frame after the next carrier signal frame is mixed with the next sound wave signal frame is not larger than the first preset amplitude, and when the sum of the amplitudes of all the sound wave signal frames in the sound wave signals is not smaller than the second preset amplitude, the sound wave signal obtaining unit 402 is triggered to execute the step of obtaining the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame.
In another possible implementation manner, the acoustic wave signal obtaining unit 402 is further configured to obtain the acoustic wave signal according to the target data, the amplitude of each acoustic wave signal frame, the number of acoustic wave signal frames in the acoustic wave signal, and a preset time interval, where the preset time interval is a time interval between any two acoustic wave signal frames.
In another possible implementation, referring to fig. 5, the acoustic wave signal acquiring unit 402 includes:
a data conversion sub-unit 4021 configured to convert the target data into binary data;
the frequency band determining subunit 4022 is configured to determine at least one frequency band corresponding to the binary data according to a preset mapping relationship, where the preset mapping relationship includes a mapping relationship between the binary data and the at least one frequency band;
the acoustic wave signal acquisition subunit 4023 is configured to acquire an acoustic wave signal according to at least one frequency band corresponding to the binary data and the amplitude of each acoustic wave signal frame.
In another possible implementation manner, if the frequency band corresponding to the binary data is a frequency band, the acoustic wave signal is a single-frequency acoustic wave signal; alternatively, the first and second electrodes may be,
if the frequency band corresponding to the binary data includes a plurality of frequency bands, the acoustic wave signal is a multifrequency acoustic wave signal.
In another possible implementation, referring to fig. 5, the signal sending unit 403 includes:
a first signal determination subunit 4031 configured to perform mixing processing on the carrier signal and the acoustic wave signal to obtain a first transmission signal;
a first transmitting subunit 4032 configured to add a synchronization signal to the first transmission signal, obtain a second transmission signal, and transmit the second transmission signal, where the synchronization signal is used to indicate a start position of the target data in the acoustic wave signal; alternatively, the first and second electrodes may be,
a second sending subunit 4033, configured to add the check signal corresponding to the target data to the first transmission signal, obtain a third transmission signal, and send the third transmission signal; alternatively, the first and second electrodes may be,
the third transmitting subunit 4034 is configured to add the synchronization signal and the check signal to the first transmission signal, obtain a fourth transmission signal, and transmit the fourth transmission signal.
In another possible implementation, the amplitude determining unit 401 is further configured to:
on the premise that the amplitude of at least one carrier signal frame in the carrier signals is not changed, the amplitude of each sound wave signal frame in the sound wave signals is determined according to the amplitude of the at least one carrier signal frame, so that the amplitude of the signal frame after the carrier signals and the signal frames corresponding to each other in the sound wave signals are mixed is not larger than a first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not smaller than a second preset amplitude.
In another possible implementation, referring to fig. 5, the signal sending unit 403 includes:
an encoding subunit 4035 configured to encode the transmission signal to obtain an encoded transmission signal;
the playing subunit 4036 is configured to play the encoded transmission signal according to a preset number of playing times.
Fig. 6 is a block diagram illustrating a terminal 600 according to an example embodiment. The terminal 600 is used for executing the steps executed by the terminal in the data transmission method, and may be a portable mobile terminal, such as: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 600 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 600 includes: one or more processors 601 and one or more memories 602.
The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include volatile memory or non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 602 is used to store at least one instruction for being possessed by processor 601 to implement the data transfer methods provided by the method embodiments herein.
In some embodiments, the terminal 600 may further optionally include: a peripheral interface 603 and at least one peripheral. The processor 601, memory 602, and peripheral interface 603 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a touch screen display 605, a camera 606, an audio circuit 607, a positioning component 608, and a power supply 609.
The peripheral interface 603 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, memory 602, and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 604 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 604 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 604 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 13G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 604 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display 605 is used to display a UI (user interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to capture touch signals on or over the surface of the display screen 605. The touch signal may be input to the processor 601 as a control signal for processing. At this point, the display 605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 605 may be one, providing the front panel of the terminal 600; in other embodiments, the display 605 may be at least two, respectively disposed on different surfaces of the terminal 600 or in a folded design; in still other embodiments, the display 605 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 600. Even more, the display 605 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 605 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 606 is used to capture images or video. Optionally, camera assembly 606 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 607 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 601 for processing or inputting the electric signals to the radio frequency circuit 604 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 600. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 607 may also include a headphone jack.
The positioning component 608 is used for positioning the current geographic Location of the terminal 600 to implement navigation or LBS (Location Based Service). The Positioning component 608 can be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union's galileo System.
Power supply 609 is used to provide power to the various components in terminal 600. The power supply 609 may be ac, dc, disposable or rechargeable. When the power supply 609 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 600 also includes one or more sensors 610. The one or more sensors 610 include, but are not limited to: acceleration sensor 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 615, and proximity sensor 616.
The acceleration sensor 611 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 600. For example, the acceleration sensor 611 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 601 may control the touch screen display 605 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 612 may detect a body direction and a rotation angle of the terminal 600, and the gyro sensor 612 and the acceleration sensor 611 may cooperate to acquire a 3D motion of the user on the terminal 600. The processor 601 may implement the following functions according to the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
The pressure sensor 613 may be disposed on a side frame of the terminal 600 and/or on a lower layer of the touch display screen 605. When the pressure sensor 613 is disposed on the side frame of the terminal 600, a user's holding signal of the terminal 600 can be detected, and the processor 601 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed at the lower layer of the touch display screen 605, the processor 601 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 605. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 614 is used for collecting a fingerprint of a user, and the processor 601 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the identity of the user according to the collected fingerprint. Upon recognizing that the user's identity is a trusted identity, the processor 601 authorizes the user to have relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 614 may be disposed on the front, back, or side of the terminal 600. When a physical key or vendor Logo is provided on the terminal 600, the fingerprint sensor 614 may be integrated with the physical key or vendor Logo.
The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, processor 601 may control the display brightness of touch display 605 based on the ambient light intensity collected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 605 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is turned down. In another embodiment, the processor 601 may also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
A proximity sensor 616, also known as a distance sensor, is typically disposed on the front panel of the terminal 600. The proximity sensor 616 is used to collect the distance between the user and the front surface of the terminal 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 gradually decreases, the processor 601 controls the touch display 605 to switch from the bright screen state to the dark screen state; when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 gradually becomes larger, the processor 601 controls the touch display 605 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is not intended to be limiting of terminal 600 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
In an exemplary embodiment, a non-transitory computer readable storage medium is also provided, and when executed by a processor of an electronic device, the instructions in the storage medium enable the electronic device to perform the steps performed by the electronic device in the above data transmission method.
In an exemplary embodiment, a computer program product is also provided, in which instructions, when executed by a processor of an electronic device, enable the electronic device to perform the steps performed by the electronic device in the above-mentioned data transmission method.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (16)

1. A method of data transmission, the method comprising:
determining a first sound wave amplitude of a first sound wave signal frame according to the amplitude of the first carrier signal frame in the carrier signals, so that the amplitude of the signal frame after the first carrier signal frame is mixed with the first sound wave signal frame is not larger than a first preset amplitude;
if the first sound wave amplitude is not smaller than a second preset amplitude, obtaining sound wave signals according to target data to be transmitted and the amplitude of each sound wave signal frame, wherein each sound wave signal frame carries the target data;
if the first sound wave amplitude is smaller than the second preset amplitude, continuing to determine the amplitude of the next sound wave signal frame according to the amplitude of the next carrier wave signal frame, so that the amplitude of the signal frame after the next carrier wave signal frame is mixed with the next sound wave signal frame is not larger than the first preset amplitude, and obtaining the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame when the sum of the amplitudes of each sound wave signal frame in the sound wave signals is not smaller than the second preset amplitude;
and at least mixing the carrier signal and the sound wave signal to obtain a transmission signal comprising the carrier signal and the sound wave signal, and sending the transmission signal.
2. The method according to claim 1, wherein the obtaining the acoustic signals according to the target data to be transmitted and the amplitude of each acoustic signal frame comprises:
and acquiring the sound wave signals according to the target data, the amplitude of each sound wave signal frame, the number of the sound wave signal frames in the sound wave signals and a preset time interval, wherein the preset time interval is a time interval between any two sound wave signal frames.
3. The method according to claim 1, wherein the obtaining the acoustic signals according to the target data to be transmitted and the amplitude of each acoustic signal frame comprises:
converting the target data into binary data;
determining at least one frequency band corresponding to the binary data according to a preset mapping relation, wherein the preset mapping relation comprises the mapping relation between the binary data and the at least one frequency band;
and acquiring the sound wave signals according to at least one frequency band corresponding to the binary data and the amplitude of each sound wave signal frame.
4. The method of claim 3, wherein if the binary data corresponds to a frequency band, the acoustic signal is a single frequency acoustic signal; alternatively, the first and second electrodes may be,
and if the binary data correspond to a plurality of frequency bands, the sound wave signal is a multi-frequency sound wave signal.
5. The method according to claim 1, wherein the mixing the carrier signal and the acoustic wave signal to obtain a transmission signal including the carrier signal and the acoustic wave signal comprises:
mixing the carrier signal and the sound wave signal to obtain a first transmission signal;
adding a synchronization signal into the first transmission signal to obtain a second transmission signal, and sending the second transmission signal, wherein the synchronization signal is used for indicating the initial position of the target data in the sound wave signal; alternatively, the first and second electrodes may be,
adding a check signal corresponding to the target data to the first transmission signal to obtain a third transmission signal, and sending the third transmission signal; alternatively, the first and second electrodes may be,
and adding the synchronous signal and the check signal into the first transmission signal to obtain a fourth transmission signal, and sending the fourth transmission signal.
6. The method of claim 1, further comprising:
and on the premise that the amplitude of at least one carrier signal frame in the carrier signals is not changed, determining the amplitude of each sound wave signal frame in the sound wave signals according to the amplitude of the at least one carrier signal frame, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the sound wave signals is not greater than the first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than the second preset amplitude.
7. The method of any of claims 1-6, wherein said sending said transmission signal comprises:
encoding the transmission signal to obtain an encoded transmission signal;
and playing the coded transmission signal according to the preset playing times.
8. A data transmission apparatus, characterized in that the apparatus comprises:
the amplitude determining unit is configured to determine a first sound wave amplitude of a first sound wave signal frame according to the amplitude of the first carrier signal frame in the carrier signals, so that the amplitude of the signal frame after the first carrier signal frame is mixed with the first sound wave signal frame is not larger than a first preset amplitude; if the first sound wave amplitude is not smaller than a second preset amplitude, triggering a sound wave signal acquisition unit to acquire a sound wave signal according to target data to be transmitted and the amplitude of each sound wave signal frame;
the amplitude determining unit is further configured to continue to determine the amplitude of a next sound wave signal frame according to the amplitude of a next carrier wave signal frame if the first sound wave amplitude is smaller than the second preset amplitude, so that the amplitude of a signal frame after the next carrier wave signal frame is mixed with the next sound wave signal frame is not larger than the first preset amplitude, and when the sum of the amplitudes of each sound wave signal frame in the sound wave signals is not smaller than the second preset amplitude, the sound wave signal obtaining unit is triggered to perform the step of obtaining the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame;
the sound wave signal acquisition unit is configured to acquire the sound wave signals according to the target data to be transmitted and the amplitude of each sound wave signal frame, and each sound wave signal frame carries the target data;
a signal transmitting unit configured to perform mixing processing on at least the carrier signal and the acoustic wave signal to obtain a transmission signal including the carrier signal and the acoustic wave signal, and transmit the transmission signal.
9. The apparatus according to claim 8, wherein the acoustic signal acquiring unit is configured to acquire the acoustic signal according to the target data, the amplitude of each acoustic signal frame, the number of acoustic signal frames in the acoustic signal, and a preset time interval, wherein the preset time interval is a time interval between any two acoustic signal frames.
10. The apparatus according to claim 8, wherein said acoustic wave signal acquisition unit comprises:
a data conversion subunit configured to convert the target data into binary data;
a frequency band determining subunit, configured to determine at least one frequency band corresponding to the binary data according to a preset mapping relationship, where the preset mapping relationship includes a mapping relationship between the binary data and the at least one frequency band;
and the sound wave signal acquisition subunit is configured to acquire the sound wave signals according to at least one frequency band corresponding to the binary data and the amplitude of each sound wave signal frame.
11. The apparatus according to claim 10, wherein if the frequency band corresponding to the binary data is a frequency band, the acoustic wave signal is a single-frequency acoustic wave signal; alternatively, the first and second electrodes may be,
and if the frequency band corresponding to the binary data comprises a plurality of frequency bands, the sound wave signal is a multi-frequency sound wave signal.
12. The apparatus of claim 8, wherein the signal sending unit comprises:
a signal determination subunit, configured to perform mixing processing on the carrier signal and the acoustic wave signal to obtain a first transmission signal;
a first sending subunit, configured to add a synchronization signal to the first transmission signal, obtain a second transmission signal, and send the second transmission signal, where the synchronization signal is used to indicate a starting position of the target data in the acoustic wave signal; alternatively, the first and second electrodes may be,
the second sending subunit is configured to add a check signal corresponding to the target data to the first transmission signal to obtain a third transmission signal, and send the third transmission signal; alternatively, the first and second electrodes may be,
and the third sending subunit is configured to add the synchronization signal and the check signal to the first transmission signal to obtain a fourth transmission signal, and send the fourth transmission signal.
13. The apparatus of claim 8, wherein the amplitude determination unit is configured to:
and on the premise that the amplitude of at least one carrier signal frame in the carrier signals is not changed, determining the amplitude of each sound wave signal frame in the sound wave signals according to the amplitude of the at least one carrier signal frame, so that the amplitude of the signal frame after the carrier signals are mixed with the signal frames corresponding to each other in the sound wave signals is not greater than the first preset amplitude, and the sum of the amplitudes of each sound wave signal frame is not less than the second preset amplitude.
14. The apparatus according to any one of claims 8-13, wherein the signal transmission unit comprises:
an encoding subunit, configured to encode the transmission signal, resulting in an encoded transmission signal;
and the playing subunit is configured to play the encoded transmission signal according to a preset playing time.
15. An electronic device for data transmission, the electronic device comprising:
one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable commands;
wherein the one or more processors are configured to perform the data transmission method of any one of claims 1 to 7.
16. A non-transitory computer readable storage medium, instructions in which, when executed by a processor of an electronic device, enable the electronic device to perform the data transmission method of any one of claims 1 to 7.
CN202010072491.6A 2020-01-21 2020-01-21 Data transmission method and device, electronic equipment and storage medium Active CN111313979B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010072491.6A CN111313979B (en) 2020-01-21 2020-01-21 Data transmission method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010072491.6A CN111313979B (en) 2020-01-21 2020-01-21 Data transmission method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111313979A CN111313979A (en) 2020-06-19
CN111313979B true CN111313979B (en) 2021-09-17

Family

ID=71161581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010072491.6A Active CN111313979B (en) 2020-01-21 2020-01-21 Data transmission method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111313979B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450312A (en) * 2014-08-07 2016-03-30 福建天晴数码有限公司 Sending method and device for acoustic wave communication
CN105790854A (en) * 2016-03-01 2016-07-20 济南中维世纪科技有限公司 Short distance data transmission method and device based on sound waves
CN107171738A (en) * 2017-06-29 2017-09-15 深圳传音控股有限公司 The apparatus and method that ultrasonic propagation is carried out to audio
CN110011760A (en) * 2019-04-10 2019-07-12 中山大学 A kind of full duplex multicarrier near field communication method based on sound wave
JP2020010408A (en) * 2015-11-02 2020-01-16 学校法人立命館 Radiation method from parametric speaker, parametric speaker, signal processing device, and signal processing program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450312A (en) * 2014-08-07 2016-03-30 福建天晴数码有限公司 Sending method and device for acoustic wave communication
JP2020010408A (en) * 2015-11-02 2020-01-16 学校法人立命館 Radiation method from parametric speaker, parametric speaker, signal processing device, and signal processing program
CN105790854A (en) * 2016-03-01 2016-07-20 济南中维世纪科技有限公司 Short distance data transmission method and device based on sound waves
CN107171738A (en) * 2017-06-29 2017-09-15 深圳传音控股有限公司 The apparatus and method that ultrasonic propagation is carried out to audio
CN110011760A (en) * 2019-04-10 2019-07-12 中山大学 A kind of full duplex multicarrier near field communication method based on sound wave

Also Published As

Publication number Publication date
CN111313979A (en) 2020-06-19

Similar Documents

Publication Publication Date Title
CN109348247B (en) Method and device for determining audio and video playing time stamp and storage medium
CN108965757B (en) Video recording method, device, terminal and storage medium
CN108881286B (en) Multimedia playing control method, terminal, sound box equipment and system
CN111107389B (en) Method, device and system for determining live broadcast watching time length
CN110996305B (en) Method and device for connecting Bluetooth equipment, electronic equipment and medium
CN110827820B (en) Voice awakening method, device, equipment, computer storage medium and vehicle
CN108897659B (en) Method, device and storage medium for modifying log level
CN109635133B (en) Visual audio playing method and device, electronic equipment and storage medium
CN110784370B (en) Method and device for testing equipment, electronic equipment and medium
CN111241499A (en) Application program login method, device, terminal and storage medium
CN113076051A (en) Slave control terminal synchronization method, device, terminal and storage medium
CN111092991B (en) Lyric display method and device and computer storage medium
CN109783176B (en) Page switching method and device
CN108401194B (en) Time stamp determination method, apparatus and computer-readable storage medium
CN110827830B (en) Voiceprint recognition method, voiceprint recognition device, terminal and storage medium based on voice data
CN110933454B (en) Method, device, equipment and storage medium for processing live broadcast budding gift
CN110286839B (en) Message sending method, device, terminal and storage medium
CN110113669B (en) Method and device for acquiring video data, electronic equipment and storage medium
CN108966026B (en) Method and device for making video file
CN111313979B (en) Data transmission method and device, electronic equipment and storage medium
CN112015612B (en) Method and device for acquiring stuck information
CN111128115B (en) Information verification method and device, electronic equipment and storage medium
CN108664421B (en) Method, device and storage medium for acquiring multimedia data
CN112132472A (en) Resource management method and device, electronic equipment and computer readable storage medium
CN111246240A (en) Method and apparatus for storing media data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant