The present disclosure relates to the field of communication technology and, in particular, to a method and an apparatus for data transmission.
At present, when data is to be transmitted between mobile devices, the mobile devices need to have a Bluetooth, an NFC, a WIFI or the like turned on first in order to enable the mobile devices to search, discover and pair with each other, and the data transmission cannot happen between the mobile devices until successful pairing.
In the prior art, however, a mobile device needs to be provided with a special antenna to implement the functions of the Bluetooth, NFC, WIFI, etc., and the searching, discovery and pairing of mobile devices through a wireless signal transmitted via the antenna.
The present disclosure provides a method and an apparatus for data transmission to address the problem in the prior art that the power consumption is high and the antenna related to voice call of the mobile devices is potentially interfered when transmitting data between mobile devices via the special antenna.
A first aspect of the present disclosure provides a method for data transmission, the method includes:
Further, the authentication success message carries: a received power of the sound wave.
And before the first mobile device obtains data to be transmitted, performs protocol encapsulation, encoding and modulation on the data to be transmitted to obtain modulated data to be transmitted, loads the modulated data to be transmitted onto the sound wave, and transmits the sound wave to the second mobile device that has succeeded in the authentication, the method further includes:
Further, the authentication success message carries:
And before the first mobile device obtains data to be transmitted, performs protocol encapsulation, encoding and modulation on the data to be transmitted to obtain modulated data to be transmitted, loads the modulated data to be transmitted onto the sound wave, and transmits the sound wave to the second mobile device that has been successfully authenticated, the method further includes:
Further, before the first mobile device loads the modulated authentication data onto the sound wave and transmits the sound wave to the second mobile device within the predefined range, the method further includes:
Further, the sound wave is an ultrasonic wave with a frequency greater than or equal to 25 kHz.
Another aspect of the present disclosure provides an apparatus for data transmission, the apparatus includes:
Further, the authentication success message carries: a received power of the sound wave;
Further, the authentication success message carries: location information of the second mobile device;
Further, the apparatus further includes: an encrypting module;
Further, the sound wave is an ultrasonic wave with a frequency greater than or equal to 25 kHz.
In this disclosure, a first mobile device transmits authentication data to a second mobile device via a sound wave, and transmits data to the second mobile device via a sound wave after the second mobile device has been successfully authenticated, thereby achieving data transmission between the first mobile device and the second mobile device via a sound generating apparatus, such as a microphone and a loudspeaker, in the first mobile device and the second mobile device, with small power consumption and no interference to the antenna related to the voice call of the mobile device.
In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without inventive labor are within the protection scope of the present disclosure.
101: a first mobile device obtains authentication data to be transmitted.
The method for data transmission provided in the present disclosure is primarily carried out by an apparatus for data transmission which may particularly be any one of, or software or an application installed on, two or more mobile devices that need to transmit data.
102: the first mobile device performs protocol encapsulation, encoding and modulation on the authentication data to obtain modulated authentication data.
103: the first mobile device loads the modulated authentication data onto a sound wave and transmits the sound wave to a second mobile device within a predefined range, so that the second mobile device returns an authentication success message to the first mobile device after the second mobile device has successfully performed demodulation, decoding and protocol handling on the modulated authentication data.
In order to ensure that the sound wave transmitted by the first mobile device reaches the position where the second mobile device is located, the sound wave may be an ultrasonic wave with a frequency greater than or equal to 25 kHz.
In particular, when the first mobile device and the second mobile device need to transmit data, the first mobile device may, with an associated keystroke, initiate functions of transmitting and receiving a sound wave for the first mobile device, so that the first mobile device may transmit or receive the sound wave loaded with data. For example, the first device may transmit a sound wave loaded with authentication data; and the second mobile device may also initiate the functions of transmitting and receiving the sound wave for the second mobile device with an associated keystroke.
An optional authentication mechanism between the first mobile device and the second mobile device may be that the authentication data to be transmitted may carry an identification of the first mobile device. After the first mobile device loads the modulated authentication data onto the sound wave and transmits the sound wave to the second mobile device within the predefined range, if the identification of the first mobile device is obtained after the second mobile device performs demodulation, decoding and protocol handling on the modulated authentication data, the second mobile device has been successfully authenticated, and returns an authentication success message carrying the identification of the second mobile device to the first mobile device. Otherwise, if the second mobile device obtains nothing other than random code or irrelevant data after the demodulation, decoding and protocol handling on the modulated authentication data, the second mobile device fails the authentication, and does not return any authentication success message.
It should be noted that the data to be transmitted may also carry other data, such as pre-negotiated values or images, which will not be limited herein. The data carried by the authentication data to be transmitted may be configured according to specific situations.
Further, in order to improve security for the data transmission, the first mobile device may encrypt the modulated authentication data according to a predefined password. Accordingly, after the second mobile device receives the modulated authentication data, it may begin from decrypting the modulated authentication data, and only proceed to the demodulation, decoding and protocol handling if the decryption has succeeded. If the decryption fails, so does the authentication.
104: the first mobile device receives the authentication success message returned from the second mobile device.
105: the first mobile device obtains data to be transmitted, performs protocol encapsulation, encoding and modulation on the data to be transmitted to obtain modulated data to be transmitted, loads the modulated data to be transmitted onto a sound wave, and transmits the sound wave to the second mobile device that has succeeded in the authentication.
Optionally, in order to reduce power consumption and save energy, in a first implementation scenario, the authentication success message carries: a received power of the sound wave.
Accordingly, before step 105, the method may further include: the first mobile device obtains a transmitted power of the sound wave; the first mobile device determines the distance between the first mobile device and the second mobile device according to the received power and the transmitted power of the sound wave; and the first mobile device adjusts the transmitted power of the sound wave according to the distance.
In the present embodiment, the first mobile device may adjust attenuation for the sound wave if the distance between the second mobile device and the first mobile device is small, so that the second mobile device receives the sound wave while other mobile devices farther from the first mobile device do not. This may save energy while still make sure the second mobile device receives the sound wave, as well as avoid possible interference to the first mobile device when other mobile devices farther from the first mobile device provide feedback to or echo the sound wave.
Optionally, in order to reduce power consumption and save energy, in a second implementation scenario, the authentication success message carries: location information of the second mobile device.
Accordingly, before step 105, the method may further include: the first mobile device obtains location information of itself; the first mobile device determines the distance between the first mobile device and the second mobile device and the direction of the second mobile device relative to the first mobile device according to the location information of itself and the location information of the second mobile device; and the first mobile device adjusts the transmitted power and an emission direction of the sound wave according to the distance and the direction.
In the present embodiment, the first mobile device may adjust the attenuation and the direction of the sound wave, so that only the second mobile device at its location receives the sound wave while other mobile devices at other positions receive no or only very poor sound wave, thereby saving energy while ensuring that the second mobile device receives the sound wave and avoiding interference to the first mobile device when other mobile devices farther from the first mobile device provide feedback to or echo the sound wave.
In this embodiment, the first mobile device transmits authentication data to the second mobile device via the sound wave, and transmits data to the second mobile device via a sound wave after the second mobile device has been successfully authenticated, thereby achieving data transmission between the first mobile device and the second mobile device via a sound generating apparatus, such as a microphone and a loudspeaker, in the first mobile device and the second mobile device, with small power consumption and no interference to the antenna related to the voice call of the mobile device.
Persons of ordinary skill in the art may understand that, all or a part of steps of the foregoing method embodiments may be implemented by a program instructing relevant hardware. The foregoing program may be stored in a computer-readable storage medium. When the program runs, the steps of the foregoing embodiment methods are performed. The foregoing storage medium includes various mediums capable of storing program codes, such as a ROM, a RAM, a magnetic disk, or an optical disc.
the transmitting module 23 being configured to load the modulated authentication data onto a sound wave and transmit the sound wave to a second mobile device within a predefined range, so that the second mobile device returns an authentication success message to a first mobile device after the second mobile device has successfully performed demodulation, decoding and protocol handling on the modulated authentication data.
In order to ensure that the sound wave transmitted from the first mobile device reaches the second mobile device at its location, the sound wave may be an ultrasonic wave with a frequency greater than or equal to 25 kHz.
The receiving module 24 is configured to receive the authentication success message returned from the second mobile device.
The obtaining module 21 is further configured to obtain data to be transmitted.
The modulating module 22 is further configured to perform protocol encapsulation, encoding and modulation on the data to be transmitted to obtain modulated data to be transmitted.
The transmitting module 23 is further configured to load the modulated data to be transmitted onto a sound wave and transmit the sound wave to the second mobile device that has succeeded in the authentication.
Further, as shown in
Optionally, in order to reduce power consumption and save energy, in a first implementation scenario, the authentication success message carries: a received power of the sound wave.
Accordingly, the apparatus further includes: a first determining module 26 and a first adjusting module 27;
Optionally, in order to reduce power consumption and save energy, in a second implementation scenario, the authentication success message carries: location information of a second mobile device.
Accordingly, the apparatus may further include: a second determining module 28 and a second adjusting module 29, which are shown in
The obtaining module 21 is further configured to obtain location information of itself before the transmitting module 23 loads the modulated data to be transmitted onto the sound wave and transmits the sound wave to the second mobile device that has succeeded in the authentication.
The second determining module 28 is configured to determine, according to the location information of the first mobile device and the location information of the second mobile device, a distance between the first mobile device and the second mobile device, and a direction of the second mobile device relative to the first mobile device.
The second adjusting module 29 is configured to adjust the transmitted power and a transmission direction of the sound wave according to the distance and the direction.
In this embodiment, the first mobile device transmits authentication data to the second mobile device via the sound wave, and transmits data to the second mobile device via a sound wave after the second mobile device has been successfully authenticated, thereby achieving data transmission between the first mobile device and the second mobile device via a sound generating apparatus, such as a microphone and a loudspeaker, in the first mobile device and the second mobile device, with small power consumption and no interference to the antenna related to the voice call of the mobile device.
Finally, it should be noted that the foregoing embodiments are merely intended for describing, rather than limiting, the technical solutions of the present disclosure. Although the present disclosure is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that it remains possible to make modifications to the technical solutions described in the foregoing embodiments, or make equivalent replacements to some or all technical features therein. However, these modifications or replacements do not make the essence of corresponding technical solutions depart from the scope of the technical solutions in the embodiments of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
201510164793.5 | Apr 2015 | CN | national |
This application is a continuation of International Application No. PCT/CN2016/088411, filed on Aug. 28, 2015, which claims priority to Chinese Patent Application No. 201510164793.5, filed on Apr. 9, 2015. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2015/088411 | Aug 2015 | US |
Child | 15719471 | US |