WO2020087450A1 - Wireless fidelity (wi-fi) access method and apparatus, electronic device, and storage medium - Google Patents

Wireless fidelity (wi-fi) access method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2020087450A1
WO2020087450A1 PCT/CN2018/113455 CN2018113455W WO2020087450A1 WO 2020087450 A1 WO2020087450 A1 WO 2020087450A1 CN 2018113455 W CN2018113455 W CN 2018113455W WO 2020087450 A1 WO2020087450 A1 WO 2020087450A1
Authority
WO
WIPO (PCT)
Prior art keywords
pppoe
configuration
client
mode
server
Prior art date
Application number
PCT/CN2018/113455
Other languages
French (fr)
Chinese (zh)
Inventor
林进全
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201880097757.3A priority Critical patent/CN112740762A/en
Priority to PCT/CN2018/113455 priority patent/WO2020087450A1/en
Publication of WO2020087450A1 publication Critical patent/WO2020087450A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Definitions

  • the invention relates to the technical field of wireless network communication, in particular to a wireless fidelity Wi-Fi access method, device, electronic equipment and storage medium.
  • the wifi access method of mobile phone devices is only dynamic host allocation protocol IP configuration (Dynamic Host Configuration Protocol, DHCP), static (Static) IP configuration two access methods, for hotspots that require authentication, after the hotspot is connected, it will automatically start The browser pops up an authentication page, and the user can enter the account password in the browser to log in for authentication.
  • DHCP Dynamic Host Configuration Protocol
  • static IP configuration assigns a fixed IP address to each computer.
  • the addresses assigned by legitimate users are prone to be illegally stolen, which not only affects the normal use of the network, but also because the stolen addresses often have higher permissions, Therefore, it is also easy to cause losses to potential users and potential security risks.
  • the DHCP server with dynamic IP configuration has no restrictions on user access.
  • any computer After any computer is connected to the network, it can obtain the correct network configuration through the DHCP server to access the network. Illegal users can easily enter the internal network, which brings security risks. Especially when posing as a DHCP server, the DHCP server cannot detect the IP address that has been leased, which will cause confusion to the network.
  • An embodiment of the present application provides a wireless fidelity Wi-Fi access method, which is applied to a client.
  • the method includes: receiving a wireless local area network opening command, searching for an alternative network in the wireless local area network; Select and confirm the access network in the selected network, and select the preset configuration Internet protocol IP method for the access network to configure the IP address of the access network, wherein the preset configuration IP method includes: static IP configuration mode, dynamic IP configuration mode, and Ethernet-based PPPoE configuration mode; detecting that the configured IP mode is PPPoE configuration mode, and a user account information input box pops up to obtain the account information entered by the user; according to the The input account information is subjected to PPPoE authentication and establishes a connection with the access network.
  • An embodiment of the present application also provides a device for Wi-Fi access.
  • the device includes: a network search module, an IP configuration module, an input module, and a connection module; wherein, the network search module is used to receive a wireless local area network start command, Searching for alternative networks in the wireless local area network; configuring an IP module for selecting and confirming an access network in the alternative network, and selecting a preset configuration internet protocol IP method for the access network to Configure the IP address of the access network, wherein the preset IP configuration mode includes: static IP configuration mode, dynamic IP configuration mode and Ethernet-based point-to-point communication protocol PPPoE configuration mode; input module is used to detect the Configure the IP mode as the PPPoE configuration mode, and pop up a user account information input box to obtain the account information entered by the user; the connection module is used to perform PPPoE authentication based on the input account information and establish a connection with the access network.
  • the network search module is used to receive a wireless local area network start command, Searching for alternative networks in the wireless
  • An embodiment of the present application further provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is caused to perform the wireless protection as described above Steps of true Wi-Fi access method.
  • Embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, which is characterized in that when the computer program is executed by a processor, the wireless fidelity Wi-Fi connection as described above is implemented Into method steps.
  • detecting that the IP configuration mode is the PPPoE configuration mode a user account information input box pops up to obtain the account information input by the user; and according to the input account information Perform PPPoE authentication and establish a connection with the access network.
  • This application introduces the PPPoE access method to the electronic device.
  • the WiFi access method with high security and simple configuration broadens the WiFi access method of the electronic device and improves the user experience.
  • FIG. 1 is a flowchart of a Wi-Fi access method in an embodiment
  • FIG. 2 is a schematic structural diagram of a Wi-Fi access device in an embodiment
  • FIG. 3 is a schematic diagram of an internal structure of an electronic device in an embodiment
  • FIG. 4 is a block diagram of a partial structure of an electronic device related to a computer device provided by an embodiment of the present application.
  • An embodiment of the present application provides a wireless fidelity Wi-Fi access method, which is applied to a client. As shown in FIG. 1, the method includes:
  • the electronic device can monitor the receiving behavior of the application's wireless LAN open command through the built-in monitoring function (listen ()).
  • the system can be created at the system framework layer (native / framework layer)
  • the monitoring module of the same level through the monitoring module, monitors the command line of the application's wireless local area network, or independently creates a monitoring process and monitors whether the wireless local area network is turned on through a message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue.
  • Wi-Fi power consumption of electronic products is relatively large. Therefore, the upper-layer application sets switches to turn the Wi-Fi function on and off.
  • the Wi-Fi module When the user clicks on the mobile phone to open Wi-Fi, the Wi-Fi module is powered on and runs, and of course the Wi-Fi driver will be loaded accordingly.
  • This search process is scanning. Use the scan to find the wireless network, and then join the alternative network.
  • the access point In the process of accessing the network, the access point (Access Point, AP) sends a beacon frame to the mobile terminal.
  • AP Access Point
  • the beacon frame can contain the network's Service Set Identifier (SSID), and the user can choose himself according to the SSID A wireless LAN that can be joined.
  • SSID is actually the parameter that the Access Point responds to when the workstation scans, as well as other network parameters, including the Media Access Control (MAC) address, signal strength, encryption, and authentication method of the access point Wait.
  • MAC Media Access Control
  • the preset time is set according to the Wi-Fi optional network scanning detection process. The specific time can be set by the engineer according to the hardware parameters or software algorithms, and will not be described here.
  • the preset IP configuration modes include: static IP configuration mode, dynamic IP configuration mode, and Point-to-Point Protocol over Ethernet (PPPoE) configuration mode based on Ethernet.
  • the selection method of configuring the Internet protocol IP mode may be that the preset configuration IP mode is automatically selected according to the priority policy of the IP configuration mode.
  • the priority policy may be set as follows: the dynamic IP configuration mode has a higher priority than the PPPoE configuration IP mode; the PPPoE configuration IP mode has a higher priority than the static IP configuration mode.
  • the modification authority of the priority policy may be provided by the user. The user can modify the priority strategy according to personal needs.
  • a wireless local area network electronic devices communicate based on the wireless fidelity (WIreless-FIdelity, Wi-Fi) protocol.
  • the access point (Access Point, AP) sends a beacon frame to the mobile terminal.
  • the target frame can include the service set identifier (SSID) of the network, and the user can select the wireless local area network that he can join according to the SSID.
  • SSID service set identifier
  • Static IP configuration is a static IP address set by the user to the electronic device according to the characteristics of the router's own IP address. This address will not change when the device is restarted or the router is restarted.
  • Dynamic IP configuration is automatically assigned by the Dynamic Host Configuration Protocol (DHCP) server.
  • DHCP is the network protocol of the local area network and uses the UDP protocol to work.
  • the DHCP protocol allows the server to dynamically assign IP addresses and configuration information to clients.
  • the DHCP protocol supports a C / S structure, which is mainly divided into a client and a server.
  • the IP address assigned by the DHCP server is affected by the lease of the address and the status of the device. After the lease expires, the IP address will be recovered by the DHCP server. Restarting the device, restarting the router, or reconnecting to the network will cause the DHCP server to reassign IP. address.
  • the PPPoE configuration method has a high cost performance, and it is widely used in a series of applications including community networking construction.
  • the current popular broadband access methods such as Asymmetric Digital Subscriber Line (ADSL) use PPPoE protocol .
  • PPPoE uses Ethernet to form a large number of hosts into a network, connect to the Internet through a remote access device, and implement control and billing functions for each host accessed.
  • Most computers that access the Internet through ADSL are connected to the Internet through an Ethernet card (Ethernet).
  • the same TCP / IP method is also used, and no new protocol is added.
  • the dial-up Internet access of the modem uses Point-to-Point Protocol (PPP), which has the functions of user authentication and notification of IP address.
  • PPPoE Point-to-Point Protocol
  • the PPP Over Ethernet (PPPoE) protocol is a technology for relaying PPP frame information in an Ethernet network, and is particularly suitable for ADSL and other methods.
  • the priority strategy of the IP configuration mode can be automatically selected, mainly involving the transition from high priority to low priority, for example, including: two cases,
  • the current IP configuration method is automatically selected as the dynamic IP configuration method, but if the DHCP server cannot allocate dynamic IP, it automatically switches to the PPPoE configuration IP method.
  • the specific steps are as follows: detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode; according to the dynamic host configuration DHCP protocol, detect that the client's physical network interface connection end does not have a DHCP server, then directly switch the client's IP configuration mode to all The PPPoE method is described.
  • the IP configuration mode is automatically selected as the dynamic IP configuration mode; according to the dynamic host configuration DHCP protocol, detect that the DHCP server exists at the connection end of the physical network interface, and then detect whether the physical network interface and the DHCP server A DHCP session is established, and it is found that the physical network interface has not established a call with the DHCP server; then the client's IP configuration mode is switched to the PPPoE mode.
  • the current IP configuration mode is automatically selected as the PPPoE configuration mode, but the PPPoE server cannot automatically assign a dynamic IP and then automatically switches to the static configuration IP mode.
  • the specific steps are as follows: detecting that the IP configuration mode is automatically selected as the PPPoE mode; according to the PPPOE protocol, detecting that there is no PPPoE server on the client's physical network interface connection end, and switching the client's IP configuration mode to the static IP configuration mode.
  • the IP configuration mode is automatically selected as the PPPoE mode; according to the PPPOE protocol, detect that there is a PPPoE server at the connection end of the physical network interface, then detect whether the physical network interface establishes a PPPoE session with the PPPoE server; if not established During a call, switch the client's IP configuration mode to the static IP configuration mode.
  • the priority policy is a priority policy set by the user, for example, the priority of the PPPoE configuration IP method is higher than that of the dynamic IP configuration method or the dynamic IP configuration method
  • the level is higher than the dynamic configuration IP mode.
  • the automatic switching detection method of the IP configuration mode is the same, for example: the PPPoE configuration IP mode has a higher priority than the dynamic IP configuration mode, then the electronic equipment is automatically selected as the PPPoE mode; according to the PPPOE protocol, the detection There is no PPPoE server at the connection end of the physical network interface of the client, and the IP configuration mode of the client is switched to the dynamic IP configuration mode.
  • the IP configuration mode is automatically selected as the PPPoE mode; according to the PPPOE protocol, detect that there is a PPPoE server at the connection end of the physical network interface, then detect whether the physical network interface establishes a PPPoE session with the PPPoE server; if not established During a call, switch the IP configuration mode of the client to the dynamic IP configuration mode. Setting other priority policies, the switch detection method of the IP configuration method is similar, and will not be described here.
  • IP configuration mode is the PPPoE configuration mode, and pop up a user account information input box to obtain the account information input by the user;
  • the method of detecting the configuration IP method can monitor the configuration IP interface occupancy information of the application through the built-in monitoring function of the electronic device.
  • a system-level can be created at the system framework layer (native / framework layer)
  • the monitoring module monitors the configuration IP mode of the application through the monitoring module, or independently creates a monitoring process and monitors the configuration IP mode of the application through the message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue.
  • the IP mode is configured as a PPPoE configuration mode, that is, the condition that the user's account information input box is triggered to display is met, the electronic device screen displays the account information input box, and the user fills in the legal account information to establish a connection.
  • the user confirms the alternative network by entering the wireless network selection information.
  • the user sets the IP configuration mode for the alternative network. If the IP configuration mode is the PPPoE configuration mode, a user account information input box pops up, and the user establishes a network connection by entering the account information .
  • the input information includes, legal user name information and password information matching the user name.
  • S104 Perform PPPoE authentication according to the input account information, and establish a connection with the access network.
  • the account information input box is also used to back up the account information using a cloud server.
  • the specific method includes: storing the account information and uploading it to the cloud server, and receiving a response from the cloud server that the account information has been successfully saved; if the client is reset or replaced, according to the input.
  • the user name sends a request to the server to obtain the password corresponding to the user name; receives the password corresponding to the user name issued by the cloud server, and fills in the password input box to enable PPPoE authentication of the user's account information .
  • the PPPoE method for configuring the IP connection to the network includes: the client and the access concentrator (Access) acquire the Ethernet physical address of the peer, and the client and the access concentrator share a unique session ID; The client sends a Discovery Phase Initialization (PPPoE Active Discovery, Initiation, PADI) broadcast message to the preset broadcast domain to apply for services from the AC in the preset broadcast domain, where the preset broadcast area may be within the cell.
  • PPPoE Active Discovery, Initiation, PADI Discovery Phase Initialization
  • PPPoEActive Discovery, Offer, PADO AC Discovery Phase Reply
  • the client and the access concentrator establish a dial-up connection through the session ID and perform point-to-point network layer data packet transmission; the PPP negotiation at the PPPoE session negotiation stage is the same as the ordinary PPP negotiation; the client connects Enter the network and interact with data.
  • the client or the access concentrator when the client or server needs to terminate the session, can send such a PADT message. Both parties to the session can send a termination message (PPPoEActiveDiscoveryTerminate, PADT) as required. Disconnect the PPPoE connection between the two sides of the session.
  • the client sends a request to the server to authenticate the identity of the PPPoE client. If the server authentication is successful, the dial-up connection is restored.
  • it may include: acquiring data information of abnormal log-off; querying the abnormal log-off identifier of the data information, confirming that the abnormal log-off identifier is in the preset abnormal log-off entry, wherein the preset abnormal log-off table
  • the item may include a router restart, a short power outage of the device, link flapping, hardware failure, and client restart, etc .; if it belongs to any of the above table items, it is sent to the server to request authentication of the client identity Authentication message; receiving the identity authentication success response returned by the server, and recovering the abnormal offline dial-up connection.
  • the client and the Broadband Remote Access Server (BRAS) device are interconnected through a Layer 2 switch.
  • the access port link of the BRAS device fluctuates or the hardware fails, the client will be abnormally offline.
  • the public network address of the BRAS device in the client still exists.
  • the client can still continue to access the public network, but the BRAS device should The user entry of the access port corresponding to the client will be automatically cleared, and the BRAS device cannot send PADT messages to the client, so the client cannot perceive the failure.
  • the client can only rely on its own periodic keepalive detection mechanism to sense that it has been abnormally offline.
  • the network recovery connection method in other situations in the preset abnormal offline entry is similar to the link recovery and hardware failure network recovery connection method. I won't repeat them here.
  • An embodiment of the present application provides a device for wireless fidelity Wi-Fi access.
  • the device includes: a network search module 21, a configuration IP module 22, an input module 23, and a connection module 24,
  • the network search module 21 is configured to receive a wireless local area network opening command and search for alternative networks in the wireless local area network.
  • the electronic device can monitor the reception behavior of the wireless local area network opening command of the network search module 21 of the application through the built-in monitoring function (listen ()).
  • the system framework layer (native / framework layer) Create a system-level monitoring module, use the monitoring module to monitor the command line of the application's wireless local area network, or independently create a monitoring process to monitor whether the wireless local area network is turned on through a message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue.
  • Wi-Fi power consumption of electronic products is relatively large. Therefore, the upper-layer application sets switches to turn the Wi-Fi function on and off.
  • the Wi-Fi module When the user clicks on the mobile phone to open Wi-Fi, the Wi-Fi module is powered on and runs, and of course the Wi-Fi driver will be loaded accordingly.
  • This search process is scanning. Use the scan to find the wireless network, and then join the alternative network.
  • the access point In the process of accessing the network, the access point (Access Point, AP) sends a beacon frame to the mobile terminal.
  • AP Access Point
  • the beacon frame can contain the network's Service Set Identifier (SSID), and the user can choose himself according to the SSID A wireless LAN that can be joined.
  • SSID is actually the parameter that the Access Point responds to when the workstation scans, as well as other network parameters, including the Media Access Control (MAC) address, signal strength, encryption, and authentication method of the access point Wait.
  • MAC Media Access Control
  • the preset time is set according to the Wi-Fi optional network scanning detection process. The specific time can be set by the engineer according to the hardware parameters or software algorithms, and will not be described here.
  • the configuration IP module 22 is used to select and confirm an access network in the alternative network, and select a preset configuration Internet Protocol (Internet Protocol (IP) mode for the access network to configure the access network IP address, wherein the preset IP configuration mode includes: static IP configuration mode, dynamic IP configuration mode, and Point-to-Point Protocol over Ethernet (PPPoE) configuration mode based on Ethernet.
  • IP Internet Protocol
  • PPPoE Point-to-Point Protocol over Ethernet
  • the selection method of configuring the Internet protocol IP mode may be that the preset configuration IP mode is automatically selected according to the priority policy of the IP configuration mode.
  • the priority policy may be set as follows: the dynamic IP configuration mode has a higher priority than the PPPoE configuration IP mode; the PPPoE configuration IP mode has a higher priority than the static IP configuration mode.
  • the modification authority of the priority policy may be provided by the user. The user can modify the priority strategy according to personal needs.
  • a wireless local area network electronic devices communicate based on the wireless fidelity (WIreless-FIdelity, Wi-Fi) protocol.
  • the access point (Access Point, AP) sends a beacon frame to the mobile terminal.
  • the target frame can include the service set identifier (SSID) of the network, and the user can select the wireless local area network that he can join according to the SSID.
  • SSID service set identifier
  • Static IP configuration is a static IP address set by the user to the electronic device according to the characteristics of the router's own IP address. This address will not change when the device is restarted or the router is restarted.
  • Dynamic IP configuration is automatically assigned by the Dynamic Host Configuration Protocol (DHCP) server.
  • DHCP is the network protocol of the local area network and uses the UDP protocol to work.
  • the DHCP protocol allows the server to dynamically assign IP addresses and configuration information to clients.
  • the DHCP protocol supports a C / S structure, which is mainly divided into a client and a server.
  • the IP address assigned by the DHCP server is affected by the lease of the address and the status of the device. After the lease expires, the IP address will be recovered by the DHCP server. Restarting the device, restarting the router, or reconnecting to the network will cause the DHCP server to reassign IP. address.
  • the PPPoE configuration method has a high cost performance, and it is widely used in a series of applications including community networking construction.
  • the current popular broadband access methods such as Asymmetric Digital Subscriber Line (ADSL) use PPPoE protocol .
  • PPPoE uses Ethernet to form a network of a large number of hosts, connect to the Internet through a remote access device, and implement control and billing functions for each host accessed.
  • Most computers that access the Internet through ADSL are connected to the Internet through an Ethernet card (Ethernet).
  • the same TCP / IP method is also used, and no new protocol is added.
  • the dial-up Internet access of the modem uses Point-to-Point Protocol (PPP), which has the functions of user authentication and notification of IP address.
  • PPPoE Point-to-Point Protocol
  • the PPP Over Ethernet (PPPoE) protocol is a technology for relaying PPP frame information in an Ethernet network, and is particularly suitable for ADSL and other methods.
  • the configuration IP module 22 includes a detection unit 221, a judgment unit 222, and a switching unit 223.
  • the priority strategy of the IP configuration mode can be automatically selected, mainly involving a transition from a high priority to a low priority, for example, including two cases :
  • the current IP configuration method is automatically selected as the dynamic IP configuration method, but if the DHCP server cannot allocate dynamic IP, it automatically switches to the PPPoE configuration IP method.
  • the specific steps are as follows: the detection unit 221 is used to detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode; the determination unit 222 is used to configure the DHCP protocol according to the dynamic host, detect that there is no DHCP server on the client's physical network interface connection, and switch Unit 223, configured to switch the IP configuration mode of the client to the PPPoE mode.
  • the detection unit 221 is configured to detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode;
  • the determination unit 222 is configured to detect the presence of the DHCP server at the physical network interface connection end according to the dynamic host configuration DHCP protocol, and Detecting whether the physical network interface has established a DHCP session with the DHCP server, and found that the physical network interface has not established a call with the DHCP server;
  • a switching unit 223 is used to switch the IP configuration mode of the client to the PPPoE mode .
  • the current IP configuration mode is automatically selected as the PPPoE configuration mode, but the PPPoE server cannot automatically assign a dynamic IP and then automatically switches to the static configuration IP mode.
  • the specific steps are as follows: the detection unit 221 is also used to detect that the IP configuration mode is automatically selected as the PPPoE mode; the determination unit 222 is also used to detect that there is no PPPoE server on the client's physical network interface connection according to the PPPOE protocol, and the switching unit 223 And is also used to switch the client's IP configuration mode to the static IP configuration mode.
  • the detection unit 221 is also used to detect that the IP configuration mode is automatically selected as the PPPoE mode; the determination unit 222 is also used to detect that there is a PPPoE server at the connection end of the physical network interface according to the PPPOE protocol, and then detect the physical network Whether the interface establishes a PPPoE session with the PPPoE server; if no call is established, the switching unit 223 is also used to switch the IP configuration mode of the client to the static IP configuration mode.
  • the priority policy is a priority policy set by the user, for example, the priority of the PPPoE configuration IP method is higher than that of the dynamic IP configuration method or the dynamic IP configuration method
  • the level is higher than the dynamic configuration IP mode.
  • the automatic switching detection method of the IP configuration mode is consistent, for example: the PPPoE configuration IP mode has a higher priority than the dynamic IP configuration mode, the detection unit 221 detects that the IP configuration mode of the electronic device is automatically selected as the PPPoE mode; Protocol, the judging unit 222 detects that there is no PPPoE server on the client's physical network interface connection, and the switching unit 223 switches the client's IP configuration mode to the dynamic IP configuration mode.
  • the detection unit 221 detects that the IP configuration mode is automatically selected as the PPPoE mode; the determination unit 222 detects that a PPPoE server exists at the connection end of the physical network interface according to the PPPOE protocol, and then detects whether the physical network interface is established with the PPPoE server PPPoE session; if no call is established, the switching unit 223 switches the IP configuration mode of the client to the dynamic IP configuration mode. Setting other priority policies, the switch detection method of the IP configuration method is similar, and will not be described here.
  • the input module 23 is configured to detect that the IP configuration mode is the PPPoE configuration mode, and pop up a user account information input box to obtain the account information input by the user;
  • the method of detecting the configuration IP method can monitor the configuration IP interface occupancy information of the application through the built-in monitoring function of the electronic device.
  • a system-level can be created at the system framework layer (native / framework layer)
  • the monitoring module monitors the configuration IP mode of the application through the monitoring module, or independently creates a monitoring process and monitors the configuration IP mode of the application through the message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue.
  • the IP mode is configured as a PPPoE configuration mode, that is, the condition that the user's account information input box is triggered to display is met, the electronic device screen displays the account information input box, and the user fills in the legal account information to establish a connection.
  • the user confirms the alternative network by entering the wireless network selection information.
  • the user sets the IP configuration mode for the alternative network. If the IP configuration mode is the PPPoE configuration mode, a user account information input box pops up, and the user establishes a network connection by entering the account information .
  • the input information includes, legal user name information and password information matching the user name.
  • the connection module 24 is configured to perform PPPoE authentication according to the input account information and establish a connection with the access network. In one embodiment, the connection module 24 is also used to back up the account information using a cloud server.
  • the connection module 24 includes a storage unit 241, a password request unit 242, and a password recovery unit 243, among them.
  • the storage unit 241 is used to store the account information and upload it to the cloud server, and receives a response from the cloud server that the account information is saved successfully;
  • the password request unit 242 is used to reset or replace the account
  • the client sends a request for obtaining the password corresponding to the user name to the server according to the entered user name;
  • the password recovery unit 243 is configured to receive the password corresponding to the user name issued by the cloud server and fill in To the password input box to enable PPPoE authentication of the user's account information.
  • the PPPoE method for configuring the IP connection to the network includes: the client and the access concentrator (Access) acquire the Ethernet physical address of the peer, and the client and the access concentrator share a unique session ID; The client sends a Discovery Phase Initialization (PPPoE Active Discovery, Initiation, PADI) broadcast message to the preset broadcast domain to apply for services from the AC in the preset broadcast domain, where the preset broadcast area may be within the cell.
  • PPPoE Active Discovery, Initiation, PADI Discovery Phase Initialization
  • PPPoEActive Discovery, Offer, PADO AC Discovery Phase Reply
  • the client and the access concentrator establish a dial-up connection through the session ID and perform point-to-point network layer data packet transmission; the PPP negotiation at the PPPoE session negotiation stage is the same as the ordinary PPP negotiation; the client connects Enter the network and interact with data.
  • the client or the access concentrator when the client or server needs to terminate the session, can send such a PADT message. Both parties to the session can send a termination message (PPPoEActiveDiscoveryTerminate, PADT) as required. Disconnect the PPPoE connection between the two sides of the session.
  • the device provided in this embodiment of the present application may further include: an abnormal offline recovery module 25, configured to abnormally log out if the dial-up connection established in the PPPoE manner belongs to the preset abnormal offline entry, Then, the client sends a request to the server to authenticate the PPPoE client identity, and if the server authentication is successful, the dial-up connection is restored.
  • the abnormal offline recovery module 25 may include: an acquisition unit 251, an inquiry unit 252, an authentication request unit 253, and a recovery unit 254.
  • the process of recovering the dial-up connection is specifically as follows: the acquisition unit 251 acquires abnormal offline data information; The abnormal offline identifier of the data information, confirming that the abnormal offline identifier is in the preset abnormal offline entry, where the preset abnormal offline entry may include a restart of the router, a brief power failure of the device, and a link flap , Hardware failure and client restart, etc.
  • the preset abnormal offline entry can be set according to user needs; if it belongs to any of the above entries, the authentication request unit 253 sends to the server An authentication message for requesting authentication of the identity of the client; the restoration unit 254 receives the identity authentication success response returned by the server, and restores the abnormal offline dial-up connection.
  • PPPoE Point-to-Point Protocol over Ethernet
  • BRAS Broadband Remote Access Server
  • the client will be abnormally offline.
  • the public network address of the BRAS device in the client still exists.
  • the client can still continue to access the public network, but the BRAS device should The user entry of the access port corresponding to the client will be automatically cleared, and the BRAS device cannot send PADT messages to the client, so the client cannot perceive the failure.
  • the client can only rely on its own periodic keepalive detection mechanism to sense that it has been abnormally offline.
  • the query unit 252 queries the abnormal offline identifier of the data information, confirms that the abnormal offline identifier is in the preset abnormal offline entry, and then submits the authentication
  • the server sends an authentication message for requesting authentication of the identity of the client; when the recovery unit 254 receives the identity authentication success response returned by the server, the abnormal offline dial-up connection is restored.
  • the network recovery connection method in other situations in the preset abnormal offline entry is similar to the link recovery and hardware failure network recovery connection method. I won't repeat them here.
  • the electronic device includes a processor connected through a system bus, a non-volatile storage medium, an internal memory and a network interface, a sound collection device, a speaker, a display screen, and an input device.
  • the non-volatile storage medium of the terminal stores an operating system and computer-readable instructions.
  • the processor is used to provide computing and control capabilities to support the operation of the entire electronic device.
  • the internal memory in the electronic device provides an environment for the execution of computer-readable instructions in the non-volatile storage medium.
  • the display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, etc.
  • the input device may be a touch layer covered on the display screen, a button, a trackball or a touch pad provided on the housing of the electronic device, or External keyboard, touchpad or mouse, etc.
  • the electronic device may be a mobile phone, a tablet computer, a personal digital assistant or a wearable device.
  • FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied.
  • the specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
  • the method for processing the application mentioned above may specifically be:
  • the methods include: static IP configuration method, dynamic IP configuration method, and Ethernet-based PPPoE configuration method for point-to-point communication protocol;
  • IP configuration mode is the PPPoE configuration mode
  • a user account information input box pops up to obtain the account information input by the user
  • the client sends a request to the server to authenticate the PPPoE client identity, if the server authenticates If successful, the dial-up connection is restored.
  • the embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of processing the application program as described above are realized.
  • An embodiment of the present invention also provides a computer device. As shown in FIG. 4, for ease of description, only parts related to the embodiments of the present invention are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present invention.
  • the computer device may be any terminal device including electronic devices, tablet computers, PDA (Personal Digital Assistant), POS (Point of Sales, point of sale), in-vehicle computers, wearable devices, etc.
  • the computer device is an electronic device example.
  • the embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of playing the alarm clock as described above are realized.
  • An embodiment of the present application also provides a computer device. As shown in FIG. 4, for convenience of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application.
  • the computer device can be any terminal device including electronic devices, tablet computers, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computers, wearable devices, etc. Taking computer devices as electronic devices is example:
  • the electronic device includes: a radio frequency (Radio Frequency) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor
  • the RF circuit 410 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 480; it can also send the uplink data to the base station.
  • RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on.
  • the RF circuit 410 can also communicate with other devices through a wireless communication network.
  • the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division Multiple Access) Access, CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Message Service (SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Message Service
  • the memory 420 may be used to store software programs and modules.
  • the processor 480 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 420.
  • the memory 420 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc .;
  • the data storage area can store data (such as audio data, address book, etc.) created according to the use of electronic devices.
  • the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 430 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device 400.
  • the input unit 430 may include a touch panel 431 and other input devices 432.
  • the touch panel 431 also known as a touch screen, can collect user's touch operations on or near it (such as the user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 431 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 431 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 480, and can receive the command sent by the processor 480 and execute it.
  • the touch panel 431 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 430 may also include other input devices 432.
  • the other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.).
  • the display unit 440 may be used to display information input by the user or information provided to the user and various menus of the electronic device.
  • the display unit 440 may include a display panel 441.
  • the display panel 441 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • the touch panel 431 may cover the display panel 441, and when the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event, and then the processor 480 according to The type of touch event provides corresponding visual output on the display panel 441.
  • the touch panel 431 and the display panel 441 are implemented as two independent components to realize the input and input functions of the electronic device, in some embodiments, the touch panel 431 and the display panel 441 may be integrated And realize the input and output functions of electronic equipment.
  • the electronic device 400 may further include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 441 according to the brightness of the ambient light, and the proximity sensor may close the display panel 441 and the electronic device when moving to the ear / Or backlight.
  • the motion sensor may include an acceleration sensor. The acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest.
  • electronic devices can be used for applications that recognize the posture of electronic devices (such as horizontal and vertical screen switching), and vibration recognition related functions ( For example, pedometer, percussion, etc .; in addition, electronic devices can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc.
  • sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc.
  • the audio circuit 460, the speaker 461, and the microphone 462 may provide an audio interface between the user and the electronic device.
  • the audio circuit 460 can transmit the converted electrical signal of the received audio data to the speaker 461, which converts the speaker 461 into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 460 After receiving, it is converted into audio data, and then processed by the audio data output processor 480, and then sent to another electronic device via the RF circuit 410, or the audio data is output to the memory 420 for subsequent processing.
  • WiFi is a short-range wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 470. It provides users with wireless broadband Internet access.
  • FIG. 4 shows the WiFi module 470, it can be understood that it is not a necessary component of the electronic device 400, and may be omitted as needed.
  • the processor 480 is the control center of the electronic device, and uses various interfaces and lines to connect the various parts of the entire electronic device, by running or executing the software programs and / or modules stored in the memory 420, and calling the data stored in the memory 420 , Perform various functions of electronic devices and process data, so as to monitor the electronic devices as a whole.
  • the processor 480 may include one or more processing units.
  • the processor 480 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 480.
  • the electronic device 400 further includes a power supply 490 (such as a battery) that supplies power to various components.
  • a power supply 490 (such as a battery) that supplies power to various components.
  • the power supply can be logically connected to the processor 480 through the power management system, so as to implement functions such as charging, discharging, and power management through the power management system .
  • the electronic device 400 may further include a camera, a Bluetooth module, and the like.
  • the processor 480 included in the computer device implements the methods of the foregoing embodiments when executing the computer program stored on the memory.
  • the program may be stored in a non-volatile computer-readable storage medium
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), etc.
  • Embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the methods of the foregoing embodiments.

Abstract

The present application relates to a wireless fidelity (Wi-Fi) access method, applicable to a client. The method comprises: receiving a wireless local area network enabling command, and searching optional networks in the wireless local area network; selecting and confirming an access network from the optional networks, and selecting a preset configuration internet protocol (IP) mode for the access network to configure an IP address of the access network, wherein the preset configuration IP mode comprises: a static IP configuration mode, a dynamic IP configuration mode, and a point-to-point protocol over Ethernet (PPPoE) configuration mode; detecting the configuration IP mode as the PPPoE configuration mode, and popping up an account information input box of a user to obtain account information input by the user; and carrying out PPPoE authentication according to the input account information, and establishing a connection with the access network. According to the present application, the PPPoE access mode is introduced into an electronic device, and the Wi-Fi access mode is high in security and simple in configuration, thereby broadening the Wi-Fi access mode of the electronic device, and improving the user experience.

Description

一种无线保真Wi-Fi接入方法、装置、电子设备及存储介质Wireless fidelity Wi-Fi access method, device, electronic equipment and storage medium 技术领域Technical field
本发明涉及无线网络通信技术领域,尤其涉及一种无线保真Wi-Fi接入方法、装置、电子设备及存储介质。The invention relates to the technical field of wireless network communication, in particular to a wireless fidelity Wi-Fi access method, device, electronic equipment and storage medium.
背景技术Background technique
目前手机设备的wifi接入方式只有动态主机分配协议IP配置(Dynamic Host ConfigurationProtocol,DHCP)、静态(Static)IP配置两种接入方式,对于需要认证的热点,在连接好热点后,会自动启动浏览器弹出认证页面,用户可以在浏览器中输入账号密码,进行认证登陆。但静态IP配置给每一台计算机都分配一个固定的IP地址,易出现合法用户分配的地址被非法盗用,不仅对网络的正常使用造成影响,同时由于被盗用的地址往往具有较高的权限,因而也容易给合法用户造成损失和潜在的安全隐患。而动态IP配置的DHCP服务器对于用户的接入没有限制,任一电脑连网后能通过DHCP服务器获得正确的网络配置,从而访问网络。非法的用户很容易进入内部网络,带来安全隐患。尤其是出现冒充DHCP服务器时,DHCP服务器无法查出已被租的IP地址,将会给网络造成混乱。At present, the wifi access method of mobile phone devices is only dynamic host allocation protocol IP configuration (Dynamic Host Configuration Protocol, DHCP), static (Static) IP configuration two access methods, for hotspots that require authentication, after the hotspot is connected, it will automatically start The browser pops up an authentication page, and the user can enter the account password in the browser to log in for authentication. However, the static IP configuration assigns a fixed IP address to each computer. The addresses assigned by legitimate users are prone to be illegally stolen, which not only affects the normal use of the network, but also because the stolen addresses often have higher permissions, Therefore, it is also easy to cause losses to potential users and potential security risks. The DHCP server with dynamic IP configuration has no restrictions on user access. After any computer is connected to the network, it can obtain the correct network configuration through the DHCP server to access the network. Illegal users can easily enter the internal network, which brings security risks. Especially when posing as a DHCP server, the DHCP server cannot detect the IP address that has been leased, which will cause confusion to the network.
发明内容Summary of the invention
基于此,有必要提供一种应用于客户端的高安全性且配置简单的的无线保真Wi-Fi接入方法、装置、电子设备及存储介质。Based on this, it is necessary to provide a high-fidelity and simple-configuration wireless fidelity Wi-Fi access method, device, electronic device, and storage medium applied to the client.
本申请实施例提供一种无线保真Wi-Fi接入方法,应用于客户端,所述方法包括:接收无线局域网络开启命令,搜索所述无线局域网络内的供选网络;在所述供选网络中选择并确认出接入网络,且为所述接入网络选择预设配置互联网协议IP方式,以配置所述接入网络的IP地址,其中,所述预设配置IP方式包括:静态IP配置方式、动态IP配置方式和基于以太网的点对点通讯协议PPPoE配置方式;检测所述配置IP方式为PPPoE配置方式,弹出用户的账户信息输入框,以获取用户输入的账户信息;根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接。An embodiment of the present application provides a wireless fidelity Wi-Fi access method, which is applied to a client. The method includes: receiving a wireless local area network opening command, searching for an alternative network in the wireless local area network; Select and confirm the access network in the selected network, and select the preset configuration Internet protocol IP method for the access network to configure the IP address of the access network, wherein the preset configuration IP method includes: static IP configuration mode, dynamic IP configuration mode, and Ethernet-based PPPoE configuration mode; detecting that the configured IP mode is PPPoE configuration mode, and a user account information input box pops up to obtain the account information entered by the user; according to the The input account information is subjected to PPPoE authentication and establishes a connection with the access network.
本申请实施例还提供一种Wi-Fi接入的装置,所述装置包括:网络搜索模块、配置IP模块、输入模块和连接模块;其中,网络搜索模块,用于接收无线局域网络开启命 令,搜索所述无线局域网络内的供选网络;配置IP模块,用于在所述供选网络中选择并确认出接入网络,且为所述接入网络选择预设配置互联网协议IP方式,以配置所述接入网络的IP地址,其中,所述预设配置IP方式包括:静态IP配置方式、动态IP配置方式和基于以太网的点对点通讯协议PPPoE配置方式;输入模块,用于检测所述配置IP方式为PPPoE配置方式,弹出用户的账户信息输入框,以获取用户输入的账户信息;连接模块,用于根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接。An embodiment of the present application also provides a device for Wi-Fi access. The device includes: a network search module, an IP configuration module, an input module, and a connection module; wherein, the network search module is used to receive a wireless local area network start command, Searching for alternative networks in the wireless local area network; configuring an IP module for selecting and confirming an access network in the alternative network, and selecting a preset configuration internet protocol IP method for the access network to Configure the IP address of the access network, wherein the preset IP configuration mode includes: static IP configuration mode, dynamic IP configuration mode and Ethernet-based point-to-point communication protocol PPPoE configuration mode; input module is used to detect the Configure the IP mode as the PPPoE configuration mode, and pop up a user account information input box to obtain the account information entered by the user; the connection module is used to perform PPPoE authentication based on the input account information and establish a connection with the access network.
本申请实施例还提供一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如上述所述无线保真Wi-Fi接入方法的步骤。An embodiment of the present application further provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is caused to perform the wireless protection as described above Steps of true Wi-Fi access method.
本申请实施例还提供一种计算机非易失性可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如上述所述无线保真Wi-Fi接入方法步骤。Embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, which is characterized in that when the computer program is executed by a processor, the wireless fidelity Wi-Fi connection as described above is implemented Into method steps.
电子设备和计算机可读存储介质在实现上述方法时,检测所述配置IP方式为PPPoE配置方式,则弹出用户的账户信息输入框,以获取用户输入的账户信息;并根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接。本申请将PPPoE接入方式引入到电子设备中,高安全性且配置简单的WiFi接入方式,拓宽了电子设备wifi接入方式,提升用户体验。When the electronic device and the computer-readable storage medium implement the above method, detecting that the IP configuration mode is the PPPoE configuration mode, a user account information input box pops up to obtain the account information input by the user; and according to the input account information Perform PPPoE authentication and establish a connection with the access network. This application introduces the PPPoE access method to the electronic device. The WiFi access method with high security and simple configuration broadens the WiFi access method of the electronic device and improves the user experience.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。In order to more clearly explain the embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, without paying any creative labor, drawings of other embodiments can be obtained based on these drawings.
图1为一实施例中的Wi-Fi接入方法流程图;FIG. 1 is a flowchart of a Wi-Fi access method in an embodiment;
图2为一实施例中的Wi-Fi接入装置结构示意图;2 is a schematic structural diagram of a Wi-Fi access device in an embodiment;
图3为一实施例中的电子设备的内部结构示意图;3 is a schematic diagram of an internal structure of an electronic device in an embodiment;
图4为与本申请实施例提供的计算机设备相关的电子设备的部分结构的框图。4 is a block diagram of a partial structure of an electronic device related to a computer device provided by an embodiment of the present application.
具体实施方式detailed description
为了便于理解本发明,下面将参照相关附图对本发明进行更全面的描述。附图中 给出了本发明的较佳实施例。但是,本发明可以以许多不同的形式来实现,并不限于本文所描述的实施例。相反地,提供这些实施例的目的是使对本发明的公开内容的理解更加透彻全面。In order to facilitate understanding of the present invention, the present invention will be described more fully below with reference to related drawings. The drawings show preferred embodiments of the present invention. However, the present invention can be implemented in many different forms, and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
本申请实施例提供了一种无线保真Wi-Fi接入方法,应用于客户端,如图1所示,所述方法包括:An embodiment of the present application provides a wireless fidelity Wi-Fi access method, which is applied to a client. As shown in FIG. 1, the method includes:
S101、接收无线局域网络开启命令,搜索所述无线局域网络内的供选网络;S101. Receive a wireless local area network opening command and search for alternative networks in the wireless local area network;
电子设备可通过内置的监听函数(listen())对应用程序的无线局域网络开启命令的接收行为进行监测,以安卓系统的电子设备为例,可在系统框架层(native/framework层)创建系统级的监测模块,通过监测模块对应用程序的无线局域网络开启命令行为进行监测,或,独立创建监测进程,通过消息传输机制监测无线局域网络是否开启。例如,可在框架层设立监测模块并运行在系统服务程序(system_server)中,由于该监测模块设立在系统级的服务框架层中,可方便与其他系统服务进行交互,同时无需担心系统调用时的权限问题。此外,也可以创建独立的监测进程,在该进程中设立并调用单独的监听函数,可设置为开机自启动,并实时对其他任何一个应用程序的接收命令行为、查询命令行为进行监控,具体地,可实时抓取当前调用的无线局域网络接口的数据信息及开启状态标识,以此确定当前是否接收到无线局域网络开启命令,可独立开发,不与系统进行耦合,方便后续的开发和升级。The electronic device can monitor the receiving behavior of the application's wireless LAN open command through the built-in monitoring function (listen ()). Taking the electronic device of the Android system as an example, the system can be created at the system framework layer (native / framework layer) The monitoring module of the same level, through the monitoring module, monitors the command line of the application's wireless local area network, or independently creates a monitoring process and monitors whether the wireless local area network is turned on through a message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue. In addition, you can also create an independent monitoring process, set up and call a separate monitoring function in this process, can be set to start automatically after booting, and monitor the receiving command line and query command line of any other application in real time, specifically , It can capture the data information and open status identification of the currently called wireless local area network interface in real time to determine whether the wireless local area network opening command is currently received. It can be independently developed without coupling with the system, which is convenient for subsequent development and upgrade.
电子产品Wi-Fi的功耗较大。因此,上层应用程序设置开关,用于打开和关闭Wi-Fi功能。当用户在手机上点击打开Wi-Fi时,Wi-Fi模块通电运行起来,当然也会相应加载Wi-Fi的驱动程序。利用监听函数(listen())监听无线局域网络开启命令,即表示Wi-Fi功能开启,电子产品则显示搜索到附近的Wi-Fi热点,这个搜索过程即扫描(Scanning)。利用扫描找到无线网络,然后加入到该供选网络中。在接入网络的过程中,接入点(Access Point,AP)发送信标帧至移动终端,信标帧中可以包含网络的服务集标识(Service Set Identifier,SSID),用户可以根据SSID选择自己能够加入的无线局域网。SSID其实是接入点(Access Point)回应工作站扫描时所带的参数,还有其它的网络参数,包括接入点的媒体访问控制(MediaAccess Control Address,MAC)地址、信号强度、加密和认证方式等。需要指明的是,在对Wi-Fi供选网络进行扫描网络检测,若在预设时间内检测到仍不可上网,则触发其他供选网络检测。其中,预设时间是根据对Wi-Fi供选网络扫描检测过程来设置的,具体时间可由工程师根据硬件参数或者软件算法自行设置,此处不再赘述。Wi-Fi power consumption of electronic products is relatively large. Therefore, the upper-layer application sets switches to turn the Wi-Fi function on and off. When the user clicks on the mobile phone to open Wi-Fi, the Wi-Fi module is powered on and runs, and of course the Wi-Fi driver will be loaded accordingly. Use the listen function (listen ()) to monitor the wireless LAN opening command, which means that the Wi-Fi function is turned on, and the electronic product displays that the nearby Wi-Fi hotspot is searched. This search process is scanning. Use the scan to find the wireless network, and then join the alternative network. In the process of accessing the network, the access point (Access Point, AP) sends a beacon frame to the mobile terminal. The beacon frame can contain the network's Service Set Identifier (SSID), and the user can choose himself according to the SSID A wireless LAN that can be joined. The SSID is actually the parameter that the Access Point responds to when the workstation scans, as well as other network parameters, including the Media Access Control (MAC) address, signal strength, encryption, and authentication method of the access point Wait. It should be pointed out that during the scan network detection of the Wi-Fi alternative network, if it is detected that the Internet is still not available within the preset time, other alternative network detection is triggered. Among them, the preset time is set according to the Wi-Fi optional network scanning detection process. The specific time can be set by the engineer according to the hardware parameters or software algorithms, and will not be described here.
S102、在所述供选网络中选择并确认出接入网络,且为所述接入网络选择预设配置互联网协议(InternetProtocol,IP)方式,以配置所述接入网络的IP地址,其中,所 述预设配置IP方式包括:静态IP配置方式、动态IP配置方式和基于以太网的点对点通讯协议(Point-to-PointProtocol over Ethernet,PPPoE)配置方式。需指明的是,配置互联网协议IP方式的选择方式可以是,根据IP配置方式的优先级策略自动选择所述预设配置IP方式。设置所述优先级策略可以为:所述动态IP配置方式的优先级高于所述PPPoE配置IP方式;所述PPPoE配置IP方式的优先级高于所述静态IP配置方式。其中,所述优先级策略的修改权限可以供所述用户提供。所述用户可以根据个人需求自行修改优先级策略。S102. Select and confirm an access network in the alternative network, and select a preset configuration Internet Protocol (Internet Protocol, IP) method for the access network to configure an IP address of the access network, where, The preset IP configuration modes include: static IP configuration mode, dynamic IP configuration mode, and Point-to-Point Protocol over Ethernet (PPPoE) configuration mode based on Ethernet. It should be noted that the selection method of configuring the Internet protocol IP mode may be that the preset configuration IP mode is automatically selected according to the priority policy of the IP configuration mode. The priority policy may be set as follows: the dynamic IP configuration mode has a higher priority than the PPPoE configuration IP mode; the PPPoE configuration IP mode has a higher priority than the static IP configuration mode. Wherein, the modification authority of the priority policy may be provided by the user. The user can modify the priority strategy according to personal needs.
在无线局域网中,电子设备基于无线保真(WIreless-FIdelity,Wi-Fi)协议进行通信,在接入网络的过程中,接入点(Access Point,AP)发送信标帧至移动终端,信标帧中可以包含网络的服务集标识(Service Set Identifier,SSID),用户可以根据SSID选择自己能够加入的无线局域网。In a wireless local area network, electronic devices communicate based on the wireless fidelity (WIreless-FIdelity, Wi-Fi) protocol. During the process of accessing the network, the access point (Access Point, AP) sends a beacon frame to the mobile terminal. The target frame can include the service set identifier (SSID) of the network, and the user can select the wireless local area network that he can join according to the SSID.
静态IP配置是由用户根据路由器自身IP地址的特点给电子设备设置的静态IP地址,此地址不会因为设备重新启动或路由器重新启动而改变。动态IP配置则是由动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)服务器自动分配地址的,DHCP是局域网的网络协议,使用UDP协议工作。DHCP协议允许服务器向客户端动态分配IP地址和配置信息。DHCP协议支持C/S结构,主要分为客户端和服务端。DHCP服务器分配的IP地址受地址租期、设备状态影响,租期到期后,IP地址会被DHCP服务器收回,设备重新启动、路由器重新启动或是重新接入网络都将导致DHCP服务器重新分配IP地址。Static IP configuration is a static IP address set by the user to the electronic device according to the characteristics of the router's own IP address. This address will not change when the device is restarted or the router is restarted. Dynamic IP configuration is automatically assigned by the Dynamic Host Configuration Protocol (DHCP) server. DHCP is the network protocol of the local area network and uses the UDP protocol to work. The DHCP protocol allows the server to dynamically assign IP addresses and configuration information to clients. The DHCP protocol supports a C / S structure, which is mainly divided into a client and a server. The IP address assigned by the DHCP server is affected by the lease of the address and the status of the device. After the lease expires, the IP address will be recovered by the DHCP server. Restarting the device, restarting the router, or reconnecting to the network will cause the DHCP server to reassign IP. address.
PPPoE配置方式具有较高的性价比,它在包括小区组网建设等一系列应用中被广泛采用,目前流行的宽带接入方式如非对称数字用户线路(Asymmetric Digital SubscriberLine,ADSL)就使用了PPPoE协议。PPPoE利用以太网将大量主机组成网络,通过一个远端接入设备连入因特网,并对接入的每一个主机实现控制、计费功能。通过ADSL方式上网的计算机大都是通过以太网卡(Ethernet)与互联网相连的。同样使用的还是普通的TCP/IP方式,并没有附加新的协议。调制解调器的拨号上网,使用的是点到点协议协议(Pointto Point Protocol,PPP),PPP协议具有用户认证及通知IP地址的功能。PPP over Ethernet(PPPoE)协议,是在以太网络中转播PPP帧信息的技术,尤其适用于ADSL等方式。The PPPoE configuration method has a high cost performance, and it is widely used in a series of applications including community networking construction. The current popular broadband access methods such as Asymmetric Digital Subscriber Line (ADSL) use PPPoE protocol . PPPoE uses Ethernet to form a large number of hosts into a network, connect to the Internet through a remote access device, and implement control and billing functions for each host accessed. Most computers that access the Internet through ADSL are connected to the Internet through an Ethernet card (Ethernet). The same TCP / IP method is also used, and no new protocol is added. The dial-up Internet access of the modem uses Point-to-Point Protocol (PPP), which has the functions of user authentication and notification of IP address. The PPP Over Ethernet (PPPoE) protocol is a technology for relaying PPP frame information in an Ethernet network, and is particularly suitable for ADSL and other methods.
IP配置方式的优先级策略可以自动选择,主要涉及到从高优先级往低优先级跳变,举例来说,包括:两种情况,The priority strategy of the IP configuration mode can be automatically selected, mainly involving the transition from high priority to low priority, for example, including: two cases,
第一,当前IP配置方式自动选择为动态IP配置方式,但DHCP服务器无法分配动态IP则自动切换至PPPoE配置IP方式。具体步骤如下:检测所述IP配置方式自动选择为动态IP配置方式;根据动态主机配置DHCP协议,检测客户端的物理网络接口 连接端无DHCP服务器,则直接将所述客户端的IP配置方式切换至所述PPPoE方式。或,检测所述IP配置方式自动选择为动态IP配置方式;根据动态主机配置DHCP协议,检测所述物理网络接口连接端存在所述DHCP服务器,进而检测所述物理网络接口与所述DHCP服务器是否建立DHCP会话,发现所述物理网络接口与所述DHCP服务器未建立通话;则将所述客户端的IP配置方式切换至所述PPPoE方式。First, the current IP configuration method is automatically selected as the dynamic IP configuration method, but if the DHCP server cannot allocate dynamic IP, it automatically switches to the PPPoE configuration IP method. The specific steps are as follows: detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode; according to the dynamic host configuration DHCP protocol, detect that the client's physical network interface connection end does not have a DHCP server, then directly switch the client's IP configuration mode to all The PPPoE method is described. Or, detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode; according to the dynamic host configuration DHCP protocol, detect that the DHCP server exists at the connection end of the physical network interface, and then detect whether the physical network interface and the DHCP server A DHCP session is established, and it is found that the physical network interface has not established a call with the DHCP server; then the client's IP configuration mode is switched to the PPPoE mode.
第二,当前IP配置方式自动选择为PPPoE配置方式,但PPPoE服务器无法分配动态IP则自动切换至静态配置IP方式。具体步骤如下:检测所述IP配置方式自动选择为PPPoE方式;根据PPPOE协议,检测客户端的物理网络接口连接端不存在PPPoE服务器,将所述客户端的IP配置方式切换至所述静态IP配置方式。或,检测所述IP配置方式自动选择为PPPoE方式;根据PPPOE协议,检测所述物理网络接口连接端存在PPPoE服务器,则检测所述物理网络接口是否与所述PPPoE服务器建立PPPoE会话;若未建立通话,将所述客户端的IP配置方式切换至所述静态IP配置方式。Second, the current IP configuration mode is automatically selected as the PPPoE configuration mode, but the PPPoE server cannot automatically assign a dynamic IP and then automatically switches to the static configuration IP mode. The specific steps are as follows: detecting that the IP configuration mode is automatically selected as the PPPoE mode; according to the PPPOE protocol, detecting that there is no PPPoE server on the client's physical network interface connection end, and switching the client's IP configuration mode to the static IP configuration mode. Or, detect that the IP configuration mode is automatically selected as the PPPoE mode; according to the PPPOE protocol, detect that there is a PPPoE server at the connection end of the physical network interface, then detect whether the physical network interface establishes a PPPoE session with the PPPoE server; if not established During a call, switch the client's IP configuration mode to the static IP configuration mode.
需要指明的是,若优先级策略为用户自行设置的优先级策略,比如说为:所述PPPoE配置IP方式的优先级高于所述动态IP配置方式或者所述所述动态IP配置方式的优先级高于动态配置IP方式。IP配置方式的自动切换检测方法一致,例如:所述PPPoE配置IP方式的优先级高于所述动态IP配置方式,则检测电子设备所述IP配置方式自动选择为PPPoE方式;根据PPPOE协议,检测客户端的物理网络接口连接端不存在PPPoE服务器,将所述客户端的IP配置方式切换至所述动态IP配置方式。或,检测所述IP配置方式自动选择为PPPoE方式;根据PPPOE协议,检测所述物理网络接口连接端存在PPPoE服务器,则检测所述物理网络接口是否与所述PPPoE服务器建立PPPoE会话;若未建立通话,将所述客户端的IP配置方式切换至所述动态IP配置方式。设置其他的优先级策略,IP配置方式的切换检测方法类似,此处不再赘述。It should be noted that if the priority policy is a priority policy set by the user, for example, the priority of the PPPoE configuration IP method is higher than that of the dynamic IP configuration method or the dynamic IP configuration method The level is higher than the dynamic configuration IP mode. The automatic switching detection method of the IP configuration mode is the same, for example: the PPPoE configuration IP mode has a higher priority than the dynamic IP configuration mode, then the electronic equipment is automatically selected as the PPPoE mode; according to the PPPOE protocol, the detection There is no PPPoE server at the connection end of the physical network interface of the client, and the IP configuration mode of the client is switched to the dynamic IP configuration mode. Or, detect that the IP configuration mode is automatically selected as the PPPoE mode; according to the PPPOE protocol, detect that there is a PPPoE server at the connection end of the physical network interface, then detect whether the physical network interface establishes a PPPoE session with the PPPoE server; if not established During a call, switch the IP configuration mode of the client to the dynamic IP configuration mode. Setting other priority policies, the switch detection method of the IP configuration method is similar, and will not be described here.
S103、检测所述配置IP方式为PPPoE配置方式,弹出用户的账户信息输入框,以获取用户输入的账户信息;S103. Detect that the IP configuration mode is the PPPoE configuration mode, and pop up a user account information input box to obtain the account information input by the user;
检测配置IP方式的方法可以通过电子设备内置的监听函数对应用程序的配置IP接口占用信息进行监测,以安卓系统的电子设备为例,可在系统框架层(native/framework层)创建系统级的监测模块,通过监测模块对应用程序的配置IP方式进行监测,或,独立创建监测进程,通过消息传输机制监测应用程序的配置IP方式。例如,可在框架层设立监测模块并运行在系统服务程序(system_server)中,由于该监测模块设立在系统级的服务框架层中,可方便与其他系统服务进行交互,同时无需担心系统调用时的权限问题。若配置IP方式为PPPoE配置方式,即满足用户的账户信息输入框触发显示的条件,电子设备屏幕显示账户信息输入框,用户填写合法的的账户信息,便可建立连接。The method of detecting the configuration IP method can monitor the configuration IP interface occupancy information of the application through the built-in monitoring function of the electronic device. Taking the electronic device of the Android system as an example, a system-level can be created at the system framework layer (native / framework layer) The monitoring module monitors the configuration IP mode of the application through the monitoring module, or independently creates a monitoring process and monitors the configuration IP mode of the application through the message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue. If the IP mode is configured as a PPPoE configuration mode, that is, the condition that the user's account information input box is triggered to display is met, the electronic device screen displays the account information input box, and the user fills in the legal account information to establish a connection.
用户通过输入无线网络选择信息,确认出供选网络,用户为供选网络设置IP配置 方式,若IP配置方式为PPPoE配置方式,则弹出用户的账户信息输入框,用户通过输入账户信息建立网络连接。其中,输入信息包括、合法用户名信息和与用户名匹配的密码信息。The user confirms the alternative network by entering the wireless network selection information. The user sets the IP configuration mode for the alternative network. If the IP configuration mode is the PPPoE configuration mode, a user account information input box pops up, and the user establishes a network connection by entering the account information . Among them, the input information includes, legal user name information and password information matching the user name.
S104、根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接。其中,所述账户信息输入框还用于对所述账户信息利用云服务器进行备份。具体方法包括:存储所述账户信息并上传至所述云服务器,且接收所述云服务器返回的所述账户信息保存成功的响应;若重置或更换所述客户端,则根据输入的所述用户名向所述服务器发送获取所述用户名对应密码的请求;接收所述云服务器下发的所述用户名对应密码,并填写至密码输入框,以使所述用户的账户信息进行PPPoE认证。S104. Perform PPPoE authentication according to the input account information, and establish a connection with the access network. The account information input box is also used to back up the account information using a cloud server. The specific method includes: storing the account information and uploading it to the cloud server, and receiving a response from the cloud server that the account information has been successfully saved; if the client is reset or replaced, according to the input The user name sends a request to the server to obtain the password corresponding to the user name; receives the password corresponding to the user name issued by the cloud server, and fills in the password input box to enable PPPoE authentication of the user's account information .
PPPoE配置IP连接入网的方法包括:客户端和接入集中器端(Access Concentrator,AC)获取对端的以太网物理地址,且所述客户端和所述接入集中器端共享唯一的会话ID;客户端发送发现阶段初始化(PPPoEActive Discovery Initiation,PADI)广播报文至预设广播域内,以向预设广播域内的AC申请服务,其中预设广播区域可以是小区内。或者方圆1m-1000m任一值包括范围均可;预设广播域内一个或多个AC发现阶段回复(PPPoEActive Discovery Offer,PADO)报文,以回复可以为客户端提供服务;客户端主机根据预设需求选择一个AC,并向其发送发现阶段请求(PPPoE Active Discovery Request,PADR)报文,以向该AC请求服务,其中客户端主机的预设需求可以是信号强度、距离信息或安全信息等;AC向客户端发送会话承诺(PPPoEActive Discovery Session Configuration,PADS)报文,以宣告向客户端提供服务,并与所述客户端共享唯一的会话ID。所述客户端和所述接入集中器通过所述会话ID建立拨号连接,并进行点对点的网络层数据报文传送;PPPoE会话协商阶段上的PPP协商和普通的PPP协商方式一致;客户端接入网络,并进行数据交互。所述客户端或所述接入集中器端,当客户端或者服务器需要终止会话时,可以发送这种PADT报文会话双方任一方均可根据需求发送终结报文(PPPoEActive Discovery Terminate,PADT)以断开会话双方的PPPoE连接。The PPPoE method for configuring the IP connection to the network includes: the client and the access concentrator (Access) acquire the Ethernet physical address of the peer, and the client and the access concentrator share a unique session ID; The client sends a Discovery Phase Initialization (PPPoE Active Discovery, Initiation, PADI) broadcast message to the preset broadcast domain to apply for services from the AC in the preset broadcast domain, where the preset broadcast area may be within the cell. Or any value within the range of 1m-1000m, including the range; preset one or more AC Discovery Phase Reply (PPPoEActive Discovery, Offer, PADO) messages in the broadcast domain, in response to which the client can be served; the client host is based on the preset Need to select an AC and send it a discovery phase request (PPPoE Active Discovery Request, PADR) message to request services from the AC, where the preset requirements of the client host can be signal strength, distance information, or security information; The AC sends a session commitment (PPPoEActive Discovery Session, Configuration, PADS) message to the client to announce the provision of services to the client and share a unique session ID with the client. The client and the access concentrator establish a dial-up connection through the session ID and perform point-to-point network layer data packet transmission; the PPP negotiation at the PPPoE session negotiation stage is the same as the ordinary PPP negotiation; the client connects Enter the network and interact with data. The client or the access concentrator, when the client or server needs to terminate the session, can send such a PADT message. Both parties to the session can send a termination message (PPPoEActiveDiscoveryTerminate, PADT) as required. Disconnect the PPPoE connection between the two sides of the session.
本申请实施例提供的方法还可以包括:The method provided in this embodiment of the present application may further include:
S105、若所述PPPoE方式建立的拨号连接异常下线,且所述异常下线属于所述预设异常下线表项,则所述客户端向服务器发送请求认证PPPoE客户端身份,若所述服务器认证成功,则恢复所述拨号连接。具体可以包括:获取异常下线的数据信息;查询所述数据信息的异常下线标识,确认所述异常下线标识处于所述预设异常下线表项内,其中,预设异常下线表项可以包括路由器重启、设备短暂断电、链路震荡、硬件故障和客户端重启等;若属于上述表项中的任一一种,则向所述服务器发送用于请求认证所述客户端身份的认证报文;接收所述服务器返回的身份认证成功响应,恢复所 述异常下线拨号连接。S105. If the dial-up connection established in the PPPoE mode is abnormally offline, and the abnormal offline belongs to the preset abnormal offline entry, the client sends a request to the server to authenticate the identity of the PPPoE client. If the server authentication is successful, the dial-up connection is restored. Specifically, it may include: acquiring data information of abnormal log-off; querying the abnormal log-off identifier of the data information, confirming that the abnormal log-off identifier is in the preset abnormal log-off entry, wherein the preset abnormal log-off table The item may include a router restart, a short power outage of the device, link flapping, hardware failure, and client restart, etc .; if it belongs to any of the above table items, it is sent to the server to request authentication of the client identity Authentication message; receiving the identity authentication success response returned by the server, and recovering the abnormal offline dial-up connection.
在现网在基于以太网点对点协议(Point-to-PointProtocol over Ethernet,PPPoE)应用中,通常客户端与宽带远程接入服务器(Broadband RemoteAccess Server,BRAS)设备之间会通过二层交换机互联。当BRAS设备的接入口链路发生震荡或者硬件发生故障等会导致客户端发生异常下线,客户端中BRAS设备的公网地址仍然存在,客户端仍然可以继续访问公网,但BRAS设备上该客户端对应的接入口的用户表项将自动清除,BRAS设备无法向客户端发送PADT报文,因此客户端无法感知到故障。在这种情况下,客户端只能依赖于自身的周期性保活探测机制来感知自身已被异常下线。通过客户端获取异常下线的数据信息;并查询所述数据信息的异常下线标识,确认所述异常下线标识处于所述预设异常下线表项内,则向所述服务器发送用于请求认证所述客户端身份的认证报文;当接收所述服务器返回的身份认证成功响应,则恢复所述异常下线拨号连接。预设异常下线表项中其他情况的网络恢复连接方式与链路震荡及硬件故障网络恢复连接的方式类似。此处不再赘述。In the application of the existing network based on the Point-to-Point Protocol over Ethernet (PPPoE), usually the client and the Broadband Remote Access Server (BRAS) device are interconnected through a Layer 2 switch. When the access port link of the BRAS device fluctuates or the hardware fails, the client will be abnormally offline. The public network address of the BRAS device in the client still exists. The client can still continue to access the public network, but the BRAS device should The user entry of the access port corresponding to the client will be automatically cleared, and the BRAS device cannot send PADT messages to the client, so the client cannot perceive the failure. In this case, the client can only rely on its own periodic keepalive detection mechanism to sense that it has been abnormally offline. Obtain the abnormal offline data information through the client; and query the abnormal offline identifier of the data information to confirm that the abnormal offline identifier is in the preset abnormal offline entry, then send to the server for An authentication message requesting authentication of the identity of the client; when receiving the identity authentication success response returned by the server, the abnormal offline dial-up connection is restored. The network recovery connection method in other situations in the preset abnormal offline entry is similar to the link recovery and hardware failure network recovery connection method. I won't repeat them here.
本申请实施例提供了一种无线保真Wi-Fi接入的装置,如图2所示,所述装置包括:网络搜索模块21、配置IP模块22、输入模块23和连接模块24,An embodiment of the present application provides a device for wireless fidelity Wi-Fi access. As shown in FIG. 2, the device includes: a network search module 21, a configuration IP module 22, an input module 23, and a connection module 24,
网络搜索模块21,用于接收无线局域网络开启命令,搜索所述无线局域网络内的供选网络。The network search module 21 is configured to receive a wireless local area network opening command and search for alternative networks in the wireless local area network.
电子设备可通过内置的监听函数(listen())对应用程序的网络搜索模块21的无线局域网络开启命令的接收行为进行监测,以安卓系统的电子设备为例,可在系统框架层(native/framework层)创建系统级的监测模块,通过监测模块对应用程序的无线局域网络开启命令行为进行监测,或,独立创建监测进程,通过消息传输机制监测无线局域网络是否开启。例如,可在框架层设立监测模块并运行在系统服务程序(system_server)中,由于该监测模块设立在系统级的服务框架层中,可方便与其他系统服务进行交互,同时无需担心系统调用时的权限问题。此外,也可以创建独立的监测进程,在该进程中设立并调用单独的监听函数,可设置为开机自启动,并实时对其他任何一个应用程序的接收命令行为、查询命令行为进行监控,具体地,可实时抓取当前调用的无线局域网络接口的数据信息及开启状态标识,以此确定当前是否接收到无线局域网络开启命令,可独立开发,不与系统进行耦合,方便后续的开发和升级。The electronic device can monitor the reception behavior of the wireless local area network opening command of the network search module 21 of the application through the built-in monitoring function (listen ()). Taking the electronic device of the Android system as an example, the system framework layer (native / framework layer) Create a system-level monitoring module, use the monitoring module to monitor the command line of the application's wireless local area network, or independently create a monitoring process to monitor whether the wireless local area network is turned on through a message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue. In addition, you can also create an independent monitoring process, set up and call a separate monitoring function in this process, can be set to start automatically after booting, and monitor the receiving command line and query command line of any other application in real time, specifically , It can capture the data information and open status identification of the currently called wireless local area network interface in real time to determine whether the wireless local area network opening command is currently received. It can be independently developed without coupling with the system, which is convenient for subsequent development and upgrade.
电子产品Wi-Fi的功耗较大。因此,上层应用程序设置开关,用于打开和关闭Wi-Fi功能。当用户在手机上点击打开Wi-Fi时,Wi-Fi模块通电运行起来,当然也会相应加载Wi-Fi的驱动程序。利用监听函数(listen())监听无线局域网络开启命令,即表示Wi-Fi功能开启,电子产品则显示搜索到附近的Wi-Fi热点,这个搜索过程即扫描(Scanning)。 利用扫描找到无线网络,然后加入到该供选网络中。在接入网络的过程中,接入点(Access Point,AP)发送信标帧至移动终端,信标帧中可以包含网络的服务集标识(Service Set Identifier,SSID),用户可以根据SSID选择自己能够加入的无线局域网。SSID其实是接入点(Access Point)回应工作站扫描时所带的参数,还有其它的网络参数,包括接入点的媒体访问控制(MediaAccess Control Address,MAC)地址、信号强度、加密和认证方式等。需要指明的是,在对Wi-Fi供选网络进行扫描网络检测,若在预设时间内检测到仍不可上网,则触发其他供选网络检测。其中,预设时间是根据对Wi-Fi供选网络扫描检测过程来设置的,具体时间可由工程师根据硬件参数或者软件算法自行设置,此处不再赘述。Wi-Fi power consumption of electronic products is relatively large. Therefore, the upper-layer application sets switches to turn the Wi-Fi function on and off. When the user clicks on the mobile phone to open Wi-Fi, the Wi-Fi module is powered on and runs, and of course the Wi-Fi driver will be loaded accordingly. Use the listen function (listen ()) to monitor the wireless LAN opening command, which means that the Wi-Fi function is turned on, and the electronic product displays that the nearby Wi-Fi hotspot is searched. This search process is scanning. Use the scan to find the wireless network, and then join the alternative network. In the process of accessing the network, the access point (Access Point, AP) sends a beacon frame to the mobile terminal. The beacon frame can contain the network's Service Set Identifier (SSID), and the user can choose himself according to the SSID A wireless LAN that can be joined. The SSID is actually the parameter that the Access Point responds to when the workstation scans, as well as other network parameters, including the Media Access Control (MAC) address, signal strength, encryption, and authentication method of the access point Wait. It should be pointed out that during the scan network detection of the Wi-Fi alternative network, if it is detected that the Internet is still not available within the preset time, other alternative network detection is triggered. Among them, the preset time is set according to the Wi-Fi optional network scanning detection process. The specific time can be set by the engineer according to the hardware parameters or software algorithms, and will not be described here.
配置IP模块22,用于在所述供选网络中选择并确认出接入网络,且为所述接入网络选择预设配置互联网协议(InternetProtocol,IP)方式,以配置所述接入网络的IP地址,其中,所述预设配置IP方式包括:静态IP配置方式、动态IP配置方式和基于以太网的点对点通讯协议(Point-to-Point Protocol over Ethernet,PPPoE)配置方式。需指明的是,配置互联网协议IP方式的选择方式可以是,根据IP配置方式的优先级策略自动选择所述预设配置IP方式。设置所述优先级策略可以为:所述动态IP配置方式的优先级高于所述PPPoE配置IP方式;所述PPPoE配置IP方式的优先级高于所述静态IP配置方式。其中,所述优先级策略的修改权限可以供所述用户提供。所述用户可以根据个人需求自行修改优先级策略。The configuration IP module 22 is used to select and confirm an access network in the alternative network, and select a preset configuration Internet Protocol (Internet Protocol (IP) mode for the access network to configure the access network IP address, wherein the preset IP configuration mode includes: static IP configuration mode, dynamic IP configuration mode, and Point-to-Point Protocol over Ethernet (PPPoE) configuration mode based on Ethernet. It should be noted that the selection method of configuring the Internet protocol IP mode may be that the preset configuration IP mode is automatically selected according to the priority policy of the IP configuration mode. The priority policy may be set as follows: the dynamic IP configuration mode has a higher priority than the PPPoE configuration IP mode; the PPPoE configuration IP mode has a higher priority than the static IP configuration mode. Wherein, the modification authority of the priority policy may be provided by the user. The user can modify the priority strategy according to personal needs.
在无线局域网中,电子设备基于无线保真(WIreless-FIdelity,Wi-Fi)协议进行通信,在接入网络的过程中,接入点(Access Point,AP)发送信标帧至移动终端,信标帧中可以包含网络的服务集标识(Service Set Identifier,SSID),用户可以根据SSID选择自己能够加入的无线局域网。In a wireless local area network, electronic devices communicate based on the wireless fidelity (WIreless-FIdelity, Wi-Fi) protocol. During the process of accessing the network, the access point (Access Point, AP) sends a beacon frame to the mobile terminal. The target frame can include the service set identifier (SSID) of the network, and the user can select the wireless local area network that he can join according to the SSID.
静态IP配置是由用户根据路由器自身IP地址的特点给电子设备设置的静态IP地址,此地址不会因为设备重新启动或路由器重新启动而改变。动态IP配置则是由动态主机配置协议(Dynamic Host Configuration Protocol,DHCP)服务器自动分配地址的,DHCP是局域网的网络协议,使用UDP协议工作。DHCP协议允许服务器向客户端动态分配IP地址和配置信息。DHCP协议支持C/S结构,主要分为客户端和服务端。DHCP服务器分配的IP地址受地址租期、设备状态影响,租期到期后,IP地址会被DHCP服务器收回,设备重新启动、路由器重新启动或是重新接入网络都将导致DHCP服务器重新分配IP地址。Static IP configuration is a static IP address set by the user to the electronic device according to the characteristics of the router's own IP address. This address will not change when the device is restarted or the router is restarted. Dynamic IP configuration is automatically assigned by the Dynamic Host Configuration Protocol (DHCP) server. DHCP is the network protocol of the local area network and uses the UDP protocol to work. The DHCP protocol allows the server to dynamically assign IP addresses and configuration information to clients. The DHCP protocol supports a C / S structure, which is mainly divided into a client and a server. The IP address assigned by the DHCP server is affected by the lease of the address and the status of the device. After the lease expires, the IP address will be recovered by the DHCP server. Restarting the device, restarting the router, or reconnecting to the network will cause the DHCP server to reassign IP. address.
PPPoE配置方式具有较高的性价比,它在包括小区组网建设等一系列应用中被广泛采用,目前流行的宽带接入方式如非对称数字用户线路(Asymmetric Digital SubscriberLine,ADSL)就使用了PPPoE协议。PPPoE利用以太网将大量主机组成网 络,通过一个远端接入设备连入因特网,并对接入的每一个主机实现控制、计费功能。通过ADSL方式上网的计算机大都是通过以太网卡(Ethernet)与互联网相连的。同样使用的还是普通的TCP/IP方式,并没有附加新的协议。调制解调器的拨号上网,使用的是点到点协议协议(Pointto Point Protocol,PPP),PPP协议具有用户认证及通知IP地址的功能。PPP over Ethernet(PPPoE)协议,是在以太网络中转播PPP帧信息的技术,尤其适用于ADSL等方式。The PPPoE configuration method has a high cost performance, and it is widely used in a series of applications including community networking construction. The current popular broadband access methods such as Asymmetric Digital Subscriber Line (ADSL) use PPPoE protocol . PPPoE uses Ethernet to form a network of a large number of hosts, connect to the Internet through a remote access device, and implement control and billing functions for each host accessed. Most computers that access the Internet through ADSL are connected to the Internet through an Ethernet card (Ethernet). The same TCP / IP method is also used, and no new protocol is added. The dial-up Internet access of the modem uses Point-to-Point Protocol (PPP), which has the functions of user authentication and notification of IP address. The PPP Over Ethernet (PPPoE) protocol is a technology for relaying PPP frame information in an Ethernet network, and is particularly suitable for ADSL and other methods.
配置IP模块22包括检测单元221、判断单元222和切换单元223,IP配置方式的优先级策略可以自动选择,主要涉及到从高优先级往低优先级跳变,举例来说,包括两种情况:The configuration IP module 22 includes a detection unit 221, a judgment unit 222, and a switching unit 223. The priority strategy of the IP configuration mode can be automatically selected, mainly involving a transition from a high priority to a low priority, for example, including two cases :
第一,当前IP配置方式自动选择为动态IP配置方式,但DHCP服务器无法分配动态IP则自动切换至PPPoE配置IP方式。具体步骤如下:检测单元221,用于检测所述IP配置方式自动选择为动态IP配置方式;判断单元222,用于根据动态主机配置DHCP协议,检测客户端的物理网络接口连接端无DHCP服务器,切换单元223,用于将所述客户端的IP配置方式切换至所述PPPoE方式。或,检测单元221,用于检测所述IP配置方式自动选择为动态IP配置方式;判断单元222,用于根据动态主机配置DHCP协议,检测所述物理网络接口连接端存在所述DHCP服务器,进而检测所述物理网络接口与所述DHCP服务器是否建立DHCP会话,发现所述物理网络接口与所述DHCP服务器未建立通话;切换单元223,用于所述客户端的IP配置方式切换至所述PPPoE方式。First, the current IP configuration method is automatically selected as the dynamic IP configuration method, but if the DHCP server cannot allocate dynamic IP, it automatically switches to the PPPoE configuration IP method. The specific steps are as follows: the detection unit 221 is used to detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode; the determination unit 222 is used to configure the DHCP protocol according to the dynamic host, detect that there is no DHCP server on the client's physical network interface connection, and switch Unit 223, configured to switch the IP configuration mode of the client to the PPPoE mode. Or, the detection unit 221 is configured to detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode; the determination unit 222 is configured to detect the presence of the DHCP server at the physical network interface connection end according to the dynamic host configuration DHCP protocol, and Detecting whether the physical network interface has established a DHCP session with the DHCP server, and found that the physical network interface has not established a call with the DHCP server; a switching unit 223 is used to switch the IP configuration mode of the client to the PPPoE mode .
第二,当前IP配置方式自动选择为PPPoE配置方式,但PPPoE服务器无法分配动态IP则自动切换至静态配置IP方式。具体步骤如下:检测单元221,还用于检测所述IP配置方式自动选择为PPPoE方式;判断单元222,还用于根据PPPOE协议,检测客户端的物理网络接口连接端不存在PPPoE服务器,切换单元223,还用于将所述客户端的IP配置方式切换至所述静态IP配置方式。或,检测单元221,还用于检测所述IP配置方式自动选择为PPPoE方式;判断单元222,还用于根据PPPOE协议,检测所述物理网络接口连接端存在PPPoE服务器,则检测所述物理网络接口是否与所述PPPoE服务器建立PPPoE会话;若未建立通话,切换单元223,还用于将所述客户端的IP配置方式切换至所述静态IP配置方式。Second, the current IP configuration mode is automatically selected as the PPPoE configuration mode, but the PPPoE server cannot automatically assign a dynamic IP and then automatically switches to the static configuration IP mode. The specific steps are as follows: the detection unit 221 is also used to detect that the IP configuration mode is automatically selected as the PPPoE mode; the determination unit 222 is also used to detect that there is no PPPoE server on the client's physical network interface connection according to the PPPOE protocol, and the switching unit 223 And is also used to switch the client's IP configuration mode to the static IP configuration mode. Or, the detection unit 221 is also used to detect that the IP configuration mode is automatically selected as the PPPoE mode; the determination unit 222 is also used to detect that there is a PPPoE server at the connection end of the physical network interface according to the PPPOE protocol, and then detect the physical network Whether the interface establishes a PPPoE session with the PPPoE server; if no call is established, the switching unit 223 is also used to switch the IP configuration mode of the client to the static IP configuration mode.
需要指明的是,若优先级策略为用户自行设置的优先级策略,比如说为:所述PPPoE配置IP方式的优先级高于所述动态IP配置方式或者所述所述动态IP配置方式的优先级高于动态配置IP方式。IP配置方式的自动切换检测方法一致,例如:所述PPPoE配置IP方式的优先级高于所述动态IP配置方式,则检测单元221检测电子设备所述IP配置方式自动选择为PPPoE方式;根据PPPOE协议,判断单元222检测客户 端的物理网络接口连接端不存在PPPoE服务器,切换单元223将所述客户端的IP配置方式切换至所述动态IP配置方式。或,检测单元221检测所述IP配置方式自动选择为PPPoE方式;判断单元222根据PPPOE协议,检测所述物理网络接口连接端存在PPPoE服务器,则检测所述物理网络接口是否与所述PPPoE服务器建立PPPoE会话;若未建立通话,切换单元223将所述客户端的IP配置方式切换至所述动态IP配置方式。设置其他的优先级策略,IP配置方式的切换检测方法类似,此处不再赘述。It should be noted that if the priority policy is a priority policy set by the user, for example, the priority of the PPPoE configuration IP method is higher than that of the dynamic IP configuration method or the dynamic IP configuration method The level is higher than the dynamic configuration IP mode. The automatic switching detection method of the IP configuration mode is consistent, for example: the PPPoE configuration IP mode has a higher priority than the dynamic IP configuration mode, the detection unit 221 detects that the IP configuration mode of the electronic device is automatically selected as the PPPoE mode; Protocol, the judging unit 222 detects that there is no PPPoE server on the client's physical network interface connection, and the switching unit 223 switches the client's IP configuration mode to the dynamic IP configuration mode. Or, the detection unit 221 detects that the IP configuration mode is automatically selected as the PPPoE mode; the determination unit 222 detects that a PPPoE server exists at the connection end of the physical network interface according to the PPPOE protocol, and then detects whether the physical network interface is established with the PPPoE server PPPoE session; if no call is established, the switching unit 223 switches the IP configuration mode of the client to the dynamic IP configuration mode. Setting other priority policies, the switch detection method of the IP configuration method is similar, and will not be described here.
输入模块23,用于检测所述配置IP方式为PPPoE配置方式,弹出用户的账户信息输入框,以获取用户输入的账户信息;The input module 23 is configured to detect that the IP configuration mode is the PPPoE configuration mode, and pop up a user account information input box to obtain the account information input by the user;
检测配置IP方式的方法可以通过电子设备内置的监听函数对应用程序的配置IP接口占用信息进行监测,以安卓系统的电子设备为例,可在系统框架层(native/framework层)创建系统级的监测模块,通过监测模块对应用程序的配置IP方式进行监测,或,独立创建监测进程,通过消息传输机制监测应用程序的配置IP方式。例如,可在框架层设立监测模块并运行在系统服务程序(system_server)中,由于该监测模块设立在系统级的服务框架层中,可方便与其他系统服务进行交互,同时无需担心系统调用时的权限问题。若配置IP方式为PPPoE配置方式,即满足用户的账户信息输入框触发显示的条件,电子设备屏幕显示账户信息输入框,用户填写合法的的账户信息,便可建立连接。The method of detecting the configuration IP method can monitor the configuration IP interface occupancy information of the application through the built-in monitoring function of the electronic device. Taking the electronic device of the Android system as an example, a system-level can be created at the system framework layer (native / framework layer) The monitoring module monitors the configuration IP mode of the application through the monitoring module, or independently creates a monitoring process and monitors the configuration IP mode of the application through the message transmission mechanism. For example, you can set up a monitoring module at the framework layer and run it in the system service program (system_server). Because the monitoring module is set up at the system-level service framework layer, you can easily interact with other system services without worrying about system calls. Permissions issue. If the IP mode is configured as a PPPoE configuration mode, that is, the condition that the user's account information input box is triggered to display is met, the electronic device screen displays the account information input box, and the user fills in the legal account information to establish a connection.
用户通过输入无线网络选择信息,确认出供选网络,用户为供选网络设置IP配置方式,若IP配置方式为PPPoE配置方式,则弹出用户的账户信息输入框,用户通过输入账户信息建立网络连接。其中,输入信息包括、合法用户名信息和与用户名匹配的密码信息。The user confirms the alternative network by entering the wireless network selection information. The user sets the IP configuration mode for the alternative network. If the IP configuration mode is the PPPoE configuration mode, a user account information input box pops up, and the user establishes a network connection by entering the account information . Among them, the input information includes, legal user name information and password information matching the user name.
连接模块24,用于根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接。在一个实施例中,连接模块24还用于对所述账户信息利用云服务器进行备份。连接模块24包括存储单元241、密码请求单元242和密码恢复单元243,其中。存储单元241,用于存储所述账户信息并上传至所述云服务器,且接收所述云服务器返回的所述账户信息保存成功的响应;密码请求单元242,用于若重置或更换所述客户端,则根据输入的所述用户名向所述服务器发送获取所述用户名对应密码的请求;密码恢复单元243,用于接收所述云服务器下发的所述用户名对应密码,并填写至密码输入框,以使所述用户的账户信息进行PPPoE认证。The connection module 24 is configured to perform PPPoE authentication according to the input account information and establish a connection with the access network. In one embodiment, the connection module 24 is also used to back up the account information using a cloud server. The connection module 24 includes a storage unit 241, a password request unit 242, and a password recovery unit 243, among them. The storage unit 241 is used to store the account information and upload it to the cloud server, and receives a response from the cloud server that the account information is saved successfully; the password request unit 242 is used to reset or replace the account The client sends a request for obtaining the password corresponding to the user name to the server according to the entered user name; the password recovery unit 243 is configured to receive the password corresponding to the user name issued by the cloud server and fill in To the password input box to enable PPPoE authentication of the user's account information.
PPPoE配置IP连接入网的方法包括:客户端和接入集中器端(Access Concentrator,AC)获取对端的以太网物理地址,且所述客户端和所述接入集中器端共享唯一的会话ID;客户端发送发现阶段初始化(PPPoEActive Discovery Initiation,PADI)广播报文至预设广播域内,以向预设广播域内的AC申请服务,其中预设广播区域可以是小区内。或者方圆1m-1000m任一值包括范围均可;预设广播域内一个或多个AC发现阶段回复 (PPPoEActive Discovery Offer,PADO)报文,以回复可以为客户端提供服务;客户端主机根据预设需求选择一个AC,并向其发送发现阶段请求(PPPoEActive Discovery Request,PADR)报文,以向该AC请求服务,其中客户端主机的预设需求可以是信号强度、距离信息或安全信息等;AC向客户端发送会话承诺(PPPoEActive Discovery Session Configuration,PADS)报文,以宣告向客户端提供服务,并与所述客户端共享唯一的会话ID。所述客户端和所述接入集中器通过所述会话ID建立拨号连接,并进行点对点的网络层数据报文传送;PPPoE会话协商阶段上的PPP协商和普通的PPP协商方式一致;客户端接入网络,并进行数据交互。所述客户端或所述接入集中器端,当客户端或者服务器需要终止会话时,可以发送这种PADT报文会话双方任一方均可根据需求发送终结报文(PPPoEActive Discovery Terminate,PADT)以断开会话双方的PPPoE连接。The PPPoE method for configuring the IP connection to the network includes: the client and the access concentrator (Access) acquire the Ethernet physical address of the peer, and the client and the access concentrator share a unique session ID; The client sends a Discovery Phase Initialization (PPPoE Active Discovery, Initiation, PADI) broadcast message to the preset broadcast domain to apply for services from the AC in the preset broadcast domain, where the preset broadcast area may be within the cell. Or any value within the range of 1m-1000m, including the range; preset one or more AC Discovery Phase Reply (PPPoEActive Discovery, Offer, PADO) messages in the broadcast domain, in response to which the client can be served; the client host is based on the preset Need to select an AC and send a discovery phase request (PPPoEActive Discovery Request, PADR) message to it to request services from the AC, where the preset requirements of the client host can be signal strength, distance information, or security information; AC A session commitment (PPPoEActive Discovery Session Configuration, PADS) message is sent to the client to announce the provision of services to the client and share a unique session ID with the client. The client and the access concentrator establish a dial-up connection through the session ID and perform point-to-point network layer data packet transmission; the PPP negotiation at the PPPoE session negotiation stage is the same as the ordinary PPP negotiation; the client connects Enter the network and interact with data. The client or the access concentrator, when the client or server needs to terminate the session, can send such a PADT message. Both parties to the session can send a termination message (PPPoEActiveDiscoveryTerminate, PADT) as required. Disconnect the PPPoE connection between the two sides of the session.
本申请实施例提供的装置还可以包括:异常下线恢复模块25,用于若所述PPPoE方式建立的拨号连接异常下线,且所述异常下线属于所述预设异常下线表项,则所述客户端向服务器发送请求认证PPPoE客户端身份,若所述服务器认证成功,则恢复所述拨号连接。异常下线恢复模块25可以包括:获取单元251、查询单元252、认证请求单元253和恢复单元254,恢复拨号连接的过程具体如下:获取单元251获取异常下线的数据信息;查询单元252查询所述数据信息的异常下线标识,确认所述异常下线标识处于所述预设异常下线表项内,其中,预设异常下线表项可以包括路由器重启、设备短暂断电、链路震荡、硬件故障和客户端重启等,需指明的是,预设异常下线表项可以根据用户需求自行设置;若属于上述表项中的任一一种,认证请求单元253,向所述服务器发送用于请求认证所述客户端身份的认证报文;恢复单元254接收所述服务器返回的身份认证成功响应,恢复所述异常下线拨号连接。The device provided in this embodiment of the present application may further include: an abnormal offline recovery module 25, configured to abnormally log out if the dial-up connection established in the PPPoE manner belongs to the preset abnormal offline entry, Then, the client sends a request to the server to authenticate the PPPoE client identity, and if the server authentication is successful, the dial-up connection is restored. The abnormal offline recovery module 25 may include: an acquisition unit 251, an inquiry unit 252, an authentication request unit 253, and a recovery unit 254. The process of recovering the dial-up connection is specifically as follows: the acquisition unit 251 acquires abnormal offline data information; The abnormal offline identifier of the data information, confirming that the abnormal offline identifier is in the preset abnormal offline entry, where the preset abnormal offline entry may include a restart of the router, a brief power failure of the device, and a link flap , Hardware failure and client restart, etc. It should be noted that the preset abnormal offline entry can be set according to user needs; if it belongs to any of the above entries, the authentication request unit 253 sends to the server An authentication message for requesting authentication of the identity of the client; the restoration unit 254 receives the identity authentication success response returned by the server, and restores the abnormal offline dial-up connection.
在现在基于以太网的点对点协议(Point-to-PointProtocol overEthernet,PPPoE)应用中,通常客户端与宽带远程接入服务器(Broadband RemoteAccess Server,BRAS)设备之间会通过二层交换机互联。当BRAS设备的接入口链路发生震荡或者硬件发生故障等会导致客户端发生异常下线,客户端中BRAS设备的公网地址仍然存在,客户端仍然可以继续访问公网,但BRAS设备上该客户端对应的接入口的用户表项将自动清除,BRAS设备无法向客户端发送PADT报文,因此客户端无法感知到故障。在这种情况下,客户端只能依赖于自身的周期性保活探测机制来感知自身已被异常下线。通过客户端获取单元251获取异常下线的数据信息;查询单元252查询所述数据信息的异常下线标识,确认所述异常下线标识处于所述预设异常下线表项内,则向认证请求单元253所述服务器发送用于请求认证所述客户端身份的认证报文;当恢复单元254接收所 述服务器返回的身份认证成功响应,则恢复所述异常下线拨号连接。预设异常下线表项中其他情况的网络恢复连接方式与链路震荡及硬件故障网络恢复连接的方式类似。此处不再赘述。In the application of Point-to-Point Protocol over Ethernet (PPPoE) based on Ethernet, usually the client and Broadband Remote Access Server (BRAS) equipment are interconnected through a Layer 2 switch. When the access port link of the BRAS device fluctuates or the hardware fails, the client will be abnormally offline. The public network address of the BRAS device in the client still exists. The client can still continue to access the public network, but the BRAS device should The user entry of the access port corresponding to the client will be automatically cleared, and the BRAS device cannot send PADT messages to the client, so the client cannot perceive the failure. In this case, the client can only rely on its own periodic keepalive detection mechanism to sense that it has been abnormally offline. Obtain the abnormal offline data information through the client obtaining unit 251; the query unit 252 queries the abnormal offline identifier of the data information, confirms that the abnormal offline identifier is in the preset abnormal offline entry, and then submits the authentication In the request unit 253, the server sends an authentication message for requesting authentication of the identity of the client; when the recovery unit 254 receives the identity authentication success response returned by the server, the abnormal offline dial-up connection is restored. The network recovery connection method in other situations in the preset abnormal offline entry is similar to the link recovery and hardware failure network recovery connection method. I won't repeat them here.
图3为一实施例中电子设备的内部结构示意图。如图3所示,该电子设备包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口、声音采集装置、扬声器、显示屏和输入装置。其中,终端的非易失性存储介质存储有操作系统和计算机可读指令。该计算机可读指令被处理器执行时以实现一种电子设备的对应用程序进行处理的方法。该处理器用于提供计算和控制能力,支撑整个电子设备的运行。电子设备中的内存储器为非易失性存储介质中的计算机可读指令的运行提供环境。电子设备的显示屏可以是液晶显示屏或者电子墨水显示屏等,输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,也可以是外接的键盘、触控板或鼠标等。该电子设备可以是手机、平板电脑或者个人数字助理或穿戴式设备等。本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。3 is a schematic diagram of an internal structure of an electronic device in an embodiment. As shown in FIG. 3, the electronic device includes a processor connected through a system bus, a non-volatile storage medium, an internal memory and a network interface, a sound collection device, a speaker, a display screen, and an input device. Among them, the non-volatile storage medium of the terminal stores an operating system and computer-readable instructions. When the computer-readable instructions are executed by the processor, a method for processing an application program of an electronic device is realized. The processor is used to provide computing and control capabilities to support the operation of the entire electronic device. The internal memory in the electronic device provides an environment for the execution of computer-readable instructions in the non-volatile storage medium. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, etc. The input device may be a touch layer covered on the display screen, a button, a trackball or a touch pad provided on the housing of the electronic device, or External keyboard, touchpad or mouse, etc. The electronic device may be a mobile phone, a tablet computer, a personal digital assistant or a wearable device. Those skilled in the art can understand that the structure shown in FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may It includes more or fewer components than shown in the figure, or some components are combined, or have a different component arrangement.
其中,上述提及的对应用程序进行处理的方法具体可以为:Among them, the method for processing the application mentioned above may specifically be:
接收无线局域网络开启命令,搜索所述无线局域网络内的供选网络;Receiving a wireless local area network opening command, searching for alternative networks in the wireless local area network;
在所述供选网络中选择并确认出接入网络,且为所述接入网络选择预设配置互联网协议IP方式,以配置所述接入网络的IP地址,其中,所述预设配置IP方式包括:静态IP配置方式、动态IP配置方式和基于以太网的点对点通讯协议PPPoE配置方式;Select and confirm an access network in the alternative network, and select a preset configuration internet protocol IP method for the access network to configure an IP address of the access network, wherein the preset configuration IP The methods include: static IP configuration method, dynamic IP configuration method, and Ethernet-based PPPoE configuration method for point-to-point communication protocol;
检测所述配置IP方式为PPPoE配置方式,弹出用户的账户信息输入框,以获取用户输入的账户信息;Detect that the IP configuration mode is the PPPoE configuration mode, and a user account information input box pops up to obtain the account information input by the user;
根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接;Perform PPPoE authentication based on the input account information, and establish a connection with the access network;
若所述PPPoE方式建立的拨号连接异常下线,且所述异常下线属于所述预设异常下线表项,则所述客户端向服务器发送请求认证PPPoE客户端身份,若所述服务器认证成功,则恢复所述拨号连接。If the dial-up connection established by the PPPoE method is abnormally offline, and the abnormal offline belongs to the preset abnormal offline entry, the client sends a request to the server to authenticate the PPPoE client identity, if the server authenticates If successful, the dial-up connection is restored.
此外,本申请实施例还提供了一种计算机非易失性可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述对应用程序进行处理的步骤。In addition, the embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of processing the application program as described above are realized.
本发明实施例还提供了一种计算机设备。如图4所示,为了便于说明,仅示出了与本发明实施例相关的部分,具体技术细节未揭示的,请参照本发明实施例方法部分。该计算机设备可以为包括电子设备、平板电脑、PDA(Personal Digital  Assistant,个人数字助理)、POS(Point ofSales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以计算机设备为电子设备为例。An embodiment of the present invention also provides a computer device. As shown in FIG. 4, for ease of description, only parts related to the embodiments of the present invention are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present invention. The computer device may be any terminal device including electronic devices, tablet computers, PDA (Personal Digital Assistant), POS (Point of Sales, point of sale), in-vehicle computers, wearable devices, etc. The computer device is an electronic device example.
此外,本申请实施例还提供了一种计算机非易失性可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如上述闹钟播放的步骤。In addition, the embodiments of the present application also provide a computer non-volatile readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of playing the alarm clock as described above are realized.
本申请实施例还提供了一种计算机设备。如图4所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该计算机设备可以为包括电子设备、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point ofSales,销售终端)、车载电脑、穿戴式设备等任意终端设备,以计算机设备为电子设备为例:An embodiment of the present application also provides a computer device. As shown in FIG. 4, for convenience of description, only parts related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method part of the embodiments of the present application. The computer device can be any terminal device including electronic devices, tablet computers, PDA (Personal Digital Assistant), POS (Point of Sales), in-vehicle computers, wearable devices, etc. Taking computer devices as electronic devices is example:
图4为与本申请实施例提供的计算机设备相关的电子设备的部分结构的框图。参考图4,电子设备包括:射频(Radio Frequency,RF)电路410、存储器420、输入单元430、显示单元440、传感器450、音频电路460、无线保真(wireless fidelity,WiFi)模块470、处理器480、以及电源490等部件。本领域技术人员可以理解,图4所示的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。4 is a block diagram of a partial structure of an electronic device related to a computer device provided by an embodiment of the present application. 4, the electronic device includes: a radio frequency (Radio Frequency) circuit 410, a memory 420, an input unit 430, a display unit 440, a sensor 450, an audio circuit 460, a wireless fidelity (WiFi) module 470, a processor 480, and power supply 490 and other components. Those skilled in the art may understand that the structure of the electronic device shown in FIG. 4 does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine some components, or arrange different components.
其中,RF电路410可用于收发信息或通话过程中,信号的接收和发送,可将基站的下行信息接收后,给处理器480处理;也可以将上行的数据发送给基站。通常,RF电路包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路410还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System ofMobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE))、电子邮件、短消息服务(Short Messaging Service,SMS)等。Among them, the RF circuit 410 can be used to receive and send signals during the sending and receiving of information or during a call. It can receive the downlink information of the base station and process it to the processor 480; it can also send the uplink data to the base station. Generally, RF circuits include but are not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (Low Noise Amplifier, LNA), duplexer, and so on. In addition, the RF circuit 410 can also communicate with other devices through a wireless communication network. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division Multiple Access) Access, CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE)), e-mail, Short Message Service (SMS), etc.
存储器420可用于存储软件程序以及模块,处理器480通过运行存储在存储器420的软件程序以及模块,从而执行电子设备的各种功能应用以及数据处理。存储器420可主要包括程序存储区和数据存储区,其中,程序存储区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能的应用程序、图像播放功能的应用程序等)等;数据存储区可存储根据电子设备的使用所创建的数据(比如音频数据、通讯录等)等。此外,存储器420可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 420 may be used to store software programs and modules. The processor 480 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 420. The memory 420 may mainly include a program storage area and a data storage area, where the program storage area may store an operating system and at least one function-required application program (such as a sound playback function application program, an image playback function application program, etc.), etc .; The data storage area can store data (such as audio data, address book, etc.) created according to the use of electronic devices. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元430可用于接收输入的数字或字符信息,以及产生与电子设备400的用户设置以及功能控制有关的键信号输入。具体地,输入单元430可包括触控面板431以及其他输入设备432。触控面板431,也可称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板431上或在触控面板431附近的操作),并根据预先设定的程式驱动相应的连接装置。在一个实施例中,触控面板431可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器480,并能接收处理器480发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板431。除了触控面板431,输入单元430还可以包括其他输入设备432。具体地,其他输入设备432可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)等中的一种或多种。The input unit 430 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device 400. Specifically, the input unit 430 may include a touch panel 431 and other input devices 432. The touch panel 431, also known as a touch screen, can collect user's touch operations on or near it (such as the user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 431 Operation), and drive the corresponding connection device according to the preset program. In one embodiment, the touch panel 431 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 480, and can receive the command sent by the processor 480 and execute it. In addition, the touch panel 431 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 431, the input unit 430 may also include other input devices 432. Specifically, the other input devices 432 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.).
显示单元440可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种菜单。显示单元440可包括显示面板441。在一个实施例中,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板441。在一个实施例中,触控面板431可覆盖显示面板441,当触控面板431检测到在其上或附近的触摸操作后,传送给处理器480以确定触摸事件的类型,随后处理器480根据触摸事件的类型在显示面板441上提供相应的视觉输出。虽然在图4中,触控面板431与显示面板441是作为两个独立的部件来实现电子设备的输入和输入功能,但是在某些实施例中,可以将触控面板431与显示面板441集成而实现电子设备的输入和输出功能。The display unit 440 may be used to display information input by the user or information provided to the user and various menus of the electronic device. The display unit 440 may include a display panel 441. In one embodiment, the display panel 441 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like. In one embodiment, the touch panel 431 may cover the display panel 441, and when the touch panel 431 detects a touch operation on or near it, it is transmitted to the processor 480 to determine the type of touch event, and then the processor 480 according to The type of touch event provides corresponding visual output on the display panel 441. Although in FIG. 4, the touch panel 431 and the display panel 441 are implemented as two independent components to realize the input and input functions of the electronic device, in some embodiments, the touch panel 431 and the display panel 441 may be integrated And realize the input and output functions of electronic equipment.
电子设备400还可包括至少一种传感器450,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板441的亮度,接近传感器可在电子设备移动到耳边时,关闭显示面板441和/或背光。运动传感器可包括加速度传感器,通过加速度传感器可检测各个方向上加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态的应用(比如横竖屏切换)、振动识别相关功能(比如计步器、敲击)等;此外,电子设备还可配置陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器等。The electronic device 400 may further include at least one sensor 450, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 441 according to the brightness of the ambient light, and the proximity sensor may close the display panel 441 and the electronic device when moving to the ear / Or backlight. The motion sensor may include an acceleration sensor. The acceleration sensor can detect the magnitude of acceleration in various directions, and can detect the magnitude and direction of gravity when at rest. It can be used for applications that recognize the posture of electronic devices (such as horizontal and vertical screen switching), and vibration recognition related functions ( For example, pedometer, percussion, etc .; in addition, electronic devices can also be equipped with other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc.
音频电路460、扬声器461和传声器462可提供用户与电子设备之间的音频接口。音频电路460可将接收到的音频数据转换后的电信号,传输到扬声器461,由扬声器461转换为声音信号输出;另一方面,传声器462将收集的声音信号转换为 电信号,由音频电路460接收后转换为音频数据,再将音频数据输出处理器480处理后,经RF电路410可以发送给另一电子设备,或者将音频数据输出至存储器420以便后续处理。The audio circuit 460, the speaker 461, and the microphone 462 may provide an audio interface between the user and the electronic device. The audio circuit 460 can transmit the converted electrical signal of the received audio data to the speaker 461, which converts the speaker 461 into a sound signal for output; on the other hand, the microphone 462 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 460 After receiving, it is converted into audio data, and then processed by the audio data output processor 480, and then sent to another electronic device via the RF circuit 410, or the audio data is output to the memory 420 for subsequent processing.
WiFi属于短距离无线传输技术,电子设备通过WiFi模块470可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图4示出了WiFi模块470,但是可以理解的是,其并不属于电子设备400的必须构成,可以根据需要而省略。WiFi is a short-range wireless transmission technology. Electronic devices can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 470. It provides users with wireless broadband Internet access. Although FIG. 4 shows the WiFi module 470, it can be understood that it is not a necessary component of the electronic device 400, and may be omitted as needed.
处理器480是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器420内的软件程序和/或模块,以及调用存储在存储器420内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。在一个实施例中,处理器480可包括一个或多个处理单元。在一个实施例中,处理器480可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等;调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器480中。The processor 480 is the control center of the electronic device, and uses various interfaces and lines to connect the various parts of the entire electronic device, by running or executing the software programs and / or modules stored in the memory 420, and calling the data stored in the memory 420 , Perform various functions of electronic devices and process data, so as to monitor the electronic devices as a whole. In one embodiment, the processor 480 may include one or more processing units. In one embodiment, the processor 480 may integrate an application processor and a modem processor, where the application processor mainly processes an operating system, user interface, application programs, and the like; the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 480.
电子设备400还包括给各个部件供电的电源490(比如电池),优选的,电源可以通过电源管理系统与处理器480逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 400 further includes a power supply 490 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 480 through the power management system, so as to implement functions such as charging, discharging, and power management through the power management system .
在一个实施例中,电子设备400还可以包括摄像头、蓝牙模块等。In one embodiment, the electronic device 400 may further include a camera, a Bluetooth module, and the like.
在本申请实施例中,该计算机设备所包括的处理器480执行存储在存储器上的计算机程序时实现上述各实施例的方法。In the embodiments of the present application, the processor 480 included in the computer device implements the methods of the foregoing embodiments when executing the computer program stored on the memory.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时上述各实施例的方法。Those of ordinary skill in the art may understand that all or part of the processes in the method of the above embodiments may be completed by instructing relevant hardware through a computer program, and the program may be stored in a non-volatile computer-readable storage medium In this case, when the program is executed, it may include the flow of the above method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM), etc. Embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the methods of the foregoing embodiments.
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above-mentioned embodiments can be combined arbitrarily. To simplify the description, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, All should be considered within the scope of this description.
以上所述实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several embodiments of the present invention, and their descriptions are more specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that, for a person of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can also be made, which all fall within the protection scope of the present invention. Therefore, the protection scope of the invention patent shall be subject to the appended claims.

Claims (22)

  1. 一种无线保真Wi-Fi接入方法,应用于客户端,其特征在于,所述方法包括:A wireless fidelity Wi-Fi access method, applied to a client, characterized in that the method includes:
    接收无线局域网络开启命令,搜索所述无线局域网络内的供选网络;Receiving a wireless local area network opening command, searching for alternative networks in the wireless local area network;
    在所述供选网络中选择并确认出接入网络,且为所述接入网络选择预设配置互联网协议IP方式,以配置所述接入网络的IP地址,其中,所述预设配置IP方式包括:静态IP配置方式、动态IP配置方式和基于以太网的点对点通讯协议PPPoE配置方式;Select and confirm an access network in the alternative network, and select a preset configuration internet protocol IP method for the access network to configure an IP address of the access network, wherein the preset configuration IP The methods include: static IP configuration method, dynamic IP configuration method, and Ethernet-based PPPoE configuration method for point-to-point communication protocol;
    检测所述配置IP方式为PPPoE配置方式,弹出用户的账户信息输入框,以获取用户输入的账户信息;Detect that the IP configuration mode is the PPPoE configuration mode, and a user account information input box pops up to obtain the account information input by the user;
    根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接。Perform PPPoE authentication according to the input account information, and establish a connection with the access network.
  2. 根据权利要求1所述的方法,其特征在于,所述为所述接入网络选择预设配置互联网协议IP方式,包括:The method according to claim 1, wherein the selecting a preset configuration internet protocol IP method for the access network comprises:
    根据IP配置方式的优先级策略自动选择所述预设配置IP方式。The preset IP configuration mode is automatically selected according to the priority policy of the IP configuration mode.
  3. 根据权利要求2所述的方法,其特征在于,所述优先级策略为:The method according to claim 2, wherein the priority policy is:
    所述动态IP配置方式的优先级高于所述PPPoE方式;The priority of the dynamic IP configuration mode is higher than that of the PPPoE mode;
    所述PPPoE方式的优先级高于所述静态IP配置方式。The PPPoE mode has a higher priority than the static IP configuration mode.
  4. 根据权利要求2所述的方法,其特征在于,所述根据IP配置方式的优先级策略自动选择所述预设配置IP方式,包括:The method according to claim 2, wherein the automatically selecting the preset IP configuration mode according to the priority policy of the IP configuration mode includes:
    检测所述IP配置方式自动选择为动态IP配置方式;Detect that the IP configuration mode is automatically selected as the dynamic IP configuration mode;
    根据动态主机配置DHCP协议,检测客户端的物理网络接口连接端不存在DHCP服务器,According to the dynamic host configuration DHCP protocol, it is detected that there is no DHCP server on the client's physical network interface connection end,
    或,检测所述物理网络接口连接端存在所述DHCP服务器,所述物理网络接口未与所述DHCP服务器建立DHCP会话;Or, detecting that the DHCP server exists at the connection end of the physical network interface, and the physical network interface has not established a DHCP session with the DHCP server;
    将所述客户端的IP配置方式切换至所述PPPoE方式。Switch the IP configuration mode of the client to the PPPoE mode.
  5. 根据权利要求2所述的方法,其特征在于,所述根据IP配置方式的优先级策略自动选择所述预设配置IP方式,还包括:The method according to claim 2, wherein the automatically selecting the preset IP configuration mode according to the priority policy of the IP configuration mode further comprises:
    检测所述IP配置方式自动选择为PPPoE方式;Detect that the IP configuration mode is automatically selected as PPPoE mode;
    根据PPPOE协议,检测客户端的物理网络接口连接端不存在PPPoE服务器,According to the PPPOE protocol, it is detected that there is no PPPoE server at the physical network interface connection end of the client,
    或,检测所述物理网络接口连接端存在PPPoE服务器,所述物理网络接口是未所述PPPoE服务器建立PPPoE会话;Or, detecting that a PPPoE server exists at the connection end of the physical network interface, and the physical network interface is that a PPPoE session is not established with the PPPoE server;
    将所述客户端的IP配置方式切换至所述静态IP配置方式。Switch the IP configuration mode of the client to the static IP configuration mode.
  6. 根据权利要求1所述的方法,其特征在于,所述方法还包括:若所述PPPoE方式建立的拨号连接异常下线,且所述异常下线属于所述预设异常下线表项,则所述客户端向服务器发送请求认证PPPoE客户端身份,若所述服务器认证成功,则恢复所述 拨号连接。The method according to claim 1, wherein the method further comprises: if the dial-up connection established in the PPPoE mode is abnormally offline, and the abnormal offline belongs to the preset abnormal offline entry, then The client sends a request to the server to authenticate the PPPoE client identity, and if the server authentication is successful, the dial-up connection is restored.
  7. 根据权利要求6所述的方法,其特征在于,所述若所述服务器认证成功,则恢复所述拨号连接,包括:The method according to claim 6, wherein the restoring the dial-up connection if the server authentication succeeds includes:
    获取异常下线的数据信息;Obtain abnormal offline data information;
    查询所述数据信息的异常下线标识,确认所述异常下线标识处于所述预设异常下线表项内;Query the abnormal offline identifier of the data information to confirm that the abnormal offline identifier is in the preset abnormal offline entry;
    向所述服务器发送用于请求认证所述客户端身份的认证报文;Sending an authentication message for requesting authentication of the identity of the client to the server;
    接收所述服务器返回的身份认证成功响应,恢复所述异常下线拨号连接。Receiving the identity authentication success response returned by the server, and recovering the abnormal offline dial-up connection.
  8. 根据权利要求1所述的方法,其特征在于,所述根据所述账户信息输入框输入信息进行PPPoE认证,包括:对所述账户信息利用云服务器进行备份。The method according to claim 1, wherein the performing PPPoE authentication according to the input information in the account information input box includes: backing up the account information using a cloud server.
  9. 根据权利要求8所述的方法,其特征在于,所述对所述账户信息利用云服务器进行备份包括:The method according to claim 8, wherein the backing up the account information using a cloud server includes:
    存储所述账户信息并上传至所述云服务器,且接收所述云服务器返回的所述账户信息保存成功的响应;Store the account information and upload it to the cloud server, and receive a response that the account information returned by the cloud server is successfully saved;
    若重置或更换所述客户端,则根据输入的所述用户名向所述服务器发送获取所述用户名对应密码的请求;If the client is reset or replaced, a request to obtain the password corresponding to the user name is sent to the server according to the entered user name;
    接收所述云服务器下发的所述用户名对应密码,并填写至密码输入框,以使所述用户的账户信息进行PPPoE认证。Receive the password corresponding to the user name issued by the cloud server, and fill in the password input box to enable PPPoE authentication of the user's account information.
  10. 根据权利要求1所述的方法,其特征在于,所述进行PPPoE认证拨号接入所述接入网络,包括:The method according to claim 1, wherein the dialing to access the access network by PPPoE authentication includes:
    客户端和接入集中器端获取对端的以太网物理地址,且所述客户端和所述接入集中器端共享唯一的会话ID;The client and the access concentrator end obtain the Ethernet physical address of the opposite end, and the client and the access concentrator end share a unique session ID;
    所述客户端和所述接入集中器通过所述会话ID建立拨号连接,并进行点对点的网络层数据报文传送;The client and the access concentrator establish a dial-up connection through the session ID and perform point-to-point network layer data packet transmission;
    所述客户端或所述接入集中器端根据需求发送点对点终结报文,以断开PPPoE连接。The client or the access concentrator end sends a point-to-point termination message according to requirements to disconnect the PPPoE connection.
  11. 一种无线保真Wi-Fi接入的装置,其特征在于,所述装置包括:A wireless fidelity Wi-Fi access device, characterized in that the device includes:
    网络搜索模块,用于接收无线局域网络开启命令,搜索所述无线局域网络内的供选网络;The network search module is used to receive a wireless local area network opening command and search for alternative networks in the wireless local area network;
    配置IP模块,用于在所述供选网络中选择并确认出接入网络,且为所述接入网络选择预设配置互联网协议IP方式,以配置所述接入网络的IP地址,其中,所述预设配置IP方式包括:静态IP配置方式、动态IP配置方式和基于以太网的点对点通讯协议PPPoE配置方式;An IP module is configured to select and confirm an access network in the alternative network, and select a preset configuration Internet protocol IP method for the access network to configure the IP address of the access network, wherein, The preset IP configuration modes include: static IP configuration mode, dynamic IP configuration mode, and Ethernet-based PPPoE configuration mode for point-to-point communication protocol;
    输入模块,用于检测所述配置IP方式为PPPoE配置方式,弹出用户的账户信息输入框,以获取用户输入的账户信息;The input module is used to detect that the IP configuration mode is the PPPoE configuration mode, and a user account information input box pops up to obtain the account information input by the user;
    连接模块,用于根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接。The connection module is configured to perform PPPoE authentication based on the input account information and establish a connection with the access network.
  12. 根据权利要求11所述的装置,其特征在于,所述配置IP模块,还用于根据IP配置方式的优先级策略自动选择所述预设配置IP方式。The apparatus according to claim 11, wherein the configuration IP module is further configured to automatically select the preset configuration IP mode according to a priority policy of the IP configuration mode.
  13. 根据权利要求12所述的装置,其特征在于,所述配置IP模块的IP配置方式的优先级策略为:The device according to claim 12, wherein the priority policy for configuring the IP configuration mode of the IP module is:
    所述动态IP配置方式的优先级高于所述PPPoE方式;The priority of the dynamic IP configuration mode is higher than that of the PPPoE mode;
    所述PPPoE方式的优先级高于所述静态IP配置方式。The PPPoE mode has a higher priority than the static IP configuration mode.
  14. 根据权利要求12所述的装置,其特征在于,所述配置IP模块包括:The apparatus according to claim 12, wherein the configuration IP module comprises:
    检测单元,用于检测所述IP配置方式自动选择为动态IP配置方式;A detection unit, configured to detect that the IP configuration mode is automatically selected as a dynamic IP configuration mode;
    判断单元,用于根据动态主机配置DHCP协议,检测客户端的物理网络接口连接端无DHCP服务器,或,检测所述物理网络接口连接端存在所述DHCP服务器,所述物理网络接口与所述DHCP服务器的DHCP会话处于断开状态;The judging unit is configured to detect that there is no DHCP server on the physical network interface connection end of the client according to the dynamic host configuration DHCP protocol, or detect that the DHCP server exists on the physical network interface connection end, and that the physical network interface and the DHCP server Of the DHCP session is disconnected;
    切换单元,用于将所述客户端的IP配置方式切换至所述PPPoE方式。The switching unit is configured to switch the IP configuration mode of the client to the PPPoE mode.
  15. 根据权利要求12所述的装置,其特征在于,所述配置IP模块包括:The apparatus according to claim 12, wherein the configuration IP module comprises:
    检测单元,还用于检测所述IP配置方式自动选择为PPPoE方式;The detection unit is also used to detect that the IP configuration mode is automatically selected as the PPPoE mode;
    判断单元,还用于根据PPPOE协议,检测客户端的物理网络接口连接端无PPPoE服务器,或,检测所述物理网络接口连接端存在PPPoE服务器,所述物理网络接口与所述PPPoE服务器的PPPoE会话处于断开状态;The judging unit is also used to detect that there is no PPPoE server at the connection end of the physical network interface of the client according to the PPPOE protocol, or detect that a PPPoE server exists at the connection end of the physical network interface, and the PPPoE session between the physical network interface and the PPPoE server Disconnected state
    切换单元,还用于将所述客户端的IP配置方式切换至所述静态IP配置方式。The switching unit is also used to switch the IP configuration mode of the client to the static IP configuration mode.
  16. 根据权利要求11所述的装置,其特征在于,所述装置还包括异常下线恢复模块,用于若所述PPPoE方式建立的拨号连接异常下线,且所述异常下线属于所述预设异常下线表项,则向服务器发送请求认证PPPoE客户端身份,若所述服务器认证成功,则恢复所述拨号连接。The device according to claim 11, characterized in that the device further comprises an abnormal offline recovery module, configured to abnormally log out if the dial-up connection established in the PPPoE mode belongs to the preset If the log-off entry is abnormal, a request to authenticate the identity of the PPPoE client is sent to the server, and if the server authentication is successful, the dial-up connection is restored.
  17. 根据权利要求16所述的装置,其特征在于,所述异常下线恢复模块包括:The apparatus according to claim 16, wherein the abnormal offline recovery module comprises:
    获取单元,用于获取异常下线的数据信息;The obtaining unit is used to obtain abnormal offline data information;
    查询单元,用于查询所述数据信息的异常下线标识,确认所述异常下线标识处于所述预设异常下线表项内;The query unit is used to query the abnormal offline identifier of the data information and confirm that the abnormal offline identifier is in the preset abnormal offline entry;
    认证请求单元,用于向所述服务器发送用于请求认证所述客户端身份的认证报文;An authentication request unit, configured to send an authentication message requesting authentication of the client identity to the server;
    恢复单元,用于接收所述服务器返回的身份认证成功响应,并恢复所述异常下线 拨号连接。The recovery unit is configured to receive the identity authentication success response returned by the server, and recover the abnormal offline dial-up connection.
  18. 根据权利要求11所述的装置,其特征在于,所述连接模块还用于,利用云服务器对所述账户信息进行备份。The apparatus according to claim 11, wherein the connection module is further configured to use a cloud server to back up the account information.
  19. 根据权利要求18所述的装置,其特征在于,所述连接模块还包括:The device according to claim 18, wherein the connection module further comprises:
    存储单元,用于存储所述账户信息并上传至所述云服务器,且接收所述云服务器返回的所述账户信息保存成功的响应;A storage unit, configured to store the account information and upload it to the cloud server, and receive a response from the cloud server that the account information is successfully saved;
    密码请求单元,用于若重置或更换所述客户端时,则根据输入的所述用户名向所述服务器发送获取所述用户名对应密码的请求;A password requesting unit, configured to send a request for obtaining a password corresponding to the user name to the server according to the entered user name when resetting or replacing the client;
    密码恢复单元,用于接收所述云服务器下发的所述用户名对应密码,并填写至密码输入框,以使所述用户的账户信息进行PPPoE认证。The password recovery unit is configured to receive the password corresponding to the user name issued by the cloud server, and fill in the password input box to enable PPPoE authentication of the user's account information.
  20. 根据权利要求11所述的装置,其特征在于,所述连接模块根据所述输入的账户信息进行PPPoE认证,并与所述接入网络建立连接,包括:The apparatus according to claim 11, wherein the connection module performs PPPoE authentication based on the input account information and establishes a connection with the access network, including:
    客户端和接入集中器端获取对端的以太网物理地址,且所述客户端和所述接入集中器端共享唯一的会话ID;The client and the access concentrator end obtain the Ethernet physical address of the opposite end, and the client and the access concentrator end share a unique session ID;
    所述客户端和所述接入集中器通过所述会话ID建立拨号连接,并进行点对点的网络层数据报文传送;The client and the access concentrator establish a dial-up connection through the session ID and perform point-to-point network layer data packet transmission;
    所述客户端或所述接入集中器端根据需求发送点对点终结报文,以断开PPPoE连接。The client or the access concentrator end sends a point-to-point termination message according to requirements to disconnect the PPPoE connection.
  21. 一种电子设备,包括存储器及处理器,所述存储器中储存有计算机程序,所述计算机程序被所述处理器执行时,使得所述处理器执行如权利要求1-10中任一项所述无线保真Wi-Fi接入方法的步骤。An electronic device includes a memory and a processor, and a computer program is stored in the memory, and when the computer program is executed by the processor, the processor is executed as described in any one of claims 1-10 Steps of wireless fidelity Wi-Fi access method.
  22. 一种计算机非易失性可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1-10中任一项所述无线保真Wi-Fi接入方法步骤。A computer non-volatile readable storage medium on which a computer program is stored, characterized in that when the computer program is executed by a processor, the wireless fidelity Wi-Fi according to any one of claims 1-10 is realized Fi access method steps.
PCT/CN2018/113455 2018-11-01 2018-11-01 Wireless fidelity (wi-fi) access method and apparatus, electronic device, and storage medium WO2020087450A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201880097757.3A CN112740762A (en) 2018-11-01 2018-11-01 Wireless fidelity Wi-Fi access method and device, electronic equipment and storage medium
PCT/CN2018/113455 WO2020087450A1 (en) 2018-11-01 2018-11-01 Wireless fidelity (wi-fi) access method and apparatus, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/113455 WO2020087450A1 (en) 2018-11-01 2018-11-01 Wireless fidelity (wi-fi) access method and apparatus, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020087450A1 true WO2020087450A1 (en) 2020-05-07

Family

ID=70461761

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113455 WO2020087450A1 (en) 2018-11-01 2018-11-01 Wireless fidelity (wi-fi) access method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN112740762A (en)
WO (1) WO2020087450A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115767602B (en) * 2022-11-01 2023-07-07 荣耀终端有限公司 Automatic error correction method for equipment protocol subsystem abnormality and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012089030A1 (en) * 2010-12-27 2012-07-05 中兴通讯股份有限公司 Method, access device and authentication device for network access by multiple access methods
CN102883407A (en) * 2012-09-13 2013-01-16 中兴通讯股份有限公司 Dialing method and device
CN102904879A (en) * 2012-09-18 2013-01-30 中兴通讯股份有限公司 Dialing mobile terminal and dialing method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106850867A (en) * 2015-12-04 2017-06-13 中兴通讯股份有限公司 A kind of Home eNodeB obtains location device and obtains location method
CN107592240A (en) * 2017-09-07 2018-01-16 上海斐讯数据通信技术有限公司 A kind of method and system of router automatic detection network access
CN108206765B (en) * 2018-03-30 2021-08-06 新华三技术有限公司 PPPoE online recovery method, BRAS equipment and AAA server
CN108667672A (en) * 2018-06-13 2018-10-16 四川斐讯信息技术有限公司 A kind of automatic adaptation method and router of LAN interface and wan interface

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012089030A1 (en) * 2010-12-27 2012-07-05 中兴通讯股份有限公司 Method, access device and authentication device for network access by multiple access methods
CN102883407A (en) * 2012-09-13 2013-01-16 中兴通讯股份有限公司 Dialing method and device
CN102904879A (en) * 2012-09-18 2013-01-30 中兴通讯股份有限公司 Dialing mobile terminal and dialing method thereof

Also Published As

Publication number Publication date
CN112740762A (en) 2021-04-30

Similar Documents

Publication Publication Date Title
US11902381B2 (en) Session management method and apparatus
CN106686070B (en) Database data migration method, device, terminal and system
US11758399B2 (en) Wireless local area network configuration using probe request frame having authentication information
US8468254B2 (en) Switching between connectivity types to maintain connectivity
CN116232667A (en) Method for edge computing service and electronic device thereof
US10069818B2 (en) Method, system, device, and terminal for network initialization of multimedia playback device
WO2018196468A1 (en) Method, device and terminal for realizing data service
US11277744B2 (en) Wi-Fi hotspot connection method and terminal
WO2019128982A1 (en) Device bootstrap method, terminal, and server
CN107147549B (en) Intelligent household equipment networking method and device
CN111818100A (en) Method for configuring channel across networks, related equipment and storage medium
US9392537B2 (en) Terminal and connection method for same
CN109039989B (en) Address resolution protocol spoofing detection method, host and computer-readable storage medium
WO2015139401A1 (en) Establishment method and system for wireless network, and wireless routing device
WO2020087450A1 (en) Wireless fidelity (wi-fi) access method and apparatus, electronic device, and storage medium
CN112654073B (en) Network attachment method and user equipment
CN110944313B (en) Bluetooth connection method, device, storage medium and terminal
US9965341B2 (en) Method and device for exchanging data between processes
CN110891262A (en) Bluetooth pairing method, system and terminal equipment
CN104113582B (en) Communication equipment and its control method
TWI488530B (en) Method for handling network connection and electrical apparatus using the same
EP3310078A1 (en) Communication method, small cell base station, small cell base station controller, terminal and system
WO2019237954A1 (en) Network connection method and device, readable storage medium and intelligent terminal
WO2020078183A1 (en) Dns query method and related product
CN108574664B (en) Account login method, client, server, system and storage medium

Legal Events

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

Ref document number: 18938943

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.09.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18938943

Country of ref document: EP

Kind code of ref document: A1