Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In many service scenarios, more than one connection channel needs to be established between two devices, as shown in fig. 1, the network 100 includes a first device 101 and a second device 102, and the first device 101 and the second device 102 may have the capability of establishing more than one connection channel (e.g., a wired channel a, a wireless mobile channel b, and a short-distance wireless channel c in the figure). The wired channel a can be a USB channel or the like, and the wireless mobile channel b can be a GSM, 3G, 4G channel or the like. The short-distance wireless channel c can be a WIFI channel, a Bluetooth channel, an infrared channel, an NFC channel, an RFID channel and the like. The first device 101 and the second device 102 may be a variety of smart devices, such as a cell phone, a tablet computer, a smart headset, a smart television, a smart watch, a car machine in an automobile, and so on.
In other service scenarios, the network 100 may further include a server (not shown in the figure), and the first device 101 and the second device 102 respectively have the capability of establishing the wireless mobile channel b with the server 103.
In the following description, the first device 101 is used as a device for establishing a short-range wireless channel and the second device 102 is used as a connected device, and it is worth pointing out that in some scenarios, one device may only have the functions of the first device 101 or the second device 102, and in other scenarios, may have the functions of both the first device 101 and the second device 102. When a short-distance wireless channel is established between the two devices, the first device 101 connects with the second device 102 according to the connection point identifier issued by the second device 102. When different short-distance wireless channels are established, the connection point identifiers may be different, for example, when a WIFI channel is established, the connection point identifier may be an SSID (Service set identifier) issued by the second device 102; when the bluetooth channel is established, the wireless connection point identifier may be the MAC address of the device, which is issued by the second device 102; the connection point identities of other short-range wireless channels are not listed in order.
The application provides a method for establishing a short-distance wireless channel between devices, which can improve the efficiency of establishing the short-distance wireless channel.
Fig. 2 illustrates its operation principle from the first device 101 side.
S201, receiving at least one piece of wireless channel connection information from the established connection channel, where the wireless channel connection information includes a connection point identifier on the second device 102, and the connection point identifier is used to identify a connection point of one of the short-range wireless channels.
S202, if the connection point matched with the received connection point identification is searched, a short-distance wireless channel is established with the connection point according to the received wireless channel connection information.
Therefore, the method and the device can quickly establish the short-distance wireless channel because the connection point does not need to be manually selected or the password does not need to be manually input.
In addition to the steps shown in fig. 2, in some occasions with certain requirements on security, the security can be ensured through authentication, and before the short-distance wireless channel is established, the validity of the equipment involved in establishing the short-distance wireless channel can be verified. If the authentication is passed, the first device 101 may automatically acquire the wireless channel connection information; if the authentication fails, the first device 101 still needs to establish a short-range wireless channel with the second device 102 by means of a user manually selecting a connection point and entering a connection password.
The validity of the device to be verified can be verified by checking whether the account of the device to be verified is a registered valid account; or whether the two end devices belong to the same account name or the related account name; or whether the list of connection points recorded on the server to which the first device 101 is allowed to connect is empty, etc.
According to the requirements of different service scenarios, it may be verified whether one of the first device 101 and the second device 102 is a valid user, or both devices may be verified for validity. Thus, as an example, when the first device 101 needs to be authenticated, the first device 101 may send its own authentication identifier to the device responsible for authentication through the established connection channel for authentication.
In one example, the scheme disclosed in fig. 2 is applied to a case where a short-range wireless channel is first established between two devices, and when the establishment is successful, the wireless connection information corresponding to the short-range wireless channel may be stored. Therefore, whether the short-distance wireless connection channel is established for the first time or again, whether the corresponding wireless channel connection information is stored or not can be searched for firstly, and if not, the self identity authentication identification is sent to the connected equipment or the server through the established connection channel for identity authentication; if the stored wireless channel connection information is found, automatic connection can be realized according to the stored wireless connection information. When the connection with the second device 102 is not successful according to the stored wireless channel connection information, the stored wireless channel connection information is deleted.
Therefore, when the first device 101 is replaced, the system is restarted, the account password is replaced and the like, which may cause the stored wireless channel connection information to be cleared, the automatic connection of multiple short-distance wireless channels can be conveniently realized.
In one embodiment, the sender of the wireless channel connection information may be the device responsible for authentication. For example, if the first device 101 requests the wireless channel connection information from the server, the identity of the first device 101 is authenticated by the server; for another example, if the first device 101 requests the wireless channel connection information from the second device 102, the first device 101 is authenticated by the second device 102. The server may be physically integrated on the first device 101 or the second device 102, or may be independent of the second device 101 and the second device 102.
In step S201, the first device 101 acquires the wireless channel connection information through the established connection channel. The following illustrates a case where the established connection channel transmits the wireless channel connection information. The established connection channels may include at least one of the following: a wired channel a, a wireless mobile channel b and a short-distance wireless channel c.
S201a, receiving the wireless channel connection information through the established wireless mobile channel b.
As an embodiment, the server may use the wireless mobile tunnel b to complete the function of issuing the wireless tunnel connection information.
The method for recording the wireless channel connection information on the server may be configured in advance, or may be uploaded to the server by the second device 102 at a certain time (for example, the second device 102 may upload the wireless channel connection information to the server when logging in the server).
The information of the wireless channel connection point recorded on the server may include only one of the information required for establishing the short-range wireless channel, or may include information required for establishing two or more short-range wireless channels. For example, the wireless channel connection information recorded on the server may be an SSID and a WIFI password used for establishing a WIFI channel with the second device 102; or the MAC address and bluetooth password of the second device 102; still alternatively, both may be recorded. The connection information of other wireless channels is not illustrated in sequence.
There are many situations when the server issues the wireless channel connection information to the first device 101, for example, the wireless channel connection information may be issued when the identity authentication of the first device 101 passes, or the first device 101 sends a request for acquiring a wireless channel connection point to the server when necessary, and the server issues the request when receiving the request.
The wireless channel connection information received by the first device 101 from the server may be information required to establish one of the short-range wireless channels, or may be two or more types of wireless channel connection information. According to different pieces of the issued wireless channel connection information, the process of the first device 101 establishing the short-distance wireless channel may be different when S202 is executed.
For example, if the first device 101 receives one of the wireless channel connection information (e.g., SSID and WIFI password), the first device 101 searches whether there is a matching connection point according to the connection point identifier (e.g., SSID) in the received wireless channel connection information, and if so, sends the wireless channel connection information (e.g., WIFI password and SSID) to the second device 102 to request to establish a connection. After the first short-range wireless channel is established, a second short-range wireless channel is established through the established first short-range wireless channel (see the following description of S201 c).
For another example, if the first device 101 receives more than one wireless channel connection information (e.g., SSID and WIFI password, MAC address and bluetooth password), more than one wireless channel may be directly established according to the received wireless channel connection information. After the establishment is completed, if there are other wireless channel connection information to be established, the corresponding wireless channel connection information can be acquired through the established connection channels (for example, the connected wired channel a, the wireless mobile channel b, and one of the established short-distance wireless channels c). The specific process can be seen from the corresponding contents in the application S201 a/S201 b/S201c according to the selected channel type.
S201b, obtaining the wireless channel connection information through the established wired channel a.
As an embodiment, after the server verifies the identities of the devices involved in establishing the short-range wireless channel, the first device 101 and the second device 102 may be notified; or the first device 101 carries its own authentication identifier in a request and sends the request to the second device 102 for authentication. After obtaining the message that the verification passes, the second device 102 may send wireless channel connection information to the first device 101 through the connected wired channel a, where the sent wireless channel connection information may be information corresponding to one of the short-range wireless channels to be established, or information corresponding to two or more short-range wireless channels to be established.
The first device 101 establishes one or more short-range wireless channels upon receiving the wireless channel connection information. After the establishment is completed, if there are other wireless channel connection information to be established, the corresponding wireless channel connection information can be acquired through the established connection channels (for example, the connected wired channel a, the wireless mobile channel b, and one of the established short-distance wireless channels c). The specific process can be seen in the corresponding part of the application S201 a/S201 b/S201 c.
S201c, acquiring the wireless channel connection information through one of the established short-range wireless channels c.
When one or more short-range wireless channels c have been established between the first device 101 and the second device 102, if there are other short-range wireless channels to be established, the second device 102 sends wireless channel connection information corresponding to at least one short-range wireless channel to be established to the first device 101 through the established short-range wireless channel. After receiving the wireless channel connection information through the established short-distance wireless channel, the first device 101 searches for a connection point matching the received connection point identifier (if a connection password needs to be input, the connection password is sent to the second device 102), and establishes a corresponding short-distance wireless channel.
From the above disclosure of sections S201a, S201b, S201c, it can be seen that the process of establishing a plurality of short-range wireless channels may be different when different established connection channels are selected to transmit different numbers of short-range wireless channels. For example, all the wireless channel connection information to be established can be received through the same established connection channel, and the first device 101 can directly establish multiple short-range wireless channels. At least one wireless channel connection information can be received from the server through the wireless mobile channel or received from the second device 102 through the wired channel before any short-distance wireless channel is not established; after at least one short-range wireless channel is established, channel connection information corresponding to the next short-range wireless channel to be established is received from the second device 102 through one of the short-range wireless channels. Various design processes may vary according to business requirements and are not listed here.
Some service scenarios may verify the connection password when establishing a certain short-range wireless channel. The process of sending the connection password to the first device 101 may be distinguished according to actual service scenarios, and in some scenarios, the connection password and the connection point identifier may be packaged together in the wireless channel connection information and sent to the first device 101 when step 201 is executed; in other scenarios, the connection password and connection point identification may be different acquisition procedures. Several different process flows are listed below as exemplary descriptions, but are not limited to the listed flows.
For example, when the user first establishes the wireless channel connection, the connection password and the connection point identifier may be packaged and sent to the first device 101.
For another example, the user may only store the connection point identifier after acquiring the connection password and the connection point identifier for the first time, and when the user establishes the short-distance wireless connection with the connection point corresponding to the connection point identifier next time, the first device 101 requests the connection password again, and at this time, the connection password corresponding to the connection point identifier is sent to the first device 101 through the established connection channel.
In addition, the connection password may also be stored locally in the first device 101 in advance in some way, and after the first device 101 acquires the connection point identifier, the corresponding connection password is searched locally according to the corresponding relationship between the connection point identifier and the connection password. For example, the connection password may be downloaded to the local storage when the first device 101 logs in the server, the connection password may have a tag for identifying the connection password, when the server issues the connection point identifier of the first device 101, the corresponding tags of the connection password may be issued to the first device 101 together, and the first device 101 may obtain the stored connection password according to the tag.
Fig. 3 is a flowchart illustration of the operation of the second device 102 as a connected device in the embodiment of the present application.
S301, sending at least one wireless channel connection information of the second device 102 to the first device 101 through the established connection channel. It should be noted that the process of executing S301 by the server is already described in the section S201a above, and the disclosure is not repeated in this example. The relevant definition of the wireless channel connection information may refer to the description above.
S302, when receiving the wireless channel connection information sent by the first device 101, if the received connection point identifier matches with the connection point identifier on the device, establishing a short-distance wireless channel between the connection point and the first device 101 according to the wireless channel connection information.
In addition to the steps shown in fig. 3, in some occasions with certain requirements on security, the security can be ensured through authentication, and before the short-distance wireless channel is established, the validity of the equipment involved in establishing the short-distance wireless channel can be verified. If the authentication is passed, the second device 102 may send wireless channel connection information.
In concert with the schemes disclosed in S201a, S201b, S201c above, the second apparatus 102 performs differently in S301 under different circumstances. As can be seen from the above description, the wireless channel connection information may be sent to the first device 101 by the server according to the disclosure of the part S201a, or the wireless channel connection information may be sent to the first device 101 by the second device 102. Thus, as an example, the second device 102 may perform the following processes of S301a, S301b, S301 c.
S301a, the second device 102 may upload the wireless channel connection information to the server through the wireless mobile channel, and then the server sends the wireless channel connection information to the first device 101 through the wireless mobile channel. For example, the wireless channel connection information may be uploaded when the second device 102 logs in to the server, or the uploading may be performed when the server notifies the second device 102. The second device 102 may upload one or more types of wireless channel connection information as needed in the actual service scenario.
The second device 102 may also perform the process disclosed at S301 b.
S301b, the server notifies the second device 102 after the authentication of the device involved in establishing the short-range wireless channel is passed, and the second device 102 sends at least one wireless channel connection information to the first device 101 through the established wired channel.
The second device 102 may also perform the process disclosed at S301 c.
S301c, the first device 101 may request the second device 102 to send the wireless channel connection information through the established short-range wireless channel c, and the second device 102 sends the corresponding wireless channel connection information to the first device 101 through the established short-range wireless channel c after receiving the request.
It should be noted that the functions performed by the first device 101 and the functions performed by the second device 102 may also be integrated into the same device at the same time, and the device performs the functions of the first device 101 and the second device 102 when performing different roles.
In one example, the processes described in fig. 2 and fig. 3 above may be applied to initially establish each short-range wireless channel, and after a certain short-range wireless channel is established, the first device 101 may store the wireless channel connection information of the short-range wireless channel, so that the connection may be automatically established when the connection point is connected with the second device 102 next time, and the related processes may refer to similar processes in the prior art.
Fig. 4 is a diagram of an application example of the present application. The solution of the present application is applied in this example to an internet automotive system 400. The system 400 is based on the android operating system or other operating system that can be developed to automatically enter wireless channel connection information.
The system 400 comprises a mobile phone 401, a car machine 402 and a cloud server 403. The mobile phone 401 and the car machine 402 may complete the functions of the first device 101 and the second device 102. Fig. 4 only describes a flow of using the mobile phone 401 as the first device 401 and using the car machine 402 as the second device 402. The short-distance wireless channels to be established in this example include a WIFI channel and a bluetooth channel.
The mobile phone 401 and the car machine 402 interact with the cloud server 403 through wireless mobile channels (described below by taking a 4G channel as an example) by means of App applications on the mobile phone. In addition, the application on the mobile phone 401 can control the number of short-distance wireless channels to be established according to the number of short-distance wireless functions opened on the mobile phone 401, in this example, the user can open the WIFI and bluetooth connection interfaces in advance, and the application searches the WIFI and bluetooth connection interfaces and then sets the short-distance wireless channels to be established to be the WIFI and bluetooth channels.
In the S401 stage, the car machine 402 uploads the WIFI connection point identifier and the WIFI password to the cloud server 403 by logging in the cloud server 403.
In the S402 stage, when the driver opens the application on the mobile phone 401 for the first time, the mobile phone 401 sends the account and the password to the cloud server 403 through the application to request login.
In the S403 stage, the cloud server 403 verifies whether the account sent by the mobile phone 401 is consistent with the account used when the car machine logs in, if so, the verification is passed, and then sends the saved WIFI connection point identifier and the saved WIFI password of the car machine 402 to the mobile phone 401.
In the S404 stage, the mobile phone 401 initiates a WIFI connection to the in-vehicle device 402 according to the received WIFI connection point identifier and the WIFI password.
In the S405 stage, after the car machine 402 verifies that the WIFI password passes, the connection request of the mobile phone 401 is responded, and the WIFI channel is successfully established.
In the S406 stage, the mobile phone 401 requests the car machine 402 for the MAC address and the bluetooth password through the established WIFI channel, and sends the account information of the mobile phone to the car machine 402.
In the stage S407, the car machine 402 verifies that the account of the mobile phone 401 is the same as the account of the cloud server 403 logged in by the car machine, and sends the MAC address and the bluetooth password to the mobile phone 401 through the WIFI channel.
In step S408, the mobile phone 401 sends the MAC address and the bluetooth password to the car machine 402 to request to connect the bluetooth channel.
In the stage S409, the car machine 402 establishes a WIFI connection with the mobile phone 401 after verifying the bluetooth password.
In addition to the process described in the stages S401 to 409, the mobile phone 401 may store the WIFI connection point identifier and the WIFI password after a successful WIFI channel is established; after a successful bluetooth channel is established, the MAC address and bluetooth password of the car machine 402 are saved. The mobile phone 401 may also prompt the user to manually select the connection point identifier through the App when the WIFI channel or the bluetooth channel is failed to be established, and manually enter a connection password to try connection again.
Corresponding to the embodiment of the method for establishing the short-distance wireless channel, the application also provides an embodiment of a device for establishing the short-distance wireless channel.
The embodiment of the device for establishing the short-distance wireless channel can be applied to intelligent equipment such as mobile phones, car machines, televisions, watches and the like. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. The software implementation is taken as an example, and as a logical device, the device is formed by reading corresponding computer program instructions in the nonvolatile memory into the memory for operation through the processor of the intelligent device where the device is located. In terms of hardware, as shown in fig. 5, a hardware structure diagram of an intelligent device in which an apparatus for establishing a short-range wireless channel is located for the present application is shown, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 5, the intelligent device in which the apparatus is located in the embodiment may also include other hardware according to the actual function of the intelligent device, which is not described again.
Referring to fig. 6, an apparatus 600 for establishing a short-range wireless channel includes:
a communication module 601, configured to receive at least one piece of wireless channel connection information from the established connection channel, and transmit the wireless channel connection information to the connection module, where the wireless channel connection information includes a connection point identifier on the second device;
a connection module 602, configured to establish a short-distance wireless channel with a connection point according to the wireless channel connection information when the connection point matching the received connection point identifier is found.
In one embodiment, the established connection channels may include at least one of the following: wired channel, wireless mobile channel, short-range wireless channel.
The communication module 601 may receive more than one wireless channel connection information from the second device or the server through the same established connection channel. In addition, before any short-distance wireless channel is not established, the communication module 601 may receive wireless channel connection information from the server through a wireless mobile channel, or receive the wireless channel connection information from the second device through a wired channel; after establishing at least one short-range wireless channel, the communication module 601 receives the wireless channel connection information from the second device through one of the short-range wireless channels.
In one embodiment, the apparatus 600 may further include a storage module (not shown in the figure) for storing the wireless connection channel information; the communication module 601 may further send an authentication identifier of the apparatus for establishing the short-distance wireless channel to the second device or the server for authentication through the established connection channel when the storage module does not store the wireless connection channel information.
In addition, the apparatus 600 may further include a processing module (not shown in the figure), configured to store the connection information of the wireless channel corresponding to the short-distance wireless channel in a storage module after the short-distance wireless channel is established; and deleting the wireless channel connection information stored in the storage module if the short-distance wireless channel is not established successfully next time with the second equipment according to the stored wireless channel connection information.
The short-range wireless channels may include at least one of: a WIFI channel, a Bluetooth channel, an infrared channel and an NFC channel; the connection point identification may include: service set identification, MAC address.
According to different connection requirements, the wireless channel connection information may further include a connection password corresponding to the connection point identifier.
The connection module 602 is further configured to receive, through the communication module 601, a connection password corresponding to the connection point identifier from the established connection channel; or acquiring the connection password from the local according to the corresponding relation between the connection point identification and the connection password.
Fig. 7 is another apparatus 700 for establishing a short-range wireless channel, which is used for establishing at least one short-range wireless channel with a device requesting a connection; the method comprises the following steps:
a communication module 701, configured to send at least one type of wireless channel connection information on a second device to a first device through an established connection channel, where the wireless channel connection information includes a connection point identifier on the second device;
a connection module 702, configured to, when at least one type of wireless channel connection information sent by a first device is received, if a connection point identifier carried in the wireless channel connection information sent by the first device matches with a connection point identifier on the first device, establish a short-distance wireless channel between the connection point and the first device according to the wireless channel connection information sent by the first device.
The communication module 701 may be located on the second device, and at this time, the established connection channel may be a wired channel or a short-range wireless channel. In addition, the communication module 701 may also be located on a server, and in this case, the established connection channel may be a wireless mobile channel. The at least one identification information of the second device sent by the server may be manually configured on the server or sent to the server via the connected device.
When designing the device 600 and 700 for establishing a short-distance wireless channel, the functions of the two devices may be implemented by App, or by opening operating systems of corresponding interfaces, and the functions of the two devices may be integrated on the same device, or may be loaded in different devices, depending on the functions to be completed by the specific device.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.