CN111405639B - Wireless network connection method and device, readable storage medium and computer equipment - Google Patents

Wireless network connection method and device, readable storage medium and computer equipment Download PDF

Info

Publication number
CN111405639B
CN111405639B CN202010155995.4A CN202010155995A CN111405639B CN 111405639 B CN111405639 B CN 111405639B CN 202010155995 A CN202010155995 A CN 202010155995A CN 111405639 B CN111405639 B CN 111405639B
Authority
CN
China
Prior art keywords
domain name
loss rate
packet loss
target
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010155995.4A
Other languages
Chinese (zh)
Other versions
CN111405639A (en
Inventor
雷中南
贺磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianhai Baidi Network Co ltd
Original Assignee
Shenzhen Qianhai Baidi Network Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianhai Baidi Network Co ltd filed Critical Shenzhen Qianhai Baidi Network Co ltd
Priority to CN202010155995.4A priority Critical patent/CN111405639B/en
Publication of CN111405639A publication Critical patent/CN111405639A/en
Application granted granted Critical
Publication of CN111405639B publication Critical patent/CN111405639B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • H04W12/068Authentication using credential vaults, e.g. password manager applications or one time password [OTP] applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service

Abstract

The application relates to a wireless network connection method, a wireless network connection device, a computer readable storage medium and a computer device, wherein the method comprises the following steps: selecting a target domain name server with the highest response speed from the domain name servers; inquiring a first network address of a target server according to the target domain name server; sending a request packet to the target server according to the first network address; acquiring feedback data of the target server and each gateway passing through the target server when receiving the request packet respectively; extracting the packet loss rate of the local gateway from the feedback data; and when the packet loss rate is greater than the packet loss rate threshold value, performing public network connection in a special network networking mode. The scheme provided by the application can improve the communication efficiency of the equipment accessing the Internet through wireless WIFI.

Description

Wireless network connection method and device, readable storage medium and computer equipment
Technical Field
The present application relates to the field of internet technologies, and in particular, to a wireless network connection method, apparatus, readable storage medium, and computer device.
Background
With the development of wireless network technology, more and more devices are accessed to the internet through wireless WIFI. When the connection state of the wireless WIFI is good, the device accessing the Internet through the wireless WIFI can keep high communication efficiency.
However, at present, the connection quality of WIFI cannot be detected, and when WIFI connection is abnormal, an abnormal state cannot be found in time and cannot be adjusted according to the abnormal state.
Disclosure of Invention
Based on this, it is necessary to provide a wireless network connection method, apparatus, readable storage medium and computer device for solving the technical problem that the abnormal wireless WIFI connection state cannot be found in time.
A wireless network connection method, comprising:
selecting a target domain name server with the highest response speed from the domain name servers;
inquiring a first network address of a target server according to the target domain name server;
sending a request packet to the target server according to the first network address;
acquiring feedback data of the target server and each gateway passing through the target server when receiving the request packet respectively;
extracting the packet loss rate of the local gateway from the feedback data;
and when the packet loss rate is greater than the packet loss rate threshold value, performing public network connection in a special network networking mode.
In one embodiment, the selecting a target domain name server with the fastest response speed from the domain name servers includes:
sending ping instructions to a domain name server;
receiving response information fed back by the domain name server in response to the ping instruction;
determining a response speed according to the sending time of the ping instruction and the receiving time of the response information;
selecting the fastest response speed from the response speeds;
and selecting a target domain name server from the domain name servers according to the fastest response speed.
In one embodiment, the method further comprises:
when the packet loss rate is greater than a packet loss rate threshold, determining an abnormal level of the wireless network connection according to the packet loss rate;
and carrying out corresponding exception prompt according to the exception grade.
In one embodiment, the method further comprises:
when the packet loss rate is greater than a packet loss rate threshold value, acquiring an administrator account and a password;
logging in wireless network equipment according to the administrator account and the password;
modifying the initial networking mode of the wireless network equipment into a private network networking mode;
and executing the step of performing public network connection by adopting a special network networking mode.
In one embodiment, the method further comprises:
and inquiring second network addresses of all gateways passed by the target server according to the target domain name server.
In one embodiment, the sending the request packet to the target server according to the first network address includes:
and respectively sending request packets to the target server and the gateway according to the first network address and the second network address.
In one embodiment, the method further comprises:
extracting a third network address corresponding to the local gateway from the second network address;
the extracting of the packet loss rate of the local gateway from the feedback data includes:
and extracting the packet loss rate of the local gateway from the feedback data according to the third network address.
A wireless networking apparatus, the apparatus comprising:
the domain name server selection module is used for selecting a target domain name server with the highest response speed from the domain name servers;
the network address query module is used for querying a first network address of a target server according to the target domain name server;
a request packet sending module, configured to send a request packet to the target server according to the first network address;
the feedback data acquisition module is used for acquiring feedback data of the target server and each gateway passing through the target server when receiving the request packet;
the packet loss rate extraction module is used for extracting the packet loss rate of the local gateway from the feedback data;
and the public network connection module is used for performing public network connection in a special network networking mode when the packet loss rate is greater than the packet loss rate threshold.
In one embodiment, the domain name server selection module is further configured to:
sending ping instructions to a domain name server;
receiving response information fed back by the domain name server in response to the ping instruction;
determining a response speed according to the sending time of the ping instruction and the receiving time of the response information;
selecting the fastest response speed from the response speeds;
and selecting a target domain name server from the domain name servers according to the fastest response speed.
In one embodiment, the apparatus further comprises:
an abnormal grade determining module, configured to determine an abnormal grade of the wireless network connection according to the packet loss rate when the packet loss rate is greater than a packet loss rate threshold;
and the abnormity prompting module is used for carrying out corresponding abnormity prompting according to the abnormity grade.
In one embodiment, the apparatus further comprises:
the account password obtaining module is used for obtaining an administrator account and a password when the packet loss rate is greater than a packet loss rate threshold;
the login module is used for logging in the wireless network equipment according to the administrator account and the password;
a network connection mode modifying module used for modifying the initial network connection mode of the wireless network equipment into a special network connection mode; and executing the step of performing public network connection by adopting a special network networking mode.
In one embodiment, the network address query module is further configured to:
and inquiring second network addresses of all gateways passed by the target server according to the target domain name server.
In one embodiment, the request packet sending module is further configured to:
and respectively sending request packets to the target server and the gateway according to the first network address and the second network address.
In one embodiment, the apparatus further comprises:
a third network address extracting module, configured to extract a third network address corresponding to the local gateway from the second network address;
the packet loss rate extraction module is further configured to:
and extracting the packet loss rate of the local gateway from the feedback data according to the third network address.
A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to perform the steps of any of the methods described above.
A computer device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of any of the methods described above.
According to the wireless network connection method, the wireless network connection device, the readable storage medium and the computer equipment, the target domain name server with the highest response speed is selected from the domain name servers; inquiring a first network address of a target server according to a target domain name server; sending a request packet to a target server according to a first network address; acquiring feedback data of a target server and each gateway passing through the target server when receiving a request packet respectively; extracting the packet loss rate of the local gateway from the feedback data; when the packet loss rate is greater than the packet loss rate threshold value, a private network networking mode is adopted for public network connection, so that the wireless network connection quality is high, and the communication efficiency of the equipment accessing the Internet through the wireless WIFI is improved.
Drawings
FIG. 1 is a diagram of an exemplary wireless network connection method;
FIG. 2 is a flow diagram illustrating a method for wireless network connectivity in one embodiment;
FIG. 3 is a diagram illustrating domain name server response speed in one embodiment;
FIG. 4 is a diagram of a wireless networking mode in one embodiment;
FIG. 5 is a diagram of feedback data in one embodiment;
FIG. 6 is a diagram illustrating collated feedback data in one embodiment;
FIG. 7 is a flow diagram illustrating a method for wireless network connectivity in one embodiment;
FIG. 8 is a flow diagram illustrating a method for wireless network connectivity in one embodiment;
FIG. 9 is a block diagram of a wireless networking device in one embodiment;
FIG. 10 is a block diagram of a wireless network connection device in another embodiment;
FIG. 11 is a block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
Fig. 1 is a diagram of an application environment of a wireless network connection method according to an embodiment. Referring to fig. 1, the wireless network connection method is applied to a wireless network connection system. The wireless network connection system includes a terminal 110, an access device 120, a target domain name server 130, and a target server 140. The terminal 110 is in network connection with the target domain name server 130 and the target server 140 through the access device 120. Where access device 120 may specifically be a wireless network device. After the terminal 110 accesses the internet through the access device 120, selecting a target domain name server 130 with the highest response speed from the domain name servers; querying the target server for a first network address based on the target domain name server 130; sending a request packet to the destination server 140 according to the first network address; collecting feedback data of the target server and each gateway passing through the target server 140 when receiving the request packet; extracting the packet loss rate of the local gateway from the feedback data; and when the packet loss rate is greater than the packet loss rate threshold value, performing public network connection in a special network networking mode.
The terminal 110 may specifically be a desktop terminal or a mobile terminal, and the mobile terminal may specifically be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The target server 140 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
As shown in fig. 2, in one embodiment, a wireless network connection method is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 in fig. 1. Referring to fig. 2, the wireless network connection method specifically includes the following steps:
s202, selecting a target domain name server with the highest response speed from the domain name servers.
The domain name server (DNS server) stores a table of domain names and IP addresses (IP addresses) corresponding thereto to resolve the domain names of messages. Typically, to ensure high availability of services, DNS requires the redundant support of each zone using multiple domain name servers.
In one embodiment, the terminal acquires the network address of each domain name server, then acquires the response speed of each domain name server through a ping command according to the network address of each domain name server, and selects a target domain name server with the highest response speed from the domain name servers as a target domain name server for a curve (Command line Uniform Resource locator) request. The Ping command constructs an ICMP request packet with a fixed format during operation, and then the ICMP protocol delivers the packet to the IP layer protocol together with the destination address. The IP layer protocol constructs an IP data packet by adding a Destination Address (Destination Address) and a local Source Address (Source Address) and other control information, and then transmits the IP data packet to the next protocol layer, namely a data link layer. The data link layer obtains the MAC address of the destination host (i.e. the physical address of the network card, which is the necessary address for the data link layer protocol to construct the data frame) by querying the ARP cache table or broadcasting the ARP request, and then constructs and sends the MAC frame. And then, corresponding response information is returned according to actual network conditions such as whether the network is connected, whether the host is reachable, whether the route is available and the like.
The following table shows network addresses of the domain name servers currently and mainstream used by the terminal, where the network addresses may specifically be IP addresses. After acquiring the network address of the domain name server currently used in mainstream, the terminal acquires the response speed of each domain name server through the linux ping command line according to the network address of each domain name server, and selects the target domain name server with the fastest response speed from the domain name servers, as shown in fig. 3, the target domain name server is the response speed information of the DNS 114 acquired through the linux ping command.
Domestic common public DNS Main DNS Backup DNS
114DNS 114.114.114.114 114.114.115.115
AliDNS 223.5.5.5 223.6.6.6
BaiduDNS 180.76.76.76
DNSPod 119.29.29.29 182.254.116.116
GoogleDNS 8.8.8.8 8.8.4.4
In one embodiment, the terminal has connected to the public network through a networking mode before performing S202. The network connection mode is that network connection is directly carried out according to the service set identification and the network access password of the WIFI, and specifically, after the service set identification and the network access password of the WIFI are verified, network connection between the terminal and a public network is achieved. The service mode of the current terminal for network connection is shown in fig. 4, and mainly includes: starting and connecting local WIFI, accessing a public network, and accessing a server-side response program through an ISP (Internet Service provider) operator network.
And S204, inquiring the first network address of the target server according to the target domain name server.
And the target server is a server corresponding to the destination domain name which is sent by the request packet when the terminal detects the wireless network connection quality. The first network address is a network address of the target server, and may specifically be an IP address.
In one embodiment, a terminal sends a request packet to a target server through an mtr (my traceroute) network test tool, where the request packet includes a domain name of the target server, and generates a domain name query request according to the domain name, and sends the domain name query request to the target domain name server, after receiving the domain name query request, the target domain name server queries a corresponding first network address according to the domain name in the domain name query request, and generates a response message according to the first network address, and returns the response message to the terminal, and after receiving the response message returned by the target domain name server, the terminal extracts the first network address of the target server from the response message. Wherein the MTR network test tool defaults to sending ICMP data packets for link probing. ICMP is an Internet control message protocol. It is a subprotocol of the TCP/IP protocol cluster for passing control messages between IP hosts and routers.
S206, sending the request packet to the target server according to the first network address.
And S208, acquiring feedback data of the target server and each gateway passing through the target server when receiving the request packet.
In one embodiment, after acquiring a first network address, a terminal sends a request packet to a target server through an access device according to the first network address by using an MTR network test tool, and the specific process is that the request packet is forwarded through the access device and other gateway devices and finally sent to the target server, and after receiving the request packet, each forwarding device (the access device and other gateway devices) and the target server all return feedback data for indicating the reception condition of the request packet to the terminal, so that the terminal acquires the feedback data of the target server and each gateway passing through the target server when receiving the request packet by using the MTR network test tool. The number of request packets may be multiple.
And S210, extracting the packet loss rate of the local gateway from the feedback data.
And S212, when the packet loss rate is greater than the packet loss rate threshold, performing public network connection in a special network networking mode.
Among them, the Gateway (Gateway) is also called an internetwork connector and a protocol converter. The gateway realizes network interconnection above a network layer, is the most complex network interconnection equipment and is only used for interconnection of two networks with different high-level protocols. The gateway can be used for interconnection of both wide area networks and local area networks. A gateway is a computer system or device that acts as a switch-operative.
In an embodiment, the terminal determines packet loss rates of gateways in a process of sending a data packet to a target server according to feedback data, extracts packet loss rates of local gateways from the calculated packet loss rates, and determines whether the packet loss rate of the local gateway is greater than a packet loss rate threshold, and when the packet loss rate of the local gateway is greater than the packet loss rate threshold, the terminal performs public network connection through the access device in a private network networking manner.
As shown in fig. 5, feedback data collected after sending an ICMP request packet to a destination server with a domain name of www.kuaidi100.com is sent to a terminal through an MTR network test tool, where? "specific data is collected for tool underlying protocol non-feedback bits. After determining the affiliation of the gateway according to the IP address of the gateway, sorting the feedback data to obtain sorted data shown in fig. 6, then obtaining the packet loss rates of the local gateway and the first gateway accessing the public network according to the obtained IP address of the local gateway, judging that the state of the current device accessing the public network through WIFI is abnormal when the packet loss rate is greater than a packet loss rate threshold value, displaying an abnormal prompt through an LED, and executing a step of connecting the public network in a private network networking mode. The current packet loss judgment principle comprises the following steps: when the gateway jumps to have different amounts of Loss each time, the gateway always trusts the subsequent data statistics; a small loss around 10%, there is no real reason to be concerned with determining whether the loss is true or due to rate limiting, see the next hop, if the hop packet loss rate is 0.0%, ICMP rate limiting can be determined instead of actual packet loss; if the loss lasts more than one hop, there may be some packet loss or routing problems.
In the embodiment, the terminal selects the target domain name server with the highest response speed from the domain name servers; inquiring a first network address of a target server according to a target domain name server; sending a request packet to a target server according to a first network address; acquiring feedback data of a target server and each gateway passing through the target server when receiving a request packet respectively; extracting the packet loss rate of the local gateway from the feedback data; when the packet loss rate is greater than the packet loss rate threshold value, a private network networking mode is adopted for public network connection, so that the wireless network connection quality is high, and the communication efficiency of the equipment accessing the Internet through the wireless WIFI is improved.
In one embodiment, the terminal sends a ping instruction to the domain name server, then receives response information fed back by the domain name server in response to the ping instruction, determines response speed according to sending time of the ping instruction and receiving time of the response information, selects the fastest response speed from the response speeds, and selects a target domain name server from the domain name servers according to the fastest response speed.
In one embodiment, the terminal sends an ICMP data packet to each domain name server, receives response information fed back by each domain name server in response to the ICMP data packet, determines the response speed of each domain name server according to the sending time of the ICMP data packet and the receiving time of the response information, selects the fastest response speed from the response speeds, and selects a target domain name server from the domain name servers according to the fastest response speed.
In the embodiment, the terminal acquires the target domain name server with the fastest response speed through the ping instruction, and the influence on the communication between the terminal and the server due to DNS safety conditions such as DNS cache virus exposure, DNS hijacking and the like is avoided, so that the wireless network connection quality is high, and the communication efficiency of equipment accessing the internet through wireless WIFI is improved.
In an embodiment, after extracting the packet loss rate of the local gateway from the feedback data, the terminal determines whether the packet loss rate of the local gateway is greater than a packet loss rate threshold, and controls an LED on the terminal to display when the packet loss rate of the local gateway is greater than the packet loss rate threshold.
In one embodiment, after extracting the packet loss rate of the local gateway from the feedback data, the terminal determines whether the packet loss rate of the local gateway is greater than a packet loss rate threshold, and determines an abnormal level of the wireless network connection according to the packet loss rate when the packet loss rate is greater than the packet loss rate threshold; and carrying out corresponding exception prompt according to the exception grade. The type of the abnormal prompt can be sound, text or pictures.
In one embodiment, after extracting the packet loss rate of the local gateway from the feedback data, the terminal determines whether the packet loss rate of the local gateway is greater than a packet loss rate threshold, and acquires an administrator account and a password when the packet loss rate is greater than the packet loss rate threshold; logging in the wireless network equipment according to the administrator account and the password; modifying the initial networking mode of the wireless network equipment into a special network networking mode; and executing the step of public network connection in a special network networking mode.
In the above embodiment, the terminal performs corresponding exception prompting by judging whether the packet loss rate of the local gateway is greater than the packet loss rate threshold value or not, modifies the initial networking mode of the wireless network device into a private network networking mode, and performs public network connection by using the private network networking mode, so that the quality of wireless network connection is high, and the communication efficiency of the device accessing the internet through the wireless WIFI is improved.
In one embodiment, as shown in fig. 7, the wireless network connection method further includes the following steps:
s702, querying a second network address of each gateway through which the target server passes according to the target domain name server.
In one embodiment, after the terminal selects the target domain name server with the highest response speed, the terminal sends a request packet to the target server through the MTR network test tool, the request packet contains the domain name of the target server, and generates a domain name query request according to the domain name, and sends the domain name query request to the target domain name server, after the target domain name server receives the domain name query request, according to the first network address corresponding to the domain name query in the domain name query request and the second network address of each gateway passed by the target server, and generates a response message according to the first network address and the second network address, and returns the response message to the terminal, after the terminal receives the response message returned by the target domain name server, and extracting the first network address and the second network address of the target server from the response message.
S704, sending request packets to the target server and the gateway according to the first network address and the second network address.
In one embodiment, after acquiring the first network address and the second network address, the terminal sends data packets to the target server and each gateway passing through the target server through the MTR network test tool according to the first network address and the second network address.
In one embodiment, after querying the second network address of each gateway passed by the target server according to the target domain name server, the terminal extracts the third network address corresponding to the local gateway from the second network address, and then extracts the packet loss rate of the local gateway from the feedback data according to the third network address.
In the above embodiment, the terminal queries the second network address of each gateway through which the target server passes according to the target domain name server, and sends the request packet to the target server and the gateway according to the first network address and the second network address, so that the terminal can acquire the feedback data, and perform the judgment of the network connection quality according to the acquired feedback data, so that when the network connection quality is poor, a private network networking mode is adopted for public network connection, so that the wireless network connection quality is higher, and the communication efficiency of the device accessing the internet through the wireless WIFI is improved.
In one embodiment, as shown in fig. 8, a wireless network connection method is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 in fig. 1. Referring to fig. 8, the wireless network connection method specifically includes the following steps:
s802, sending a ping to the domain name server.
And S804, receiving response information fed back by the domain name server in response to the ping instruction.
And S806, determining the response speed according to the sending time of the ping command and the receiving time of the response information.
S808, selects the fastest response speed from the response speeds.
And S810, selecting a target domain name server from the domain name servers according to the fastest response speed.
S812, inquiring the first network address of the target server according to the target domain name server.
S814, the request packet is sent to the target server according to the first network address.
And S816, acquiring feedback data of the target server and each gateway passing through the target server when receiving the request packet.
S818, extracting the packet loss rate of the local gateway from the feedback data.
And S820, when the packet loss rate is greater than the threshold value of the packet loss rate, acquiring an administrator account and a password.
And S822, logging in the wireless network equipment according to the administrator account and the password.
S824, the initial networking mode of the wireless network equipment is changed into a special network networking mode, and public network connection is carried out in the special network networking mode.
Fig. 2, 7 and 8 are flow diagrams illustrating a wireless network connection method according to an embodiment. It should be understood that although the various steps in the flowcharts of fig. 2, 7 and 8 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 7 and 8 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 9, there is provided a wireless network connection apparatus including: a domain name server selecting module 902, a network address querying module 904, a request packet sending module 906, a feedback data collecting module 908, a packet loss rate extracting module 910 and a public network connecting module 912, wherein:
a domain name server selecting module 902, configured to select a target domain name server with the fastest response speed from the domain name servers;
a network address query module 904, configured to query a first network address of a target server according to a target domain name server;
a request packet sending module 906, configured to send a request packet to a target server according to a first network address;
a feedback data acquisition module 908, configured to acquire feedback data of the target server and each gateway that passes through the target server when receiving the request packet;
a packet loss rate extraction module 910, configured to extract a packet loss rate of the local gateway from the feedback data;
a public network connection module 912, configured to perform public network connection in a private network networking manner when the packet loss rate is greater than the packet loss rate threshold.
In one embodiment, the apparatus further comprises: a third network address extraction module 924, wherein:
the third network address extraction module is used for extracting a third network address corresponding to the local gateway from the second network address;
the packet loss rate extracting module 910 is further configured to:
and extracting the packet loss rate of the local gateway from the feedback data according to the third network address.
In the embodiment, the terminal selects the target domain name server with the highest response speed from the domain name servers; inquiring a first network address of a target server according to a target domain name server; sending a request packet to a target server according to a first network address; acquiring feedback data of a target server and each gateway passing through the target server when receiving a request packet respectively; extracting the packet loss rate of the local gateway from the feedback data; when the packet loss rate is greater than the packet loss rate threshold value, a private network networking mode is adopted for public network connection, so that the wireless network connection quality is high, and the communication efficiency of the equipment accessing the Internet through the wireless WIFI is improved.
In one embodiment, the domain name server selection module 902 is further configured to:
sending ping instructions to a domain name server;
receiving response information fed back by the domain name server in response to the ping instruction;
determining a response speed according to the sending time of the ping instruction and the receiving time of the response information;
selecting the fastest response speed from the response speeds;
and selecting the target domain name server from the domain name servers according to the fastest response speed.
In the embodiment, the terminal acquires the target domain name server with the fastest response speed through the ping instruction, and the influence on the communication between the terminal and the server due to DNS safety conditions such as DNS cache virus exposure, DNS hijacking and the like is avoided, so that the wireless network connection quality is high, and the communication efficiency of equipment accessing the internet through wireless WIFI is improved.
In one embodiment, as shown in fig. 10, the apparatus further comprises: an exception level determination module 914 and an exception prompt module 916, wherein:
an abnormal level determining module 914, configured to determine an abnormal level of the wireless network connection according to the packet loss rate when the packet loss rate is greater than the packet loss rate threshold;
the exception prompting module 916 is configured to perform corresponding exception prompting according to the exception level.
In one embodiment, as shown in fig. 10, the apparatus further comprises: an account password obtaining module 918, a login module 920 and a networking mode modifying module 922, wherein:
an account password obtaining module 918, configured to obtain an administrator account and a password when the packet loss rate is greater than a packet loss rate threshold;
a login module 920, configured to log in the wireless network device according to the administrator account and the password;
a networking mode modifying module 922, configured to modify an initial networking mode of the wireless network device into a private network networking mode; and executing the step of public network connection in a special network networking mode.
In the above embodiment, the terminal performs corresponding exception prompting by judging whether the packet loss rate of the local gateway is greater than the packet loss rate threshold value or not, modifies the initial networking mode of the wireless network device into a private network networking mode, and performs public network connection by using the private network networking mode, so that the quality of wireless network connection is high, and the communication efficiency of the device accessing the internet through the wireless WIFI is improved.
In one embodiment, the network address query module 904 is further configured to:
and inquiring the second network address of each gateway passed by the target server according to the target domain name server.
In one embodiment, the request packet sending module 906 is further configured to:
and respectively sending request packets to the target server and the gateway according to the first network address and the second network address.
In the above embodiment, the terminal queries the second network address of each gateway through which the target server passes according to the target domain name server, and sends the request packet to the target server and the gateway according to the first network address and the second network address, so that the terminal can acquire the feedback data, and perform the judgment of the network connection quality according to the acquired feedback data, so that when the network connection quality is poor, a private network networking mode is adopted for public network connection, so that the wireless network connection quality is higher, and the communication efficiency of the device accessing the internet through the wireless WIFI is improved.
FIG. 11 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 (or the target server 140) in fig. 1. As shown in fig. 11, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen connected through a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program that, when executed by the processor, causes the processor to implement the wireless network connection method. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a wireless networking method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the wireless network connection apparatus provided in the present application may be implemented in the form of a computer program, and the computer program may be run on a computer device as shown in fig. 11. The memory of the computer device may store various program modules that constitute the wireless network connection apparatus, such as the domain name server selecting module 902, the network address querying module 904, the request packet sending module 906, the feedback data collecting module 908, the packet loss rate extracting module 910, and the public network connection module 912 shown in fig. 9. The computer program constituted by the respective program modules causes the processor to execute the steps in the wireless network connection method of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 11 may perform S202 through the domain name server selection module 902 in the wireless network connection apparatus as shown in fig. 9. The computer device may perform S204 through the network address query module 904. The computer device may perform S206 by the request packet transmission module 906. The computer device may perform S208 by the feedback data collection module 908. The computer device may perform S210 by the packet loss rate extraction module 910. The computer device may perform S212 through the public network connection module 912.
In one embodiment, there is provided a computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of: selecting a target domain name server with the highest response speed from the domain name servers; inquiring a first network address of a target server according to a target domain name server; sending a request packet to a target server according to a first network address; acquiring feedback data of a target server and each gateway passing through the target server when receiving a request packet respectively; extracting the packet loss rate of the local gateway from the feedback data; and when the packet loss rate is greater than the packet loss rate threshold value, performing public network connection in a special network networking mode.
In one embodiment, when the step of selecting the target domain name server with the fastest response speed from the domain name servers is executed by the processor, the processor is specifically caused to execute the following steps: sending ping instructions to a domain name server; receiving response information fed back by the domain name server in response to the ping instruction; determining a response speed according to the sending time of the ping instruction and the receiving time of the response information; selecting the fastest response speed from the response speeds; and selecting the target domain name server from the domain name servers according to the fastest response speed.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: when the packet loss rate is greater than the packet loss rate threshold, determining the abnormal level of the wireless network connection according to the packet loss rate; and carrying out corresponding exception prompt according to the exception grade.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: when the packet loss rate is greater than a packet loss rate threshold value, acquiring an administrator account and a password; logging in the wireless network equipment according to the administrator account and the password; modifying the initial networking mode of the wireless network equipment into a special network networking mode; and executing the step of public network connection in a special network networking mode.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: and inquiring the second network address of each gateway passed by the target server according to the target domain name server.
In one embodiment, the computer program, when executed by the processor, causes the processor to perform the steps of sending a request packet to a destination server according to a first network address, in particular: and respectively sending request packets to the target server and the gateway according to the first network address and the second network address.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: extracting a third network address corresponding to the local gateway from the second network address; extracting the packet loss rate of the local gateway from the feedback data, including: and extracting the packet loss rate of the local gateway from the feedback data according to the third network address.
In one embodiment, a computer readable storage medium is provided, storing a computer program that, when executed by a processor, causes the processor to perform the steps of: selecting a target domain name server with the highest response speed from the domain name servers; inquiring a first network address of a target server according to a target domain name server; sending a request packet to a target server according to a first network address; acquiring feedback data of a target server and each gateway passing through the target server when receiving a request packet respectively; extracting the packet loss rate of the local gateway from the feedback data; and when the packet loss rate is greater than the packet loss rate threshold value, performing public network connection in a special network networking mode.
In one embodiment, when the step of selecting the target domain name server with the fastest response speed from the domain name servers is executed by the processor, the processor is specifically caused to execute the following steps: sending ping instructions to a domain name server; receiving response information fed back by the domain name server in response to the ping instruction; determining a response speed according to the sending time of the ping instruction and the receiving time of the response information; selecting the fastest response speed from the response speeds; and selecting the target domain name server from the domain name servers according to the fastest response speed.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: when the packet loss rate is greater than the packet loss rate threshold, determining the abnormal level of the wireless network connection according to the packet loss rate; and carrying out corresponding exception prompt according to the exception grade.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: when the packet loss rate is greater than a packet loss rate threshold value, acquiring an administrator account and a password; logging in the wireless network equipment according to the administrator account and the password; modifying the initial networking mode of the wireless network equipment into a special network networking mode; and executing the step of public network connection in a special network networking mode.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: and inquiring the second network address of each gateway passed by the target server according to the target domain name server.
In one embodiment, the computer program, when executed by the processor, causes the processor to perform the steps of sending a request packet to a destination server according to a first network address, in particular: and respectively sending request packets to the target server and the gateway according to the first network address and the second network address.
In one embodiment, the computer program, when executed by the processor, causes the processor to further perform the steps of: extracting a third network address corresponding to the local gateway from the second network address; extracting the packet loss rate of the local gateway from the feedback data, including: and extracting the packet loss rate of the local gateway from the feedback data according to the third network address.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A wireless network connection method is executed on a terminal and comprises the following steps:
selecting a target domain name server with the highest response speed from the domain name servers;
inquiring a first network address of a target server according to the target domain name server;
sending a request packet to the target server according to the first network address;
acquiring feedback data of the target server and each gateway passing through the target server when receiving the request packet respectively;
extracting the packet loss rate of the local gateway from the feedback data;
when the packet loss rate is greater than a packet loss rate threshold value, performing public network connection in a special network networking mode; the method for performing public network connection by adopting the private network networking mode is characterized in that the initial networking mode of the wireless network equipment is modified into the private network networking mode, and the initial networking mode is performed according to the service set identification and the access password of the WIFI; the public network connection means that the terminal accesses the Internet through wireless WIFI.
2. The method of claim 1, wherein selecting the target domain name server with the fastest response speed from the domain name servers comprises:
sending ping instructions to a domain name server;
receiving response information fed back by the domain name server in response to the ping instruction;
determining a response speed according to the sending time of the ping instruction and the receiving time of the response information;
selecting the fastest response speed from the response speeds;
and selecting a target domain name server from the domain name servers according to the fastest response speed.
3. The method of claim 1, further comprising:
when the packet loss rate is greater than a packet loss rate threshold, determining an abnormal level of the wireless network connection according to the packet loss rate;
and carrying out corresponding exception prompt according to the exception grade.
4. The method of claim 1, further comprising:
when the packet loss rate is greater than a packet loss rate threshold value, acquiring an administrator account and a password;
logging in wireless network equipment according to the administrator account and the password;
modifying the initial networking mode of the wireless network equipment into a private network networking mode;
and executing the step of performing public network connection by adopting a special network networking mode.
5. The method according to any one of claims 1 to 4, further comprising:
and inquiring second network addresses of all gateways passed by the target server according to the target domain name server.
6. The method of claim 5, wherein sending the request packet to the destination server according to the first network address comprises:
and respectively sending request packets to the target server and the gateway according to the first network address and the second network address.
7. The method of claim 5, further comprising:
extracting a third network address corresponding to the local gateway from the second network address;
the extracting of the packet loss rate of the local gateway from the feedback data includes:
and extracting the packet loss rate of the local gateway from the feedback data according to the third network address.
8. An apparatus for wireless networking, the apparatus comprising:
the domain name server selection module is used for selecting a target domain name server with the highest response speed from the domain name servers;
the network address query module is used for querying a first network address of a target server according to the target domain name server;
a request packet sending module, configured to send a request packet to the target server according to the first network address;
the feedback data acquisition module is used for acquiring feedback data of the target server and each gateway passing through the target server when receiving the request packet;
the packet loss rate extraction module is used for extracting the packet loss rate of the local gateway from the feedback data;
the public network connection module is used for performing public network connection in a special network networking mode when the packet loss rate is greater than a packet loss rate threshold value; the method for performing public network connection by adopting the private network networking mode is characterized in that the initial networking mode of the wireless network equipment is modified into the private network networking mode, and the initial networking mode is performed according to the service set identification and the access password of the WIFI; the public network connection means that the terminal accesses the Internet through wireless WIFI.
9. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 7.
10. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
CN202010155995.4A 2020-03-09 2020-03-09 Wireless network connection method and device, readable storage medium and computer equipment Active CN111405639B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010155995.4A CN111405639B (en) 2020-03-09 2020-03-09 Wireless network connection method and device, readable storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010155995.4A CN111405639B (en) 2020-03-09 2020-03-09 Wireless network connection method and device, readable storage medium and computer equipment

Publications (2)

Publication Number Publication Date
CN111405639A CN111405639A (en) 2020-07-10
CN111405639B true CN111405639B (en) 2022-05-13

Family

ID=71413209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010155995.4A Active CN111405639B (en) 2020-03-09 2020-03-09 Wireless network connection method and device, readable storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN111405639B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114745445A (en) * 2022-04-27 2022-07-12 深圳绿米联创科技有限公司 Control method, control device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375401A (en) * 2016-08-30 2017-02-01 全球能源互联网研究院 Electric power multi-mode heterogeneous fusion device supporting multi-stream convergence and communication method
CN106953795A (en) * 2016-01-07 2017-07-14 中兴通讯股份有限公司 Configure the method and device of many network interface cards
CN108737588A (en) * 2018-03-29 2018-11-02 北京小米移动软件有限公司 Domain name analytic method and device
CN110572859A (en) * 2019-09-29 2019-12-13 珠海格力电器股份有限公司 AP switching method, device, equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201006194A (en) * 2008-07-17 2010-02-01 D Link Corp Method of building connection channels among network terminal devices using servers with dynamic domain names
CN103297422B (en) * 2013-05-03 2016-09-07 安斌 A kind of communication means, router and communication system
CN103297338B (en) * 2013-06-20 2016-06-01 杭州华三通信技术有限公司 A kind of VPN route advertising method and equipment
CN110191036B (en) * 2019-07-02 2024-03-15 广东晨信科技有限公司 Internet and private network fusion transmission system based on wireless access mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953795A (en) * 2016-01-07 2017-07-14 中兴通讯股份有限公司 Configure the method and device of many network interface cards
CN106375401A (en) * 2016-08-30 2017-02-01 全球能源互联网研究院 Electric power multi-mode heterogeneous fusion device supporting multi-stream convergence and communication method
CN108737588A (en) * 2018-03-29 2018-11-02 北京小米移动软件有限公司 Domain name analytic method and device
CN110572859A (en) * 2019-09-29 2019-12-13 珠海格力电器股份有限公司 AP switching method, device, equipment and medium

Also Published As

Publication number Publication date
CN111405639A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
US9712422B2 (en) Selection of service nodes for provision of services
US8971342B2 (en) Switch and flow table controlling method
US8578034B2 (en) Optimized network device discovery
US8214537B2 (en) Domain name system using dynamic DNS and global address management method for dynamic DNS server
CN107360184B (en) Terminal equipment authentication method and device
CN102739684B (en) Portal authentication method based on virtual IP address, and server thereof
US8578468B1 (en) Multi-factor client authentication
CN110839046B (en) Multi-protocol intercommunication method and system
CN111917900B (en) Domain name agent request processing method and device
CN111866124B (en) Method, device, server and machine-readable storage medium for accessing webpage
CN109525684B (en) Message forwarding method and device
US10924533B2 (en) System, apparatus and method for load balancing
CN112702425B (en) WEB application access proxy method, device and storage medium based on domain name extensive resolution
US11283757B2 (en) Mapping internet routing with anycast and utilizing such maps for deploying and operating anycast points of presence (PoPs)
CN103618801A (en) Method, device and system for sharing P2P (Peer-to-Peer) resources
CN108234194B (en) Network topology structure discovery method and device based on SDN and storage medium
CN106507414B (en) Message forwarding method and device
CN111193813B (en) Test request processing method and device for determining NAT type and computer equipment
CN110474814B (en) Power local area network fault diagnosis method and device
CN111405639B (en) Wireless network connection method and device, readable storage medium and computer equipment
US10560348B2 (en) Network access device for facilitating the troubleshooting of network connectivity problems
CN106254433B (en) Method and device for establishing TCP communication connection
CN114268578B (en) Data transmission method, device, equipment and storage medium for switching line
Alzoubi et al. Performance implications of unilateral enabling of IPv6
CN114710560A (en) Data processing method and system, proxy equipment and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant