WO2018166103A1 - 一种基于无线通信的连接方法及终端 - Google Patents

一种基于无线通信的连接方法及终端 Download PDF

Info

Publication number
WO2018166103A1
WO2018166103A1 PCT/CN2017/090555 CN2017090555W WO2018166103A1 WO 2018166103 A1 WO2018166103 A1 WO 2018166103A1 CN 2017090555 W CN2017090555 W CN 2017090555W WO 2018166103 A1 WO2018166103 A1 WO 2018166103A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
wireless
connection
connection mode
wireless connection
Prior art date
Application number
PCT/CN2017/090555
Other languages
English (en)
French (fr)
Inventor
赵朋
陈风
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17900319.9A priority Critical patent/EP3585127B1/en
Priority to CN201780087982.4A priority patent/CN110393021B/zh
Priority to US16/494,527 priority patent/US10764738B2/en
Publication of WO2018166103A1 publication Critical patent/WO2018166103A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4594Address books, i.e. directories containing contact information about correspondents
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/047Key management, e.g. using generic bootstrapping architecture [GBA] without using a trusted network node as an anchor
    • H04W12/0471Key exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/50Secure pairing of devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/20Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel
    • H04W4/21Services signaling; Auxiliary data signalling, i.e. transmitting data via a non-traffic channel for social networking applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a connection method and terminal based on wireless communication.
  • terminals such as smart phones, wearable devices, tablets, etc.
  • terminals are increasingly becoming an indispensable tool in people's daily life and learning.
  • the user needs to manually enter the dedicated setting interface of the terminal to open the corresponding wireless connection mode (for example, Bluetooth mode, WiFi mode, etc.), and then know the name or address of the other terminal in the wireless connection mode.
  • the corresponding wireless connection mode for example, Bluetooth mode, WiFi mode, etc.
  • another terminal is manually selected to connect. If the other terminal does not turn on the corresponding wireless connection mode, the terminal cannot scan to another terminal, and thus the wireless communication connection cannot be established. Therefore, the above method has a problem that the operation process is cumbersome and the terminal intelligence is low.
  • the embodiment of the invention provides a connection method and a terminal for wireless communication, which are beneficial to simplifying the operation process and improving the intelligence of the terminal.
  • an embodiment of the present invention provides a method for connecting wireless communications.
  • the first terminal first selects a wireless connection mode in the target application, and then determines a target identifier from the target application identifier list, and uses a wireless network to
  • the second terminal corresponding to the target identifier sends a wireless connection request for the wireless connection mode, and when receiving the acknowledgment response for the wireless connection request, establishes a wireless communication connection with the second terminal in the wireless connection mode.
  • the wireless communication connection in the wireless connection mode can be completed in the target application by using the first terminal, and the user does not need to manually open the corresponding wireless connection mode in the dedicated setting interface, and does not need to The user knows in advance the information such as the name or address of the second terminal in the wireless connection mode, which simplifies the operation process and improves the intelligence of the terminal.
  • the confirmation connection response of the connection request includes: a random number generated by the second terminal in the wireless connection mode.
  • the first terminal establishes a wireless communication connection with the second terminal in the wireless connection mode, where the first terminal first performs a local connection interaction with the second terminal for the wireless connection mode by using the random number, and obtains the first The encryption key of the terminal in the wireless connection mode, and then the first terminal establishes a wireless communication connection in the wireless connection mode with the second terminal according to the encryption key of the second terminal.
  • the first terminal interacts with the second terminal by using a random number to obtain an encryption key of the second terminal, and establishes a wireless communication connection with the second terminal, thereby enriching establishing the wireless communication.
  • the way of connecting increases the intelligence of the terminal.
  • the confirmation connection response of the connection request includes: an encryption key of the second terminal in a wireless connection mode.
  • the first terminal establishes a wireless communication connection with the second terminal in the wireless connection mode, and specifically, the first terminal establishes a wireless communication connection in the wireless connection mode with the second terminal according to the encryption key of the second terminal. .
  • the first terminal directly obtains the encryption key of the second terminal, and can establish a wireless communication connection with the second terminal without performing local connection interaction with the second terminal, enriching The way to establish a wireless communication connection improves the intelligence of the terminal.
  • the confirmation connection response of the connection request includes: a hardware address of the second terminal.
  • the first terminal establishes a wireless communication connection with the second terminal in the wireless connection mode, and specifically, the first terminal first starts the wireless connection mode when receiving the confirmation connection response of the connection request, and receives the wireless connection mode. Determining, by the request for the wireless connection mode, whether the hardware address in the request for the wireless connection mode is a hardware address of the second terminal, if the hardware address in the request for the wireless connection mode is the second terminal And the first terminal establishes a wireless communication connection in the wireless communication mode with the second terminal.
  • the first terminal may establish the wireless communication with the second terminal if the hardware address in the request for the wireless connection mode is determined to be the hardware address of the second terminal.
  • the wireless communication connection in the mode can avoid the situation that other terminals are mis-accessed, and the intelligence of the terminal is improved.
  • the method further includes: when receiving the confirmation connection response of the connection request, the first terminal sends the hardware address of the third terminal to the second terminal, and controls the third terminal.
  • the second terminal establishes a wireless communication connection based on the hardware address of the third terminal when the wireless connection mode is turned on.
  • the first terminal can control the third terminal to establish a wireless communication connection with the second terminal, enriching the function of the first terminal, and improving the intelligence of the terminal.
  • the wireless connection mode may include any one or more of a Bluetooth-based connection mode, a WPS-based connection mode, and a WiFi-based connection mode.
  • the wireless network may include: a cellular mobile data network and/or a wireless local area network.
  • a terminal having a function of implementing terminal behavior in a possible implementation manner of the first aspect described above.
  • This function can be implemented in hardware or in hardware by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • This module can be software and/or hardware. Based on the same inventive concept, the principles and benefits of the terminal can be solved.
  • the implementation of the terminal can be referred to the first Aspects and possible method implementations of the first aspect are not repeated here.
  • a terminal comprising: a memory for storing one or more programs; and a processor for calling a program stored in the memory to implement the solution in the method design of the first aspect above
  • a processor for calling a program stored in the memory to implement the solution in the method design of the first aspect above
  • a computer program product which, when run on a computer, causes the computer to perform the method of the first aspect described above and the various possible methods of the first aspect.
  • FIG. 1 is a schematic diagram of a network architecture for a wireless communication connection according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of a method for connecting a wireless communication according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of another method for connecting wireless communications according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a scenario for a wireless communication connection according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of another scenario for a wireless communication connection according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of still another method for connecting wireless communications according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of another scenario for a wireless communication connection according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of another scenario for a wireless communication connection according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 10 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
  • the user needs to manually enter the dedicated setting interface of the first terminal to enable the corresponding wireless connection mode (for example, Bluetooth mode, WiFi mode, etc.), then manually initiate a scan on the dedicated setting interface, and manually select the second terminal to connect, knowing the name or address of the second terminal in the wireless connection mode, if at this time
  • the second terminal does not enable the corresponding wireless connection mode, and the first terminal cannot scan the second terminal, so that the wireless communication connection in the wireless communication mode cannot be established.
  • how to make a terminal enter the state that can be scanned is difficult. It may be necessary to check the terminal's manual to know the method. At the same time, too many manual operations also establish a wireless communication connection between the terminals. The process becomes very complicated and the terminal is less intelligent.
  • an embodiment of the present invention provides a connection method and a terminal for wireless communication, which are used to simplify the operation process and improve the intelligence of the terminal.
  • the network architecture of the embodiment of the present invention is first introduced.
  • FIG. 1 is a schematic diagram of a network architecture for a wireless communication connection provided by the present invention.
  • the network architecture includes a first terminal 101 and a second terminal 102.
  • the first terminal 101 and the second terminal 102 can be various types of smart terminals, such as a smart phone, a tablet, a wearable device, a computer, and a personal digital assistant (English: Personal Digital Assistant, abbreviation: PDA) ), a mobile Internet device (English: Mobile Internet Device, abbreviation: MID) and other terminals with communication functions.
  • PDA Personal Digital Assistant
  • MID Mobile Internet Device
  • the first terminal 101 first selects a wireless connection mode in its own target application.
  • the target application is a social application
  • the wireless connection mode is a Bluetooth-based connection mode
  • the first terminal 101 first selects a Bluetooth-based connection mode in the social application.
  • the first terminal 101 may determine a target identifier (such as a contact name in the contact list) by using a list of identifiers (such as a contact list, etc.) in the social application, and through a wireless network (eg, WiFi, The cellular mobile network or the like transmits a wireless connection request for the wireless connection mode to the second terminal 102 corresponding to the target identifier.
  • a target identifier such as a contact name in the contact list
  • a list of identifiers such as a contact list, etc.
  • a wireless network eg, WiFi, The cellular mobile network or the like transmits a wireless connection request for the wireless connection mode to the second terminal 102 corresponding to the target identifier.
  • the request may include parameters of the first terminal 101 required to establish the wireless communication connection (eg, a hardware address of the first terminal 101, a user identifier (eg, a user account of the target application, a user name of the target application, etc.), and the like. ).
  • parameters of the first terminal 101 required to establish the wireless communication connection eg, a hardware address of the first terminal 101, a user identifier (eg, a user account of the target application, a user name of the target application, etc.), and the like. ).
  • the second terminal 102 needs to install a target application with the first terminal 101, and the second terminal 102 receives a wireless connection request for the wireless connection mode in the target application through a wireless network. If the second terminal The user of 102 confirms that a wireless communication connection is established with the first terminal 101, and then the second terminal 102 can generate an acknowledgment connection response for the wireless connection request and send it to the first terminal 101 over the wireless network.
  • the target application installed by the second terminal 102 and the target application installed by the first terminal 101 may be the same application, or may be different applications, which is not limited by the present invention.
  • the acknowledgment connection response for the wireless connection request may include parameters of the second terminal 102 required to establish the wireless communication connection (eg, hardware address, random number, encryption key, etc. of the second terminal 102) .
  • the second terminal 102 if the user of the second terminal 102 confirms that the wireless communication connection is established with the first terminal 101, when the user agrees to the wireless connection request on the first terminal 102, the second terminal 102 automatically opens its own In the wireless connection mode, the second terminal 102 can automatically turn on the wireless connection mode requested by the first terminal 101.
  • the first terminal 101 requests to establish a Bluetooth-based wireless communication connection with the second terminal 102, and if the user of the second terminal 102 agrees to establish the wireless communication connection by the first terminal 101, the Bluetooth of the second terminal 102 If it is not turned on, the second terminal 102 can automatically turn on the Bluetooth.
  • the first terminal 101 may automatically open its own The wireless connection mode can then perform a local pairing process of the wireless connection mode with the second terminal 102 through a local connection (if the confirmation connection response includes some specific parameters, such as an encryption key, etc., the first terminal 101 can also The first pairing terminal and the second terminal 102 can establish a wireless communication connection in the wireless connection mode, after the pairing is successful, the first terminal 101 and the second terminal 102 can establish a wireless communication connection in the wireless connection mode. .
  • the first terminal 101 can initiate a wireless connection request for the wireless connection mode to the second terminal 102 by using the target application, and establish a wireless communication with the second terminal 102 through the wireless network.
  • the pairing process under the local connection can be directly entered according to the parameter (if the parameter is a specific parameter, the pairing process under the local connection can be omitted), after the pairing is completed, the first terminal 101 A wireless communication connection in the wireless connection mode is established with the second terminal 102.
  • the user of the first terminal 101 does not need to know the hardware address or name of the second terminal 102 in the wireless communication mode, and the users of the two terminals do not need to open the corresponding wireless connection mode to the dedicated setting interface, and select The corresponding terminal can establish a wireless communication connection in the wireless connection mode, which simplifies the operation process of the user and improves the intelligence of the terminal.
  • FIG. 2 is a schematic flowchart diagram of a method for connecting wireless communications according to an embodiment of the present invention. As shown in FIG. 2, the embodiment of the present invention includes the following steps:
  • the first terminal selects a wireless connection mode in the target application, and determines a target identifier from the identifier list of the target application.
  • the wireless connection mode may be a mode for the first terminal to wirelessly connect with other terminals, where one or more wireless connection modes may be set, and the user may obtain multiple from the target application. Wireless connection mode selects one of the wireless connection modes.
  • the wireless connection mode includes: one or more of a Bluetooth-based connection mode and a WiFi-based connection mode.
  • the WiFi-based connection mode includes: a WPS-based connection mode and a PIN-based connection mode.
  • the target application may be a social application or other type of the first terminal downloaded in advance.
  • the application or the like may also be the communication software and the like provided by the first terminal, and the present invention is not limited herein.
  • the identifier list of the target application may be a list of contact names stored in the target application, a list of contact phones, a list of contact avatars, and the like, and the present invention is not limited thereto.
  • the user may select a wireless connection mode in the target application by using the first terminal, and determine a target identifier in the identifier list of the target application.
  • the first terminal may also automatically select a wireless connection mode with the highest historical selection frequency according to a historical selection frequency of the wireless connection mode and the target identifier, and determine a target identifier with the highest historical selection frequency. And sending a prompt message to the user, if the user confirms the prompt message, the first terminal can perform steps 202 and 203. In this way, the user can perform the steps of selecting and re-determining each time, which simplifies the user's operation steps.
  • the first terminal sends a wireless connection request for the wireless connection mode to the second terminal corresponding to the target identifier by using a wireless network.
  • the wireless network comprises: a cellular mobile data network and/or a wireless local area network.
  • the cellular mobile data network may be a 2G network, a 3G network, a 4G network, or even a 5G network
  • the WLAN may be a WLAN, a WiFi, or the like.
  • the manner in which the first terminal determines the second terminal corresponding to the target identifier may be that the second terminal is also equipped with the same target application, and the target application of the first terminal and the target application of the second terminal have a certain target application.
  • the connection for example, the first terminal sends a message to the contact in the target application, and if the contact in the target application logs in on the second terminal, it can be on the target application of the second terminal. The message is received), so the target identifier can correspond to the second terminal.
  • the request for the wireless connection mode of the wireless connection mode may include: a connection request command, configured to notify the second terminal of the first terminal request and which type of wireless connection established by the second terminal a mode; a hardware address of the first terminal, configured to pair the second terminal with the first terminal under a local connection.
  • a connection request command configured to notify the second terminal of the first terminal request and which type of wireless connection established by the second terminal a mode
  • a hardware address of the first terminal configured to pair the second terminal with the first terminal under a local connection.
  • other types of parameters may be included in the request, which are not limited by the present invention.
  • the first terminal may send the wireless connection request for the wireless connection mode to the second terminal corresponding to the target identifier by using the wireless network after selecting the target identifier. Then, the second terminal receives the wireless connection request on the target application of the second terminal through the wireless network, and confirms whether the wireless communication connection is to be established with the first terminal.
  • the first terminal When receiving the acknowledge connection response of the wireless connection request, the first terminal establishes a wireless communication connection in the wireless connection mode with the second terminal.
  • the acknowledgment connection response of the wireless connection request is sent by the second terminal.
  • the second terminal may be a confirmation connection response that sends the wireless connection request when the user using the second terminal confirms that a wireless communication connection is to be established with the first terminal.
  • the second terminal may be a confirmation connection response that directly sends the wireless connection request when receiving the wireless connection request.
  • the above manners are only examples, not exhaustive, and include but are not limited to the above alternatives.
  • the second terminal may automatically send the confirmation connection response, for example, an automatic confirmation is performed as long as the wireless connection request of the terminal is received (the user does not need to manually confirm).
  • the second terminal may be set to be a wireless connection request sent by a user in a certain group, and may be automatically confirmed (no need for the user to manually confirm), such as at the target.
  • the connection request sent by the user identification in the family, family, etc. can automatically send the confirmation connection response.
  • the above manners are only examples, not exhaustive, and include but are not limited to the above alternatives.
  • the first terminal may detect whether the wireless connection mode of the wireless connection mode is enabled after sending the wireless connection request for the wireless connection mode to the second terminal, and automatically enable the wireless connection if not Connection mode, if it is enabled, let the wireless connection mode save on.
  • the second terminal may also detect whether the wireless connection mode of the second terminal is enabled when the wireless connection request is sent, and if not, automatically enable the wireless connection mode, if Turn on, let the wireless connection mode save open
  • first terminal and the second terminal establish a wireless communication connection in the wireless connection mode may be: the first terminal and the second terminal both turn on the wireless connection mode, and then pass the The parameters in the connection request and the parameters in the acknowledgment connection response establish a wireless communication connection in the wireless connection mode.
  • the wireless communication connection may be a point-to-point wireless communication connection, such as a Bluetooth communication connection.
  • the wireless communication connection may also be a multi-point wireless communication connection, such as a WiFi communication connection, wherein the WiFi communication connection may include a WPS communication connection and a PIN code communication connection.
  • the first terminal may initiate a wireless connection request for the wireless connection mode to the second terminal by using the target application, and receive the confirmation connection response of the second terminal by using the wireless network, and simultaneously establish a wireless connection.
  • the second terminal establishes a wireless communication connection in the wireless connection mode by the parameters required for the communication connection.
  • the user of the first terminal does not need to know the hardware address or name of the second terminal in the wireless communication mode, and does not need to open the corresponding wireless connection mode to the dedicated setting interface, and selects the corresponding terminal, and the user is established.
  • the wireless communication connection in the wireless connection mode simplifies the operation process of the user and improves the intelligence of the terminal.
  • FIG. 3 is a schematic flowchart diagram of another method for connecting wireless communications according to an embodiment of the present invention.
  • the method of the embodiment of the present invention may include:
  • the first terminal selects a wireless connection mode in the target application, and determines a target identifier from the identifier list of the target application.
  • the first terminal sends a wireless connection request for the wireless connection mode to the second terminal corresponding to the target identifier by using the wireless network.
  • the wireless connection request may include one or more parameters for establishing the wireless communication connection, such as a hardware address of the first terminal, a connection command, and the like.
  • the first terminal When receiving the confirmation connection response of the wireless connection request, the first terminal performs a local connection interaction with the second terminal for the wireless connection mode by using a random number, and obtains an encryption key of the second terminal in the wireless connection mode. .
  • the confirmation connection response of the connection request may include: a random number generated by the second terminal in the wireless connection mode.
  • the random number may be a number randomly transmitted by the second terminal to the first terminal, and the number of the digits may be any number of three, five, or the like, which is not limited in the present invention.
  • the second terminal sends the acknowledgment connection response to the first terminal by using a wireless network, where the acknowledgment connection response includes the random number. Then, the two parties can perform local connection interaction for the wireless connection mode, that is, the random number and the hardware address of the first terminal can be used as input, and the encryption key of the second terminal is obtained by algorithm processing.
  • the second terminal may first encapsulate the random number into the acknowledgement connection response and send the same to the first terminal. Then, the second terminal generates an encryption key K2, and then encrypts the encryption key K2 according to the encryption algorithm by using the random number to obtain the ciphertext M2, and then the ciphertext M2 can be obtained through a local connection (for example, a Bluetooth connection). Send to the first terminal. After receiving the ciphertext M2, the first terminal decrypts the ciphertext M2 according to the encryption algorithm by using the random number (encapsulated in the acknowledgment connection response) to obtain the key K2. In the above manner, the first terminal and the second terminal both have an encryption key K2, and the first terminal and the second terminal can encrypt and decrypt the data by using the encryption key K2.
  • the first terminal and the second terminal respectively generate an encryption key locally according to an encryption algorithm, using a random number as a parameter, and the first terminal and the second terminal may use the encryption key.
  • K2 encrypts and decrypts the data.
  • the encryption algorithm may be any type of algorithm, and the embodiment of the present invention does not impose any limitation.
  • the embodiment of the present invention may obtain an encryption key by using a random number and various local interaction methods, and the specific manner of the embodiment of the present invention is not limited.
  • the random number is sent by the second terminal to the first terminal, the random numbers of the two parties are the same. In this case, the two parties can use the random number to perform the wireless connection mode. Local connection interaction.
  • the second terminal may perform the encryption process on the random number and then send the data, or may directly send the random number without being encrypted.
  • the present invention does not limit this.
  • the first terminal establishes a wireless communication connection in a wireless connection mode with the second terminal according to the encryption key of the second terminal.
  • the wireless connection mode is specifically a Bluetooth-based connection mode (hereinafter referred to as Bluetooth mode).
  • the user a and the user b can respectively install the target application at the first terminal and the second terminal.
  • the first terminal is connected to the wireless network, and the second terminal is also connected to the wireless network.
  • the user a selects a target identifier from the identifier list by using the target application of the first terminal, and selects the wireless connection mode to be the Bluetooth mode.
  • the target application of the first terminal sends a Bluetooth wireless connection request, where the wireless connection request may include a connection command, a hardware address of the first terminal, and the like, wherein the connection command may make the second terminal aware.
  • the type of wireless connection mode requested, the hardware address of the first terminal can be used to establish a wireless communication connection of the Bluetooth mode.
  • step 405 user b confirms on the target application of the second terminal.
  • the second terminal may detect whether Bluetooth is enabled, if not, turn on the Bluetooth, and send a confirmation connection response to the target application of the first terminal.
  • the confirmation connection response may include a connection command, a hardware address of the second terminal, and a random number.
  • the first terminal and the second terminal can perform Bluetooth pairing through a local connection.
  • the second terminal and the first terminal may use the random number and a hardware address of the first terminal as input, and obtain an encryption key of the second terminal by using an algorithm.
  • the foregoing algorithm may be any type of encryption algorithm, and the embodiment of the present invention does not impose any limitation.
  • step 408 in obtaining the encryption key of the second terminal, if the Bluetooth verification is successful, the target application of the first terminal may prompt the pairing to be completed. Meanwhile, in step 409, if the Bluetooth verification is successful, the target application of the second terminal may also prompt the pairing to be completed.
  • the first terminal and the second terminal can establish a wireless communication connection of the Bluetooth mode.
  • step 404 and step 406 may be a communication phase under a wireless network
  • step 407 and step 410 may be a communication phase under a local connection.
  • the confirmation connection response of the connection request may further include: an encryption key of the second terminal in the wireless connection mode.
  • the acknowledgment connection response includes the encryption key of the second terminal in the wireless connection mode
  • the first terminal and the second terminal may not need to perform a local interaction process, as long as the password is successfully verified.
  • the wireless communication connection in the wireless connection mode can be established.
  • the second terminal may perform the encryption process on the encryption key, and then send the encryption key.
  • the present invention does not limit the encryption key.
  • FIG. 5 it is another schematic diagram of a scenario for a wireless communication connection provided by an embodiment of the present invention.
  • step 501 to step 505 shown in FIG. 5 reference may be made to the specific implementation process of step 401 to step 405 shown in FIG. 4, and details are not described herein.
  • the second terminal detects whether Bluetooth is enabled, and if not, turns on the Bluetooth and sends a confirmation connection response.
  • the confirmation connection response may include a connection command, a hardware address of the second terminal, and an encryption key of the second terminal in the Bluetooth mode.
  • step 507 the first terminal receives the confirmation connection response, and connects the Bluetooth of the second terminal according to the encryption key of the second terminal. If the verification password is successful, the pairing is prompted on the target application of the first terminal. carry out. At the same time, in step 508, if the connection is successful, the pairing completion is also prompted on the target application of the second terminal.
  • step 509 the first terminal establishes a Bluetooth mode wireless communication connection with the second terminal.
  • the first terminal may initiate a wireless connection request for the wireless connection mode to the second terminal by using the target application, and receive the confirmation connection response of the second terminal by using the wireless network, and simultaneously establish a wireless communication.
  • the second terminal can establish a wireless communication connection in the wireless connection mode.
  • the user of the first terminal does not need to know the hardware address or name of the second terminal in the wireless communication mode, and does not need to open the corresponding wireless connection mode to the dedicated setting interface, and selects the corresponding terminal, and the user is established.
  • the wireless communication connection in the wireless connection mode simplifies the operation process of the user and improves the intelligence of the terminal.
  • FIG. 6 is a schematic flowchart diagram of still another method for connecting wireless communications according to an embodiment of the present invention.
  • the first terminal selects a wireless connection mode in the target application, and determines a target identifier from the identifier list of the target application.
  • the first terminal sends a wireless connection request for the wireless connection mode to the second terminal corresponding to the target identifier by using the wireless network.
  • the first terminal starts the wireless connection mode when receiving the confirmation connection response of the connection request.
  • the confirmation connection response of the connection request includes: a hardware address of the second terminal.
  • the wireless connection mode may be, for example, a connection mode based on WPS (WiFi Protected Setup) (hereinafter referred to as WPS mode).
  • WPS mode can automatically configure a network name and an encryption key for each terminal in the network.
  • the user does not have to understand the concept of the network name and the encryption key, and does not need to input the pre-known cipher segment, and only needs to open the WPS mode at both the access terminal and the originating terminal to connect.
  • the encryption key is randomly generated, the security performance is also high.
  • the wireless connection mode may also be a WiFi mode when the first terminal turns on the personal hotspot, or another wireless connection mode, and the present invention is not limited herein.
  • the first terminal when receiving the confirmation connection response of the second terminal, the first terminal may detect whether the wireless connection mode is enabled according to the confirmation connection response, and if not, the first terminal automatically starts the wireless connection. Connection mode, if it is turned on, you can keep the wireless connection mode turned on.
  • the first terminal determines whether the hardware address in the request for the wireless connection mode is a hardware address of the second terminal.
  • the request for the wireless connection mode may be used to request access to the wireless network of the first terminal.
  • the request for the wireless connection mode may be sent by the second terminal or may be sent by another terminal, and the request for the wireless connection mode may include issuing the hardware address of the terminal.
  • the first terminal may obtain the hardware address of the second terminal by using a wireless communication phase, and then, when receiving the request for the wireless connection mode during the communication phase of the local connection, may determine the request in the request. Whether the hardware address is the hardware address obtained during the wireless communication phase. If so, the second terminal can be allowed to perform local access to the wireless network (eg, allowing WPS access), and if not, the second terminal is not allowed to perform local access to the wireless network.
  • the wireless network eg, allowing WPS access
  • the first terminal when receiving the request for the wireless connection mode of any one terminal, may determine, in the communication phase of the local connection, whether the hardware address in the request for the wireless connection mode is responsive to the confirmation connection.
  • the address (ie the hardware address of the second terminal) is the same.
  • the first terminal establishes a wireless communication connection with the second terminal in the wireless communication mode.
  • the first terminal may determine that the second terminal is initiated.
  • a wireless communication connection in a wireless communication mode can be established with the second terminal.
  • the first terminal determines that the hardware address in the request for the wireless connection mode is the hardware address of the second terminal, establishing, by the second terminal, the wireless communication connection of the wireless connection mode, It is possible to prevent the other terminal from erroneously accessing when the first terminal starts the wireless connection mode, thereby improving the connection efficiency.
  • FIG. 7 another scenario for a wireless communication connection provided by an embodiment of the present invention is shown.
  • the user a and the user b can respectively install the target application at the first terminal and the second terminal.
  • the first terminal is connected to the wireless network
  • the second terminal is also connected to the wireless network.
  • the user a selects a target identifier from the identifier list by using the target application of the first terminal, and selects the wireless connection mode to be the WPS mode.
  • the target application of the first terminal sends a wireless connection request (ie, message 1) in the WPS mode
  • the wireless connection request may include a connection command, a hardware address of the first terminal, and the like, where The connection command can make the second terminal know that the type of the requested wireless connection mode is the WPS mode, and the hardware address of the first terminal can be used to accurately find the first terminal when the second terminal sends the WPS access request.
  • step 705 user b confirms on the target application of the second terminal.
  • the second terminal may detect whether the WPS mode is enabled, if not, turn on the WPS mode, and send a confirmation connection response (ie, message 2) to the target application of the first terminal.
  • the confirmation connection response (ie, message 2) may include a connection command, a hardware address of the second terminal, and the like.
  • step 707 after receiving the acknowledgment connection response (ie, message 2), the first terminal detects whether the WPS mode is enabled. If not, the WPS mode is enabled, and if it is enabled, the WPS mode is maintained. It is on.
  • step 708 the second terminal sends a WPS access request (ie, a request for the wireless connection mode, ie, message 3) to the first terminal.
  • a WPS access request ie, a request for the wireless connection mode, ie, message 3
  • the first terminal receives the WPS access request (ie, message 3), and determines whether the hardware address in the WPS access request is a hardware address of the second terminal in the acknowledgment connection response.
  • step 710 if the first terminal determines that the hardware address in the request (message 3) and the hardware address in the acknowledgment connection response (ie, message 2) are the same as the hardware address of the second terminal, the second terminal may be Received in the wireless network of the first terminal.
  • the terminal corresponding to the hardware address in the request may not be connected to the wireless network of the first terminal.
  • step 711 the first terminal establishes a wireless communication connection in the WPS mode with the second terminal.
  • step 704 and step 706 may be a communication phase under a wireless network
  • steps 707 to 711 may be a communication phase under a local connection.
  • the first terminal when receiving the confirmation connection response of the connection request, may further send the hardware address of the third terminal to the second terminal, and control the third terminal to be in the wireless connection mode, so as to facilitate The second terminal establishes a wireless communication connection based on the hardware address of the third terminal when the wireless connection mode is turned on.
  • confirmation connection response may include the hardware address of the second terminal.
  • the third terminal may be a router, a WiFi transmitting device, or the like.
  • the first terminal may establish the wireless communication connection with the third terminal in advance, and save the hardware address of the third terminal. Moreover, the first terminal may further acquire the operation authority of the third terminal in advance, that is, the third terminal may be controlled without the third terminal confirming.
  • the first terminal when receiving the confirmation connection response of the connection request, may accurately send the hardware address of the third terminal to the second terminal according to the hardware address of the second terminal in the confirmation connection response. And controlling the third terminal to be in the wireless connection mode. Further, the second terminal may receive the hardware address of the third terminal, and enable the wireless connection mode, and the second terminal may access the third terminal according to the hardware address of the third terminal. And establishing a wireless communication connection with the third terminal in the wireless network.
  • the wireless connection mode is WPS mode.
  • the first terminal first establishes a wireless communication connection of the WPS mode with the third terminal, and saves the hardware address of the third terminal. Then, the first terminal acquires the operation authority of the third terminal, so that the third terminal can be controlled on the first terminal. Further, the first terminal sends the connection request of the WPS mode to the second terminal, and when receiving the confirmation connection response of the second terminal for the connection request, sending the hardware address of the third terminal to the second terminal At the same time, the first terminal controls the third terminal to enable the WPS mode.
  • the second terminal sends a WPS access request to the third terminal according to the hardware address of the third terminal, and the third terminal can access the second terminal after receiving the WPS access request, and the The second terminal establishes a wireless communication connection in WPS mode.
  • the second terminal may further send a request for accessing the wireless connection mode to the first terminal after sending the acknowledge connection response.
  • the first terminal controls the third terminal to be in the wireless connection mode, and forwards the request of the second terminal to access the wireless connection mode to the third terminal.
  • the third terminal accesses the second terminal according to the hardware address in the request, and establishes a wireless communication connection in the wireless connection mode with the second terminal.
  • the first terminal may further send, when receiving the confirmation connection response of the connection request, the encryption key of the third terminal in the wireless connection mode and the hardware address of the third terminal to the third terminal.
  • Two terminals When receiving the encryption key and the hardware address of the third terminal, the second terminal turns on the wireless connection mode, scans the third terminal according to the hardware address of the third terminal, and automatically inputs an encryption key to be encrypted. After the key verification is successful, the wireless communication connection in the wireless connection mode can be established with the third terminal.
  • the third terminal may be a router.
  • the first terminal can first establish a wireless communication connection with the router and record the hardware address of the router.
  • the first terminal sends a wireless connection request to the second terminal (the wireless connection request carries the hardware address of the router at this time).
  • the second terminal After receiving the wireless connection request, the second terminal saves the hardware address of the router and turns on its own WPS access mode, and then sends a confirmation connection response for the wireless connection request to the first terminal.
  • the first terminal when the first terminal receives the acknowledgment connection response for the wireless connection request, the first terminal notifies the router to enable the WPS mode command.
  • the WPS mode command may also include that the hardware address of the second terminal in the acknowledgment response of the second terminal is also sent to the router to receive the WPS request command sent by the first terminal, and the WPS mode is started, ready to The second terminal performs WPS interaction.
  • the confirmation connection response of the second terminal may include a PIN code.
  • the first terminal may connect to the wireless network of the second terminal according to the PIN code, and establish a wireless communication connection of the WiFi connection mode with the second terminal.
  • FIG. 8 it is a schematic diagram of another scenario for a wireless communication connection provided by an embodiment of the present invention.
  • the user a and the user b can respectively install the target application at the first terminal and the second terminal.
  • the first terminal is connected to the wireless network
  • the second terminal is also connected to the wireless network.
  • the user a uses the target application of the first terminal to select the target identifier from the identifier list as the user b, and selects the wireless connection mode to be the WiFi mode.
  • step 804 the target application of the first terminal sends a wireless connection request in a WiFi mode, where the wireless connection request may include a connection command, a hardware address of the first terminal, and the like.
  • step 805 user b confirms on the target application of the second terminal.
  • the second terminal may detect whether the WiFi mode is enabled, if not, turn on the WiFi mode, and send a confirmation connection response to the target application of the first terminal.
  • the confirmation connection response may include a connection command, a hardware address of the second terminal, and a parameter such as a PIN code.
  • the PIN code may be a WiFi password, or other passwords for encryption, and the embodiment of the present invention does not impose any limitation.
  • step 807 after receiving the confirmation connection response, the first terminal detects whether the WiFi mode is enabled. If not, the WiFi mode is enabled, and if it is enabled, the WiFi mode is kept on.
  • step 808 the first terminal performs a WiFi connection with the second terminal, and automatically inputs the PIN code in the confirmation connection response, so that the second terminal verifies whether the PIN code is correct.
  • step 809 if the second terminal verifies that the PIN code is correct, the second terminal may access the first terminal to the wireless network of the second terminal, and establish the WiFi mode with the first terminal. Wireless communication connection.
  • the first terminal may not be connected to the wireless network of the second terminal.
  • step 804 and step 806 may be a communication phase under a wireless network
  • steps 807 to 809 may be a communication phase under a local connection.
  • the first terminal may initiate a wireless connection request for the wireless connection mode to the second terminal by using the target application, and receive the confirmation connection response of the second terminal by using the wireless network, and simultaneously establish a wireless connection.
  • a parameter such as a hardware address required for the communication connection, when receiving the request of the wireless connection mode, determining whether the hardware address in the request of the wireless connection mode is the hardware address of the second terminal, and if so, the second terminal Establish a wireless communication connection in the wireless connection mode.
  • the first terminal may establish a wireless communication connection of the wireless connection mode with the second terminal if the hardware address in the request for the wireless connection mode is the hardware address of the second terminal, and the other terminal may be avoided.
  • the terminal turns on the wireless connection mode, the terminal is incorrectly accessed, thereby improving the intelligence of the terminal.
  • FIG. 9 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
  • the terminal shown in FIG. 9 may include:
  • the determining module 901 is configured to select a wireless connection mode in the target application, and determine a target identifier from the identifier list of the target application.
  • the sending module 902 is configured to send, by using a wireless network, a wireless connection request for the wireless connection mode to the second terminal corresponding to the target identifier.
  • the establishing module 903 is configured to establish a wireless communication connection in the wireless connection mode with the second terminal when receiving the acknowledgment response of the wireless connection request.
  • the confirmation connection response of the connection request includes: a random number generated by the second terminal in the wireless connection mode;
  • the establishing module 903 includes: an interaction unit 9030, configured to perform, by using the random number, the second terminal The local connection interaction of the line connection mode obtains an encryption key of the second terminal in the wireless connection mode.
  • the first establishing unit 9031 is configured to establish a wireless communication connection in the wireless connection mode with the second terminal according to the encryption key of the second terminal.
  • the confirmation connection response of the connection request includes: an encryption key of the second terminal in the wireless connection mode.
  • the establishing module 903 includes: a second establishing unit 9032, configured to establish a wireless communication connection in the wireless connection mode with the second terminal according to the encryption key of the second terminal.
  • the confirmation connection response of the connection request includes: a hardware address of the second terminal;
  • the establishing module 903 includes: an opening unit 9033, configured to enable the wireless connection mode when receiving the confirmation connection response of the connection request.
  • the determining unit 9034 is configured to determine, when the request for the wireless connection mode is received, whether the hardware address in the request for the wireless connection mode is a hardware address of the second terminal.
  • the third establishing unit 9035 establishes a wireless communication connection in the wireless communication mode with the second terminal if the hardware address in the request for the wireless connection mode is the hardware address of the second terminal.
  • the terminal further includes: a processing module 904, configured to: when receiving the confirmation connection response of the connection request, send the hardware address of the third terminal to the second terminal, and control the third terminal to be in the wireless
  • the connection mode is configured to enable the second terminal to establish a wireless communication connection based on the hardware address of the third terminal when the wireless connection mode is turned on.
  • the wireless connection mode includes: one or more of a Bluetooth-based connection mode, a WPS-based connection mode, a WiFi-based connection mode, and an NFC-based connection mode.
  • the wireless network comprises: a cellular mobile data network and/or a wireless local area network.
  • the wireless connection request for the wireless connection mode may be initiated to the second terminal by the target application, and the confirmation connection response of the second terminal is received by the wireless network, and the wireless communication connection is required to be established.
  • the parameter can be used by the second terminal to establish a wireless communication connection in the wireless connection mode.
  • the user of the first terminal does not need to know the hardware address or name of the second terminal in the wireless communication mode, and does not need to open the corresponding wireless connection mode to the dedicated setting interface, and selects the corresponding terminal, and the user is established.
  • the wireless communication connection in the wireless connection mode simplifies the operation process of the user and improves the intelligence of the terminal.
  • FIG. 10 is a schematic structural diagram of another terminal according to an embodiment of the present invention.
  • the terminal described in this embodiment includes: a radio frequency (RF) circuit 110, a memory 120, other input devices 130, a display screen 140, a sensor 150, an input/output subsystem 170, a processor 190, and a power supply 190. And other components.
  • RF radio frequency
  • FIG. 9 does not constitute a limitation of the terminal, and may include more or less components than those illustrated, or combine some components, or split some components, or Different parts are arranged.
  • the display screen 140 belongs to a user interface (UI), and the terminal can include a user interface that is smaller than the illustration or the like.
  • UI user interface
  • the radio frequency circuit 110 can be used for receiving and transmitting signals during and after receiving or transmitting information, in particular, after receiving the downlink information of the base station, and processing it to the processor 180; in addition, transmitting the designed uplink data to the base station.
  • the radio frequency circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, and an LNA (Low Noise Amplifier, Low noise amplifier), duplexer, etc.
  • the radio frequency circuit 110 can also communicate with the network and other devices through wireless communication.
  • the wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access). , Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), e-mail, SMS (Short Messaging Service), and the like.
  • the memory 120 can be used to store software programs and modules, and the processor 180 executes various functional applications and data processing of the terminal 1 by running software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may be stored. Data created based on the use of the terminal (such as audio data, phone book, etc.).
  • memory 120 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • Other input devices 130 can be used to receive input numeric or character information, as well as to generate key signal inputs related to user settings and function controls of the terminal.
  • other input devices 130 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and light mice (the light mouse is not sensitive to display visual output).
  • function keys such as volume control buttons, switch buttons, etc.
  • trackballs mice, joysticks, and light mice (the light mouse is not sensitive to display visual output).
  • Other input devices 130 are coupled to other input device controllers 171 of input/output subsystem 170 for signal interaction with processor 180 under the control of other device input controllers 171.
  • the display screen 140 can be used to display information input by the user or information provided to the user as well as various menus of the terminal, and can also accept user input.
  • the specific display screen 140 may include a display panel 141 and a touch panel 142.
  • the display panel 141 can be configured by using an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), or the like.
  • the touch panel 142 also referred to as a touch screen, a touch sensitive screen, etc., can collect contact or non-contact operations on or near the user (eg, the user uses any suitable object or accessory such as a finger, a stylus, etc. on the touch panel 142.
  • the operation in the vicinity of the touch panel 142 may also include a somatosensory operation; the operation includes a single-point control operation, a multi-point control operation, and the like, and drives the corresponding connection device according to a preset program.
  • the touch panel 142 may include two parts: a touch detection device and a touch controller. Wherein, the touch detection device detects the touch orientation and posture of the user, and detects a signal brought by the touch operation, and transmits a signal to the touch controller; the touch controller receives the touch information from the touch detection device, and converts the signal into a processor. The processed information is sent to the processor 180 and can receive commands from the processor 180 and execute them.
  • the touch panel 142 can be implemented by using various types such as resistive, capacitive, infrared, and surface acoustic waves, and the touch panel 142 can be implemented by any technology developed in the future.
  • the touch panel 142 can cover the display panel 141, and the user can display the content according to the display panel 141 (the display content includes, but is not limited to, a soft keyboard, a virtual mouse, a virtual button, an icon, etc.) on the display panel 141. Operation is performed on or near the covered touch panel 142.
  • the touch panel 142 After detecting the operation thereon or nearby, the touch panel 142 transmits to the processor 180 through the input/output subsystem 170 to determine user input, and then the processor 180 according to the user The input provides a corresponding visual output on display panel 141 via input/output subsystem 170.
  • the touch panel 142 and the display panel 141 are implemented as two separate components. The input and input functions of the terminal, but in some embodiments, the touch panel 142 can be integrated with the display panel 141 to implement input and output functions of the terminal.
  • the terminal may also include at least one type of sensor 150, such as a light sensor, a speed sensor, a GPS sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor may close the display panel 141 and/or when the terminal moves to the ear. Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes). When it is stationary, it can detect the magnitude and direction of gravity.
  • the terminal can be used to identify the attitude of the terminal (such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for the terminal can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • attitude of the terminal such as horizontal and vertical screen switching, related Game, magnetometer attitude calibration
  • vibration recognition related functions such as pedometer, tapping
  • the terminal can also be configured with gyroscopes, barometers, hygrometers, thermometers, infrared sensors and other sensors, no longer Narration.
  • the input/output subsystem 170 is used to control external devices for input and output, and may include other device input controllers 171, sensor controllers 172, and display controllers 173.
  • one or more other input control device controllers 171 receive signals from other input devices 130 and/or send signals to other input devices 130.
  • Other input devices 130 may include physical buttons (press buttons, rocker buttons, etc.) , dial, slide switch, joystick, click wheel, light mouse (light mouse is a touch-sensitive surface that does not display visual output, or an extension of a touch-sensitive surface formed by a touch screen). It is worth noting that other input control device controllers 171 can be connected to any one or more of the above devices.
  • Display controller 173 in input/output subsystem 170 receives signals from display 140 and/or transmits signals to display 140. After the display 140 detects the user input, the display controller 173 converts the detected user input into an interaction with the user interface object displayed on the display screen 140, ie, implements human-computer interaction. Sensor controller 172 can receive signals from one or more sensors 150 and/or send signals to one or more sensors 150.
  • the processor 180 is the control center of the terminal, and connects various parts of the entire terminal using various interfaces and lines, by executing or executing software programs and/or modules stored in the memory 120, and calling data stored in the memory 120, executing The terminal's various functions and processing data, so as to monitor the terminal as a whole.
  • the processor 180 may include one or more processing units; preferably, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, a user interface, an application, and the like.
  • the modem processor primarily handles wireless communications. It can be understood that the above modem processor may not be integrated into the processor 180.
  • the terminal also includes a power source 190 (such as a battery) that supplies power to the various components.
  • a power source 190 such as a battery
  • the power source can be logically coupled to the processor 180 through a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
  • the terminal may further include a camera, a Bluetooth module, and the like, and details are not described herein again.
  • the processor 180 may invoke the program instructions stored in the memory 120 to implement the method as shown in the embodiment of the present invention.
  • the processor 180 is configured to select a wireless connection mode in the target application, and determine a target identifier from the identifier list of the target application, and send, by using a wireless network, the second terminal corresponding to the target identifier to the wireless connection mode. a wireless connection request; the first terminal and the second terminal establish a wireless communication connection in the wireless connection mode upon receiving the confirmation connection response of the wireless connection request.
  • the method performed by the processor in the embodiment of the present invention is described from the perspective of a processor. It can be understood that the processor in the embodiment of the present invention needs to cooperate with other hardware structures to perform the above method.
  • the above terminal and other devices or The interaction of the server, such as sending a wireless connection request for the wireless connection mode to the second terminal corresponding to the target identifier, is controlled by the processor 180 to receive the related data.
  • the specific implementation process is not described and limited in detail in the embodiments of the present invention.
  • the confirmation connection response of the connection request includes: a random number generated by the second terminal in the wireless connection mode.
  • the processor 180 is configured to perform, by using the random number, a local connection interaction with the second terminal for the wireless connection mode, to obtain an encryption key of the second terminal in the wireless connection mode, and according to the second terminal.
  • the encryption key establishes a wireless communication connection in the wireless connection mode with the second terminal.
  • the confirmation connection response of the connection request includes: an encryption key of the second terminal in the wireless connection mode.
  • the processor 180 is specifically configured to establish a wireless communication connection in the wireless connection mode with the second terminal according to the encryption key of the second terminal.
  • the confirming connection response of the foregoing connection request includes: a hardware address of the second terminal.
  • the processor 180 is configured to: when receiving the confirmation connection response of the connection request, turn on the wireless connection mode; and when receiving the request for the wireless connection mode, determine the hardware in the request for the wireless connection mode. Whether the address is the hardware address of the second terminal; if the hardware address in the request for the wireless connection mode is the hardware address of the second terminal, the first terminal and the second terminal establish the wireless communication mode. Wireless communication connection.
  • the processor 180 is further configured to: when receiving the confirmation connection response of the connection request, send the hardware address of the third terminal to the second terminal, and control the third terminal to be in the wireless connection mode, So that the second terminal establishes a wireless communication connection based on the hardware address of the third terminal when the wireless connection mode is turned on.
  • the foregoing wireless connection mode includes: one or more of a Bluetooth-based connection mode, a WPS-based connection mode, a WiFi-based connection mode, and an NFC-based connection mode.
  • the foregoing wireless network comprises: a cellular mobile data network and/or a wireless local area network.
  • the wireless connection request for the wireless connection mode may be initiated to the second terminal by the target application, and the confirmation connection response of the second terminal is received by the wireless network, and the wireless communication connection is required to be established.
  • the parameter can be used by the second terminal to establish a wireless communication connection in the wireless connection mode.
  • the user of the first terminal does not need to know the hardware address or name of the second terminal in the wireless communication mode, and does not need to open the corresponding wireless connection mode to the dedicated setting interface, and selects the corresponding terminal, and the user is established.
  • the wireless communication connection in the wireless connection mode simplifies the operation process of the user and improves the intelligence of the terminal.
  • a computer readable storage medium storing a computer program, when executed by a processor, may implement: selecting a wireless connection mode in a target application, Determining, by the identifier list of the target application, a target identifier; sending, by the wireless network, a wireless connection request for the wireless connection mode to the second terminal corresponding to the target identifier; and confirming the connection when receiving the wireless connection request In response, establishing a wireless communication connection in the wireless connection mode with the second terminal.
  • Yet another embodiment of the present invention also provides a computer program product comprising instructions that, when run on a computer, cause the computer to perform: selecting a wireless connection mode in the target application, and from the list of identifications of the target application Determining a target identifier; transmitting, by the wireless network, a wireless connection request for the wireless connection mode to a second terminal corresponding to the target identifier; and when receiving the confirmation connection response of the wireless connection request, with the second terminal Establishing a wireless communication connection in the wireless connection mode.
  • the computer readable storage medium may be an internal storage unit of the terminal described in any of the foregoing embodiments, such as a hard disk or a memory of the terminal.
  • the computer readable storage medium may also be an external storage device of the terminal, such as a plug-in hard disk equipped on the terminal, a smart memory card (SMC), and a Secure Digital (SD) card. , Flash Card, etc.
  • the computer readable storage medium may also include both an internal storage unit of the terminal and an external storage device.
  • the computer readable storage medium is for storing the computer program and other programs and data required by the terminal.
  • the computer readable storage medium can also be used to temporarily store data that has been output or is about to be output.
  • the principle of the terminal to solve the problem in the embodiment of the present invention is similar to the method embodiment of the present invention. Therefore, the implementation of the terminal may refer to the implementation of the method, and is not described here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

本发明实施例公开了一种无线通信的连接方法及终端,其中方法包括:第一终端首先在目标应用里选择无线连接模式,然后从该目标应用的标识列表中确定出目标标识,并通过无线网络向该目标标识对应的第二终端发送针对无线连接模式的无线连接请求,在接收到针对该无线连接请求的确认响应时,与该第二终端建立在无线连接模式下的无线通信连接,可以简化操作步骤,提高终端的智能性。

Description

一种基于无线通信的连接方法及终端 技术领域
本发明涉及通信技术领域,尤其涉及一种基于无线通信的连接方法及终端。
背景技术
随着通信技术的不断发展,终端(例如智能手机、可穿戴设备、平板电脑等)也日益成为人们日常生活与学习中必不可少的工具。
目前,人们常常会利用终端进行数据交互,这就需要建立无线通信连接来实现。现有的无线通信连接方式,需要用户手动进入终端的专用设置界面开启相应的无线连接模式(例如蓝牙模式、WiFi模式等),然后在知晓另一终端在该无线连接模式下的名称或地址等信息的前提下,手动选择另一终端来进行连接,如果这时另一终端并没有开启相应的无线连接模式,该终端就无法扫描到另一终端,从而无法建立无线通信连接。因此,上述方式存在操作过程繁琐,且终端智能性较低的问题。
发明内容
本发明实施例提供了一种无线通信的连接方法及终端,有利于简化操作过程,提高终端的智能性。
第一方面,本发明实施例提供了一种无线通信的连接方法,第一终端首先在目标应用里选择无线连接模式,然后从该目标应用的标识列表中确定出目标标识,并通过无线网络向该目标标识对应的第二终端发送针对无线连接模式的无线连接请求,在接收到针对该无线连接请求的确认响应时,与该第二终端建立在无线连接模式下的无线通信连接。
可见,通过实施第一方面所提供的方法,可以通过第一终端在目标应用里完成建立无线连接模式下的无线通信连接,不需要用户手动在专用设置界面开启相应的无线连接模式,也不需要用户提前知道第二终端在该无线连接模式下的名称或地址等信息,可以简化操作过程,并同时提高终端的智能性。
作为一种可选的实施方式,该连接请求的确认连接响应包括:该第二终端在无线连接模式下产生的随机数。该第一终端与该第二终端建立该无线连接模式下的无线通信连接,具体可以是第一终端首先通过该随机数与该第二终端进行针对该无线连接模式的本地连接交互,得到该第二终端在该无线连接模式下的加密密钥,然后该第一终端根据该第二终端的加密密钥与该第二终端建立该无线连接模式下的无线通信连接。
可见,通过实施上述可选的实施方式,第一终端利用随机数与该第二终端进行交互,得到第二终端的加密密钥,并与该第二终端建立无线通信连接,丰富了建立无线通信连接的方式,提高了终端的智能性。
作为一种可选的实施方式,该连接请求的确认连接响应包括:该第二终端在无线连接模式下的加密密钥。该第一终端与该第二终端建立该无线连接模式下的无线通信连接,具体可以是第一终端根据该第二终端的加密密钥与该第二终端建立该无线连接模式下的无线通信连接。
可见,通过实施上述可选的实施方式,第一终端直接得到该第二终端的加密密钥,并且无需与第二终端进行本地连接交互,便能够与该第二终端建立无线通信连接,丰富了建立无线通信连接的方式,提高了终端的智能性。
作为一种可选的实施方式,该连接请求的确认连接响应包括:该第二终端的硬件地址。该第一终端与该第二终端建立该无线连接模式下的无线通信连接,具体可以是该第一终端首先在接收到该连接请求的确认连接响应时,开启该无线连接模式,并在接收到针对该无线连接模式的请求时,判断该针对该无线连接模式的请求中的硬件地址是否为该第二终端的硬件地址,如果该针对该无线连接模式的请求中的硬件地址为该第二终端的硬件地址,则该第一终端与该第二终端建立该无线通信模式下的无线通信连接。
可见,通过实施上述可选的实施方式,第一终端可以在确定该针对该无线连接模式的请求中的硬件地址是第二终端的硬件地址的情况下,才与该第二终端建立该无线通信模式下的无线通信连接,可以避免其他终端误接入的情况,提高了终端的智能性。
作为一种可选的实施方式,该方法还包括:该第一终端在接收到该连接请求的确认连接响应时,将第三终端的硬件地址发送至该第二终端,并控制该第三终端处于该无线连接模式,以便于该第二终端在开启该无线连接模式时基于该第三终端的硬件地址建立无线通信连接。
可见,通过实施上述可选的实施方式,该第一终端可以控制第三终端与第二终端建立无线通信连接,丰富了该第一终端的功能,同时提高了终端的智能性。
作为一种可选的实施方式,该无线连接模式可以包括:基于蓝牙的连接模式、基于WPS的连接模式、基于WiFi的连接模式中的任意一种或多种。
作为一种可选的实施方式,该无线网络可以包括:蜂窝移动数据网络和/或无线局域网。
第二方面,提供了一种终端,该终端具有实现上述第一方面可能的实现方式中终端行为的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。该模块可以是软件和/或硬件。基于同一发明构思,由于该终端解决问题的原理以及有益效果可以参见上述第一方面和第一方面的各可能的方法实施方式以及所带来的有益效果,因此该终端的实施可以参见上述第一方面和第一方面的各可能的方法实施方式,重复之处不再赘述。
第三方面,提供了一种终端,该终端包括:存储器,用于存储一个或多个程序;处理器,用于调用存储在该存储器中的程序以实现上述第一方面的方法设计中的方案,该终端解决问题的实施方式以及有益效果可以参见上述第一方面和第一方面的各可能的方法的实施方式以及有益效果,重复之处不再赘述。
第四方面,提供了一种计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面的方法和第一方面的各可能的方法的实施方式。
附图说明
图1是本发明实施例提供的一种用于无线通信连接的网络架构示意图;
图2是本发明实施例提供的一种无线通信的连接方法的流程示意图;
图3是本发明实施例提供的另一种无线通信的连接方法的流程示意图;
图4是本发明实施例提供的一种用于无线通信连接的情景示意图;
图5是本发明实施例提供的另一种用于无线通信连接的情景示意图;
图6是本发明实施例提供的又一种无线通信的连接方法的流程示意图;
图7是本发明实施例提供的又一种用于无线通信连接的情景示意图;
图8是本发明实施例提供的又一种用于无线通信连接的情景示意图;
图9是是本发明实施例提供的一种终端的结构示意图;
图10是本发明实施例提供的另一种终端的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例进行说明。
在现有的实际应用中,如果第一终端与第二终端需要建立无线通信模式下的无线通信连接,就需要用户手动进入第一终端的专用设置界面开启相应的无线连接模式(例如蓝牙模式、WiFi模式等),然后手动在该专用设置界面发起扫描,并在知晓第二终端在该无线连接模式下的名称或地址等信息的前提下,手动选择第二终端来进行连接,如果这时该第二终端并没有开启相应的无线连接模式,该第一终端就无法扫描到该第二终端,从而无法建立该无线通信模式下的无线通信连接。对于一般的用户来说,如何让一个终端进入到可被扫描到的状态是比较困难的,可能需要去查看终端的说明书才能知晓方法,同时,过多的手动操作也让终端间建立无线通信连接的过程变得十分复杂,终端的智能性较低。
为此,本发明实施例提供了一种无线通信的连接方法及终端,用以简化操作过程,提高终端的智能性。为了更好理解本发明实施例提供的无线通信的连接方法及终端,下面先对本发明实施例的网络架构进行介绍。
请参阅图1,是本发明提供的一种用于无线通信连接的网络架构示意图。本发明实施例中,所述网络架构中包括第一终端101、以及第二终端102。其中,该第一终端101以及该第二终端102可以为各种类型的智能终端,例如可以是智能手机、平板电脑、可穿戴设备、计算机、个人数字助理(英文:Personal Digital Assistant,缩写:PDA)、移动互联网设备(英文:Mobile Internet Device,缩写:MID)等具有通信功能的终端。
在图1所示的用于无线通信连接的网络架构示意图中,该第一终端101首先在自身的目标应用中选择出无线连接模式。例如,该目标应用为社交应用,该无线连接模式为基于蓝牙的连接模式,那么该第一终端101首先在该社交应用中选择出基于蓝牙的连接模式。
进一步的,该第一终端101可以在该社交应用中的标识列表(例如联系人列表等)确定出目标标识(例如联系人列表中的某一个联系人名称),并通过无线网络(例如WiFi,蜂窝移动网络等)向该目标标识对应的第二终端102发送针对该无线连接模式的无线连接请求。
其中,该请求中可以包括建立该无线通信连接所需要的该第一终端101的参数(例如第一终端101的硬件地址、用户标识(例如目标应用的用户账号、目标应用的用户名称等)等)。
进一步的,该第二终端102需要与该第一终端101均安装目标应用,该第二终端102通过无线网络在该目标应用里接收到针对该无线连接模式的无线连接请求。如果第二终端 102的用户确认与该第一终端101建立无线通信连接,那么该第二终端102可以生成针对该无线连接请求的确认连接响应,并通过无线网络发送给该第一终端101。
其中,第二终端102安装的目标应用与该第一终端101安装的目标应用可以是同一个应用,也可以是不同的应用,本发明对此不作限制。
需要说明的是,该针对该无线连接请求的确认连接响应可以包括建立该无线通信连接所需要的该第二终端102的参数(例如第二终端102的硬件地址、随机数、加密密钥等)。
需要说明的是,如果该第二终端102的用户确认与该第一终端101建立无线通信连接时,当用户在第一终端102上面同意无线连接请求时,那么该第二终端102自动开启自身的无线连接模式,那么该第二终端102可以自动开启该第一终端101请求的无线连接模式。例如,第一终端101请求与该第二终端102建立基于蓝牙的无线通信连接,如果该第二终端102的用户在同意该第一终端101建立该无线通信连接时,该第二终端102的蓝牙并没有开启,那么该第二终端102可以自动开启该蓝牙。
进一步的,该第一终端101在通过无线网络接收到第二终端102发来的该无线连接请求的确认连接响应时,当第一终端101收到响应后,第一终端101可以自动开启自身的无线连接模式,然后可以通过本地连接与该第二终端102进行该无线连接模式的本地配对过程(如果该确认连接响应包括了一些特定的参数,如加密密钥等,该第一终端101也可以无需通过本地连接与该第二终端102进行本地配对过程而可以直接配对成功),在双方配对成功后,该第一终端101与该第二终端102便可以建立该无线连接模式下的无线通信连接。
在图1所示的架构图中,该第一终端101可以利用目标应用向该第二终端102发起针对该无线连接模式的无线连接请求,并通过无线网络与该第二终端102交互建立无线通信连接所需要的参数,就可以根据该参数直接进入本地连接下的配对过程(如果该参数为特定的参数,那么该本地连接下的配对过程可以省略),在配对完成之后,该第一终端101与该第二终端102建立该无线连接模式下的无线通信连接。第一终端101的用户可以不用知道第二终端102在该无线通信模式下的硬件地址或名称等参数,两个终端的用户也均不需要再到专用设置界面开启相应的无线连接模式,并选择出对应的终端,就可以建立该无线连接模式下的无线通信连接,简化了用户的操作过程,也提高了终端的智能性。
请参阅图2,是发明实施例提供的一种无线通信的连接方法的流程示意图。如图2所示,本发明实施例包括以下步骤:
S201、第一终端在目标应用里选择无线连接模式,并从所述目标应用的标识列表中确定目标标识。
需要说明的是,该无线连接模式可以是用于该第一终端与其他终端进行无线连接的模式,该目标应用里可以设置一个或者多个无线连接模式,用户可以从该目标应用里的多个无线连接模式选择出其中一个无线连接模式。
可选的,无线连接模式包括:基于蓝牙的连接模式、基于WiFi的连接模式的任意一种或多种。
其中,该基于WiFi的连接模式,包括:基于WPS的连接模式以及基于PIN码的连接模式。
需要说明的是,该目标应用可以是该第一终端提前下载的社交类应用或者其他类型的 应用等,或者也可以是该第一终端自带的通信软件等,本发明在此不作任何限制。
还需要说明的是,该目标应用的标识列表可以是该目标应用中存储的联系人名称列表、联系人电话列表、联系人头像列表等等,本发明在此不作任何限制。
具体实现中,用户可以通过该第一终端在目标应用里选择出一个无线连接模式,并且在该目标应用的标识列表中确定出目标标识。
在一些可行的实施方式中,该第一终端还可以根据用户对无线连接模式以及目标标识的历史选择频率自动选择出历史选择频率最高的无线连接模式,以及确定出历史选择频率最高的目标标识,并向用户发出提示消息,如果用户对该提示消息进行了确认,该第一终端就可以执行202步骤以及203步骤。这样,就可以不需要用户每一次都进行选择,再确定的步骤,简化了用户的操作步骤。
S202、所述第一终端通过无线网络向所述目标标识对应的第二终端发送针对所述无线连接模式的无线连接请求。
可选的,该无线网络包括:蜂窝移动数据网络和/或无线局域网。
其中,该蜂窝移动数据网络可以是2G网、3G网、4G网,甚至5G网等,该无线局域网可以是WLAN、WiFi等。
需要说明的是,第一终端确定该目标标识对应的第二终端的方式,可以是该第二终端也配备了同一个目标应用,第一终端的目标应用与第二终端的目标应用间具有一定的联系(比如说,第一终端向目标应用里的联系人发送了一个消息,如果该目标应用里的联系人在该第二终端上进行了登录,就可以在该第二终端的目标应用上接收到该消息),于是,该目标标识就可以对应到该第二终端。
还需要说明的是,该针对该无线连接模式的无线连接的请求中,可以包括:连接请求命令,用于通知该第二终端该第一终端请求和该第二终端建立的哪一类无线连接模式;第一终端的硬件地址,用于让该第二终端与该第一终端在本地连接下进行配对。当然,该请求中还可以包括其他类型的参数,本发明对此不作限制。
具体实现中,该第一终端可以在选择出该目标标识之后,通过该无线网络向该目标标识对应的第二终端发送该针对该无线连接模式的无线连接请求。然后,该第二终端通过该无线网络在该第二终端的目标应用上接收到该无线连接请求,并确认是否要与该第一终端建立该无线通信连接。
S203、在接收到所述无线连接请求的确认连接响应时,所述第一终端与所述第二终端建立所述无线连接模式下的无线通信连接。
需要说明的是,该无线连接请求的确认连接响应是该第二终端发出的。其中,该第二终端可以是在使用该第二终端的用户确认了要与该第一终端建立无线通信连接时,才发出该无线连接请求的确认连接响应。或者,该第二终端也可以是在接收到该无线连接请求时,直接发送该无线连接请求的确认连接响应。当然,上述方式只是举例,而非穷举,包含但不限于上述可选方式。
具体的,该第二终端可以自动发送该确认连接响应,比如只要接收到终端的无线连接请求,就进行自动确认(不需要用户手动确认)。或者,该第二终端可以设置为在某一个分组里面的用户发送过来的无线连接请求,就可以自动确认(不需要用户手动确认),比如在目标 应用里面的用户分组中,分组为朋友,家人等里面的用户标识发送过来的连接请求,就可以自动发送该确认连接响应。当然,上述方式只是举例,而非穷举,包含但不限于上述可选方式。
在一些可行的实施方式中,该第一终端可以在向该第二终端发送针对该无线连接模式的无线连接请求之后,检测自身的该无线连接模式是否开启,如果未开启,就自动开启该无线连接模式,如果已开启,就让该无线连接模式保存开启状态。
在一些可行的实施方式中,该第二终端也可以在发出该无线连接请求的确认连接响应时,检测自身的该无线连接模式是否开启,如果未开启,就自动开启该无线连接模式,如果已开启,就让该无线连接模式保存开启状态
还需要说明的是,该第一终端与该第二终端建立该无线连接模式下的无线通信连接的具体方式,可以是:该第一终端与该第二终端均开启该无线连接模式,然后通过该连接请求中的参数以及该确认连接响应中的参数,来建立该无线连接模式下的无线通信连接。
其中,该无线通信连接,可以是点对点的无线通信连接,例如蓝牙通信连接等。或者,该无线通信连接,还可以是多点式的无线通信连接,例如WiFi通信连接,其中,该WiFi通信连接可以包括WPS通信连接以及PIN码通信连接。
在本发明实施例中,该第一终端可以通过目标应用向该第二终端发起针对该无线连接模式的无线连接请求,并通过无线网络接收该第二终端的确认连接响应,同时交互了建立无线通信连接所需的参数,就可以该第二终端建立该无线连接模式下的无线通信连接。第一终端的用户可以不用知道第二终端在该无线通信模式下的硬件地址或名称等参数,也不需要再到专用设置界面开启相应的无线连接模式,并选择出对应的终端,就建立了该无线连接模式下的无线通信连接,简化了用户的操作过程,也提高了终端的智能性。
请参阅图3,是本发明实施例提供的另一种无线通信的连接方法的流程示意图。本发明实施例的方法可以包括:
S301、第一终端在目标应用里选择无线连接模式,并从所述目标应用的标识列表中确定目标标识。
S302、第一终端通过无线网络向目标标识对应的第二终端发送针对无线连接模式的无线连接请求。
需要说明的是,该无线连接请求中可以包括一个或多个用于建立该无线通信连接的参数,例如第一终端的硬件地址,连接命令等。
需要说明的是,本发明实施例中的S301步骤以及S302步骤的具体实现过程可以参照图2所对应的实施例中的S201步骤以及S202步骤,在此不作赘述。
S303、接收到所述无线连接请求的确认连接响应时,第一终端通过随机数与第二终端进行针对所述无线连接模式的本地连接交互,得到第二终端在无线连接模式下的加密密钥。
其中,该连接请求的确认连接响应可以包括:该第二终端在所述无线连接模式下产生的随机数。
需要说明的是,该随机数可以是该第二终端向该第一终端随机发送的数字,该数字的个数可以是3个、5个等任意个数的数字,本发明对此不作限制。
具体实现中,该第二终端向该第一终端通过无线网络发送该确认连接响应,该确认连接响应中包括了该随机数。然后,双方可以进行针对该无线连接模式的本地连接交互,即可以利用该随机数以及该第一终端的硬件地址等参数作为输入,通过算法处理得到该第二终端的加密密钥。
在一些可行的实施方式中,该第二终端可以首先将该随机数封装至该确认连接响应中,并发送给该第一终端。然后,该第二终端生成加密密钥K2,然后利用该随机数并且按照加密算法对该加密密钥K2进行加密,得到密文M2,然后可以通过本地连接(例如蓝牙连接)将该密文M2发送给该第一终端。该第一终端接收到密文M2后,利用该随机数(封装在该确认连接响应中),按照该加密算法解密密文M2,得到密钥K2。通过上述方式,第一终端与第二终端均具有了加密密钥K2,该第一终端和第二终端可以利用该加密密钥K2对数据进行加解密。
在一些可行的实施方式中,该第一终端与该第二终端按照加密算法,利用随机数作为参数,各自在本地生产出加密密钥,该第一终端和第二终端可以利用该加密密钥K2对数据进行加解密。
其中,该加密算法可以为任意类型的算法,本发明实施例对此不作任何限制。
还需要说明的是,本发明实施例可以利用随机数以及各种本地交互方法,得到加密密钥,其具体方式本发明实施例不作任何限制。
还需要说明的是,由于该随机数是由该第二终端发送给该第一终端,因此,双方的随机数相同,在这种情况下,双方可以利用该随机数进行针对该无线连接模式的本地连接交互。
具体实现中,该第二终端可以对该随机数进行加密处理后再进行发送,也可以不对该随机数进行加密而直接发送,本发明对此不作限制。
S304、第一终端根据第二终端的加密密钥与第二终端建立无线连接模式下的无线通信连接。
举例来说,如图4所示,是本发明实施例提供的一种用于无线通信连接的情景示意图。在图4中,该无线连接模式具体为基于蓝牙的连接模式(以下简称蓝牙模式)。用户a与用户b可以在该第一终端以及该第二终端分别安装该目标应用。在步骤401与步骤402中,第一终端连接到无线网络,第二终端也连接到无线网络。在步骤403中,用户a使用该第一终端的目标应用从标识列表中选择出一个目标标识,并选择无线连接模式为蓝牙模式。
在步骤404中,该第一终端的目标应用发送蓝牙的无线连接请求,该无线连接请求中可以包括连接命令、第一终端的硬件地址等参数,其中,该连接命令可以让该第二终端知晓请求的无线连接模式的类型,第一终端的硬件地址可以用于建立该蓝牙模式的无线通信连接。
在步骤405中,用户b在该第二终端的目标应用上进行了确认。在步骤406中,第二终端可以检测是否开启了蓝牙,如果未开启,就开启该蓝牙,并发送确认连接响应至该第一终端的目标应用中。其中,该确认连接响应可以包括连接命令、第二终端的硬件地址以及随机数等参数。
在步骤407中,该第一终端与该第二终端可以通过本地连接来进行蓝牙配对。具体的, 该第二终端与该第一终端可以利用该随机数以及该第一终端的硬件地址等参数作为输入,通过算法处理得到该第二终端的加密密钥。
其中,上述算法可以为任意类型的加密算法,本发明实施例对此不作任何限制。
在步骤408中,在得到该第二终端的加密密钥中,如果蓝牙验证成功,则该第一终端的目标应用可以提示配对完成。同时,在步骤409中,如果蓝牙验证成功,该第二终端的目标应用也可以提示配对完成。
在步骤409中,该第一终端与该第二终端可以建立该蓝牙模式的无线通信连接。
需要说明的是,步骤404以及步骤406可以是在无线网络下的通信阶段,步骤407以及步骤410可以是本地连接下的通信阶段。
可选的,所述连接请求的确认连接响应还可以包括:所述第二终端在所述无线连接模式下的加密密钥。所述第一终端与所述第二终端建立所述无线连接模式下的无线通信连接,可以包括:所述第一终端根据所述第二终端的加密密钥与所述第二终端建立所述无线连接模式下的无线通信连接。
需要说明的是,如果该确认连接响应中包括了该第二终端在该无线连接模式下的加密密钥,那么该第一终端与该第二终端便可以无需进行本地交互过程,只要验证密码成功,便可建立该无线连接模式下的无线通信连接。
具体实现中,该第二终端可以对该加密密钥进行加密处理后再进行发送,也可以不对该加密密钥进行加密而直接发送,本发明对此不作限制。
举例来说,如图5所示,是本发明实施例提供的另一种用于无线通信连接的情景示意图。图5所示的步骤501至步骤505的具体实现过程,可以参照图4所示的步骤401至步骤405的具体实现过程,在此不作赘述。
在步骤506中,第二终端检测自身是否开启了蓝牙,如果未开启,就开启该蓝牙,并发送确认连接响应。其中,该确认连接响应可以包括连接命令、第二终端的硬件地址,以及第二终端在该蓝牙模式下的加密密钥。
在步骤507中,第一终端接收到该确认连接响应,并根据该第二终端的加密密钥连接该第二终端的蓝牙,如果验证密码成功,便在该第一终端的目标应用上提示配对完成。同时,在步骤508中,如果连接成功,也在该第二终端的目标应用上提示配对完成。
在步骤509中,该第一终端与该第二终端建立蓝牙模式的无线通信连接。
本发明实施例中,该第一终端可以通过目标应用向该第二终端发起针对该无线连接模式的无线连接请求,并通过无线网络接收该第二终端的确认连接响应,同时交互了建立无线通信连接所需的参数,就可以该第二终端建立该无线连接模式下的无线通信连接。第一终端的用户可以不用知道第二终端在该无线通信模式下的硬件地址或名称等参数,也不需要再到专用设置界面开启相应的无线连接模式,并选择出对应的终端,就建立了该无线连接模式下的无线通信连接,简化了用户的操作过程,也提高了终端的智能性。
请参阅图6,是本发明实施例所提供的又一种无线通信的连接方法的流程示意图。
S601、第一终端在目标应用里选择无线连接模式,并从目标应用的标识列表中确定目标标识。
S602、第一终端通过无线网络向目标标识对应的第二终端发送针对无线连接模式的无线连接请求。
需要说明的是,本发明实施例中的S601步骤以及S602步骤的具体实现过程可以参照图2所对应的实施例中的S201步骤以及S202步骤,在此不作赘述。
S603、第一终端在接收到所述连接请求的确认连接响应时,开启无线连接模式。
其中,所述连接请求的确认连接响应包括:所述第二终端的硬件地址。
需要说明的是,该无线连接模式例如可以是基于WPS(WiFi Protected Setup,WiFi保护装置)的连接模式(以下简称WPS模式)。其中,该WPS模式能够在网络中为各个终端自动配置网络名及加密密钥。当连接具有WPS的终端时,用户不必去了解网络名及加密密钥等概念,也不必输入预知的密码段,只需要在接入终端和发起终端均开启该WPS模式,便可以进行连接。并且,由于该加密密钥由于是随机产生的,安全性能也较高。
还需要说明的是,该无线连接模式还可以是第一终端开启个人热点时的WiFi模式,或者是其他无线连接模式,本发明在此不作限制。
具体实现中,该第一终端在接收到该第二终端的确认连接响应时,可以根据该确认连接响应检测自身是否开启了该无线连接模式,如果未开启,则该第一终端自动开启该无线连接模式,如果已开启,就可以保持无线连接模式的开启状态。
S604、第一终端在接收到针对无线连接模式的请求时,判断针对无线连接模式的请求中的硬件地址是否为所述第二终端的硬件地址。
需要说明的是,该针对无线连接模式的请求可以用于请求接入该第一终端的无线网络。并且,该针对无线连接模式的请求可以由第二终端发出,也可以由其他终端发出,该针对无线连接模式的请求可以包括发出终端的硬件地址。
具体实现中,该第一终端可以通过无线通信阶段得到该第二终端的硬件地址,然后,在本地连接的通信阶段时,如果接收到该针对无线连接模式的请求,便可以判断该请求中的硬件地址是否为无线通信阶段得到的硬件地址。如果是,就可以允许该第二终端进行该无线网络的本地接入(例如允许WPS接入),如果不是,则不允许该第二终端进行该无线网络的本地接入。
具体实现中,该第一终端在接收到任意一个终端的该针对无线连接模式的请求时,可以在本地连接的通信阶段判断该针对无线连接模式的请求中的硬件地址是否与该确认连接响应的地址(即第二终端的硬件地址)相同。
S605、若针对所述无线连接模式的请求中的硬件地址为第二终端的硬件地址,则第一终端与第二终端建立无线通信模式下的无线通信连接。
具体实现中,如果该针对无线连接模式的请求中的硬件地址与该确认连接响应的地址(即第二终端的硬件地址)相同,该第一终端可以确定发起连接的为该第二终端,就可以与该第二终端建立无线通信模式下的无线通信连接。
还需要说明的是,该第一终端在确定该针对无线连接模式的请求中的硬件地址是该第二终端的硬件地址的情况下,与该第二终端建立该无线连接模式的无线通信连接,可以避免其他终端在该第一终端开启该无线连接模式时误接入的情况,提高连接效率。
举例来说,如图7所示,是本发明实施例提供的又一种用于无线通信连接的情景示意 图。用户a与用户b可以在该第一终端以及该第二终端分别安装该目标应用。在步骤701与步骤702中,第一终端连接到无线网络,第二终端也连接到无线网络。在步骤703中,用户a使用该第一终端的目标应用从标识列表中选择出一个目标标识,并选择无线连接模式为WPS模式。
在步骤704中,该第一终端的目标应用发送WPS模式的无线连接请求(即消息1),该无线连接请求(即消息1)中可以包括连接命令、第一终端的硬件地址等参数,其中,该连接命令可以让该第二终端知晓请求的无线连接模式的类型为WPS模式,第一终端的硬件地址可以用于第二终端发送WPS接入请求时准确找到该第一终端。
在步骤705中,用户b在该第二终端的目标应用上进行了确认。在步骤706中,第二终端可以检测是否开启了WPS模式,如果未开启,就开启该WPS模式,并发送确认连接响应(即消息2)至该第一终端的目标应用中。其中,该确认连接响应(即消息2)可以包括连接命令、第二终端的硬件地址等参数。
在步骤707中,该第一终端在接收到该确认连接响应(即消息2)之后,检测自身是否开启了WPS模式,如果未开启,就开启该WPS模式,如果已开启,就保持该WPS模式处于开启状态。
在步骤708中,该第二终端向该第一终端发送WPS接入请求(即针对无线连接模式的请求,也即消息3。
在步骤709中,该第一终端接收到该WPS接入请求(即消息3),并判断该WPS接入请求中的硬件地址是否为确认连接响应中的第二终端的硬件地址。
在步骤710中,如果该第一终端判断该请求(消息3)中的硬件地址与确认连接响应(即消息2)中的硬件地址与第二终端的硬件地址相同,就可以将该第二终端接到该第一终端的无线网络中。
其中,如果该第一终端判断该请求中的硬件地址不是该第二终端的硬件地址,便可以不将该请求中的硬件地址对应的终端接入该第一终端的无线网络中。
在步骤711中,第一终端与该第二终端建立该WPS模式下的无线通信连接。
需要说明的是,步骤704以及步骤706可以是在无线网络下的通信阶段,步骤707至步骤711可以是本地连接下的通信阶段。
可选的,该第一终端在接收到该连接请求的确认连接响应时,还可以将第三终端的硬件地址发送至该第二终端,并控制该第三终端处于该无线连接模式,以便于该第二终端在开启该无线连接模式时基于该第三终端的硬件地址建立无线通信连接。
需要说明的是,该确认连接响应中可以包括该第二终端的硬件地址。
还需要说明的是,该第三终端可以是路由器、WiFi发射设备等。该第一终端可以事先与第三终端建立过该无线通信连接,并保存该第三终端的硬件地址。并且,该第一终端还可以事先获取该第三终端的操作权限,即无需第三终端确认便可以控制该第三终端。
具体实现中,该第一终端在接收到该连接请求的确认连接响应时,可以根据该确认连接响应中的第二终端的硬件地址,将第三终端的硬件地址准确发送至该第二终端,并控制该第三终端处于该无线连接模式。进一步的,该第二终端可以接收到该第三终端的硬件地址,并开启该无线连接模式,该第二终端可以根据该第三终端的硬件地址接入该第三终端 的无线网络中,并与该第三终端建立该无线通信连接。
举例来说,该无线连接模式为WPS模式。第一终端首先与该第三终端建立该WPS模式的无线通信连接,并保存该第三终端的硬件地址。然后,该第一终端获取该第三终端的操作权限,以便于能够在该第一终端上便可控制该第三终端。进一步的,该第一终端向该第二终端发送该WPS模式的连接请求,在接收到第二终端针对该连接请求的确认连接响应时,将该第三终端的硬件地址发送至该第二终端,同时,该第一终端控制该第三终端开启WPS模式。
进一步的,该第二终端根据该第三终端的硬件地址向该第三终端发送WPS接入请求,第三终端在接收到该WPS接入请求,可以将该第二终端接入,并与该第二终端建立WPS模式下的无线通信连接。
在一些可行的实施方式中,第二终端还可以在发送确认连接响应之后,将接入该无线连接模式的请求发送给该第一终端。第一终端在接收到该无线连接模式的请求时,控制该第三终端处于该无线连接模式,并将该第二终端接入该无线连接模式的请求转发至第三终端。第三终端在接收到该请求时,根据该请求中的硬件地址将该第二终端接入,并与该第二终端建立该无线连接模式下的无线通信连接。
在一些可行的实施方式中,该第一终端还可以在接收到该连接请求的确认连接响应时,将第三终端在该无线连接模式下的加密密钥以及第三终端的硬件地址发送给第二终端。第二终端在接收到该加密密钥以及该第三终端的硬件地址时,开启无线连接模式,并根据该第三终端的硬件地址扫描到该第三终端,并自动输入加密密钥,在加密密钥验证成功后,便可以与该第三终端建立该无线连接模式下的无线通信连接。
在一些可行的实施方式中,该第三终端可以是路由器。该第一终端可以和路由器首先建立无线通信连接,并记录该路由器的硬件地址。该第一终端向该第二终端发送无线连接请求(此时该无线连接请求中携带路由器的硬件地址)。该第二终端在接收到该无线连接请求之后,保存该路由器的硬件地址,并且开启自身的WPS接入模式,然后给第一终端发送针对该无线连接请求的确认连接响应。
在一些可行的实施方式中,当该第一终端接收到针对该无线连接请求的确认连接响应时,该第一终端通知该路由器开启WPS模式命令。
其中,该WPS模式命令同时也可以包括该第二终端的确认响应里面的第二终端的硬件地址也发送给该路由器接收到第一终端发送过来的开启WPS请求命令时,开启WPS模式,准备与第二终端进行WPS交互。
在一些可行的实施方式中,在该无线连接模式为WiFi连接模式时,第二终端的确认连接响应可以包括PIN码。第一终端在接收到该确认连接响应时,可以根据该PIN码连接到该第二终端的无线网络,并与该第二终端建立该WiFi连接模式的无线通信连接。
举例来说,如图8所示,是本发明实施例提供的又一种用于无线通信连接的情景示意图。用户a与用户b可以在该第一终端以及该第二终端分别安装该目标应用。在步骤801与步骤802中,第一终端连接到无线网络,第二终端也连接到无线网络。在步骤803中,用户a使用该第一终端的目标应用从标识列表中选择出目标标识为用户b,并选择无线连接模式为WiFi模式。
在步骤804中,该第一终端的目标应用发送WiFi模式的无线连接请求,该无线连接请求中可以包括连接命令、第一终端的硬件地址等参数。
在步骤805中,用户b在该第二终端的目标应用上进行了确认。在步骤806中,第二终端可以检测是否开启了WiFi模式,如果未开启,就开启该WiFi模式,并发送确认连接响应至该第一终端的目标应用中。其中,该确认连接响应可以包括连接命令、第二终端的硬件地址,以及PIN码等参数。
其中,该PIN码可以为WiFi密码,或者其他用于加密的密码,本发明实施例对此不作任何限制。
在步骤807中,该第一终端在接收到该确认连接响应之后,检测自身是否开启了WiFi模式,如果未开启,就开启该WiFi模式,如果已开启,就保持该WiFi模式处于开启状态。
在步骤808中,该第一终端与该第二终端进行WiFi连接,并自动输入该确认连接响应中的PIN码,以便于第二终端验证该PIN码是否正确。
在步骤809中,如果该第二终端验证该PIN码正确,该第二终端便可以将该第一终端接入到该第二终端的无线网络中,并与该第一终端建立该WiFi模式下的无线通信连接。
其中,如果该第二终端验证该PIN码不正确,就可以不将该第一终端接入到该第二终端的无线网络中。
需要说明的是,步骤804以及步骤806可以是在无线网络下的通信阶段,步骤807至步骤809可以是本地连接下的通信阶段。
在本发明实施例中,该第一终端可以通过目标应用向该第二终端发起针对该无线连接模式的无线连接请求,并通过无线网络接收该第二终端的确认连接响应,同时交互了建立无线通信连接所需的硬件地址等参数,在接收到无线连接模式的请求时,判断该无线连接模式的请求中的硬件地址是否为第二终端的硬件地址,如果是,就可以与该第二终端建立该无线连接模式下的无线通信连接。该第一终端可以在确定该针对无线连接模式的请求中的硬件地址是该第二终端的硬件地址的情况下,与该第二终端建立该无线连接模式的无线通信连接,可以避免其他终端在该第一终端开启该无线连接模式时误接入的情况,提高了终端的智能性。
请参阅图9,为本发明实施例提供的一种终端的结构示意图。如图9所示的终端,可以包括:
确定模块901,用于在目标应用里选择无线连接模式,并从该目标应用的标识列表中确定目标标识。
发送模块902,用于通过无线网络向该目标标识对应的第二终端发送针对该无线连接模式的无线连接请求。
建立模块903,用于在接收到该无线连接请求的确认响应时,与该第二终端建立该无线连接模式下的无线通信连接。
可选的,该连接请求的确认连接响应包括:该第二终端在该无线连接模式下产生的随机数;
该建立模块903,包括:交互单元9030,用于通过该随机数与该第二终端进行针对该无 线连接模式的本地连接交互,得到该第二终端在该无线连接模式下的加密密钥。
第一建立单元9031,用于根据该第二终端的加密密钥与该第二终端建立该无线连接模式下的无线通信连接。
可选的,该连接请求的确认连接响应包括:该第二终端在该无线连接模式下的加密密钥。
该建立模块903,包括:第二建立单元9032,用于根据该第二终端的加密密钥与该第二终端建立该无线连接模式下的无线通信连接。
可选的,该连接请求的确认连接响应包括:该第二终端的硬件地址;
该建立模块903,包括:开启单元9033,用于在接收到该连接请求的确认连接响应时,开启该无线连接模式。
判断单元9034,用于在接收到针对该无线连接模式的请求时,判断该针对该无线连接模式的请求中的硬件地址是否为该第二终端的硬件地址。
第三建立单元9035,若该针对该无线连接模式的请求中的硬件地址为该第二终端的硬件地址,则与该第二终端建立该无线通信模式下的无线通信连接。
可选的,该终端还包括:处理模块904,用于在接收到该连接请求的确认连接响应时,将第三终端的硬件地址发送至该第二终端,并控制该第三终端处于该无线连接模式,以便于该第二终端在开启该无线连接模式时基于该第三终端的硬件地址建立无线通信连接。
可选的,该无线连接模式包括:基于蓝牙的连接模式、基于WPS的连接模式、基于WiFi的连接模式、基于NFC的连接模式中的任意一种或多种。
可选的,该无线网络包括:蜂窝移动数据网络和/或无线局域网。
在本发明实施例中,可以通过目标应用向该第二终端发起针对该无线连接模式的无线连接请求,并通过无线网络接收该第二终端的确认连接响应,同时交互了建立无线通信连接所需的参数,就可以该第二终端建立该无线连接模式下的无线通信连接。第一终端的用户可以不用知道第二终端在该无线通信模式下的硬件地址或名称等参数,也不需要再到专用设置界面开启相应的无线连接模式,并选择出对应的终端,就建立了该无线连接模式下的无线通信连接,简化了用户的操作过程,也提高了终端的智能性。
请参阅图10,为本发明实施例提供的另一种终端的结构示意图。本实施例中所描述的终端,包括:射频(Radio Frequency,RF)电路110、存储器120、其他输入设备130、显示屏140、传感器150、输入/输出子***170、处理器190、以及电源190等部件。本领域技术人员可以理解,图9中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。本领域技术人员可以理解显示屏140属于用户界面(UI,User Interface),且终端可以包括比图示或者更少的用户界面。
下面结合图9对终端的各个构成部件进行具体的介绍:
射频电路110可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器180处理;另外,将设计上行的数据发送给基站。通常,射频电路包括但不限于天线、至少一个放大器、收发信机、耦合器、LNA(Low Noise Amplifier, 低噪声放大器)、双工器等。此外,射频电路110还可以通过无线通信与网络和其他设备通信。所述无线通信可以使用任一通信标准或协议,包括但不限于GSM(Global System of Mobile communication,全球移动通讯***)、GPRS(General Packet Radio Service,通用分组无线服务)、CDMA(Code Division Multiple Access,码分多址)、WCDMA(Wideband Code Division Multiple Access,宽带码分多址)、LTE(Long Term Evolution,长期演进)、电子邮件、SMS(Short Messaging Service,短消息服务)等。
存储器120可用于存储软件程序以及模块,处理器180通过运行存储在存储器120的软件程序以及模块,从而执行终端1的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***、至少一个功能所需的应用程序(比如声音播放功能、图象播放功能等)等;存储数据区可存储根据终端的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
其他输入设备130可用于接收输入的数字或字符信息,以及产生与终端的用户设置以及功能控制有关的键信号输入。具体地,其他输入设备130可包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆、光鼠(光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸)等中的一种或多种。其他输入设备130与输入/输出子***170的其他输入设备控制器171相连接,在其他设备输入控制器171的控制下与处理器180进行信号交互。
显示屏140可用于显示由用户输入的信息或提供给用户的信息以及终端的各种菜单,还可以接受用户输入。具体的显示屏140可包括显示面板141,以及触控面板142。其中显示面板141可以采用LCD(Liquid Crystal Display,液晶显示器)、OLED(Organic Light-Emitting Diode,有机发光二极管)等形式来配置显示面板141。触控面板142,也称为触摸屏、触敏屏等,可收集用户在其上或附近的接触或者非接触操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板142上或在触控面板142附近的操作,也可以包括体感操作;该操作包括单点控制操作、多点控制操作等操作类型。),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板142可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位、姿势,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成处理器能够处理的信息,再送给处理器180,并能接收处理器180发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板142,也可以采用未来发展的任何技术实现触控面板142。进一步的,触控面板142可覆盖显示面板141,用户可以根据显示面板141显示的内容(该显示内容包括但不限于,软键盘、虚拟鼠标、虚拟按键、图标等等),在显示面板141上覆盖的触控面板142上或者附近进行操作,触控面板142检测到在其上或附近的操作后,通过输入/输出子***170传送给处理器180以确定用户输入,随后处理器180根据用户输入通过输入/输出子***170在显示面板141上提供相应的视觉输出。虽然在图4中,触控面板142与显示面板141是作为两个独立的部件来实现终 端的输入和输入功能,但是在某些实施例中,可以将触控面板142与显示面板141集成而实现终端的输入和输出功能。
终端还可包括至少一种传感器150,比如光传感器、速度传感器、GPS传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板141的亮度,接近传感器可在终端移动到耳边时,关闭显示面板141和/或背光。作为速度传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别终端姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于终端还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
输入/输出子***170用来控制输入输出的外部设备,可以包括其他设备输入控制器171、传感器控制器172、显示控制器173。可选的,一个或多个其他输入控制设备控制器171从其他输入设备130接收信号和/或者向其他输入设备130发送信号,其他输入设备130可以包括物理按钮(按压按钮、摇臂按钮等)、拨号盘、滑动开关、操纵杆、点击滚轮、光鼠(光鼠是不显示可视输出的触摸敏感表面,或者是由触摸屏形成的触摸敏感表面的延伸)。值得说明的是,其他输入控制设备控制器171可以与任一个或者多个上述设备连接。所述输入/输出子***170中的显示控制器173从显示屏140接收信号和/或者向显示屏140发送信号。显示屏140检测到用户输入后,显示控制器173将检测到的用户输入转换为与显示在显示屏140上的用户界面对象的交互,即实现人机交互。传感器控制器172可以从一个或者多个传感器150接收信号和/或者向一个或者多个传感器150发送信号。
处理器180是终端的控制中心,利用各种接口和线路连接整个终端的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行终端的各种功能和处理数据,从而对终端进行整体监控。可选的,处理器180可包括一个或多个处理单元;优选的,处理器180可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器180中。
终端还包括给各个部件供电的电源190(比如电池),优选的,电源可以通过电源管理***与处理器180逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗等功能。
尽管未示出,终端还可以包括摄像头、蓝牙模块等,在此不再赘述。
具体的,上述处理器180可以调用上述存储器120存储的程序指令,实现如本发明实施例所示的方法。
具体的,处理器180,用于在目标应用里选择无线连接模式,并从上述目标应用的标识列表中确定目标标识;通过无线网络向上述目标标识对应的第二终端发送针对上述无线连接模式的无线连接请求;在接收到上述无线连接请求的确认连接响应时,上述第一终端与上述第二终端建立上述无线连接模式下的无线通信连接。
本发明实施例中处理器执行的方法均从处理器的角度来描述,可以理解的是,本发明实施例中处理器要执行上述方法需要其他硬件结构的配合。例如,上述终端与其他设备或 服务器的交互,如向上述目标标识对应的第二终端发送针对上述无线连接模式的无线连接请求,由上述处理器180控制上述射频电路110来接收相关数据。本发明实施例对具体的实现过程不作详细描述和限制。
可选的,上述连接请求的确认连接响应包括:上述第二终端在上述无线连接模式下产生的随机数。
上述处理器180,具体用于通过上述随机数与上述第二终端进行针对上述无线连接模式的本地连接交互,得到上述第二终端在上述无线连接模式下的加密密钥;根据上述第二终端的加密密钥与上述第二终端建立上述无线连接模式下的无线通信连接。
可选的,上述连接请求的确认连接响应包括:上述第二终端在上述无线连接模式下的加密密钥。
上述处理器180,具体用于根据上述第二终端的加密密钥与上述第二终端建立上述无线连接模式下的无线通信连接。
可选的,上述连接请求的确认连接响应包括:上述第二终端的硬件地址。
上述处理器180,具体用于在接收到上述连接请求的确认连接响应时,开启上述无线连接模式;在接收到针对上述无线连接模式的请求时,判断上述针对上述无线连接模式的请求中的硬件地址是否为上述第二终端的硬件地址;若上述针对上述无线连接模式的请求中的硬件地址为上述第二终端的硬件地址,则上述第一终端与上述第二终端建立上述无线通信模式下的无线通信连接。
可选的,上述处理器180,还用于在接收到上述连接请求的确认连接响应时,将第三终端的硬件地址发送至上述第二终端,并控制上述第三终端处于上述无线连接模式,以便于上述第二终端在开启上述无线连接模式时基于上述第三终端的硬件地址建立无线通信连接。
可选的,上述无线连接模式包括:基于蓝牙的连接模式、基于WPS的连接模式、基于WiFi的连接模式、基于NFC的连接模式中的任意一种或多种。
可选的,上述无线网络包括:蜂窝移动数据网络和/或无线局域网。
在本发明实施例中,可以通过目标应用向该第二终端发起针对该无线连接模式的无线连接请求,并通过无线网络接收该第二终端的确认连接响应,同时交互了建立无线通信连接所需的参数,就可以该第二终端建立该无线连接模式下的无线通信连接。第一终端的用户可以不用知道第二终端在该无线通信模式下的硬件地址或名称等参数,也不需要再到专用设置界面开启相应的无线连接模式,并选择出对应的终端,就建立了该无线连接模式下的无线通信连接,简化了用户的操作过程,也提高了终端的智能性。
在本发明的另一实施例中提供一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序,该计算机程序被处理器执行时,可以实现:在目标应用里选择无线连接模式,并从所述目标应用的标识列表中确定目标标识;通过无线网络向所述目标标识对应的第二终端发送针对所述无线连接模式的无线连接请求;在接收到所述无线连接请求的确认连接响应时,与所述第二终端建立所述无线连接模式下的无线通信连接。
需要说明的是,该计算机可读存储介质被处理器执行的具体过程可参见第二实施例和 第三实施例中所描述的方法,在此不再赘述。
在本发明的又一实施例还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行:在目标应用里选择无线连接模式,并从所述目标应用的标识列表中确定目标标识;通过无线网络向所述目标标识对应的第二终端发送针对所述无线连接模式的无线连接请求;在接收到所述无线连接请求的确认连接响应时,与所述第二终端建立所述无线连接模式下的无线通信连接。
所述计算机可读存储介质可以是前述任一实施例所述的终端的内部存储单元,例如终端的硬盘或内存。所述计算机可读存储介质也可以是所述终端的外部存储设备,例如所述终端上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述计算机可读存储介质还可以既包括所述终端的内部存储单元也包括外部存储设备。所述计算机可读存储介质用于存储所述计算机程序以及所述终端所需的其他程序和数据。所述计算机可读存储介质还可以用于暂时地存储已经输出或者将要输出的数据。
需要说明的是,该包含指令的计算机程序产品的具体实现过程可参见第二实施例和第三实施例中所描述的方法,在此不再赘述。
基于同一发明构思,本发明实施例中提供的终端解决问题的原理与本发明方法实施例相似,因此该终端的实施可以参见方法的实施,为简洁描述,在这里不再赘述。

Claims (12)

  1. 一种无线通信的连接方法,其特征在于,包括:
    第一终端在目标应用里选择无线连接模式,并从所述目标应用的标识列表中确定目标标识;
    所述第一终端通过无线网络向所述目标标识对应的第二终端发送针对所述无线连接模式的无线连接请求;
    在接收到所述无线连接请求的确认连接响应时,所述第一终端与所述第二终端建立所述无线连接模式下的无线通信连接。
  2. 如权利要求1所述的方法,其特征在于,所述连接请求的确认连接响应包括:所述第二终端在所述无线连接模式下产生的随机数;
    所述第一终端与所述第二终端建立所述无线连接模式下的无线通信连接,包括:
    所述第一终端通过所述随机数与所述第二终端进行针对所述无线连接模式的本地连接交互,得到所述第二终端在所述无线连接模式下的加密密钥;
    所述第一终端根据所述第二终端的加密密钥与所述第二终端建立所述无线连接模式下的无线通信连接。
  3. 如权利要求1所述的方法,其特征在于,所述连接请求的确认连接响应包括:所述第二终端在所述无线连接模式下的加密密钥;
    所述第一终端与所述第二终端建立所述无线连接模式下的无线通信连接,包括:
    所述第一终端根据所述第二终端的加密密钥与所述第二终端建立所述无线连接模式下的无线通信连接。
  4. 如权利要求1所述的方法,其特征在于,所述连接请求的确认连接响应包括:所述第二终端的硬件地址;
    所述第一终端与所述第二终端建立所述无线连接模式下的无线通信连接,包括:
    所述第一终端在接收到所述连接请求的确认连接响应时,开启所述无线连接模式;
    所述第一终端在接收到针对所述无线连接模式的请求时,判断所述针对所述无线连接模式的请求中的硬件地址是否为所述第二终端的硬件地址;
    若所述针对所述无线连接模式的请求中的硬件地址为所述第二终端的硬件地址,则所述第一终端与所述第二终端建立所述无线通信模式下的无线通信连接。
  5. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一终端在接收到所述连接请求的确认连接响应时,将第三终端的硬件地址发送至所述第二终端,并控制所述第三终端处于所述无线连接模式,以便于所述第二终端在开启所述无线连接模式时基于所述第三终端的硬件地址建立无线通信连接。
  6. 一种终端,其特征在于,包括:
    确定模块,用于在目标应用里选择无线连接模式,并从所述目标应用的标识列表中确定目标标识;
    发送模块,用于通过无线网络向所述目标标识对应的第二终端发送针对所述无线连接模式的无线连接请求;
    建立模块,用于在接收到所述无线连接请求的确认响应时,与所述第二终端建立所述无线连接模式下的无线通信连接。
  7. 如权利要求6所述的终端,其特征在于,所述连接请求的确认连接响应包括:所述第二终端在所述无线连接模式下产生的随机数;
    所述建立模块,包括:
    交互单元,用于通过所述随机数与所述第二终端进行针对所述无线连接模式的本地连接交互,得到所述第二终端在所述无线连接模式下的加密密钥;
    第一建立单元,用于根据所述第二终端的加密密钥与所述第二终端建立所述无线连接模式下的无线通信连接。
  8. 如权利要求6所述的终端,其特征在于,所述连接请求的确认连接响应包括:所述第二终端在所述无线连接模式下的加密密钥;
    所述建立模块,包括:
    第二建立单元,用于根据所述第二终端的加密密钥与所述第二终端建立所述无线连接模式下的无线通信连接。
  9. 如权利要求6所述的终端,其特征在于,所述连接请求的确认连接响应包括:所述第二终端的硬件地址;
    所述建立模块,包括:
    开启单元,用于在接收到所述连接请求的确认连接响应时,开启所述无线连接模式;
    判断单元,用于在接收到针对所述无线连接模式的请求时,判断所述针对所述无线连接模式的请求中的硬件地址是否为所述第二终端的硬件地址;
    第三建立单元,若所述针对所述无线连接模式的请求中的硬件地址为所述第二终端的硬件地址,则与所述第二终端建立所述无线通信模式下的无线通信连接。
  10. 如权利要求6所述的终端,其特征在于,所述终端还包括:
    处理模块,用于在接收到所述连接请求的确认连接响应时,将第三终端的硬件地址发送至所述第二终端,并控制所述第三终端处于所述无线连接模式,以便于所述第二终端在开启所述无线连接模式时基于所述第三终端的硬件地址建立无线通信连接。
  11. 一种终端,其特征在于,所述终端包括:
    存储器,用于存储一个或多个程序;
    处理器,用于调用所述存储器中的程序执行如权利要求1至5任意一项所述的方法。
  12. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求1至5任意一项所述的方法。
PCT/CN2017/090555 2017-03-14 2017-06-28 一种基于无线通信的连接方法及终端 WO2018166103A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP17900319.9A EP3585127B1 (en) 2017-03-14 2017-06-28 Wireless communication-based connection method and terminal
CN201780087982.4A CN110393021B (zh) 2017-03-14 2017-06-28 一种基于无线通信的连接方法及终端
US16/494,527 US10764738B2 (en) 2017-03-14 2017-06-28 Wireless communication connection method and terminal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710149964.6 2017-03-14
CN201710149964 2017-03-14

Publications (1)

Publication Number Publication Date
WO2018166103A1 true WO2018166103A1 (zh) 2018-09-20

Family

ID=63523634

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/090555 WO2018166103A1 (zh) 2017-03-14 2017-06-28 一种基于无线通信的连接方法及终端

Country Status (4)

Country Link
US (1) US10764738B2 (zh)
EP (1) EP3585127B1 (zh)
CN (1) CN110393021B (zh)
WO (1) WO2018166103A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507702A (zh) * 2021-05-28 2021-10-15 西安闻泰信息技术有限公司 蓝牙连接方法、装置、车载蓝牙设备和存储介质
CN114422999A (zh) * 2022-01-30 2022-04-29 深圳创维-Rgb电子有限公司 设备自动配对连接方法、装置、设备及存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800319B (zh) * 2020-06-30 2022-12-20 京东方科技集团股份有限公司 设置连接模式的方法、装置、存储介质及电子设备
CN114024674B (zh) * 2021-11-23 2024-05-31 支付宝(杭州)信息技术有限公司 两方安全比较的方法及***
CN114389716B (zh) * 2021-12-14 2024-06-07 中科创达软件股份有限公司 一种终端接入方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209406A (zh) * 2013-03-27 2013-07-17 天脉聚源(北京)传媒科技有限公司 一种获得设备标识的方法及装置
CN103607780A (zh) * 2013-11-19 2014-02-26 惠州Tcl移动通信有限公司 移动设备及其网络连接方法
CN103684546A (zh) * 2012-09-05 2014-03-26 深圳市中兴移动通信有限公司 一种无线用户终端配对的方法及***
CN104601205A (zh) * 2013-10-31 2015-05-06 华为终端有限公司 一种内容共享的方法及装置

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1487224A1 (en) * 2003-06-11 2004-12-15 Sony France S.A. Wireless communication system and method for facilitating wireless communication
US8484466B2 (en) 2005-11-16 2013-07-09 Nokia Corporation System and method for establishing bearer-independent and secure connections
US7970350B2 (en) * 2007-10-31 2011-06-28 Motorola Mobility, Inc. Devices and methods for content sharing
US20090215398A1 (en) * 2008-02-25 2009-08-27 Adler Mitchell D Methods and Systems for Establishing Communications Between Devices
CN102752748B (zh) * 2012-06-26 2015-08-19 中国联合网络通信集团有限公司 基于移动终端的数据传输方法和***以及移动终端
CN103248956B (zh) * 2013-05-20 2016-12-28 浙江传媒学院 一种多屏协作模式的智能家庭视频业务的实现方法及***
CN105359154B (zh) * 2014-05-14 2018-06-26 华为技术有限公司 一种终端配对方法及配对终端
CN104159227B (zh) * 2014-08-15 2018-07-03 广东欧珀移动通信有限公司 无线网络连接控制方法及装置
JP6376015B2 (ja) 2015-03-24 2018-08-22 ソニー株式会社 情報処理装置、情報処理方法、およびプログラム
US9544333B2 (en) * 2015-03-31 2017-01-10 Dell Products, Lp Policy setting for content sharing of a plurality of remotely connected computing devices in physical or virtualized space
US9402274B1 (en) 2015-05-26 2016-07-26 Qualcomm Incorporated Idle mode operations in multi-subscriber identity module (SIM) mobile communication devices during data communications

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103684546A (zh) * 2012-09-05 2014-03-26 深圳市中兴移动通信有限公司 一种无线用户终端配对的方法及***
CN103209406A (zh) * 2013-03-27 2013-07-17 天脉聚源(北京)传媒科技有限公司 一种获得设备标识的方法及装置
CN104601205A (zh) * 2013-10-31 2015-05-06 华为终端有限公司 一种内容共享的方法及装置
CN103607780A (zh) * 2013-11-19 2014-02-26 惠州Tcl移动通信有限公司 移动设备及其网络连接方法

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113507702A (zh) * 2021-05-28 2021-10-15 西安闻泰信息技术有限公司 蓝牙连接方法、装置、车载蓝牙设备和存储介质
CN113507702B (zh) * 2021-05-28 2023-10-03 西安闻泰信息技术有限公司 蓝牙连接方法、装置、车载蓝牙设备和存储介质
CN114422999A (zh) * 2022-01-30 2022-04-29 深圳创维-Rgb电子有限公司 设备自动配对连接方法、装置、设备及存储介质
CN114422999B (zh) * 2022-01-30 2022-12-13 深圳创维-Rgb电子有限公司 设备自动配对连接方法、装置、设备及存储介质

Also Published As

Publication number Publication date
EP3585127B1 (en) 2023-11-15
US10764738B2 (en) 2020-09-01
CN110393021A (zh) 2019-10-29
EP3585127A4 (en) 2020-02-19
CN110393021B (zh) 2021-08-27
US20200015064A1 (en) 2020-01-09
EP3585127A1 (en) 2019-12-25

Similar Documents

Publication Publication Date Title
US11057376B2 (en) Method, apparatus, and system for controlling intelligent device, and storage medium
EP3764253B1 (en) Method for quickly opening application or application function, and terminal
WO2018166103A1 (zh) 一种基于无线通信的连接方法及终端
WO2017198161A1 (zh) 网络连接方法、装置、存储介质及终端
KR102025713B1 (ko) 차량용 인포테인먼트와 데이터를 교환하는 방법, 서버, 이동 단말 및 장치
WO2015101273A1 (zh) 一种安全验证方法、相关设备和***
WO2017020630A1 (zh) 一种处理订单信息的方法、装置和***
EP3499918B1 (en) Data sharing method and terminal
WO2018049886A1 (zh) 建立热点的方法及终端设备
CN108901020B (zh) 网络接入的方法、移动终端及服务器
WO2018049971A1 (zh) 热点网络切换方法及终端
WO2018049894A1 (zh) 数据传输方法及设备
WO2016192511A1 (zh) 远程删除信息的方法和装置
WO2021078215A1 (zh) 一种云游戏跨终端切换的方法和相关装置
WO2018049970A1 (zh) 热点网络切换方法及终端
CN111756696A (zh) 应用程序的登录方法、第一电子设备和第二电子设备
WO2019057119A1 (zh) 基于移动终端的wifi热点连接方法及移动终端、存储介质
CN106713319B (zh) 终端间的远程控制方法、装置、***及移动终端
WO2016106774A1 (zh) 一种图案锁的解锁方法及终端
WO2018049969A1 (zh) 热点建立方法及相关设备
WO2017000495A1 (zh) 一种添加联系人的方法及设备
CN109600340B (zh) 操作授权方法、装置、终端以及服务器
WO2019109987A1 (zh) 移动终端及指纹录音操作处理方法、及存储介质
WO2015081816A1 (en) Methods and devices for file transmitting through browser
CN106507357B (zh) 一种接入控制方法,及终端设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17900319

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017900319

Country of ref document: EP

Effective date: 20190919