Background
Currently, there are three main short-range wireless transmission protocols between mobile communication devices: 1) near Field Communication (NFC for short); 2) Wi-Fi (Wireless Fidelity); 3) bluetooth. These three techniques exist independently of each other, each having a respective authentication method to enable the establishment of a protocol between mobile communication devices.
NFC is a short-range, high-frequency wireless communication technology that allows contactless point-to-point data transmission (e.g., data exchange within ten centimeters) between mobile communication devices. The technology is evolved from contactless Radio Frequency Identification (RFID for short), is downward compatible with RFID, was developed successfully by sony and philips, and is mainly used for providing M2M (Machine to Machine) communication in mobile communication devices such as mobile phones. Because NFC has natural security, the NFC technology is considered to have a great application prospect in the fields of mobile payment and the like.
Wi-Fi in the wireless local area network category refers to "wireless compatibility authentication", is essentially a commercial authentication, also is a wireless networking technology, previously through the network cable connection computer, but now through the radio wave to network; the common method is to use a wireless router to perform networking in a Wi-Fi connection mode within an effective coverage range of an electric wave of the wireless router, and if the wireless router is connected to an ADSL (Asymmetric Digital Subscriber Line) Line or another internet access Line, the wireless router is also called a "hot spot".
Bluetooth, a radio technology supporting short-range communication (typically within 10 m) of devices, enables wireless information exchange between many devices including mobile phones, PDAs, wireless headsets, laptops, related peripherals, etc. By using the bluetooth technology, the communication between mobile communication devices can be effectively simplified, and the communication between the devices and the internet can be successfully simplified, so that the data transmission becomes faster and more efficient, and the way is widened for wireless communication. Bluetooth adopts a distributed network structure and a fast frequency hopping and short packet technology, supports point-to-point and point-to-multipoint communication, and works in a global universal 2.4GHz ISM (Industrial scientific medical) frequency band. The data rate is 1Mbps, and full duplex transmission is realized by adopting a time division duplex transmission scheme.
However, the NFC protocol requires that mobile communication devices maintain a very close distance and have a low transmission speed, which can meet the requirement of small data exchange, but cannot meet the transmission task of multimedia files such as high-quality pictures, audio, video, and the like. Wi-Fi and Bluetooth protocols have considerable transmission speed, but when Wi-Fi or Bluetooth connection is established between two mobile communication devices, complex authentication operation is needed to ensure the connection safety of the two parties, and the authentication process needs to exchange information manually, which is inconvenient for application programs at a mobile phone end. Some technical solutions exist in the market currently, such as two-dimensional codes are used as verification means to assist the establishment of Wi-Fi connection. This requires that one of the mobile communication devices has the capability of scanning the two-dimensional code, and the security of the two-dimensional code itself has not been solved effectively so far, and is impossible to defend if the two-dimensional code is implanted with a virus maliciously. When the Bluetooth is used for identity verification, one party firstly needs to scan peripheral equipment for opening the Bluetooth, then selects one piece of equipment which wants to establish connection to initiate a request, and completes the identity verification by selecting whether the equipment of the other party obtains the request or not or inputting the same authentication serial number by the two parties. Furthermore, Wi-Fi and bluetooth protocols, in addition to the relatively complex authentication process, require at least one party to expose its own device identity in a public environment so that another device can search. The privacy of the workflow cannot be well guaranteed.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a wireless communication method and system, which can simplify the authentication process, ensure security and privacy, increase transmission speed, and is not limited to near field communication.
In order to solve the above technical problem, an embodiment of the present invention provides a wireless communication method, including:
transmitting authentication information between a first mobile communication device and a second mobile communication device according to a near field communication protocol when the distance between the first mobile communication device and the second mobile communication device is within a valid near field communication distance range;
establishing a Wi-Fi connection or a Bluetooth connection between the first mobile communication device and the second mobile communication device by using the authentication information, and performing data transmission through the Wi-Fi connection or the Bluetooth connection.
The first mobile communication equipment and the second mobile communication equipment carry out data transmission through Wi-Fi connection;
the step of transmitting authentication information between the first mobile communication device and the second mobile communication device via the near field communication connection specifically includes:
the first mobile communication equipment set as the Wi-Fi hotspot generates a Wi-Fi hotspot broadcast name and a Wi-Fi hotspot broadcast password;
and the first mobile communication equipment sends the Wi-Fi hotspot broadcast name and the Wi-Fi hotspot broadcast password to the second mobile communication equipment through the near field communication connection.
Wherein the step of establishing a Wi-Fi connection between the first mobile communication device and the second mobile communication device using the authentication information and transmitting data through the Wi-Fi connection specifically includes:
the second mobile communication equipment performs self-configuration by utilizing the received Wi-Fi hotspot broadcast name and Wi-Fi hotspot broadcast password, and is connected to the Wi-Fi hotspot;
and carrying out data transmission with the Wi-Fi hotspot according to a Wi-Fi communication protocol.
The first mobile communication equipment and the second mobile communication equipment are connected through Bluetooth for data transmission;
the step of transmitting authentication information between the first mobile communication device and the second mobile communication device via the near field communication connection specifically includes:
the first mobile communication device generates a Bluetooth verification code;
and the first mobile communication equipment sends the Bluetooth verification code to the second mobile communication equipment through the near field communication connection.
Wherein the step of establishing a bluetooth connection between the first mobile communication device and the second mobile communication device using the authentication information and transmitting data through the bluetooth connection specifically includes:
the first mobile communication device and the second mobile communication device finish Bluetooth pairing according to the received Bluetooth verification code;
and carrying out data transmission between the first mobile communication equipment and the second mobile communication equipment according to a Bluetooth communication protocol.
Correspondingly, the invention also provides a wireless communication system, which comprises a first mobile communication device and a second mobile communication device;
the first mobile communication device comprises:
the first identity authentication module is used for sending identity authentication information to the second mobile communication equipment according to a near field communication protocol when the distance between the first mobile communication equipment and the second mobile communication equipment is within an effective near field communication distance range;
the first data transmission module is used for establishing Wi-Fi connection or Bluetooth connection between the first mobile communication equipment and the second mobile communication equipment by utilizing the identity authentication information and carrying out data transmission between the first mobile communication equipment and the second mobile communication equipment through the Wi-Fi connection or the Bluetooth connection;
the second mobile communication device comprises:
the second identity authentication module is used for receiving identity authentication information from the first mobile communication equipment according to a near field communication protocol when the first mobile communication equipment and the second mobile communication equipment are within a near field communication distance range;
and the second data transmission module is used for establishing Wi-Fi connection or Bluetooth connection between the first mobile communication equipment and the second mobile communication equipment by using the identity authentication information and carrying out data transmission between the first mobile communication equipment and the second mobile communication equipment through the Wi-Fi connection or the Bluetooth connection.
The first mobile communication equipment and the second mobile communication equipment carry out data transmission through Wi-Fi connection, and the first mobile communication equipment is set as a Wi-Fi hotspot;
the first identity verification module specifically comprises:
the Wi-Fi hotspot information generation module is used for generating a Wi-Fi hotspot broadcast name and a Wi-Fi hotspot broadcast password;
and the near field communication module is used for sending the Wi-Fi hotspot broadcast name and the Wi-Fi hotspot broadcast password to the second mobile communication device through near field communication connection when the first mobile communication device and the second mobile communication device are within a near field communication distance range.
Wherein,
the second data transmission module specifically includes:
the Wi-Fi hotspot connecting module is used for carrying out self-configuration by utilizing the received Wi-Fi hotspot broadcast name and Wi-Fi hotspot broadcast password and connecting to the Wi-Fi hotspot;
and the Wi-Fi data transmission module is used for carrying out data transmission with the Wi-Fi hotspot according to a Wi-Fi communication protocol.
The first mobile communication equipment and the second mobile communication equipment are connected through Bluetooth for data transmission;
the first identity verification module specifically comprises:
the Bluetooth verification code generating module is used for generating a Bluetooth verification code;
and the near field communication module is used for sending the Bluetooth verification code to the second mobile communication equipment through near field communication connection when the first mobile communication equipment and the second mobile communication equipment are within a near field communication distance range.
Wherein, the second data transmission module specifically includes:
the Bluetooth pairing module is used for completing Bluetooth pairing with the first mobile communication equipment according to the received Bluetooth verification code;
and the Bluetooth data transmission module is used for transmitting data with the first mobile communication equipment according to a Bluetooth communication protocol. The embodiment of the invention has the following beneficial effects: by using the near field communication technology to transmit the authentication information with other equipment and then using the authentication information to establish Wi-Fi connection or Bluetooth connection, the operation cost is low and the safety is high during authentication, and the effective distance is long during data transmission, the transmission speed is high, and the transmission data volume is large.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a flowchart of a wireless communication method according to an embodiment of the present invention is shown, including:
s100, when the distance between the first mobile communication device and the second mobile communication device is within the effective near field communication distance range, identity authentication information is transmitted between the first mobile communication device and the second mobile communication device according to a near field communication protocol.
S101, establishing a Wi-Fi connection or a Bluetooth connection between the first mobile communication device and the second mobile communication device by using the identity authentication information, and carrying out data transmission through the Wi-Fi connection or the Bluetooth connection.
According to the wireless communication method provided by the invention, the authentication information is transmitted between the near field communication technology and other equipment, and then the Wi-Fi connection or the Bluetooth connection is established by using the authentication information, so that the operation cost is low during authentication, the safety is high, the effective distance is long during data transmission, the transmission speed is high, and the transmission data volume is large.
Fig. 2 is a flowchart of a wireless communication method for data transmission using Wi-Fi technology according to an embodiment of the present invention. Wi-Fi is used as a transmission protocol for final connection between the mobile communication devices, then the wireless network card driver of at least one mobile communication device supports the establishment of the Wi-Fi hotspot, and the Wi-Fi transmission protocol can be used for realizing the connection between more than two mobile communication devices. In this embodiment, it is assumed that both the first mobile communication device and the second mobile communication device support the NFC protocol and the Wi-Fi protocol, and the NFC function and the Wi-Fi function of each of the first mobile communication device and the second mobile communication device are both in an on state. The wireless communication method may include:
s200, the first mobile communication device set as the Wi-Fi hotspot generates a Wi-Fi hotspot broadcast name and a Wi-Fi hotspot broadcast password. When the method is used as an independent application, the method can be started by a user at an interface entrance of the independent application; when the method is embedded as a development kit into other applications, parameters may be passed in by the other applications to initiate the method. The first mobile communication device set as a Wi-Fi hotspot may randomly generate a string a and a string B having fixed lengths, e.g., the strings a and B may be 8-bit or 16-bit data and letter combinations. The first mobile communication device may create a Wi-Fi hotspot broadcast with string a as a Wi-Fi hotspot broadcast name and string B as a Wi-Fi hotspot broadcast password. If the method is embedded into other applications as a development kit, the other applications can also set whether the hotspot broadcast is visible, in addition, if the hotspot broadcast is successfully created, a success message can also be sent to the other applications, and if the hotspot broadcast is unsuccessfully created, a failed error type can also be sent to the other applications.
S201, when the distance between first mobile communication equipment and second mobile communication equipment is within an effective near field communication distance range, the first mobile communication equipment sends the Wi-Fi hotspot broadcast name and the Wi-Fi hotspot broadcast password to the second mobile communication equipment through near field communication connection. Specifically, the NFC function may be triggered when the first mobile communication device discovers that a mobile communication device based on the NFC protocol is present within the NFC range.
S202, the second mobile communication device performs self-configuration by using the received Wi-Fi hotspot broadcast name and Wi-Fi hotspot broadcast password and is connected to the Wi-Fi hotspot. Specifically, after the second mobile communication device receives the Wi-Fi hotspot broadcast name and the Wi-Fi hotspot broadcast password, the user is prompted to be successfully contacted, and then the user can freely move the second mobile communication device within the Wi-Fi effective distance.
S203, the second mobile communication device transmits data to the Wi-Fi hotspot according to a Wi-Fi communication protocol. A larger amount of data can be transferred between the first mobile communication device and the second mobile communication device as long as within the Wi-Fi effective distance range.
Fig. 3 is a flowchart of a wireless communication method for data transmission using bluetooth technology according to an embodiment of the present invention. Bluetooth is used as a transmission protocol of final connection between the mobile communication devices, and connection between the two mobile communication devices can be realized by using the Bluetooth transmission protocol. In this embodiment, it is assumed that the first mobile communication device and the second mobile communication device both support the NFC protocol and the bluetooth protocol, and their NFC function and bluetooth function are both in the on state. The wireless communication method may include:
s300, the first mobile communication device generates a Bluetooth verification code. When the method is used as an independent application, the method can be started by a user at an interface entrance of the independent application; when the method is embedded as a development kit into other applications, parameters may be passed in by the other applications to initiate the method. The first mobile communication device may randomly generate a string C having a fixed length, which may be, for example, an 8-bit or 16-bit data and letter combination. The first mobile communication device may initiate bluetooth pairing using the string C as a bluetooth verification code. If the method is used as a development toolkit and embedded into other applications, if the initialization is successful, a success message can be sent to the other applications, and if the initialization is failed, a failed error type can be sent to the other applications.
S301, when the distance between a first mobile communication device and a second mobile communication device is within an effective near field communication distance range, the first mobile communication device sends the Bluetooth verification code to the second mobile communication device through the near field communication connection. Specifically, the NFC function may be triggered when the first mobile communication device discovers that a mobile communication device based on the NFC protocol is present within the NFC range.
S302, the first mobile communication device and the second mobile communication device finish Bluetooth pairing according to the received Bluetooth verification codes. Specifically, after receiving the bluetooth verification code, the second mobile communication device prompts the user that the contact is successful, and then the user can move the second mobile communication device at will within the effective distance of bluetooth.
S303, carrying out data transmission between the first mobile communication equipment and the second mobile communication equipment according to a Bluetooth communication protocol. A larger data volume transmission between the first mobile communication device and the second mobile communication device is possible as long as it is within the bluetooth effective range.
Referring to fig. 4, which is a schematic structural diagram of a wireless communication system 100 according to an embodiment of the present invention, the wireless communication system 100 includes at least two mobile communication devices, such as a first mobile communication device 110 and a second mobile communication device 120.
The first mobile communication device 110 comprises:
a first authentication module 111, configured to send authentication information to the second mobile communication device according to a near field communication protocol when a distance between the first mobile communication device and the second mobile communication device is within a valid near field communication distance range.
A first data transmission module 112, configured to establish a Wi-Fi connection or a bluetooth connection between the first mobile communication device and the second mobile communication device using the authentication information, and perform data transmission between the first mobile communication device and the second mobile communication device through the Wi-Fi connection or the bluetooth connection.
The second mobile communication device 120 includes:
a second authentication module 121, configured to receive authentication information from the first mobile communication device according to a near field communication protocol when a distance between the first mobile communication device and the second mobile communication device is within a valid near field communication distance range;
a second data transmission module 122, configured to establish a Wi-Fi connection or a bluetooth connection between the first mobile communication device and the second mobile communication device using the authentication information, and perform data transmission with the first mobile communication device through the Wi-Fi connection or the bluetooth connection.
According to the wireless communication system provided by the invention, the identity authentication information is transmitted between the near field communication technology and other equipment, and then the Wi-Fi connection or the Bluetooth connection is established by using the identity authentication information, so that the operation cost is low during authentication, the safety is high, the effective distance is long during data transmission, the transmission speed is high, and the transmission data volume is large.
Referring to fig. 5, which is a schematic structural diagram of a wireless communication system 200 for data transmission by using Wi-Fi technology according to an embodiment of the present invention, the wireless communication system 200 includes at least two mobile communication devices, such as a first mobile communication device 210 and a second mobile communication device 220, the first mobile communication device 210 includes a first authentication module 211 and a first data transmission module 212, and the second mobile communication device 220 includes a second authentication module 221 and a second data transmission module 222. Wi-Fi is used as a transmission protocol for final connection between the mobile communication devices, then the wireless network card driver of at least one mobile communication device supports the establishment of the Wi-Fi hotspot, and the Wi-Fi transmission protocol can be used for realizing the connection between more than two mobile communication devices. In this embodiment, it is assumed that the first mobile communication device 210 and the second mobile communication device 220 both support the NFC protocol and the Wi-Fi protocol, and the NFC function and the Wi-Fi function of each of them are both in an on state, and in addition, the wireless network card driver of the first mobile communication device 210 also supports establishing itself as a Wi-Fi hotspot. Thus, the first mobile communication device 210 is set as a Wi-Fi hotspot.
The first identity verification module 211 specifically includes:
the Wi-Fi hotspot information generating module 211A is configured to generate a Wi-Fi hotspot broadcast name and a Wi-Fi hotspot broadcast password. When the program is used as an independent application, the module can be started by a user at an interface entrance of the independent application; when the program is embedded into other applications as a development kit, parameters can be passed in by the other applications to launch the module. The Wi-Fi hotspot information generation module 211A may randomly generate a string a and a string B having fixed lengths, for example, the string a and the string B may be 8-bit or 16-bit data and letter combinations. The Wi-Fi hotspot information generating module 211A may use the character string a as a Wi-Fi hotspot broadcast name and the character string B as a Wi-Fi hotspot broadcast password, thereby creating a Wi-Fi hotspot broadcast. If the program is embedded into other applications as a development kit, the other applications may further set whether the hotspot broadcast is visible, in addition, if the hotspot broadcast is successfully created, the Wi-Fi hotspot information generation module 211A may further send a success message to the other applications, and if the hotspot broadcast is unsuccessfully created, the Wi-Fi hotspot information generation module 211A may further send a failed error type to the other applications.
The NFC module 211B is configured to send the Wi-Fi hotspot broadcast name and the Wi-Fi hotspot broadcast password to the second mobile communication device 220 through a near field communication connection when the distance between the first mobile communication device 210 and the second mobile communication device 220 is within the valid near field communication distance range. Specifically, when the NFC module 211B finds that a mobile communication device based on the NFC protocol is present within the NFC distance range, the NFC function may be triggered.
The second data transmission module 222 specifically includes:
the Wi-Fi hotspot connection module 222A is configured to perform self-configuration by using the Wi-Fi hotspot broadcast name and the Wi-Fi hotspot broadcast password received by the second identity authentication module 221, and connect to the Wi-Fi hotspot. After receiving the Wi-Fi hotspot broadcast name and the Wi-Fi hotspot broadcast password, the second authentication module 221 may prompt the user that the contact is successful, and then the user may move the second mobile communication device 220 at will within the Wi-Fi effective distance.
And the Wi-Fi data transmission module 222B is used for carrying out data transmission with the Wi-Fi hotspot according to a Wi-Fi communication protocol. A larger amount of data transfer between the first mobile communication device 210 and the second mobile communication device 220 may be possible as long as within the Wi-Fi effective distance range.
Fig. 6 is a schematic structural diagram of a wireless communication system 300 for data transmission by using bluetooth technology according to an embodiment of the present invention. The wireless communication system 300 includes two mobile communication devices, for example, a first mobile communication device 310 and a second mobile communication device 320, and the first mobile communication device 310 includes a first authentication module 311 and a first data transmission module 312, and the second mobile communication device 320 includes a second authentication module 321 and a second data transmission module 322. Bluetooth is used as a transmission protocol of final connection between the mobile communication devices, and connection between the two mobile communication devices can be realized by using the Bluetooth transmission protocol. In this embodiment, it is assumed that the first mobile communication device 310 and the second mobile communication device 320 both support the NFC protocol and the bluetooth protocol, and their NFC function and bluetooth function are both in the on state.
The first identity verification module 311 specifically includes:
the bluetooth verification code generating module 311A is configured to generate a bluetooth verification code. When the program is used as an independent application, the module can be started by a user at an interface entrance of the independent application; when the program is embedded into other applications as a development kit, parameters can be passed in by the other applications to launch the module. The bluetooth verification code generation module 311A may randomly generate a character string C having a fixed length, for example, the character string C may be a data and letter combination of 8 bits or 16 bits. The bluetooth verification code generation module 311A may initialize bluetooth pairing using the character string C as a bluetooth verification code. If the program is embedded in another application as a development kit, the bluetooth verification code generation module 311A may also send a success message to the other application if the initialization is successful, and if the initialization is failed, the bluetooth verification code generation module 311A may also send a failed error type to the other application.
And the NFC module 311B is configured to send the bluetooth verification code to the second mobile communication device 320 through a near field communication connection when the distance between the first mobile communication device and the second mobile communication device is within the valid near field communication distance range. Specifically, when the NFC module 311B finds that a mobile communication device based on the NFC protocol is present within the NFC distance range, the NFC function may be triggered.
The second data transmission module 322 specifically includes:
the bluetooth pairing module 322A is configured to complete bluetooth pairing according to the bluetooth verification code received by the second identity verification module 321. After receiving the bluetooth verification code, the second authentication module 321 prompts the user that the contact is successful, and then the user can move the second mobile communication device within the bluetooth effective distance at will.
The bluetooth data transmission module 322B is configured to perform data transmission with the first data transmission module 312 of the first mobile communication device 310 according to a bluetooth communication protocol. A larger data volume transfer between the first mobile communication device 310 and the second mobile communication device 320 is possible as long as it is within the bluetooth effective range.
The invention takes the near field communication technology as the first step of verification link for establishing the connection, greatly simplifies the process of establishing the long-distance connection protocol and ensures the safety. Meanwhile, the device identification of the mobile communication device does not even need to be exposed in the public search result, and privacy is greatly improved. After the connection is quickly established, data transmission is carried out through a Wi-Fi or Bluetooth protocol, so that the transmission speed can be greatly improved, and two mobile communication devices can be moved in a larger physical space without being limited to a short distance.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes in form and detail may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.