CN109451498B - Network authentication method and related product - Google Patents
Network authentication method and related product Download PDFInfo
- Publication number
- CN109451498B CN109451498B CN201811473341.5A CN201811473341A CN109451498B CN 109451498 B CN109451498 B CN 109451498B CN 201811473341 A CN201811473341 A CN 201811473341A CN 109451498 B CN109451498 B CN 109451498B
- Authority
- CN
- China
- Prior art keywords
- wireless network
- wireless
- verification code
- authentication
- target
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
- H04L63/0838—Network architectures or network communication protocols for network security for authentication of entities using passwords using one-time-passwords
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The application discloses a network authentication method and a related product, which are applied to electronic equipment, wherein the method comprises the following steps: acquiring a first wireless network and a second wireless network, wherein the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server; receiving an authentication code for the first wireless network; inputting the verification code, sending the verification code to the target authentication server, and carrying out Portal authentication on the first wireless network and the second wireless network by the target authentication server according to the verification code; and when the authentication result of the Portal authentication is that the first wireless network and the second wireless network are authenticated, accessing the first wireless network and the second wireless network. The Portal authentication efficiency is improved.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a network authentication method and a related product.
Background
With the development of mobile communication technology, users have an increasing demand for data communication, and currently, when network authentication is performed on electronic devices (such as mobile phones and tablet computers) on the market, data is generally transmitted through cellular mobile network communication or Wi-Fi communication and other modes. In general, a Wi-Fi network requires Portal authentication, and a problem of how to improve the efficiency of Portal authentication needs to be solved urgently.
Disclosure of Invention
The embodiment of the application provides a network authentication method and a related product, which can improve Portal authentication efficiency.
In a first aspect, an embodiment of the present application provides a network authentication method, which is applied to an electronic device, and the method includes:
acquiring a first wireless network and a second wireless network, wherein the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server;
receiving an authentication code for the first wireless network;
inputting the verification code, sending the verification code to the target authentication server, and carrying out Portal authentication on the first wireless network and the second wireless network by the target authentication server according to the verification code;
and when the authentication result of the Portal authentication is that the first wireless network and the second wireless network are authenticated, accessing the first wireless network and the second wireless network.
In a second aspect, an embodiment of the present application provides a network authentication apparatus applied to an electronic device, the network authentication apparatus including an obtaining unit, a receiving unit, an authentication unit, and an access unit, wherein,
the acquisition unit is used for acquiring a first wireless network and a second wireless network, the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and the first wireless network and the second wireless network both correspond to a target authentication server;
the receiving unit is used for receiving an authentication code aiming at the first wireless network;
the authentication unit is used for inputting the verification code, sending the verification code to the target authentication server, and performing Portal authentication on the first wireless network and the second wireless network by the target authentication server according to the verification code;
the access unit is used for accessing the first wireless network and the second wireless network when the authentication result of the Portal authentication is that the first wireless network and the second wireless network are authenticated.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program enables a computer to perform some or all of the steps described in the first aspect of the embodiment of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that the network authentication method and related products described in the embodiments of the present application are applied to an electronic device, and acquire a first wireless network and a second wireless network, where the first wireless network and the second wireless network belong to a same subnet and both require Portal authentication, the first wireless network and the second wireless network both correspond to a target authentication server, receive a verification code for the first wireless network, input the verification code, and sends the verification code to the target authentication server, the target authentication server performs Portal authentication on the first wireless network and the second wireless network according to the verification code, when the authentication result of Portal authentication is that the first wireless network and the second wireless network are authenticated, access to the first wireless network and the second wireless network, such that, by means of an authentication code, the first wireless network and the second wireless network are accessed, and Portal authentication efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a diagram of an example system architecture of a wireless communication system in which an electronic device according to an embodiment of the present application is located;
fig. 1B is a schematic flowchart of a network authentication method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another network authentication method provided in an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a block diagram illustrating functional units of a network authentication device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
The electronic device according to the embodiment of the present application may be an electronic device with network authentication capability, and the electronic device may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices or other processing devices connected to a wireless modem, and various forms of User Equipment (UE), Mobile Stations (MS), terminal devices (terminal device), and the like.
The following describes embodiments of the present application in detail.
As shown in fig. 1A, an electronic device 101 according to the present application may be connected to a mobile data network 103, where the mobile data network is a communication network for transmitting data services; Wi-Fi 102, a technology that allows an electronic device to connect to a wireless local area network; the 2.4G UHF or 5G SHF ISM radio frequency bands are typically used; and bluetooth 104, a wireless technology standard, that enables short-range data exchange between fixed devices, mobile devices, and building personal area networks, among others.
Referring to fig. 1B, fig. 1B is a schematic flowchart illustrating a network authentication method according to an embodiment of the present application, and is applied to an electronic device; as shown in the figure, the network authentication method includes:
101. the method comprises the steps of obtaining a first wireless network and a second wireless network, wherein the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server.
In the embodiment of the present application, Wireless-Fidelity (Wi-Fi), which may also be referred to as Wi-Fi, is a Wireless connection mode. The electronic device may include a Wi-Fi module (also referred to as a Wi-Fi communication module) to enable the electronic device to have Wi-Fi functionality. The electronic device may search for a Wi-Fi hotspot and connect to the wireless network through the Wi-Fi hotspot. The Wi-Fi data link is a data connection path established between the electronic device and the wireless network and connected through the Wi-Fi communication module interface. When the electronic equipment is used for surfing the Internet through the Wi-Fi hotspot, the electronic equipment can surf the Internet without the network of operators such as mobile, Unicom, telecom and the like, so that the traffic fee can be saved.
In the embodiment of the present application, both the first wireless network and the second wireless network may be Wi-Fi networks, the first wireless network and the second wireless network may belong to the same subnet, both the first wireless network and the second wireless network need Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server, that is, the target authentication server may perform Portal authentication on the first wireless network and the second wireless network.
Optionally, the step 101 of acquiring the first wireless network and the second wireless network may include the following steps:
a1, searching wireless networks to obtain a plurality of wireless networks, wherein each wireless network corresponds to one attribute information;
a2, classifying the wireless networks according to the attribute information of the wireless networks to obtain multiple types of wireless networks;
a3, selecting target wireless networks with the number exceeding 2 from the multiple wireless networks;
a4, selecting 2 wireless networks from the target class of wireless networks as the first wireless network and the second wireless network.
In this embodiment, the attribute information may be at least one of the following: whether Portal authentication, Wi-Fi name, SSID, BSSID, IP address of the authentication server, etc. are required, and are not limited herein. The electronic equipment can start the Wi-Fi module, further perform wireless network search to obtain a plurality of wireless networks, further classify the wireless networks according to attribute information of the wireless networks to obtain multiple types of wireless networks, for example, according to the IP address of the authentication server, the wireless networks with the same authentication server can be classified into the same type, and thus, target wireless networks with the number of the wireless networks exceeding 2 can be selected from the multiple types of wireless networks, and 2 wireless networks can be selected from the target wireless networks to serve as the first wireless network and the second wireless network.
Optionally, the step 101 of acquiring the first wireless network and the second wireless network may include the following steps:
b1, searching wireless networks to obtain a plurality of wireless networks, wherein each wireless network corresponds to one attribute information;
b2, selecting one wireless network from the plurality of wireless networks as a first wireless network;
b3, matching the attribute information of the first wireless network with each attribute information of the plurality of wireless networks to obtain target attribute information successfully matched with the attribute information of the first wireless network, and using the wireless network corresponding to the target attribute information as the second wireless network.
In this embodiment, the attribute information may be at least one of the following: whether Portal authentication, Wi-Fi name, SSID, BSSID, IP address of the authentication server, etc. are required, and are not limited herein. The electronic device may start the Wi-Fi module, perform wireless network search to obtain a plurality of wireless networks, and further select one wireless network from the plurality of wireless networks as the first wireless network, specifically, may receive a user selection instruction, and select one wireless network corresponding to the selection instruction from the plurality of wireless networks as the first wireless network, or may select one wireless network with the strongest signal from the plurality of wireless networks as the first wireless network.
Further, the attribute information of the first wireless network is matched with each attribute information of the plurality of wireless networks to obtain target attribute information successfully matched with the attribute information of the first wireless network, for example, taking a Wi-Fi name of the first wireless network as an example, in general, different networks in the same subnet will have similar Wi-Fi names, for example, the Wi-Fi name of the first wireless network is: SANHUAN1, Wi-Fi designation of the second wireless network: SANHUAN2, the matching degree between the attribute information of the two is higher than a preset matching threshold value, and the preset matching threshold value can be set by the user or default by the system. Finally, the wireless network corresponding to the target attribute information may be used as the second wireless network.
102. An authentication code for the first wireless network is received.
The authentication server may broadcast the verification code, and the electronic device may receive the verification code for the first wireless network.
Optionally, the step 102 of receiving the verification code for the first wireless network may include the following steps:
21. logging in a login interface of the first wireless network, and receiving input identification information of the electronic equipment;
22. sending the identification information to the target authentication server, identifying the identification information by the target authentication server, and sending the verification code to the electronic equipment when the identification information is successfully identified;
23. receiving the verification code sent by the target authentication server.
The identification information may be at least one of the following: a telephone number, a mailbox, an instant messaging application account, and the like, without limitation. The electronic device can log in a login interface of the first wireless network, receive the input identification information of the electronic device on the login page, send the identification information to the target authentication server, and the target authentication server identifies the identification information.
103. And inputting the verification code, sending the verification code to the target authentication server, and carrying out Portal authentication on the first wireless network and the second wireless network by the target authentication server according to the verification code.
The electronic equipment can input a verification code on an input interface of Portal authentication, and after the click determination operation is performed, the verification code can be sent to the target authentication server, so that the target authentication server authenticates the first wireless network and the second wireless network according to the verification code.
Specifically, the target authentication server may perform Portal authentication on the first wireless network according to the verification code, and if the authentication fails, send a prompt message to the electronic device to prompt that the Portal authentication of the user fails, otherwise, if the authentication succeeds, perform Portal authentication on the second wireless network according to the verification code, and if the authentication succeeds, prompt that the Portal authentication of the user succeeds. Or, the target authentication server can perform Portal authentication on the first wireless network and the second wireless network simultaneously according to the verification code.
104. And when the authentication result of the Portal authentication is that the first wireless network and the second wireless network are authenticated, accessing the first wireless network and the second wireless network.
When the Portal authentication result indicates that the first wireless network and the second wireless network are authenticated, the electronic equipment can be accessed to the first wireless network and the second wireless network, and therefore a link aggregation function can be implemented.
In the embodiment of the present application, link aggregation is that a device may use two or more network ports to surf the internet at the same time, for example, a Wi-Fi and a data network (data network, which may also be referred to as a mobile data network) may be used to access the network at the same time by link aggregation on a mobile phone, or 2 or more Wi-Fi networks may be used to access the network at the same time. The intelligent Link Aggregation (SLA) function refers to intelligently distributing internet access requests of users to different internet access interfaces (cellular communication module interfaces and Wi-Fi communication module interfaces). Link aggregation requires at least two or more available networks, so the SLA presupposes coexistence of Wi-Fi and data networks.
When the electronic device starts the intelligent link aggregation function, the electronic device may perform step 101.
In this embodiment, the electronic device may send an uplink data packet and may also receive a downlink data packet. The data packet to be transmitted may be an uplink data packet or a downlink data packet. For uplink data packets, the electronic device can allocate the uplink data packets for transmission in the first wireless network uplink and the second wireless network uplink; for the downlink data packet, the electronic device may allocate the downlink data packet to be transmitted in the first wireless network downlink data link and the second wireless network downlink data link.
Optionally, when the authentication result of the Portal authentication is the first wireless network and the authentication of the second wireless network fails, the first wireless network and the second wireless network cannot be accessed.
For example, in a public place, two Wi-Fi devices (Wi-Fi devices in the same subnet) requiring portal authentication are connected, wherein the Wi-Fi device 1 performs manual authentication, and when a verification code is received, the Wi-Fi devices 2 can share the authentication code of the Wi-Fi1, and simultaneously send the authentication code to an authentication server through the Wi-Fi devices 2, so that the Wi-Fi devices do not need manual authentication, the user authentication time is reduced, and the user surfing the internet is accelerated.
Optionally, before the step 101, the following steps may be further included:
c1, acquiring the application identification of the current foreground application;
and C2, when the application identification exists in the preset application identification set, executing the step of acquiring the first wireless network and the second wireless network.
The preset application identifier set may include at least one application identifier, and the preset application identifier set may be set by a user or default by a system. The electronic device may obtain an application identifier of a current foreground application, and execute step 101 when the application identifier of the foreground application exists in a preset application identifier set, otherwise, not execute step 101.
It can be seen that the network authentication method described in the embodiments of the present application is applied to an electronic device, and obtains a first wireless network and a second wireless network, where the first wireless network and the second wireless network belong to a same subnet and both require Portal authentication, the first wireless network and the second wireless network both correspond to a target authentication server, receive a verification code for the first wireless network, input the verification code, and sends the verification code to the target authentication server, the target authentication server performs Portal authentication on the first wireless network and the second wireless network according to the verification code, when the authentication result of Portal authentication is that the first wireless network and the second wireless network are authenticated, access to the first wireless network and the second wireless network, such that, by means of an authentication code, the first wireless network and the second wireless network are accessed, and Portal authentication efficiency is improved.
Referring to fig. 2, fig. 2 is a schematic flow chart of a network authentication method according to an embodiment of the present application, where as shown in the figure, the network authentication method includes:
201. and acquiring the application identifier of the current foreground application.
202. And when the application identifier exists in a preset application identifier set, acquiring a first wireless network and a second wireless network, wherein the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server.
203. An authentication code for the first wireless network is received.
204. And inputting the verification code, sending the verification code to the target authentication server, and carrying out Portal authentication on the first wireless network and the second wireless network by the target authentication server according to the verification code.
205. And when the authentication result of the Portal authentication is that the first wireless network and the second wireless network are authenticated, accessing the first wireless network and the second wireless network.
The specific description of the step 201-205 can refer to the corresponding steps of the network authentication method described in fig. 1B, and will not be described herein again.
It can be seen that the network authentication method described in the embodiments of the present application is applied to an electronic device, obtains an application identifier of a current foreground application, obtains a first wireless network and a second wireless network when the application identifier exists in a preset application identifier set, where the first wireless network and the second wireless network belong to a same subnet and both require Portal authentication, the first wireless network and the second wireless network both correspond to a target authentication server, receives a verification code for the first wireless network, inputs the verification code, and sends the verification code to the target authentication server, the target authentication server performs the Portal authentication on the first wireless network and the second wireless network according to the verification code, and accesses the first wireless network and the second wireless network when the authentication result of the Portal authentication is that both the first wireless network and the second wireless network pass the authentication, so that one verification code can be passed, the first wireless network and the second wireless network are accessed, and Portal authentication efficiency is improved.
Referring to fig. 3 in keeping with the embodiments shown in fig. 1B and fig. 2, fig. 3 is a schematic structural diagram of an electronic device 300 according to an embodiment of the present disclosure, and as shown in the figure, the electronic device 300 includes a processor 310, a memory 320, a communication interface 340, and one or more programs 321, where the one or more programs 321 are stored in the memory 320 and configured to be executed by the processor 310, and the one or more programs 321 include instructions for performing the following steps:
acquiring a first wireless network and a second wireless network, wherein the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server;
receiving an authentication code for the first wireless network;
inputting the verification code, sending the verification code to the target authentication server, and carrying out Portal authentication on the first wireless network and the second wireless network by the target authentication server according to the verification code;
and when the authentication result of the Portal authentication is that the first wireless network and the second wireless network are authenticated, accessing the first wireless network and the second wireless network.
It can be seen that, in the electronic device described in this embodiment of the present application, a first wireless network and a second wireless network are obtained, where the first wireless network and the second wireless network belong to a same subnet and both require Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server, and receive a verification code for the first wireless network, input the verification code, and send the verification code to the target authentication server, and the target authentication server performs Portal authentication on the first wireless network and the second wireless network according to the verification code.
In one possible example, in connection with the acquiring the first wireless network and the second wireless network, the one or more programs 321 include instructions for:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
classifying the wireless networks according to the attribute information of the wireless networks to obtain multi-class wireless networks;
selecting target wireless networks with the number of wireless networks exceeding 2 from the multi-class wireless networks;
and selecting 2 wireless networks from the target class of wireless networks as the first wireless network and the second wireless network.
In one possible example, in connection with the acquiring the first wireless network and the second wireless network, the one or more programs 321 include instructions for:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
selecting one wireless network from the plurality of wireless networks as a first wireless network;
and matching according to the attribute information of the first wireless network and each attribute information in the attribute information of the plurality of wireless networks to obtain target attribute information successfully matched with the attribute information of the first wireless network, and taking the wireless network corresponding to the target attribute information as the second wireless network.
In one possible example, in the receiving the authentication code for the first wireless network, the one or more programs 321 include instructions for:
logging in a login interface of the first wireless network, and receiving input identification information of the electronic equipment;
sending the identification information to the target authentication server, identifying the identification information by the target authentication server, and sending the verification code to the electronic equipment when the identification information is successfully identified;
receiving the verification code sent by the target authentication server.
In one possible example, the one or more programs 321 further include instructions for performing the steps of:
acquiring an application identifier of a current foreground application;
and when the application identifier exists in a preset application identifier set, executing the step of acquiring the first wireless network and the second wireless network.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that the electronic device comprises corresponding hardware structures and/or software modules for performing the respective functions in order to realize the above-mentioned functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the electronic device may be divided into the functional units according to the method example, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 4 is a block diagram of functional units of a network authentication apparatus 400 according to an embodiment of the present application. The network authentication apparatus 400 is applied to an electronic device, and the network authentication apparatus 400 includes an obtaining unit 401, a receiving unit 402, an authentication unit 403, and an access unit 404, wherein,
the acquiring unit 401 is configured to acquire a first wireless network and a second wireless network, where the first wireless network and the second wireless network belong to a same subnet and both require Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server;
the receiving unit 402 is configured to receive an authentication code for the first wireless network;
the authentication unit 403 is configured to input the verification code, send the verification code to the target authentication server, and perform Portal authentication on the first wireless network and the second wireless network by the target authentication server according to the verification code;
the access unit 404 is configured to access the first wireless network and the second wireless network when the authentication result of the Portal authentication indicates that both the first wireless network and the second wireless network pass the authentication.
It can be seen that the network authentication apparatus described in the embodiments of the present application is applied to an electronic device, and obtains a first wireless network and a second wireless network, where the first wireless network and the second wireless network belong to a same subnet and both require Portal authentication, the first wireless network and the second wireless network both correspond to a target authentication server, receive a verification code for the first wireless network, input the verification code, and sends the verification code to the target authentication server, the target authentication server performs Portal authentication on the first wireless network and the second wireless network according to the verification code, when the authentication result of Portal authentication is that the first wireless network and the second wireless network are authenticated, access to the first wireless network and the second wireless network, such that, by means of an authentication code, the first wireless network and the second wireless network are accessed, and Portal authentication efficiency is improved.
In a possible example, in terms of acquiring the first wireless network and the second wireless network, the acquiring unit 401 is specifically configured to:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
classifying the wireless networks according to the attribute information of the wireless networks to obtain multi-class wireless networks;
selecting target wireless networks with the number of wireless networks exceeding 2 from the multi-class wireless networks;
and selecting 2 wireless networks from the target class of wireless networks as the first wireless network and the second wireless network.
In a possible example, in terms of acquiring the first wireless network and the second wireless network, the acquiring unit 401 is specifically configured to:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
selecting one wireless network from the plurality of wireless networks as a first wireless network;
and matching according to the attribute information of the first wireless network and each attribute information in the attribute information of the plurality of wireless networks to obtain target attribute information successfully matched with the attribute information of the first wireless network, and taking the wireless network corresponding to the target attribute information as the second wireless network.
In one possible example, in terms of the receiving the authentication code for the first wireless network, the receiving unit 402 is specifically configured to:
logging in a login interface of the first wireless network, and receiving input identification information of the electronic equipment;
sending the identification information to the target authentication server, identifying the identification information by the target authentication server, and sending the verification code to the electronic equipment when the identification information is successfully identified;
receiving the verification code sent by the target authentication server.
In a possible example, the obtaining unit 401 is further specifically configured to:
acquiring an application identifier of a current foreground application;
and when the application identifier exists in a preset application identifier set, executing the step of acquiring the first wireless network and the second wireless network.
As shown in fig. 5, for convenience of description, only the portions related to the embodiments of the present application are shown, and details of the specific technology are not disclosed, please refer to the method portion of the embodiments of the present application. The electronic device may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, and the like, taking the electronic device as the mobile phone as an example:
fig. 5 is a block diagram illustrating a partial structure of a mobile phone related to an electronic device provided in an embodiment of the present application. Referring to fig. 5, the handset includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, Wireless Fidelity (Wi-Fi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 5 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 5:
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 930 may include a fingerprint recognition module 931 and other input devices 932. Fingerprint identification module 931, can gather the fingerprint data of user above it. The input unit 930 may include other input devices 932 in addition to the fingerprint recognition module 931. In particular, other input devices 932 may include, but are not limited to, one or more of a touch screen, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 940 may include a Display screen 941, and optionally, the Display screen 941 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The handset may also include at least one sensor 950, such as a light sensor, motion sensor, pressure sensor, temperature sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor (also referred to as a light sensor) that can adjust the backlight brightness of the mobile phone according to the brightness of ambient light, and thus adjust the brightness of the display screen 941, and a proximity sensor that can turn off the display screen 941 and/or the backlight when the mobile phone is moved to the ear. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of a mobile phone; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Wi-Fi belongs to short-distance wireless transmission technology, and a mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through a Wi-Fi module 970, and provides wireless broadband internet access for the user. Although fig. 5 shows the Wi-Fi module 970, it is understood that it does not belong to the essential constitution of the cellular phone and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. Alternatively, processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
The handset also includes a power supply 990 (e.g., a battery) for supplying power to the various components, which may preferably be logically connected to the processor 980 via a power management system, thereby providing management of charging, discharging, and power consumption via the power management system.
The mobile phone may further include a camera 9100, and the camera 9100 is used for shooting images and videos and transmitting the shot images and videos to the processor 980 for processing.
The mobile phone can also be provided with a Bluetooth module and the like, which are not described herein again.
In the embodiments shown in fig. 1B and fig. 2, the method flows of the steps may be implemented based on the structure of the mobile phone.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (9)
1. A network authentication method is applied to an electronic device, and the method comprises the following steps:
acquiring a first wireless network and a second wireless network, wherein the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and both the first wireless network and the second wireless network correspond to a target authentication server;
receiving a verification code for the first wireless network, the verification code being broadcast by the target authentication server;
inputting the verification code, and sending the verification code to the target authentication server, specifically: manually inputting the verification code, wherein the verification code is shared by the second wireless network, the verification code is sent to the target authentication server through the second wireless network, and the target authentication server performs Portal authentication on the first wireless network and the second wireless network according to the verification code;
when the authentication result of Portal authentication is that the first wireless network and the second wireless network are authenticated, accessing the first wireless network and the second wireless network;
wherein the method further comprises:
acquiring an application identifier of a current foreground application;
and when the application identifier exists in a preset application identifier set, executing the step of acquiring the first wireless network and the second wireless network.
2. The method of claim 1, wherein obtaining the first wireless network and the second wireless network comprises:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
classifying the wireless networks according to the attribute information of the wireless networks to obtain multi-class wireless networks;
selecting target wireless networks with the number of wireless networks exceeding 2 from the multi-class wireless networks;
and selecting 2 wireless networks from the target class of wireless networks as the first wireless network and the second wireless network.
3. The method of claim 1, wherein obtaining the first wireless network and the second wireless network comprises:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
selecting one wireless network from the plurality of wireless networks as a first wireless network;
and matching according to the attribute information of the first wireless network and each attribute information in the attribute information of the plurality of wireless networks to obtain target attribute information successfully matched with the attribute information of the first wireless network, and taking the wireless network corresponding to the target attribute information as the second wireless network.
4. The method of any of claims 1-3, wherein receiving the authentication code for the first wireless network comprises:
logging in a login interface of the first wireless network, and receiving input identification information of the electronic equipment;
sending the identification information to the target authentication server, identifying the identification information by the target authentication server, and sending the verification code to the electronic equipment when the identification information is successfully identified;
receiving the verification code sent by the target authentication server.
5. A network authentication device is applied to electronic equipment and comprises an acquisition unit, a receiving unit, an authentication unit and an access unit,
the acquisition unit is used for acquiring a first wireless network and a second wireless network, the first wireless network and the second wireless network belong to the same subnet and both need Portal authentication, and the first wireless network and the second wireless network both correspond to a target authentication server;
the receiving unit is used for receiving a verification code aiming at the first wireless network, and the verification code is broadcasted by the target authentication server;
the authentication unit is configured to input the verification code and send the verification code to the target authentication server, and specifically includes: manually inputting the verification code, wherein the verification code is shared by the second wireless network, the verification code is sent to the target authentication server through the second wireless network, and the target authentication server performs Portal authentication on the first wireless network and the second wireless network according to the verification code;
the access unit is used for accessing the first wireless network and the second wireless network when the authentication result of the Portal authentication is that the first wireless network and the second wireless network are authenticated;
wherein the apparatus is further specifically configured to:
acquiring an application identifier of a current foreground application;
and when the application identifier exists in a preset application identifier set, executing the step of acquiring the first wireless network and the second wireless network.
6. The apparatus of claim 5, wherein, in acquiring the first wireless network and the second wireless network, the acquiring unit is specifically configured to:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
classifying the wireless networks according to the attribute information of the wireless networks to obtain multi-class wireless networks;
selecting target wireless networks with the number of wireless networks exceeding 2 from the multi-class wireless networks;
and selecting 2 wireless networks from the target class of wireless networks as the first wireless network and the second wireless network.
7. The apparatus of claim 5, wherein, in acquiring the first wireless network and the second wireless network, the acquiring unit is specifically configured to:
wireless network searching is carried out to obtain a plurality of wireless networks, and each wireless network corresponds to one attribute information;
selecting one wireless network from the plurality of wireless networks as a first wireless network;
and matching according to the attribute information of the first wireless network and each attribute information in the attribute information of the plurality of wireless networks to obtain target attribute information successfully matched with the attribute information of the first wireless network, and taking the wireless network corresponding to the target attribute information as the second wireless network.
8. An electronic device comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-4.
9. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811473341.5A CN109451498B (en) | 2018-12-04 | 2018-12-04 | Network authentication method and related product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811473341.5A CN109451498B (en) | 2018-12-04 | 2018-12-04 | Network authentication method and related product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109451498A CN109451498A (en) | 2019-03-08 |
CN109451498B true CN109451498B (en) | 2021-04-16 |
Family
ID=65555251
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811473341.5A Active CN109451498B (en) | 2018-12-04 | 2018-12-04 | Network authentication method and related product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109451498B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103634794A (en) * | 2013-10-30 | 2014-03-12 | 邦讯技术股份有限公司 | WLAN (Wireless Local Area Network) terminal identification recognition method by integrating Portal |
CN104320781A (en) * | 2014-11-27 | 2015-01-28 | 上海斐讯数据通信技术有限公司 | Verifying method and system for mobile terminal |
CN104581892A (en) * | 2014-12-05 | 2015-04-29 | 华为技术有限公司 | A terminal data transmission method and device |
CN104980988A (en) * | 2014-04-03 | 2015-10-14 | 上海宽带技术及应用工程研究中心 | Multi-link aggregation wireless communication system and method |
CN106954214A (en) * | 2017-03-31 | 2017-07-14 | 联想(北京)有限公司 | Electronic equipment and its control method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4475377B2 (en) * | 2002-12-27 | 2010-06-09 | 日本電気株式会社 | Wireless communication system, common key management server, and wireless terminal device |
-
2018
- 2018-12-04 CN CN201811473341.5A patent/CN109451498B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103634794A (en) * | 2013-10-30 | 2014-03-12 | 邦讯技术股份有限公司 | WLAN (Wireless Local Area Network) terminal identification recognition method by integrating Portal |
CN104980988A (en) * | 2014-04-03 | 2015-10-14 | 上海宽带技术及应用工程研究中心 | Multi-link aggregation wireless communication system and method |
CN104320781A (en) * | 2014-11-27 | 2015-01-28 | 上海斐讯数据通信技术有限公司 | Verifying method and system for mobile terminal |
CN104581892A (en) * | 2014-12-05 | 2015-04-29 | 华为技术有限公司 | A terminal data transmission method and device |
CN106954214A (en) * | 2017-03-31 | 2017-07-14 | 联想(北京)有限公司 | Electronic equipment and its control method |
Also Published As
Publication number | Publication date |
---|---|
CN109451498A (en) | 2019-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110167201B (en) | Data transmission method, related device and system | |
CN109803318B (en) | Data packet distribution method and device, mobile terminal and storage medium | |
CN107708168B (en) | SIM card switching method, mobile terminal and computer-readable storage medium | |
CN110311704B (en) | Antenna switching method and related product | |
KR102060373B1 (en) | Method and apparatus for connecting short-distance wireless communication in terminal | |
CN109151796B (en) | NAN device finding method, related device, and computer-readable storage medium | |
CN110224719B (en) | Communication control method and related products | |
CN109618316B (en) | Network sharing method, mobile terminal and storage medium | |
CN110209245B (en) | Face recognition method and related product | |
CN110062405B (en) | Solution for WiFi channel interference and related product | |
CN109195143B (en) | Network access method, mobile terminal and readable storage medium | |
CN109922504B (en) | Data triage method and related products | |
CN109922539B (en) | Network connection method and related product | |
CN106569910B (en) | Data backup and transmission method and mobile terminal | |
JP2020512734A (en) | Communication method and communication device | |
CN108877733B (en) | Color temperature adjustment method and related device | |
CN108271142A (en) | Wireless fidelity Wi-Fi scanning method and related products | |
CN106413032B (en) | Hotspot establishing method and terminal equipment | |
CN105933204A (en) | Method and device for enabling first equipment to transmit synchronization message to second equipment | |
CN104333643A (en) | Method and system for adding contacts, and terminal | |
CN106961710B (en) | A kind of network access method and terminal | |
CN108541046B (en) | Network selection method, terminal and storage medium | |
CN108012270B (en) | Information processing method, equipment and computer readable storage medium | |
CN106507447A (en) | A Wi-Fi hotspot connection method and mobile terminal | |
CN107634940B (en) | Flow use control method, terminal, server and readable storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |