CN111511043B - Network connection method, device, electronic equipment and storage medium - Google Patents

Network connection method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111511043B
CN111511043B CN202010292109.2A CN202010292109A CN111511043B CN 111511043 B CN111511043 B CN 111511043B CN 202010292109 A CN202010292109 A CN 202010292109A CN 111511043 B CN111511043 B CN 111511043B
Authority
CN
China
Prior art keywords
wireless network
information
request
electronic device
server
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010292109.2A
Other languages
Chinese (zh)
Other versions
CN111511043A (en
Inventor
龚健飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010292109.2A priority Critical patent/CN111511043B/en
Publication of CN111511043A publication Critical patent/CN111511043A/en
Application granted granted Critical
Publication of CN111511043B publication Critical patent/CN111511043B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/08Access security
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Abstract

The embodiment of the application discloses a network connection method, a network connection device, electronic equipment and a storage medium. The method comprises the following steps: the first electronic device displays the searched wireless networks and the request control corresponding to each searched wireless network, and responds to the touch operation acted on the request control to generate a wireless network connection request so as to determine the wireless network to be connected. The request information is triggered in response to a wireless network connection request. And acquiring access verification information of the wireless network to be connected from the second electronic equipment, wherein the access verification information is acquired from a server by the second electronic equipment, and the wireless network to be connected is connected based on the access verification information. The method realizes that the second electronic equipment capable of communicating with the server replaces the first electronic equipment to acquire the access verification information in the server, and further realizes that the first electronic equipment can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic equipment cannot communicate with the server.

Description

Network connection method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a network connection method, a device, an electronic apparatus, and a storage medium.
Background
With the popularity of wireless technology, more electronic devices may access the internet through wireless networks built based on wireless technology. For example, the internet may be accessed through a wireless network constructed based on WiFi (wireless local area network) technology or bluetooth technology. The electronic device needs to establish a connection with the wireless network before accessing the internet through the wireless network, and in a related manner of establishing a connection with the wireless network, the electronic device needs to acquire related information of the wireless network to be connected through a server, so that the electronic device cannot access the wireless network under the condition that the electronic device cannot communicate with the server. In addition, in the related mode of establishing connection with the wireless network, the related information of the wireless network to be connected is transmitted in a plaintext-based mode, so that the problem of pure safety of the related information in the transmission process is caused.
Disclosure of Invention
In view of the foregoing, the present application proposes a network connection method, apparatus, electronic device and storage medium to improve the above-mentioned problems.
In a first aspect, the present application provides a network connection method, the method including: the method comprises the steps that first electronic equipment displays searched wireless networks and request controls corresponding to each searched wireless network;
Responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine a wireless network to be connected; triggering request information in response to the wireless network connection request, wherein the request information carries identification information of a wireless network to be connected; and acquiring access verification information of the wireless network to be connected from a second electronic device, wherein the access verification information is acquired from a server by the second electronic device based on the identification information in the request information, and the wireless network to be connected is connected based on the access verification information.
In a second aspect, the present application provides a network connection method, the method including: the method comprises the steps that a second electronic device obtains request information, the request information is triggered by a first electronic device in response to a wireless network connection request, the request information carries identification information of a wireless network to be connected, and the wireless network connection request is generated in response to touch operation acting on a request control when the first electronic device displays searched wireless networks and request controls corresponding to each searched wireless network; acquiring the identification information from the request information; and searching in a server based on the identification information to obtain access verification information corresponding to the identification information, and triggering return information carrying the access verification information so that the first electronic equipment is connected with the wireless network to be connected based on the access verification information.
In a third aspect, the present application provides a network connection device, the device comprising: the system comprises a request triggering unit, an access information acquisition unit and a network connection unit. The request triggering unit is used for displaying the searched wireless networks and request controls corresponding to each searched wireless network; responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine a wireless network to be connected; and responding to the wireless network connection request to trigger request information, wherein the request information carries identification information of the wireless network to be connected. The access information acquisition unit is used for acquiring access verification information of the wireless network to be connected from the second electronic equipment, wherein the access verification information is acquired from a server by the second electronic equipment based on the identification information in the request information. And the network connection unit is used for connecting the wireless network to be connected based on the access verification information.
In a fourth aspect, the present application provides a network connection device, the device comprising: the system comprises a request information acquisition unit, a request information identification unit, an access information searching unit and an information return unit. The request information acquisition unit is used for acquiring request information, the request information is triggered by the first electronic equipment in response to a wireless network connection request, the request information carries identification information of a wireless network to be connected, and the wireless network connection request is generated in response to touch operation acting on the request control when the first electronic equipment displays the searched wireless network and the request control corresponding to each searched wireless network. And the request information identification unit is used for acquiring the identification information from the request information. And the access information searching unit is used for searching in the server based on the identification information to obtain access verification information corresponding to the identification information. And the information return unit is used for triggering the return information carrying the access verification information so that the first electronic equipment is connected with the wireless network to be connected based on the access verification information.
In a fifth aspect, the present application provides an electronic device comprising a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the methods described above.
In a sixth aspect, the present application provides a computer readable storage medium having program code stored therein, wherein the program code, when executed by a processor, performs the method described above.
According to the network connection method, the network connection device, the electronic equipment and the storage medium, through displaying the searched wireless networks and the request control corresponding to each searched wireless network, and responding to the touch operation acting on the request control to generate a wireless network connection request so as to determine the mode of the wireless network to be connected, the first electronic equipment can trigger the identification information request information carrying the wireless network to be connected after responding to the wireless network connection request, so that the second electronic equipment can acquire the access verification information of the wireless network to be connected from the server based on the identification information in the request information, and then the first electronic equipment acquires the access verification information from the second electronic equipment.
Therefore, when the first electronic equipment cannot communicate with the server storing the access verification information, the second electronic equipment capable of communicating with the server can replace the first electronic equipment to acquire the access verification information in the server by generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic equipment can directly acquire the access verification information of the wireless network to be connected from the second electronic equipment, and further, the first electronic equipment can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic equipment cannot communicate with the server storing the access verification information.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a schematic diagram of a network environment in accordance with an embodiment of the present application;
FIG. 2 is a flow chart illustrating a method of network connection according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a wireless network that is searched for in an embodiment of the present application;
fig. 4 is a flowchart of a network connection method according to still another embodiment of the present application;
FIG. 5 illustrates a schematic diagram of an interface displaying a scannable image in an embodiment of the present application;
FIG. 6 is a flow chart illustrating a method of network connection according to another embodiment of the present application;
FIG. 7 is a schematic diagram showing a first electronic device transmitting broadcast data carrying identification information in the embodiment shown in FIG. 6;
FIG. 8 is a schematic diagram of interfaces displayed by the first electronic device and the second electronic device after the second electronic device obtains the identification information in the embodiment shown in FIG. 6;
FIG. 9 is a schematic diagram showing a first electronic device receiving broadcast data carrying access authentication information in the embodiment shown in FIG. 6;
fig. 10 is a flowchart of a network connection method according to another embodiment of the present application;
FIG. 11 is a flowchart of a network connection method according to another embodiment of the present application;
fig. 12 is a flowchart of a network connection method according to another embodiment of the present application;
FIG. 13 shows a schematic diagram of an interface for displaying a scannable image in the embodiment shown in FIG. 12;
FIG. 14 is a schematic diagram showing an interface of the second electronic device in the embodiment shown in FIG. 12 during a code scanning process;
FIG. 15 is a schematic diagram showing an interface during a process of obtaining a wireless network password from a server by a second electronic device in the embodiment shown in FIG. 12;
fig. 16 is a schematic diagram showing an interface of a two-dimensional code carrying a wireless network password displayed by a second electronic device in the embodiment shown in fig. 12;
FIG. 17 is a schematic diagram showing an interface of the first electronic device in the embodiment shown in FIG. 12 during a code scanning process;
FIG. 18 is a schematic diagram of an interface of the embodiment of FIG. 12 after a first electronic device has successfully connected to a network;
fig. 19 is a block diagram of a network connection device according to an embodiment of the present application;
fig. 20 is a block diagram showing a network connection device according to another embodiment of the present application;
fig. 21 is a block diagram showing a network connection device according to another embodiment of the present application;
fig. 22 shows a block diagram of another electronic device for performing a network connection method according to an embodiment of the present application;
fig. 23 shows a storage unit for storing or carrying program codes for implementing the network connection method according to the embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
As electronic devices used by users are equipped with more communication functions and wireless technology is developed, many electronic devices may be accessed into the internet through wireless technology. Taking WiFi technology as an example, wiFi technology is a technology that can connect electronic devices such as a personal computer, a handheld device (such as a pad, a mobile phone) and the like to each other in a wireless manner.
In some scenarios, a WiFi network constructed based on WiFi technology may be used as an intermediary between an electronic device used by a user and the internet. In this case, if the electronic device is to access to the internet, it needs to access to the WiFi network first, and then access to the internet through the device included in the WiFi network. In order to ensure the security of the WiFi network, access authentication information is configured in some WiFi networks, and in the case of the configuration of the access authentication information, the electronic device needs to transmit the access authentication information to the WiFi network for authentication in the interaction stage of control signaling with the WiFi network, and after the access authentication information is authenticated by the WiFi network, the electronic device can access to the WiFi network to realize subsequent access to the internet.
In a related manner, the collected access authentication information for the WiFi network may be stored in a server. In this related manner, the electronic device may search the server storing the access verification information of the WiFi network for the access verification information of the WiFi network to be connected after determining which WiFi network is to be connected, and then may access the WiFi network to be connected through the access verification information after receiving the access verification information returned by the server.
However, the inventors have studied this related manner and found that if the access authentication information of the WiFi network to be connected is not stored locally in the electronic device or is not known to the user, the access authentication information of the WiFi network to be connected must be obtained by accessing a server storing the collected access authentication information of the WiFi network. It can be understood that, if the electronic device does not access the WiFi network, the electronic device needs to access the internet through a mobile communication network (for example, a mobile communication network constructed by 3G, 4G or 5G technology) to access the server, and if the electronic device does not have the use authority or function of the mobile communication network, the electronic device cannot communicate with the server, access verification information of the WiFi network that needs to be connected cannot be obtained, that is, the electronic device cannot access the internet through the WiFi network.
Therefore, the inventor proposes a network connection method, a device, an electronic device and a storage medium provided by the application, in the method, a first electronic device which needs to be added to a network to be connected triggers request information carrying identification information of the wireless network to be connected in response to a wireless network connection request, so that a second electronic device obtains access verification information of the network to be connected from a server based on the identification information in the request information, and then connects the wireless network to be connected based on the access verification information.
According to the method and the device, under the condition that the first electronic equipment cannot communicate with the server storing the access verification information, the second electronic equipment capable of communicating with the server can replace the first electronic equipment to acquire the access verification information in the server by generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic equipment can directly acquire the access verification information of the wireless network to be connected from the second electronic equipment, and further, the first electronic equipment still can acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic equipment cannot communicate with the server storing the access verification information.
Before further elaborating on embodiments of the present application, description is given of network environments related to embodiments of the present application.
As shown in fig. 1, fig. 1 is a schematic diagram of a network environment according to an embodiment of the present application. The electronic device 110 and the electronic device 120 are included. The wireless network 130 is a network to be connected currently determined by the electronic device 110. In the environment shown in fig. 1, the electronic device 120 may access the mobile communication network, and thus the internet 150, through the base station 140. In such an environment, the electronic device 120 may communicate with the server 160 through a mobile communication network, while the electronic device 110 may not communicate with the server 160.
The server 130 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms. The electronic device 110 and the electronic device 120 may be, but not limited to, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc., in addition to the smart phone shown in fig. 1.
It should be noted that, the electronic device 110 may be understood as a first electronic device in the subsequent embodiment, and the electronic device 120 may be understood as a second electronic device in the subsequent embodiment.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of a network connection method according to an embodiment of the present application, where the method includes:
s110: the first electronic device displays the searched wireless networks and the request controls corresponding to each searched wireless network.
The first electronic device may start searching for the wireless network after starting the search function of the wireless network, and display the searched wireless network in the designated interface. In order to facilitate the instant acquisition of the access authentication information of the wireless network to be connected, the first electronic device may also display a corresponding request control at a location corresponding to the name of each searched wireless network. As shown in fig. 3, the names of wireless networks searched by the first electronic device are displayed in the interface 11 shown in fig. 3, including a wireless network a, a wireless network B, and a wireless network C. A request control 12 corresponding to the wireless network a is displayed corresponding to the wireless network a, a request control 13 corresponding to the wireless network B is displayed corresponding to the wireless network B, and a request control 14 corresponding to the wireless network C is displayed corresponding to the wireless network C.
It will be appreciated that the searched wireless network displayed by the first electronic device is essentially displaying the name of the searched wireless network (e.g., service set identification), and as a way, the displayed name of the wireless network may trigger the first electronic device to establish a connection with the wireless network in response to a touch operation. For example, if the name of the wireless network acted by the touch operation is wireless network a, the first electronic device establishes a connection with the wireless network a. In this way, the first electronic device may detect whether it can communicate with the server storing the collected access authentication information of the wireless network at the same time when the wireless network is searched, and when it cannot communicate with the server, the first electronic device may display the searched wireless network and the request control corresponding to each of the searched wireless networks, and when it can communicate with the server, it may not display the request control corresponding to each of the searched wireless networks.
In this embodiment, the first electronic device may detect whether it can communicate with the server storing the collected access authentication information of the wireless network in a plurality of ways. As one way, the first electronic device may detect whether it currently has the right to access the mobile communication network, and when it detects that it does not have the right to access the mobile communication network, it may determine that it is impossible to communicate with the server storing the collected access authentication information of the wireless network. Alternatively, the first electronic device may transmit an access packet to the server in the case where the permission to access the mobile communication network is detected, and determine that communication with the server storing the collected access authentication information of the wireless network is impossible when no response data with respect to the access packet is detected.
S120: and responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine the wireless network to be connected.
Taking the interface 11 shown in fig. 3 as an example, if a touch operation acting on the request control 12 is detected, a wireless network connection request is generated in response to the touch operation acting on the request control 12, and the wireless network a corresponding to the request control 12 is used as the wireless network to be connected. If the touch operation on the request control 13 is detected, a wireless network connection request is generated in response to the touch operation on the request control 13, and the wireless network B corresponding to the request control 13 is used as the wireless network to be connected. If the touch operation on the request control 14 is detected, a wireless network connection request is generated in response to the touch operation on the request control 14, and the wireless network C corresponding to the request control 14 is used as the wireless network to be connected.
S130: and responding to the wireless network connection request triggering request information, wherein the request information carries identification information of the wireless network to be connected.
In this embodiment, the role of the request information is that the other electronic device (for example, the second electronic device) other than the first electronic device can acquire the identification information of the wireless network to be connected determined by the first electronic device. And wherein the generated wireless network connection request is used to trigger the request information. In this embodiment, there are a number of ways to trigger the generation of the wireless network connection request.
As one approach, the generation of the wireless network connection request may be triggered by a manual operation by a user. In this way, the user can select the wireless network to be connected, and after detecting that the user selects the wireless network, the first electronic device further uses the wireless network selected by the user as the wireless network to be connected, and generates identification information carrying the wireless network to be connected at the same time. The first electronic device may display the searched wireless networks in a list form, and if the first electronic device detects that one of the wireless networks corresponding to the list is selected by the user, the wireless network corresponding to the list is determined to be the wireless network to be connected. The wireless network corresponding to each column is a wireless network to which the identification information of the wireless network displayed in each column belongs.
Alternatively, the wireless network connection request may be triggered automatically by the first electronic device. In this manner, the first electronic device may store therein a target condition allowing wireless connection, and when the first electronic device detects that the target condition is satisfied, a wireless network connection request may be generated so as to trigger the request information.
In one generation manner, the first electronic device may automatically initiate connection with the historically accessed wireless network when detecting the historically accessed wireless network. However, for some wireless networks, the access authentication information may be dynamically updated, in this manner, in order to facilitate the first electronic device to access to the wireless network that has been accessed in the history and may dynamically update the access authentication information, the target condition may include that the access authentication information based on the history cannot successfully access the wireless network that has been connected in the history. It will be appreciated that for a wireless network that dynamically updates the access authentication information, the access authentication information may be periodically changed, and that even if the wireless network that dynamically updates the access authentication information has been successfully accessed by the first electronic device, and in the case where the access authentication information used is stored locally, the access authentication information used cannot be successfully accessed into the wireless network through the stored history of access authentication information because of the dynamic update of the access authentication information. Further, in this manner, when the first electronic device detects that the access authentication information based on the history use cannot successfully access the wireless network connected through the history, the first electronic device determines that the target condition is satisfied, so as to generate a wireless network connection request to trigger the request information to acquire the current latest access authentication information through a subsequent flow.
In another generation manner, for the wireless network to be accessed, the user may enable the first electronic device to obtain the access authentication information of the wireless network to be accessed by manually inputting the access authentication information. However, in this manner, the user may fail to input the correct access authentication information due to a mistake or a memory error, so that the first electronic device cannot successfully access the wireless network to be connected, but the wireless network to be connected may be stored in the server, and in this manner, the target condition may include detecting that the access authentication information input based on the user cannot successfully access the wireless network a plurality of times in succession. Correspondingly, when the first electronic device detects that the wireless network cannot be successfully accessed continuously for many times based on the access verification information input by the user, the first electronic device determines that the target condition is met to generate a wireless network connection request, and takes the wireless network which cannot be successfully accessed continuously for many times as the wireless network to be connected.
S140: and acquiring access verification information of the wireless network to be connected from the second electronic equipment, wherein the access verification information is acquired from the server by the second electronic equipment based on the identification information in the request information.
It should be noted that, the main purpose of the first electronic device triggering the request information is to enable the second electronic device to obtain the identification information of the wireless network to be connected, and then when the second electronic device obtains the identification information of the wireless network to be connected from the request information, the identification information of the wireless network to be connected can be used as a query condition to obtain the access verification information corresponding to the identification information from the server.
Correspondingly, after the second electronic device obtains the access verification information of the wireless network to be connected from the server, return information carrying the access verification information can be generated, so that the first electronic device can obtain the access verification information of the wireless network to be connected through the return information.
S150: and connecting the wireless network to be connected based on the access verification information.
After the access verification information of the wireless network to be connected is obtained, the first electronic device can send the access verification information to the wireless network to be connected for verification in a control signaling interaction stage, and access the wireless network to be connected after the verification is passed.
It should be noted that, in this embodiment, the wireless network to be connected may be a WiFi network, or may be a wireless network constructed based on other wireless technologies, for example, a wireless network constructed based on bluetooth or Zigbee technology.
According to the network connection method provided by the embodiment, the first electronic device responds to the wireless network connection request to trigger the identification information request information carrying the wireless network to be connected, so that the second electronic device can acquire the access verification information of the wireless network to be connected from the server based on the identification information in the request information, and then the first electronic device acquires the access verification information from the second electronic device. Therefore, when the first electronic equipment cannot communicate with the server storing the access verification information, the second electronic equipment capable of communicating with the server can replace the first electronic equipment to acquire the access verification information in the server by generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic equipment can directly acquire the access verification information of the wireless network to be connected from the second electronic equipment, and further, the first electronic equipment can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic equipment cannot communicate with the server storing the access verification information.
Referring to fig. 4, fig. 4 is a flowchart illustrating a network connection method according to an embodiment of the present application, where the method includes:
s210: the first electronic device displays the searched wireless networks and the request controls corresponding to each searched wireless network.
S220: and responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine the wireless network to be connected.
S230: a scannable image carrying identification information of a wireless network to be connected is generated and displayed in response to a wireless network connection request.
In this embodiment, the request information is triggered in the form of a scannable image. A scannable image is understood to mean, among other things, an image that characterizes the content to be transmitted in terms of its content characteristics. The scannable image in this embodiment may be an image such as a barcode or a two-dimensional code. For example, as shown in fig. 4, the first electronic device generates and displays the interface 10 shown in fig. 4 in response to the wireless network connection request, and the two-dimensional code carrying the identification information of the wireless network to be connected is displayed in the interface 10.
S240: and acquiring access verification information of the wireless network to be connected from the second electronic equipment, wherein the access verification information is acquired from the server by the second electronic equipment based on the identification information in the request information.
After the first electronic device displays the two-dimensional code as shown in fig. 5, the second electronic device can analyze the identification information of the to-be-connected network from fig. 5 in a code scanning manner, and further after the second electronic device obtains the identification information of the to-be-connected wireless network from the request information, the identification information of the to-be-connected wireless network can be used as a query basis to obtain corresponding access verification information from the server.
Correspondingly, after the second electronic device obtains the access verification information of the wireless network to be connected from the server, return information carrying the access verification information can be generated, so that the first electronic device can obtain the access verification information of the wireless network to be connected through the return information. Optionally, in this embodiment, the second electronic device may also share the access verification information to the first electronic device by using a scannable image. In this way, the second electronic device may similarly display a scannable image carrying the access authentication information, so that the first electronic device may scan the scannable image displayed by the second electronic device, and parse the access authentication information of the wireless network to be connected from the scannable image displayed by the second electronic device.
Optionally, a scan control may be displayed in the first electronic device, and when a touch operation acting on the scan control is detected, a scannable image displayed by the second electronic device is scanned, and the access verification information of the wireless network to be connected is parsed from the scannable image displayed by the second electronic device.
S250: and connecting the wireless network to be connected based on the access verification information.
According to the network connection method, the fact that the first electronic device cannot communicate with the server storing the access verification information is achieved, the second electronic device can obtain the identification information of the wireless network to be connected by means of generating the scannable image carrying the identification information of the wireless network to be connected, and the second electronic device can replace the first electronic device to obtain the access verification information from the server, so that the first electronic device can directly obtain the access verification information of the wireless network to be connected from the second electronic device, and further the fact that the first electronic device can still obtain the access verification information to be connected to the wireless network to be connected under the condition that the first electronic device cannot communicate with the server storing the access verification information is achieved.
Referring to fig. 6, fig. 6 is a flowchart illustrating a network connection method according to an embodiment of the present application, where the method includes:
s310: the first electronic device displays the searched wireless networks and the request controls corresponding to each searched wireless network.
S320: and responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine the wireless network to be connected.
S330: and generating and transmitting broadcast data in response to the wireless network connection request, wherein the broadcast data carries identification information of the wireless network to be connected.
In this embodiment, the first electronic device may still generate a wireless network connection request based on the foregoing embodiment, and further generate and send, in response to the generated wireless network connection request, broadcast data carrying identification information of the wireless network to be connected. It should be noted that, for broadcast data, it is not necessary to establish a dedicated communication link in advance to perform transmission of information. The broadcast data transmitted by the first electronic device may be received by the second electronic device based on the broadcast data in such a way that a dedicated communication link is not pre-established with the first electronic device.
S340: and acquiring access verification information of the wireless network to be connected from the second electronic equipment, wherein the access verification information is acquired from the server by the second electronic equipment based on the identification information in the request information.
When the second electronic device is within the coverage range of the broadcast data sent by the first electronic device, the second electronic device may receive the broadcast data sent by the first electronic device, and further parse the identification information of the wireless network to be connected from the broadcast data, so as to obtain the identification information from the server by using the foregoing embodiment
S350: and connecting the wireless network to be connected based on the access verification information.
For example, as shown in fig. 7, the first electronic device 110 starts to transmit broadcast data carrying identification information in response to a wireless network connection request, and at the same time, a prompt message for prompting that broadcast data is currently being transmitted is displayed in the screen of the first electronic device 110, for example, "sharing wireless network identification" shown in fig. 7. After the first electronic device 110 starts transmitting the broadcast data, the second electronic device 120 may also activate a reception function of the broadcast data under the operation of the user, and may display "reading the network identification" shown in fig. 7 on the screen so as to prompt the user for the current processing stage. When the second electronic device 120 successfully reads the identification information from the broadcast data, the access verification information corresponding to the identification information can be found from the server, and the second electronic device can simultaneously display the "access verification information being obtained online" shown in fig. 8 in the screen during the interaction with the server so as to prompt the user to interact with the server currently.
Optionally, after the second electronic device 120 acquires the identification information of the network to be connected, notification information may also be sent to the first electronic device 110, so that the first electronic device 110 transitions to the receiving state of the broadcast data and displays "acquiring access verification information" shown in fig. 9, so as to prompt the user of the current state. When the second electronic device 120 successfully obtains the access verification information from the server, the obtained access verification information can be returned to the first electronic device 110 in a broadcast data mode, and in the process of sending the broadcast data, the second electronic device 120 can display "sharing the access verification information" to prompt a user, and finally, the first electronic device 110 can be connected to the wireless network to be connected through the access verification information after analyzing the access verification information from the broadcast data sent by the second electronic device 120.
According to the network connection method, when the first electronic device cannot communicate with the server storing the access verification information, the identification information of the wireless network to be connected can be broadcasted to the second electronic device in a mode of generating broadcast data carrying the identification information of the wireless network to be connected, so that the second electronic device can acquire the identification information of the wireless network to be connected through the broadcast data, the second electronic device replaces the first electronic device to acquire the access verification information from the server, the first electronic device can directly acquire the access verification information of the wireless network to be connected from the second electronic device, and further the first electronic device can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic device cannot communicate with the server storing the access verification information.
In the embodiment of the present application, the first electronic device and the second electronic device may have functions of sharing identification information and returning access verification information based on the scannable image and the broadcast data.
As a way, the electronic device may be configured with a setting interface, in which a user may configure a manner of currently required trigger request information, and the electronic device may store the manner of trigger request information configured by the user, so that the electronic device may read the manner of trigger request information configured by the user first and then trigger the request information based on the configured manner of trigger request information when actually sharing the identification information. The manner in which the user may configure the trigger request information is, for example, a scannable image request mode or a wireless request mode.
Correspondingly, the user of the electronic device can also configure the mode of reading the request information and the mode of generating the return information through the setting interface, and then the electronic device can store the mode of reading the request information and the mode of generating the return information configured by the user, so that the user can configure the mode of triggering the request information, the mode of reading the request information and the mode of generating the return information according to the needs of the user, and the flexibility in the network connection process is improved.
In this manner, the first electronic device may detect the manner in which the trigger request information is currently configured first when responding to the wireless network connection request. When in the scannable image request mode, the first electronic device generates and displays a scannable image in response to a wireless network connection request. And when the wireless request mode is adopted, the first electronic equipment responds to the wireless network connection request to generate and send wireless broadcast data carrying identification information. Correspondingly, the second electronic device may detect the currently configured manner of the read request information first and then read the information according to the currently configured manner of the read request information. For example, if the second electronic device detects the currently configured read request information in a manner of reading based on the scannable image, the second electronic device may activate the camera to acquire the scannable image, and if the second electronic device detects the currently configured read request information in a manner of reading based on the broadcast data, the second electronic device may activate the broadcast data receiving function.
Correspondingly, after the second electronic device obtains the access verification information from the server, the currently configured mode of generating the return information can be further detected, and then the access verification information is returned based on the currently configured mode of generating the return information.
In addition, it should be noted that, if the first electronic device directly triggers the request information through the scannable image request mode, and the second electronic device itself does not have the image acquisition function, the second electronic device cannot effectively obtain the access verification information of the wireless network to be connected, which is carried in the request information. For another example, if the second electronic device directly returns the access authentication information by generating a scannable image, but the first electronic device does not have the image capturing function, the first electronic device may not actually obtain the access authentication information.
In order to avoid the above problem, as another way, which way the first electronic device specifically adopts to trigger the request information and which way the second electronic device specifically adopts to read the request information and which way the second electronic device specifically adopts to return the access verification information may be determined according to the other electronic devices, so that information sharing between the first electronic device and the second electronic device may be performed more quickly and effectively in this way, so that the first electronic device may be accessed to the wireless network to be connected more quickly. The other electronic device may be a second electronic device for the first electronic device, and the other electronic device may be the first electronic device for the second electronic device.
Optionally, the first electronic device and the second electronic device may inform the other electronic device of the manner of triggering the request information supported by itself, in particular, in which manner to read the request information, and in which manner to return the access verification information, by sending the specified broadcast data.
As one way, when determining the specific way of triggering the request information, the first electronic device may determine the specific way of supporting which kind of reading request information by the second electronic device through the content carried in the designated broadcast data sent by the second electronic device. It may be appreciated that the steps corresponding to the second electronic device may be performed by a specific application in the second electronic device, in which case, the second electronic device may start broadcasting the specific broadcast data when detecting that the specific application is started, so that the first electronic device may acquire, by using the specific broadcast data, the read request information supported by the second electronic device before actually triggering the request information, so that the first electronic device may determine the manner of triggering the request information according to the acquired manner of the read request information supported by the second electronic device.
Alternatively, the second electronic device may perform the return of the access authentication information according to a manner of generating the return information supported by the first electronic device. When the mode of triggering the request information is determined to be a scannable image request mode, the first electronic device generates and displays a scannable image in response to a wireless network connection request, and transmits designated broadcast data, wherein the designated broadcast data carries the mode of receiving access verification information supported by the first electronic device, so that the second electronic device can return the access verification information based on the mode of receiving the access verification information supported by the first electronic device after acquiring the access verification information from the server. Optionally, if the content carried in the designated broadcast data sent by the first electronic device characterizes that the first electronic device only supports receiving the access verification information in a manner based on the broadcast data currently, the second electronic device directly returns the access verification information to the first electronic device in a manner of sending the broadcast data after obtaining the access verification information from the server. And if the content carried in the appointed broadcast data sent by the first electronic device characterizes that the first electronic device only supports receiving the access verification information based on the scannable image currently, the second electronic device directly generates the scannable image carrying the access verification information after acquiring the access verification information from the server, so that the first electronic device acquires the access verification information in a code scanning mode.
Optionally, when the mode of triggering the request information is determined to be a wireless request mode, the first electronic device carries, in addition to the identification information of the wireless network to be connected in the broadcast data sent, a mode of receiving access verification information supported by the first electronic device in the broadcast data sent, so that after the second electronic device obtains the access verification information from the server, the second electronic device can return the access verification information based on the mode of receiving the access verification information supported by the first electronic device.
Referring to fig. 10, fig. 10 is a flowchart illustrating a network connection method according to an embodiment of the present application, where the method includes:
s510: the first electronic device displays the searched wireless networks and the request controls corresponding to each searched wireless network.
S520: and responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine the wireless network to be connected.
S530: when detecting that the secret key is stored locally, the first electronic device responds to a wireless network connection request to trigger request information, wherein the request information carries identification information of a wireless network to be connected and user identification.
It should be noted that, when the electronic device is first accessed into the server, the server may automatically allocate a unique user identifier to the electronic device, or when the electronic device is first accessed into the server, the user may register a unique user identifier in the server. The server also assigns a key to the electronic device simultaneously with the generation of the user identification, and the electronic device stores the server-assigned key locally. In this way, the first electronic device detects whether the key is stored locally when responding to the wireless network connection request, and triggers the request information when detecting that the key is stored locally.
S540: and obtaining encrypted data from the second electronic equipment, wherein the encrypted data is obtained by encrypting access verification information of the wireless network to be connected based on the key after the server searches the key based on the user identifier.
It can be understood that if the access authentication information corresponding to the network to be connected can be found in the server, the found access authentication information is shared to the first electronic device by the second electronic device. In this case, in order to make the access authentication information have better security in the transmission process, the server may encrypt the searched access authentication information. In one mode, under the condition that the request information carries the identification information of the wireless network to be connected and the user identification, after the second electronic device acquires the request information triggered by the first electronic device, the second electronic device can acquire the identification information of the wireless network to be connected and the user identification at the same time, and further the identification information of the wireless network to be connected and the user identification can be sent to the server, the server can inquire a corresponding key based on the user identification, then encrypt the searched access verification information based on the key corresponding to the user identification to obtain encrypted data, and then return the encrypted data to the second electronic device.
After the second electronic device obtains the encrypted data, the second electronic device may share the encrypted data with the first electronic device based on the foregoing manner of generating the return information. For example, if the mode of generating the return information is based on the scannable image, the second electronic device generates the scannable image carrying the encrypted data, so that the first electronic device may acquire the encrypted data from the scannable image by scanning the code. For another example, if the mode of generating the return information is based on the mode of transmitting the broadcast data, the second electronic device generates the broadcast data carrying the encrypted data, so that the first electronic device may acquire the encrypted data from the second electronic device by receiving the broadcast data.
S550: and decrypting the encrypted data based on the secret key to obtain access verification information of the wireless network to be connected.
After the first electronic device obtains the encrypted data, the first electronic device can decrypt the encrypted data based on the locally stored key, and further extract access verification information of the wireless network to be connected.
S560: and connecting the wireless network to be connected based on the access verification information.
As one way, the method provided in this embodiment further includes: when the first electronic equipment detects that the first electronic equipment can communicate with a server, a key update request carrying a user identifier is sent to the server; and carrying out key updating locally based on the return information of the server to the key updating request.
According to the network connection method, when the first electronic device cannot communicate with the server storing the access verification information, the second electronic device capable of communicating with the server can replace the first electronic device to acquire the access verification information of the wireless network to be connected in the server in a mode of generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic device can directly acquire the access verification information of the wireless network to be connected from the second electronic device, and further the first electronic device can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic device cannot communicate with the server storing the access verification information.
In addition, in this embodiment, the access verification information (which may be understood as the encrypted data in the foregoing embodiment) encrypted by the server based on the user identifier of the first electronic device is obtained from the server by the second electronic device, so that the access verification information is in an encrypted state in a process of interaction from the second electronic device to the first electronic device, which is favorable for ensuring security of the access verification information.
Referring to fig. 11, fig. 11 is a flowchart illustrating a network connection method according to an embodiment of the present application, where the method includes:
s610: the second electronic equipment acquires request information, the request information is triggered by the first electronic equipment in response to a wireless network connection request, the request information carries identification information of a wireless network to be connected, and the wireless network connection request is generated in response to touch operation acting on the request control when the first electronic equipment displays the searched wireless network and the request control corresponding to each searched wireless network.
Based on the foregoing embodiments, various triggering methods for requesting information are possible. The second electronic device may acquire the request information based on the generation manner of the request information in case that the trigger manner may be plural. Optionally, if the first electronic device triggers the request information based on the scannable image request mode, the request information is a scannable image carrying identification information of the wireless network to be connected, and in this way, the second electronic device may acquire the scannable image by using the camera in an image acquisition manner to achieve acquisition of the request information. If the first electronic device triggers the request information based on the wireless request mode, the request information is broadcast data carrying identification information of the wireless network to be connected, and in this way, the second electronic device can acquire the broadcast data by starting a broadcast data receiving function to acquire the request information.
S620: the identification information is obtained from the request information.
It will be appreciated that the manner in which the first electronic device triggers the request information may be different, and the manner in which the second electronic device obtains the identification information from the request information may be different. Optionally, if the first electronic device is triggered based on the scannable image request mode when the request information is triggered, and the second electronic device correspondingly acquires the scannable image through the camera in an image acquisition manner to obtain the request information, so that the second electronic device can acquire the identification information of the wireless network to be connected from the scannable image through an image recognition manner. Optionally, if the first electronic device is triggered based on the wireless request mode when the request information is triggered, the second electronic device may acquire the broadcast data by starting the broadcast data receiving function to obtain the request information, so that the second electronic device may obtain the identification information of the wireless network to be connected by analyzing the received broadcast data.
S630: and searching in the server based on the identification information to obtain access verification information corresponding to the identification information.
S640: and triggering the return information carrying the access verification information so that the first electronic equipment is connected with the wireless network to be connected based on the access verification information.
According to the network connection method, when the first electronic device cannot communicate with the server storing the access verification information, the second electronic device capable of communicating with the server can replace the first electronic device to acquire the access verification information of the wireless network to be connected in the server in a mode of generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic device can directly acquire the access verification information of the wireless network to be connected from the second electronic device, and further the first electronic device can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic device cannot communicate with the server storing the access verification information.
Referring to fig. 12, fig. 12 is a flowchart of a network connection method according to an embodiment of the present application, where the method includes:
s710: the first electronic device initiates an application.
It should be noted that, the steps performed by the first electronic device and the second electronic device are substantially performed by the respective running application programs. In order to execute the subsequent steps, the first electronic device may first start the application program for executing the network connection method provided in this embodiment in the beginning stage, and correspondingly, the second electronic device may first start the corresponding application program for implementing the subsequent code scanning step.
S720: the first electronic device updates the key.
In this embodiment, the key is mainly used to detect whether the first electronic device has the right to convert the request code and decrypt the encrypted wireless network password later. Optionally, to improve security in using the key, the server may update the key, and illustratively, the server may update the key that is used longer than a specified duration, or update the key that is used more than a specified number of times. When the first electronic device detects that communication with the server is possible, a key update request may be sent to the server so that the server returns to the first electronic device in response to the key update request to obtain the most recently updated key.
It should be noted that, the key update request sent by the first electronic device may carry different contents according to whether the key is stored locally. Specifically, if the first electronic device does not store the key locally, the key update request sent by the first electronic device only carries the user identifier of the first electronic device, so that the server can allocate a key for the user of the first electronic device. If the first electronic device locally stores the secret key, the secret key update request sent by the first electronic device to the server carries the user identifier and the local secret key, so that the server detects whether the secret key in the secret key update request is the same as the latest secret key stored by the server, and if not, the latest secret key is returned to the first electronic device.
S721: the server correspondingly stores the user identification and the secret key.
As one way, the server may update the key corresponding to the user identification after responding to the key update request. In this way, after receiving the key update request, the server may query, according to the user identifier, whether the time length of use of the corresponding key has exceeded a specified time length, or whether the number of times of use of the corresponding key has exceeded a specified number of times, and if the time length of use has exceeded the specified time length or the number of times of use has exceeded the specified number of times, determine that the key update is required, so as to update the key corresponding to the user identifier, store the user identifier and the updated key correspondingly, and return the updated key to the first electronic device.
Alternatively, the server may update the key corresponding to each user identifier spontaneously and periodically, in this manner, the server may still update the key based on whether the time duration of use of the key has exceeded a specified duration, or query whether the number of times the corresponding key has exceeded a specified number of times, and if it is determined that the key needs to be updated, directly store the updated key locally. In this way, the server detects whether the key in the key update request is the same as the latest key stored by the server, and if not, returns the latest key to the first electronic device.
S722: the first electronic device stores the key.
For the updated key returned by the server, the first electronic device stores and replaces the key before updating.
S730: the first electronic device converts the request code.
Optionally, the first electronic device may display the searched wireless networks in a manner shown in fig. 3, and correspondingly display a request control corresponding to each searched wireless network. After detecting that a certain request control is touched, a step of converting the request code is performed to generate the sharing code carrying the identification information of the wireless network (i.e. the wireless network to be connected in the foregoing embodiment) corresponding to the touched request control and the user identification. The sharing code may be understood as the scannable image in the foregoing embodiment, and optionally, in this embodiment, the sharing code is a two-dimensional code. Alternatively, the first electronic device may display the two-dimensional code as shown in fig. 13, and simultaneously display a scan control named scan sharing code beside the two-dimensional code. The scanning control is used for triggering the first electronic equipment to scan the two-dimensional code displayed by the second electronic equipment subsequently.
S740: the second electronic device scans the code.
After the first electronic device displays the interface shown in fig. 13, the second electronic device may start the camera to start scanning the sharing code in the interface of fig. 13. And, when the second electronic device scans the interface shown in fig. 13, two black stripes shown in fig. 14 are displayed to prompt the user to be in the code scanning state currently.
S750: the second electronic device obtains a wireless network password.
After the second electronic device obtains the identification information of the wireless network to be connected and the user identification through code scanning, a request can be sent to the server, so that the server responds to the request to search the wireless network password corresponding to the identification information as access verification information.
It should be noted that, the identification information of the wireless network to be connected may include a service set identifier and a basic service set identifier. In this way, the identification information can be generated in json format when the identification information is generated, and correspondingly, the server also reads the information according to json format when the identification information is read. By way of example, the identification information may be stored in the following format:
wherein Id is a user identifier, ssid is a service set identifier, and Bssid is a basic service set identifier. It should be noted that "xxxxxx", "yyyyyyyyyy", "zzzzzzzz" and "aaaaaaaa" are merely exemplary representations and do not characterize actual content.
It should be noted that, during the process of obtaining the wireless network password, the second electronic device may display the interface shown in fig. 15, so as to prompt the user that the user is currently in the process of obtaining the wireless network password.
S751: the server searches for the wireless network password and encrypts the found wireless network password.
Optionally, the identification information of the wireless network is used to uniquely identify the wireless network. As one way, the identification information of the wireless network to be connected includes a service set identification (Service Set Identifier) of the wireless network to be connected and a basic service set identification (for example, may be a physical address of an access point) of at least one access point (WirelessAccessPoint) in the wireless network to be connected
It should be noted that, the service set identifier of the wireless network may be understood as a network name of the wireless network searched by the first electronic device. It will be appreciated that the network name of the wireless network may be freely edited by the user, which may cause different wireless networks to have the same network name, so that if the identification information for the wireless network only includes the service set identification, the server may not accurately obtain the wireless network password of the wireless network to be connected, which is determined in practice. For example, as shown in the following table:
ID Service set identification Wireless network password
1 Alink 11223344
2 Alink 12345678
3 Blink 012345567
As shown in the above table, three pieces of data are included in the above table, wherein in the data corresponding to the IDs 1 and 2, although the corresponding wireless network passwords are "11223344" and "12345678", respectively, the service set identifiers corresponding to the data corresponding to the IDs 1 and 2 are "Alink". In this case, if the identification information of the wireless network to be accessed carried in the request information triggered by the first electronic device is an link, the last acquired wireless network password is simultaneously wrapped with "11223344" and "12345678", which is further unfavorable for quickly identifying which wireless network password is the actually required wireless network password.
In this embodiment, when the basic service set identifier is introduced into the identifier information of the wireless network, the service set identifier and the basic service set identifier can be used together as the query condition of the access information, so that the wireless network password actually required can be obtained quickly.
Exemplary, as shown in the following table:
ID service set identification Basic service set identification Wireless network password
1 Alink MAC1 11223344
2 Alink MAC2 12345678
3 Blink MAC3 012345567
In the data shown in the table above, each wireless network password corresponds to the service set identifier and the basic service set identifier at the same time in each piece of data, and in this case, even if the service set identifiers are the same, the wireless network passwords of the wireless network to be connected can be obtained quickly by distinguishing the basic service set identifiers. For example, if the identification information of the wireless network to be connected includes the service set identification Alink and the basic service set identification MAC1, the corresponding wireless network password "11223344" may be directly obtained.
It should be noted that, the wireless network passwords corresponding to each access point in the wireless network are the same, so as a way, the server uses the service set identifier and the basic service set identifier together as query conditions to query the wireless network passwords. Optionally, the server may combine each basic service set identifier with the service set identifier to form a query condition, so as to obtain a plurality of query conditions, and then query access authentication information based on the plurality of query conditions, so as to improve the efficiency of wireless network password query. And, can be based on the multithread way, inquire about a plurality of inquiry conditions at the same time, in order to further promote the inquiry rate. For example, if the service set identifier is a wireless network a and the basic service set identifier includes MAC1, MAC2, and MAC3, in this case, the server may use the wireless network a and MAC1 as a query condition, use the wireless network a and MAC2 as a query condition, and use the wireless network a and MAC3 as a query condition.
After the server inquires the wireless network password, the server can search the corresponding key based on the user identifier uploaded by the second electronic device, encrypt the wireless network password based on the searched key to obtain an encrypted wireless network password (which can be understood as the encrypted data in the foregoing embodiment), and return the encrypted wireless network password to the second electronic device.
S760: the second electronic device converts the shared code.
After receiving the encrypted wireless network password returned by the server, the second electronic device correspondingly executes the step of converting the shared code, and further generates a two-dimensional code carrying the encrypted wireless network password as shown in fig. 16. Optionally, after the second electronic device obtains the encrypted wireless network password returned by the server, the second electronic device generates a json format character string based on the encrypted wireless network password, and then converts the character string into the two-dimensional code. Alternatively, the converted json format character string may be:
wherein Ssid is a service set identifier, and the Password is an encrypted wireless network Password. It should be noted that "yyyyyyyyyyyyzzzzzzzzzzzz" and "zzzzzzzzzz" are merely exemplary representations and do not characterize the actual content.
S770: the first electronic device scans the code.
After the second electronic device displays the two-dimensional code shown in fig. 16, the first electronic device may start the camera to parse the encrypted wireless network password from the two-dimensional code shown in fig. 16 in a code scanning manner. And, when the first electronic device scans the interface shown in fig. 16, two black stripes shown in fig. 17 are displayed to prompt the user to be in the code scanning state currently.
S780: the first electronic device decrypts.
After the first electronic device obtains the encrypted wireless network password, the first electronic device can perform decryption operation through a local key, and further obtain the decrypted wireless network password.
S790: the first electronic device is connected to a wireless network.
After the first electronic device obtains the wireless network password of the wireless network to be connected (for example, wireless network a), the connection process with the wireless network to be connected can be automatically triggered, and when the successful connection with the wireless network to be connected is detected, the interface of successful connection shown in fig. 18 can be displayed.
According to the network connection method provided by the embodiment, the first electronic device responds to the wireless network connection request to trigger the identification information request information carrying the wireless network to be connected, so that the second electronic device can acquire the access verification information of the wireless network to be connected from the server based on the identification information in the request information, and then the first electronic device acquires the access verification information from the second electronic device. Therefore, when the first electronic equipment cannot communicate with the server storing the access verification information, the second electronic equipment capable of communicating with the server can replace the first electronic equipment to acquire the access verification information in the server by generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic equipment can directly acquire the access verification information of the wireless network to be connected from the second electronic equipment, and further, the first electronic equipment can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic equipment cannot communicate with the server storing the access verification information.
Referring to fig. 19, fig. 19 is a block diagram illustrating a network connection device 800 according to an embodiment of the present application, where the network connection device 800 includes: a request triggering unit 810, an access information acquisition unit 820, and a network connection unit 830.
The request triggering unit 810 is configured to trigger request information in response to a wireless network connection request, where the request information carries identification information of a wireless network to be connected.
Optionally, the identification information of the wireless network to be connected includes a service set identification of the wireless network to be connected and a basic service set identification of at least one access point in the wireless network to be connected.
And an access information obtaining unit 820, configured to obtain, from the second electronic device, access authentication information of the wireless network to be connected, where the access authentication information is obtained by the second electronic device from a server based on the identification information in the request information.
A network connection unit 830, configured to connect the wireless network to be connected based on the access authentication information.
As one approach, the request information is a scannable image. In this manner, the request triggering unit 810 is specifically configured to generate and display the scannable image in response to a wireless network connection request. Alternatively, the request triggering unit 810 is further specifically configured to generate and display the scannable image in response to the wireless network connection request when in the scannable image request mode, and specifically configured to generate and transmit wireless broadcast data carrying the identification information in response to the wireless network connection request when in the wireless request mode.
As one way, the access information obtaining unit 820 is specifically configured to scan the scannable image displayed by the second electronic device, and parse the access verification information of the wireless network to be connected from the scannable image displayed by the second electronic device.
As a way, the request triggering unit 810 is further configured to display the searched wireless networks and a request control corresponding to each of the searched wireless networks; and responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine the wireless network to be connected. In this manner, the request triggering unit 810 is specifically configured to display, when communication with the server is disabled, the searched wireless networks and a request control corresponding to each of the searched wireless networks.
Optionally, the request triggering unit 810 is specifically configured to trigger the request information by the first electronic device in response to the wireless network connection request when detecting that the key is stored locally. Wherein, as a way, the request information carries identification information of the wireless network to be connected and a user identification, in this case, the access information obtaining unit 820 is specifically configured to obtain encrypted data from the second electronic device, where the encrypted data is obtained by encrypting, by the server, access authentication information of the wireless network to be connected based on the key after the server finds the key based on the user identification; and decrypting the encrypted data based on the key to obtain access verification information of the wireless network to be connected.
As shown in fig. 20, the illustrated apparatus 800 further includes:
a key management unit 840, configured to send a key update request carrying the user identifier to the server when the first electronic device detects that the first electronic device can communicate with the server; and carrying out key updating locally based on the return information of the server to the key updating request.
Referring to fig. 21, fig. 21 is a block diagram illustrating a network connection device 900 according to an embodiment of the present application, where the network connection device 900 includes: a request information acquisition unit 910, a request information identification unit 920, an access information search unit 930, and an information return unit 940.
Wherein the request information obtaining unit 910 is configured to obtain request information, where the request information is triggered by the first electronic device in response to the wireless network connection request, and the request information carries identification information of a wireless network to be connected,
a request information identifying unit 920 for acquiring the identification information from the request information;
an access information searching unit 930, configured to search in a server based on the identification information, to obtain access verification information corresponding to the identification information;
and an information return unit 940, configured to trigger a return message carrying the access authentication information, so that the first electronic device connects to the wireless network to be connected based on the access authentication information.
According to the network connection device, the first electronic equipment responds to the wireless network connection request to trigger the identification information request information carrying the wireless network to be connected, so that the second electronic equipment can acquire the access verification information of the wireless network to be connected from the server based on the identification information in the request information, and then the first electronic equipment acquires the access verification information from the second electronic equipment. Therefore, when the first electronic equipment cannot communicate with the server storing the access verification information, the second electronic equipment capable of communicating with the server can replace the first electronic equipment to acquire the access verification information in the server by generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic equipment can directly acquire the access verification information of the wireless network to be connected from the second electronic equipment, and further, the first electronic equipment can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic equipment cannot communicate with the server storing the access verification information.
It should be noted that, in the present application, the device embodiment and the foregoing method embodiment correspond to each other, and specific principles in the device embodiment may refer to the content in the foregoing method embodiment, which is not described herein again.
An electronic device provided in the present application will be described with reference to fig. 22.
Referring to fig. 22, based on the above network connection method, another electronic device 200 including a processor 102 that can execute the above network connection method is further provided in the embodiments of the present application, where the electronic device 200 may be a smart phone, a tablet computer, a computer, or a portable computer. The electronic device 200 also includes a memory 104, a network module 106, a screen 108, and a camera 109. The memory 104 stores therein a program capable of executing the contents of the foregoing embodiments, and the processor 102 can execute the program stored in the memory 104.
Processor 102 may include one or more cores for processing data and a message matrix unit, among other things. The processor 102 utilizes various interfaces and lines to connect various portions of the overall electronic device 200, perform various functions of the electronic device 200, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 104, and invoking data stored in the memory 104. Alternatively, the processor 102 may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 102 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for being responsible for rendering and drawing of display content; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 102 and may be implemented solely by a single communication chip.
The Memory 104 may include random access Memory (Random Access Memory, RAM) or Read-Only Memory (RAM). Memory 104 may be used to store instructions, programs, code sets, or instruction sets. The memory 104 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (e.g., a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described below, etc. The storage data area may also store data created by the terminal 100 in use (such as phonebook, audio-video data, chat-record data), etc.
The network module 106 is configured to receive and transmit electromagnetic waves, and implement mutual conversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices, for example, the network module 106 may transmit broadcast data, or may analyze broadcast data transmitted by other devices. The network module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The network module 106 may communicate with various networks such as the Internet, intranets, wireless networks, or other devices via wireless networks. The wireless network may include a cellular telephone network, a wireless local area network, or a metropolitan area network. For example, the network module 106 may interact with base stations.
The screen 108 may display interface content, for example, scannable images carrying identification information of the wireless network to be connected and a user identification.
The camera 109 may acquire scannable images displayed by other devices for identification of the scannable images.
It should be noted that, to implement more functions, the electronic device 200 may also protect more devices, for example, may also protect a structured light sensor for performing face information collection or may also protect a camera for collecting iris, etc.
Referring to fig. 23, a block diagram of a computer readable storage medium according to an embodiment of the present application is shown. The computer readable medium 1100 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments above.
The computer readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, computer readable storage medium 1100 includes non-volatile computer readable medium (non-transitory computer-readable storage medium). The computer readable storage medium 1100 has storage space for program code 810 that performs any of the method steps described above. The program code can be read from or written to one or more computer program products. Program code 1110 may be compressed, for example, in a suitable form.
In summary, according to the network connection method, the device, the electronic equipment and the storage medium provided by the application, the first electronic equipment responds to the wireless network connection request to trigger the identification information request information carrying the wireless network to be connected, so that the second electronic equipment can acquire the access verification information of the wireless network to be connected from the server based on the identification information in the request information, and then the first electronic equipment acquires the access verification information from the second electronic equipment. Therefore, when the first electronic equipment cannot communicate with the server storing the access verification information, the second electronic equipment capable of communicating with the server can replace the first electronic equipment to acquire the access verification information in the server by generating the request information carrying the identification information of the wireless network to be connected, so that the first electronic equipment can directly acquire the access verification information of the wireless network to be connected from the second electronic equipment, and further, the first electronic equipment can still acquire the access verification information to be connected to the wireless network to be connected under the condition that the first electronic equipment cannot communicate with the server storing the access verification information.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and are not limiting thereof; although the present application has been described in detail with reference to the foregoing embodiments, one of ordinary skill in the art will appreciate that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not drive the essence of the corresponding technical solutions to depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (11)

1. A method of network connection, the method comprising:
the method comprises the steps that first electronic equipment displays searched wireless networks and request controls corresponding to each searched wireless network;
responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine a wireless network to be connected;
when detecting that a secret key is stored locally, responding to the wireless network connection request to trigger and display request information, wherein the request information carries identification information and user identification of the wireless network to be connected, and the request information comprises a scannable image;
scanning a scannable image displayed by the second electronic device, and resolving encrypted data from the scannable image displayed by the second electronic device, wherein the encrypted data is obtained by encrypting access verification information of the wireless network to be connected based on the key after the server finds the key based on the user identifier, the user identifier and the key are distributed to the first electronic device by the server, and the user identifier has uniqueness;
Decrypting the encrypted data based on the key to obtain access verification information of the wireless network to be connected;
and connecting the wireless network to be connected based on the access verification information.
2. The method of claim 1, wherein generating and displaying the scannable image in response to a wireless network connection request comprises:
generating and displaying a scannable image in response to a wireless network connection request when in a scannable image request mode;
the method further comprises the steps of:
and when the wireless request mode is adopted, wireless broadcast data carrying the identification information is generated and transmitted in response to the wireless network connection request.
3. The method of claim 1, wherein the scanning the scannable image displayed by the second electronic device and parsing access authentication information for the wireless network to be connected from the scannable image displayed by the second electronic device comprises:
and when the touch operation on the scanning control is detected, scanning a scannable image displayed by the second electronic equipment, and analyzing the access verification information of the wireless network to be connected from the scannable image displayed by the second electronic equipment.
4. A method according to any of claims 1-3, characterized in that the identification information of the wireless network to be connected comprises a service set identification of the wireless network to be connected and a basic service set identification of at least one access point in the wireless network to be connected.
5. A method according to any of claims 1-3, wherein the first electronic device displaying the searched wireless networks and the corresponding request controls for each of the searched wireless networks comprises:
and when the first electronic equipment cannot communicate with the server, the first electronic equipment displays the searched wireless networks and the request control corresponding to each searched wireless network.
6. The method according to claim 1, wherein the method further comprises:
when the first electronic equipment detects that the first electronic equipment can communicate with the server, a key update request carrying the user identifier is sent to the server;
and carrying out key updating locally based on the return information of the server to the key updating request.
7. A method of network connection, the method comprising:
the method comprises the steps that a second electronic device obtains request information, the request information is triggered by a first electronic device in response to a wireless network connection request, the request information carries identification information of a wireless network to be connected, the wireless network connection request is generated by displaying searched wireless networks, request controls corresponding to each searched wireless network on the first electronic device and responding to touch operation acting on the request controls when a secret key is detected to be locally stored, and the request information comprises a scannable image;
Acquiring the identification information from the request information;
searching a key in a server based on a user identifier, searching access verification information corresponding to the identifier information in the server based on the identifier information, encrypting the searched access verification information by using the key to obtain encrypted data, wherein the user identifier and the key are distributed to the first electronic equipment by the server, and the user identifier has uniqueness;
and receiving the encrypted data returned by the server, generating and displaying a scannable image comprising the encrypted data so that the first electronic equipment scans the scannable image to analyze the encrypted data, performing access decryption on the encrypted data based on the secret key to obtain access verification information of the network to be connected, and connecting the wireless network to be connected based on the access verification information.
8. A network connection device, the device comprising:
the request triggering unit is used for displaying the searched wireless networks and request controls corresponding to each searched wireless network; responding to the touch operation acted on the request control to generate a wireless network connection request so as to determine a wireless network to be connected; when detecting that a secret key is stored locally, responding to the wireless network connection request to trigger and display request information, wherein the request information carries identification information of a wireless network to be connected, and the request information comprises a scannable image;
An access information obtaining unit, configured to scan a scannable image displayed by the second electronic device, and parse encrypted data from the scannable image displayed by the second electronic device, where the encrypted data is obtained by encrypting access authentication information of the wireless network to be connected based on the key after the server finds the key based on the user identifier, the user identifier and the key are distributed to the first electronic device by the server, and the user identifier has uniqueness; the access information acquisition unit is further used for decrypting the encrypted data based on the secret key to obtain access verification information of the wireless network to be connected;
and the network connection unit is used for connecting the wireless network to be connected based on the access verification information.
9. A network connection device, the device comprising:
the system comprises a request information acquisition unit, a request information generation unit and a control unit, wherein the request information is triggered by a first electronic device in response to a wireless network connection request, the request information carries identification information of a wireless network to be connected, the wireless network connection request is generated by responding to touch operation acting on the request control when the first electronic device displays searched wireless networks, request controls corresponding to each searched wireless network and a local storage key is detected;
A request information identification unit, configured to obtain the identification information from the request information;
the access information searching unit is used for searching a key in a server based on a user identifier and searching access verification information corresponding to the identifier information in the server based on the identifier information, encrypting the searched access verification information by using the key to obtain encrypted data, wherein the user identifier and the key are distributed to the first electronic equipment for the server, and the user identifier has uniqueness;
the information return unit is used for receiving the encrypted data returned by the server, generating and displaying a scannable image comprising the encrypted data so that the first electronic equipment scans the scannable image to analyze the encrypted data, and carrying out access decryption on the encrypted data based on the secret key to obtain access verification information of the network to be connected, wherein the access verification information is connected with the wireless network to be connected.
10. An electronic device comprising a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the methods of any of claims 1-6 or to implement the method of claim 7.
11. A computer readable storage medium, characterized in that a program code is stored in the computer readable storage medium, wherein the program code, when being executed by a processor, performs the method of any of claims 1-6 or performs the method of claim 7.
CN202010292109.2A 2020-04-14 2020-04-14 Network connection method, device, electronic equipment and storage medium Active CN111511043B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010292109.2A CN111511043B (en) 2020-04-14 2020-04-14 Network connection method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010292109.2A CN111511043B (en) 2020-04-14 2020-04-14 Network connection method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111511043A CN111511043A (en) 2020-08-07
CN111511043B true CN111511043B (en) 2023-07-18

Family

ID=71877556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010292109.2A Active CN111511043B (en) 2020-04-14 2020-04-14 Network connection method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111511043B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112039734A (en) * 2020-08-14 2020-12-04 深圳市欧瑞博科技股份有限公司 Equipment data configuration method and device, intelligent equipment and storage medium
CN114189861B (en) * 2021-11-24 2023-10-20 阿里巴巴(中国)有限公司 Wireless network connection method, device and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131834A (en) * 2016-06-30 2016-11-16 宇龙计算机通信科技(深圳)有限公司 Method for connecting network, network connection device and terminal
CN109548018A (en) * 2019-01-11 2019-03-29 腾讯科技(深圳)有限公司 Wireless network access method, device, equipment and system
CN110430557A (en) * 2019-06-21 2019-11-08 深圳绿米联创科技有限公司 Method, apparatus, system, electronic equipment and the storage medium that equipment networks

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135753B (en) * 2014-06-11 2016-01-20 腾讯科技(深圳)有限公司 A kind of wireless network access method, device, terminal and server
CN109246797A (en) * 2017-06-07 2019-01-18 阿里巴巴集团控股有限公司 A kind of method, apparatus, system and equipment connecting wireless network
CN109151822A (en) * 2018-08-31 2019-01-04 珠海格力电器股份有限公司 Wireless network connecting method and device, storage medium, electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106131834A (en) * 2016-06-30 2016-11-16 宇龙计算机通信科技(深圳)有限公司 Method for connecting network, network connection device and terminal
CN109548018A (en) * 2019-01-11 2019-03-29 腾讯科技(深圳)有限公司 Wireless network access method, device, equipment and system
CN110430557A (en) * 2019-06-21 2019-11-08 深圳绿米联创科技有限公司 Method, apparatus, system, electronic equipment and the storage medium that equipment networks

Also Published As

Publication number Publication date
CN111511043A (en) 2020-08-07

Similar Documents

Publication Publication Date Title
CN105933904B (en) Network connection method and device
US11323430B2 (en) Identity verification method and device and electronic device
CN106879047B (en) Method for near-field information transfer, information transmission and receiving client and information system
CN103647587B (en) Method, system, mobile terminal and the wearing electronic equipment unlocked for mobile terminal
US10212217B2 (en) Method and apparatus for data transmission in a distributed storage system
US8792825B2 (en) Terminal apparatus and communication method, information processing apparatus and method, non-transitory storing medium storing program, and information processing system
US11778458B2 (en) Network access authentication method and device
WO2019042389A1 (en) Method and system for smart home network configuration and connection
JP5978517B2 (en) Method and associated device for accessing an access point
CN115134881B (en) Wi-Fi hotspot connection method and terminal
CN104137618A (en) Shared network access via a peer-to-peer link
CN113055867A (en) Method and device for auxiliary network distribution of terminal and electronic equipment
JP2009135688A (en) Authentication method, authentication system, and on-vehicle device
CN111511043B (en) Network connection method, device, electronic equipment and storage medium
US10750369B2 (en) Method, apparatus, and platform for sharing wireless local area network
CN113099440A (en) Network configuration method, device, equipment and system
US8856876B2 (en) Apparatus and method for identifying wireless network provider in wireless communication system
CN114270781A (en) Device access method, device, system control method, electronic device and storage medium
CN113691609B (en) Data acquisition method and device, electronic equipment and storage medium
CN113691610B (en) Data acquisition method and device, electronic equipment and storage medium
CN113301563A (en) Network configuration method, device, equipment and storage medium
CN114697879A (en) Bluetooth pairing method, electronic device, chip and storage medium
US20180027486A1 (en) Method for switching from a first to a second mobile network operator and corresponding device
US9698983B2 (en) Method and apparatus for disabling algorithms in a device
CN114338132A (en) Secret-free login method, client application, operator server and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40027327

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant