COMMUNICATION METHOD, COMMUNICATION APPARATUS AND ELECTRONIC DEVICE
Embodiments of the present disclosure provide a communication method, a communication apparatus and an electronic device. The method includes: a first device establishes a Bluetooth connection with a second device; the first device performs an authentication processing with the second device to obtain an authentication result; and the first device performs a voice-based data interaction with the second device if the authentication result is that an authentication is successful. The method can improve the connection speed, connection success rate and communication security during the communication of the device.
1 . A communication method, comprising:
establishing, by a first device, a communication connection with a second device;
performing, by the first device, an authentication processing with the second device to obtain an authentication result; and
performing, by the first device, a voice-based data interaction with the second device if the authentication result is that an authentication is successful.
2 . The method according to claim 1 , further comprising:
disconnecting, by the first device, the communication connection with the second device when at least one of the first device and the second device satisfies a first condition; wherein
the first condition comprises at least one of the following:
power off, switching to a Bluetooth off state, receiving a disconnection instruction input from an user.
3 . The method according to claim 1 , wherein the establishing, by a first device, a communication connection with a second device comprises:
establishing, by the first device, the communication connection with the second device, according to manufacturer identification information broadcast by the second device and protocol version identification supported by the second device.
4 . The method according to claim 3 , wherein the communication connection is established on a radio frequency communication (RFCOMM) link.
5 . The method according to claim 1 , wherein the first device has an ability to connect to the Internet, and the second device has an ability to receive voice or an ability to play audio.
6 . The method according to claim 1 , wherein before the performing, by the first device, an authentication processing with the second device to obtain an authentication result, the method further comprises:
establishing, by the first device, the communication connection with a server in a cloud; and
the performing, by the first device, an authentication processing with the second device to obtain an authentication result comprises:
performing, by the first device, the authentication processing with the second device through the server to obtain the authentication result.
7 . The method according to claim 1 , wherein the communication connection is a Bluetooth connection.
8 . A communication apparatus, wherein the communication apparatus is applied to a first device, and the apparatus comprises: a memory, configured to store a program instruction; and
a processor, configured to invoke and execute the program instruction in the memory, which, when executed by the processor, causes the processor to:
establish a communication connection with a second device;
perform an authentication processing with the second device to obtain an authentication result; and
perform a voice-based data interaction with the second device when the authentication result is that an authentication is successful.
9 . The apparatus according to claim 8 , wherein the program instruction further causes the processor to:
disconnect the communication connection with the second device when at least one of the first device and the second device satisfies a first condition; wherein
the first condition comprises at least one of the following:
power off, switching to a Bluetooth off state, and receiving a disconnection instruction input from an user.
10 . The apparatus according to claim 8 , wherein the program instruction further causes the processor to: establish, according to manufacturer identification information broadcast by the second device and protocol version identification supported by the second device, a communication connection with the second device.
11 . The apparatus according to claim 10 , wherein the communication connection is established on a radio frequency communication (RFCOMM) link.
12 . The apparatus according to claim 8 , wherein the first device has an ability to connect to the Internet and the second device has an ability to receive voice or an ability to play audio.
13 . The apparatus according to claim 8 , wherein the program instruction further causes the processor to:
establish a communication connection with a server in a cloud; and
perform the authentication processing with the second device through the server to obtain the authentication result.
14 . The apparatus according to claim 8 , wherein the communication connection is a Bluetooth connection.
15 . A readable storage medium, wherein a computer program is stored in the readable storage medium for executing operations, comprising:
establishing, by a first device, a communication connection with a second device;
performing, by the first device, an authentication processing with the second device to obtain an authentication result; and
performing, by the first device, a voice-based data interaction with the second device if the authentication result is that an authentication is successful.
16 . The readable storage medium according to claim 15 , wherein the operations further comprise:
disconnecting, by the first device, the communication connection with the second device when at least one of the first device and the second device satisfies a first condition; wherein
the first condition comprises at least one of the following:
power off, switching to a Bluetooth off state, receiving a disconnection instruction input from an user.
17 . The readable storage medium according to claim 15 , wherein the establishing, by a first device, a communication connection with a second device comprises:
establishing, by the first device, the communication connection with the second device, according to manufacturer identification information broadcast by the second device and protocol version identification supported by the second device.
18 . The readable storage medium according to claim 17 , wherein the communication connection is established on a radio frequency communication (RFCOMM) link.
19 . The readable storage medium according to claim 15 , wherein the first device has an ability to connect to the Internet, and the second device has an ability to receive voice or an ability to play audio.
20 . The readable storage medium according to claim 15 , before the performing, by the first device, an authentication processing with the second device to obtain an authentication result, the operations further comprise:
establishing, by the first device, the communication connection with a server in a cloud; and
the performing, by the first device, an authentication processing with the second device to obtain an authentication result comprises:
performing, by the first device, the authentication processing with the second device through the server to obtain the authentication result.