CN112187588A - WIFI network connectivity detection method and device for terminal equipment, medium and terminal - Google Patents
WIFI network connectivity detection method and device for terminal equipment, medium and terminal Download PDFInfo
- Publication number
- CN112187588A CN112187588A CN202011180482.5A CN202011180482A CN112187588A CN 112187588 A CN112187588 A CN 112187588A CN 202011180482 A CN202011180482 A CN 202011180482A CN 112187588 A CN112187588 A CN 112187588A
- Authority
- CN
- China
- Prior art keywords
- dns
- network connectivity
- domain name
- message
- sending
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/50—Queue scheduling
- H04L47/62—Queue scheduling characterised by scheduling criteria
- H04L47/625—Queue scheduling characterised by scheduling criteria for service slots or service orders
- H04L47/6275—Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Environmental & Geological Engineering (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
A WIFI network connectivity detection method of a terminal device, a medium and a terminal are provided, wherein the WIFI network connectivity detection method of the terminal device comprises the following steps: analyzing the data packet in response to the received network detection starting instruction; when the analysis result shows that the data packet is a DNS message, the transmission priority of the DNS message is increased to the highest sending priority; and sending the DNS message to a corresponding DNS server according to the highest sending priority. By the scheme, the misjudgment rate of the network connectivity detection can be reduced, and the success rate of the network connectivity detection can be improved.
Description
Technical Field
The embodiment of the invention relates to the field of network connectivity detection, in particular to a WIFI network connectivity detection method and device for terminal equipment, a medium and a terminal.
Background
Generally, when a mobile terminal device such as a mobile phone is connected with a WIFI network accessed by the internet, even if a router can surf the internet, sometimes the mobile phone still prompts the word of 'no-surf the internet' (an exclamation mark is displayed on a WIFI icon).
Due to the fact that the network connectivity detection machine makes a misjudgment, the accuracy of the network connectivity detection result is low, and user experience is further affected.
Disclosure of Invention
The embodiment of the invention solves the technical problem that the misjudgment rate of network connectivity detection is high, so that the accuracy of the network connectivity detection result is low.
In order to solve the above technical problem, an embodiment of the present invention provides a method for detecting WIFI network connectivity of a terminal device, including: analyzing the data packet in response to the received network detection starting instruction; when the analysis result shows that the data packet is a DNS message, the transmission priority of the DNS message is increased to the highest sending priority; and sending the DNS message to a corresponding DNS server according to the highest sending priority.
Optionally, the increasing the transmission priority of the DNS packet to the highest sending priority includes: and based on a WMM Qos protocol, the transmission priority of the DNS message is increased to the highest sending priority.
Optionally, the increasing the transmission priority of the DNS packet to the highest sending priority includes: and putting the DNS message into a key frame sending queue of a WIFI MAC link layer, wherein the key frame sending queue has the highest sending priority.
Optionally, the method for detecting the WIFI network connectivity of the terminal device further includes: when the DNS message comprises a DNS query data frame, if the DNS message fails to be sent or a response message corresponding to the DNS message is not received within a set time length, retransmitting the DNS message according to a configured software retransmission mechanism until a set number of times of retransmission or a response message corresponding to the DNS message is received, wherein the DNS query data frame is added into the software retransmission mechanism as a key frame in a pre-configuration mode.
Optionally, the sending the DNS packet to the corresponding DNS server according to the highest sending priority includes: enabling the RTS-CTS mechanism; and based on the RTS-CTS mechanism, sending the DNS message to a corresponding DNS server according to the highest sending priority.
Optionally, after sending the DNS packet to the corresponding DNS server according to the highest sending priority, the method further includes: and maintaining an active state to receive a response message corresponding to the DNS message, wherein the response message is fed back by the DNS server according to the DNS message, and the DNS message is in the active state when being sent to the corresponding DNS server according to the highest sending priority.
Optionally, the sending the DNS packet to the corresponding DNS server according to the highest sending priority includes: and sending the DNS message to a corresponding DNS server according to the highest sending priority by adopting the lowest basic rate supported by the terminal equipment.
Optionally, the DNS packet is generated in the following manner: when detecting that WIFI network connectivity detection is triggered, acquiring a preset domain name list, wherein a plurality of different domain names are recorded in the domain name list; inquiring the domain name from the domain name list, and taking the inquired domain name as the domain name to be inquired; and generating the DNS message according to the domain name to be queried.
Optionally, the method for detecting the WIFI network connectivity of the terminal device further includes: when the response message corresponding to the DNS message is not received within the set duration, judging that the network connectivity detection aiming at the DNS message fails, continuing to inquire the domain name from the domain name list, taking the inquired domain name as the domain name to be inquired, generating the corresponding DNS message according to the domain name to be inquired, and continuing to carry out WIFI network connectivity detection until the corresponding message corresponding to one DNS message is received within the set duration or all domain names in the domain name list are inquired.
Optionally, the method for detecting the WIFI network connectivity of the terminal device further includes: when the response message of the DNS message corresponding to the last domain name in the domain name list is not received within the set duration, judging that the WIFI network connectivity detection fails; and when the WIFI network connectivity detection fails, setting an internet access unavailable identifier.
Optionally, the method for detecting the WIFI network connectivity of the terminal device further includes: and responding to the received network detection ending instruction, and ending the analysis of the data packet.
Optionally, the current position of the terminal device is obtained, the domain name corresponding to the current position is queried from the domain name list according to the current position, and the domain name corresponding to the current position is used as the domain name to be queried.
Optionally, the method for detecting the WIFI network connectivity of the terminal device further includes: and updating the domain names in the domain name list periodically.
Compared with the prior art, the technical scheme of the embodiment of the invention has the following beneficial effects:
the method comprises the steps of responding to a received network detection starting instruction, analyzing a data packet, increasing the transmission priority of the DNS message to the highest sending priority when an analysis result shows that the data packet is the DNS message, and sending the DNS message to a corresponding server according to the highest sending priority. Therefore, the sending priority of the DNS message is improved, the anti-interference capability of the DNS message can be improved, the success rate of DNS message sending is improved, the misjudgment rate of network connectivity detection can be reduced, and the success rate of the network connectivity detection can be improved.
Further, when the DNS message includes a DNS query data frame, if the DNS message fails to be sent or a response message corresponding to the DNS message is not received within a set time length, the DNS message is retransmitted according to a configured software retransmission mechanism, so that the success rate of sending the DNS message can be further increased, the false determination rate of network connectivity detection can be further reduced, and the accuracy of network connectivity detection can be increased.
Further, an RTS-CTS mechanism is enabled, based on the RTS-CTS mechanism, the DNS message is sent to the corresponding DNS server according to the highest sending priority, the problem of terminal hiding can be solved, the influence of other terminals on sending the DNS message or receiving a response message to the terminal equipment is avoided, the air interface collision probability of the DNS message in the sending process is reduced, the misjudgment rate of network connectivity detection is further reduced, and the accuracy of network connectivity detection is improved.
Further, after the DNS message is sent to the corresponding DNS server according to the highest sending priority, the active state is maintained, so that the terminal device can be prevented from entering a dormant state, and a response message fed back by the DNS server can be received in time.
Further, the lowest basic rate supported by the terminal equipment is adopted, and the DNS message is sent to the corresponding DNS server according to the highest sending priority, so that the anti-interference capability of the DNS message can be improved, and the successful sending probability is improved.
Drawings
Fig. 1 is a flowchart of a method for detecting WIFI network connectivity of a terminal device in an embodiment of the present invention;
fig. 2 is a flowchart of another method for detecting WIFI network connectivity of a terminal device in the embodiment of the present invention;
fig. 3 is a schematic structural diagram of a WIFI network connectivity detection apparatus of a terminal device in an embodiment of the present invention.
Detailed Description
In the prior art, usually, when a terminal device is just connected to a router, or a network of the terminal device changes, for example, when roaming from an Access Point (AP) to another AP, the terminal device performs network connectivity detection to detect whether the terminal device can Access the internet, so as to find a network that cannot Access the internet in time, and prompt a user whether to need to switch to another AP or close a current WIFI connection, so as to save more electric power. The principle of network connectivity detection is mainly to check whether a response is received in time by accessing a network domain name. When the terminal equipment performs WIFI network connectivity detection, when the current network environment of the terminal equipment is complex, the interference is large, the DNS query frame sending or the receiving of the response message is easy to fail, even if the router can surf the internet, the terminal equipment such as a mobile phone is still marked as 'non-internet-capable' mark, the network connectivity detection misjudgment occurs, the accuracy of the network connectivity result is low, and the user experience is influenced.
In the embodiment of the invention, the data packet is analyzed in response to the received network detection starting instruction, when the analysis result shows that the data packet is the DNS message, the transmission priority of the DNS message is increased to the highest sending priority, and the DNS message is sent to the corresponding server according to the highest sending priority, and generally, the higher the priority is, the better the occupation of air interface resources is, the better the reliability of the DNS message in the air interface transmission in a congested environment is promoted, so that the successful sending opportunity is promoted. Therefore, the sending priority of the DNS message is improved, the anti-interference capability of the DNS message can be improved, the success rate of DNS message sending is improved, the misjudgment rate of network connectivity detection can be reduced, and the success rate of the network connectivity detection can be improved.
In order to make the aforementioned objects, features and advantages of the embodiments of the present invention more comprehensible, specific embodiments accompanied with figures are described in detail below.
Referring to fig. 1, a flowchart of a method for detecting WIFI network connectivity of a terminal device in an embodiment of the present invention is shown. The method specifically comprises the following steps:
step S11, in response to the received network probing start instruction, parsing the data packet.
In a specific implementation, the network probe initiation instruction may be generated when the terminal device is just connected to the router, or when the network of the terminal device changes, where the network change may be roaming from one AP to another AP.
In the embodiment of the present invention, the application layer of the terminal device may be used as a network connectivity detection module, and the application layer may be application software APP installed on the terminal device. The application layer may detect a network change, a network access condition, and the like of the terminal device, and generate a network detection start instruction network _ detect _ start _ cmd according to the network access condition and the network change condition. The application layer may issue a network detection start instruction network _ detect _ start _ cmd to the WIFI module. And after receiving the network detection starting instruction, the WIFI module analyzes the received data packet. The data packet is generated by an application layer and is sent to the WIFI module through a network protocol stack.
And step S12, when the analysis result shows that the data packet is a DNS message, the transmission priority of the DNS message is increased to the highest sending priority.
In specific implementation, when the analysis result indicates that the data packet is a Domain Name System (DNS) packet, the sending of the DNS packet is optimized, and the DNS packet is sent preferentially. Wherein, the DNS message carries the domain name to be inquired.
Specifically, the transmission priority of the DNS packet may be increased to the highest transmission priority.
In the embodiment of the present invention, the transmission priority of the DNS packet may be increased to the highest sending priority based on a WIFI Multimedia Quality of Service (WMM Qos) protocol. The WMM is a wireless QoS protocol, which is a subset of the 802.11e protocol, and is used to ensure that a high-priority packet has a priority right to send.
In specific implementation, the transmission priority of the DNS packet is increased to the highest sending priority, which can be implemented as follows: the DNS message is placed in a key frame sending queue of a WIFI Medium Access Control (MAC) link layer, wherein the key frame sending queue has the highest sending priority.
And step S13, sending the DNS message to the corresponding DNS server according to the highest sending priority.
As can be seen from the above, in response to a received network probing start instruction, a data packet is analyzed, and when an analysis result indicates that the data packet is a DNS packet, the transmission priority of the DNS packet is increased to the highest transmission priority, and the DNS packet is transmitted to a corresponding server according to the highest transmission priority. Therefore, the sending priority of the DNS message is improved, the anti-interference capability of the DNS message can be improved, the success rate of DNS message sending is improved, the misjudgment rate of network connectivity detection can be reduced, and the success rate of the network connectivity detection can be improved.
In order to further reduce the misjudgment rate of the network connectivity detection and improve the accuracy of the network connectivity detection, the sending or receiving of the DNS packet may be optimized by at least one of the following methods, specifically:
in an embodiment of the present invention, a DNS query data frame may be configured in advance as a key frame to be added to a software retransmission mechanism, and a retransmission number may also be set.
A hardware retransmission mechanism is usually configured, and if network connectivity detection fails, the network connectivity detection may retransmit the same DNS packet, where the maximum retransmission number is M. The software retransmission mechanism configured in the embodiment of the invention can continue to retransmit on the basis of M times set by hardware retransmission, if the software retransmission is configured to N times, the actual maximum retransmission times is M x N times, and the success rate of sending the DNS message can be further improved by configuring the software retransmission mechanism, so that the misjudgment rate of network connectivity detection is further reduced, and the accuracy of the network connectivity detection is improved.
When the DNS message comprises a DNS query data frame, if the DNS message fails to be sent or a response message corresponding to the DNS message is not received within a set time length, retransmitting the DNS message according to a configured software retransmission mechanism until a set number of times of retransmission or a response message corresponding to the DNS message is received.
In another embodiment of the present invention, an RTS-CTS mechanism is enabled, and based on the RTS-CTS mechanism, the DNS packet is sent to the corresponding DNS server according to the highest sending priority. The RTS-CTS is a request-to-send/clear-to-send protocol, and under an RTS-CTS mechanism, the problem of hiding a terminal can be solved, the influence of other terminals on sending DNS messages or receiving response messages to terminal equipment is avoided, the air interface collision probability of the DNS messages in the sending process is reduced, the misjudgment rate of network connectivity detection is further reduced, and the accuracy of the network connectivity detection is improved.
Specifically, under the RTS-CTS mechanism, the terminal device requests to send a DNS message by sending an RTS request, the DNS server responds to the RTS request with a CTS, and the terminal device may send the DNS message to the DNS server after receiving the CTS. After the terminal device sends the RTS request, the hosts around the terminal device know that there are messages to be sent by the terminal device around the terminal device after receiving the RTS request, and the hosts around the terminal device keep silent without sending any message until the process of sending the DNS message to the DNS server by the terminal device is completely finished. The DNS server responds to the RTS request by using the CTS, the CTS reserves bandwidth for the terminal equipment and simultaneously informs that equipment around all nodes receives messages, the nodes around the DNS server keep a silent state and do not receive and transmit any messages so as to avoid interfering the DNS server to receive the DNS messages until the terminal equipment and the DNS server finish data receiving and transmitting, and the node sides around the DNS server can recover normal data receiving and transmitting.
In another embodiment of the present invention, when the DNS packet is sent to the corresponding DNS server according to the highest sending priority, the DNS packet is in the active state, and after the DNS packet is sent to the corresponding DNS server according to the highest sending priority, the active state is maintained to receive a response packet corresponding to the DNS packet, and the response packet is fed back by the DNS server according to the DNS packet.
By maintaining an active state, the terminal equipment can be prevented from entering a dormant state, so that the terminal equipment can receive a response message fed back by the DNS server in time.
In another embodiment of the present invention, the lowest basic rate supported by the terminal device is adopted, and the DNS packet is sent to the corresponding DNS server according to the highest sending priority.
In specific implementation, data with the same size is transmitted, the lower the transmission rate is, the longer the occupied space time is, and the higher the transmission success rate is, so that the DNS message is transmitted at the lowest basic speed supported by the terminal equipment according to the highest transmission priority, the anti-interference capability of the DNS message can be improved, and the probability of successful transmission is improved.
The research finds that another reason for misjudgment of network connectivity detection is that the number of DNS query domains is usually fixed to one or two, and when DNS packets are generated for one or two domains that are fixedly set, because different users are distributed in different countries, domain access may be limited, so that when network connectivity detection is performed for only fixed domains, the network connectivity detection result fails, and a "non-internet-capable" identifier is marked, and in practice, a router is capable of accessing the internet, so that the accuracy of the network connectivity detection result is low.
In order to further improve the accuracy of the network connectivity detection result, in the embodiment of the present invention, the DNS message is generated in the following manner: when detecting that WIFI network connectivity detection is triggered, acquiring a preset domain name list, wherein a plurality of different domain names are recorded in the domain name list; inquiring the domain name from the domain name list, and taking the inquired domain name as the domain name to be inquired; and generating the DNS message according to the domain name to be queried. The number of the domain names in the domain name list can be as many as 20-30 or more, and the domain names in the domain name list can be distributed in mainstream famous domain name systems all over the world, so that the probability of limited domain name access can be effectively reduced, and the probability of receiving a response message corresponding to a DNS message generated aiming at a certain domain name is improved.
In specific implementation, when a response message corresponding to the DNS message is not received within a set duration, it is determined that network connectivity detection for the DNS message fails, a domain name may be continuously queried from a domain name list, the queried domain name is used as a domain name to be queried, a corresponding DNS message is generated according to the domain name to be queried, and WIFI network connectivity detection is continuously performed until a response message corresponding to one of the DNS messages is received within the set duration or query of all domain names in the domain name list is completed.
When the domain name is queried from the domain name list, the current position of the terminal device can be obtained, the domain name corresponding to the current position is queried from the domain name list according to the current position, and the domain name corresponding to the current position is used as the domain name to be queried.
For example, the current location of the terminal device is china, and a chinese domain name is queried from the domain name list as a domain name to be queried. For another example, the current location of the terminal device is the united states, and the united states domain name is queried from the domain name list as the domain name to be queried.
The domain name corresponding to the current position is preferentially acquired for network connectivity detection, so that the probability of access limitation caused by the position can be effectively reduced, the probability of successful domain name access is improved, and the efficiency of network connectivity detection is improved.
It is understood that the domain name query can also be performed one by one according to the rank order of each domain name in the domain name list.
When network connectivity detection is triggered, corresponding DNS messages are generated one by one according to domain names in a domain name list, the generated DNS messages are sent to a DNS server corresponding to the domain name, and the domain names are accessed one by one to perform network connectivity detection.
In specific implementation, when a response message corresponding to the DNS message corresponding to the last domain name in the domain name list is not received within a set time length, it may be determined that the detection of the connectivity of the WIFI network fails. When the WIFI network connectivity detection is judged to fail, an internet access unavailable identifier can be set. The non-network-enabled identification may be various, such as, for example, the non-network-enabled identification being "! "or" x ", etc., it being understood that other designations may be used.
In specific implementation, the domain names in the domain name list can be updated regularly to remove the failed domain names or add new domain names, so as to reduce the influence of domain name failure or access limitation and the like on domain name access, and to facilitate improving the network connectivity detection efficiency or reducing the network connectivity detection misjudgment rate during subsequent network connectivity detection.
In specific implementation, the configuration of the domain names and the number of domain names contained in the domain name list, the generation of the DNS packet, and the like may be implemented by an application layer of the terminal device.
In a specific implementation, after receiving the network probing termination instruction, the parsing of the data packet may be terminated.
Upon completion of the network connectivity check, a network probe end instruction may be generated. The completing of the network connectivity detection may include receiving a response message corresponding to the DNS message, or failing to detect the network connectivity. And when a response message corresponding to the DNS message is received, judging that the network is connected. When the network connectivity is determined, the network connectivity detection may be ended.
When detecting that the network connectivity detection is completed, the application layer of the terminal device generates a network detection end instruction network _ detect _ end _ cmd, and sends the network detection end instruction network _ detect _ end _ cmd to the WIFI module, and after receiving the network detection end instruction network _ detect _ end _ cmd, the WIFI module stops analyzing the data packet.
In specific implementation, after the WIFI module exits the analysis of the data packet, the WIFI module may be allowed to enter a sleep (doze) state according to the current WIFI status.
In order to facilitate better understanding and implementation of the embodiment of the present invention for those skilled in the art, referring to fig. 2, another method for detecting WIFI network connectivity of a terminal device in the embodiment of the present invention is provided, which specifically includes the following steps:
step S201, triggering network connectivity detection.
The application layer of the terminal device may trigger network connectivity detection when the network of the terminal device changes as the terminal device just attaches to a router or when the terminal device roams from one AP to another AP.
Step S202, network _ detect _ start _ cmd is issued to the WIFI module.
Step S203, issuing DNS messages one by one according to the domain name list, wherein the DNS messages comprise DNS query data frames.
Step S204, the WIFI module starts to detect whether the message sent by the network protocol stack is a DNS query data frame.
In step S205, the WIFI module detects a DNS query data frame.
And step S206, carrying out optimized sending and receiving processing of a WIFI link layer.
The optimized sending and receiving processing of the WIFI link layer may include at least one of the following: adding the DNS query frame as a key frame into a software retransmission mechanism; enabling an RTS-CTS mechanism, and sending the DNS message to a corresponding DNS server according to the highest sending priority based on the RTS-CTS mechanism; maintaining an active state to receive a response message corresponding to the DNS message; sending the DNS message to a corresponding DNS server according to the highest sending priority by adopting the lowest basic rate supported by the terminal equipment; the description in the above embodiments of the present invention may be specifically referred to, and details are not repeated here.
Step S207, determining whether a response message corresponding to the DNS message is received within a set duration.
When the judgment result is no, executing step S208; if yes, step S211 is executed, and the network connectivity detection is successful. After the execution of step S211 is completed, step S212 is executed.
Step S208, determine whether to query the last domain name in the domain name list.
When the judgment result is yes, step S209 is executed; when the determination result is no, step S203 is continuously performed.
In step S209, the network connectivity check fails.
And step S210, setting and identifying an icon of 'internet surfing unavailable'.
Step S212, sending network _ detect _ end _ cmd to the WIFI module.
An application layer of the terminal equipment can serve as a communication detection module and sends network _ detect _ end _ cmd to the WIFI module.
And step S213, the WIFI module exits the DNS data packet analysis processing process.
Step S214, the network connectivity detection is finished.
In order to facilitate better understanding and implementation of the embodiments of the present invention for those skilled in the art, the embodiments of the present invention further provide a device for detecting WIFI network connectivity of a terminal device.
Referring to fig. 3, a schematic structural diagram of a WIFI network connectivity detection apparatus of a terminal device in the embodiment of the present invention is shown. The WIFI network connectivity detection apparatus 30 of the terminal device may include:
the analysis unit 31 is configured to analyze the data packet in response to the received network detection start instruction;
an adjusting unit 32, configured to increase a transmission priority of the DNS packet to a highest sending priority when the analysis result indicates that the data packet is a DNS packet;
a sending unit 33, configured to send the DNS packet to a corresponding DNS server according to the highest sending priority
In a specific implementation, the specific working principle and the working flow of the WIFI network connectivity detection apparatus 30 of the terminal device may refer to the description of the WIFI network connectivity detection method of the terminal device provided in the above embodiment of the present invention, and are not described herein again.
The embodiment of the present invention further provides a storage medium, where the computer-readable storage medium is a non-volatile storage medium or a non-transitory storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the method for detecting WIFI network connectivity of a terminal device provided in any of the above embodiments are executed.
The embodiment of the present invention further provides a terminal, which includes a memory and a processor, where the memory stores a computer program capable of running on the processor, and the processor executes the steps of the method for detecting WIFI network connectivity of a terminal device provided in any of the above embodiments when running the computer program.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in any computer readable storage medium, and the storage medium may include: ROM, RAM, magnetic or optical disks, and the like.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (16)
1. A WIFI network connectivity detection method of terminal equipment is characterized by comprising the following steps:
analyzing the data packet in response to the received network detection starting instruction;
when the analysis result shows that the data packet is a DNS message, the transmission priority of the DNS message is increased to the highest sending priority;
and sending the DNS message to a corresponding DNS server according to the highest sending priority.
2. The method for detecting WIFI network connectivity of a terminal device of claim 1, wherein said increasing the transmission priority of the DNS packet to a highest sending priority comprises:
and based on a WMM Qos protocol, the transmission priority of the DNS message is increased to the highest sending priority.
3. The method for detecting WIFI network connectivity of a terminal device according to claim 1 or 2, wherein the increasing the transmission priority of the DNS packet to the highest sending priority includes:
and putting the DNS message into a key frame sending queue of a WIFI MAC link layer, wherein the key frame sending queue has the highest sending priority.
4. The method for detecting WIFI network connectivity of a terminal device of claim 1, further comprising:
when the DNS message comprises a DNS query data frame, if the DNS message fails to be sent or a response message corresponding to the DNS message is not received within a set time length, retransmitting the DNS message according to a configured software retransmission mechanism until a set number of times of retransmission or a response message corresponding to the DNS message is received, wherein the DNS query data frame is added into the software retransmission mechanism as a key frame in a pre-configuration mode.
5. The method for detecting WIFI network connectivity of a terminal device of claim 1, wherein the sending the DNS packet to a corresponding DNS server according to the highest sending priority includes:
enabling the RTS-CTS mechanism;
and based on the RTS-CTS mechanism, sending the DNS message to a corresponding DNS server according to the highest sending priority.
6. The method for detecting WIFI network connectivity of a terminal device of claim 1, wherein after sending the DNS packet to the corresponding DNS server according to the highest sending priority, further comprising:
and maintaining an active state to receive a response message corresponding to the DNS message, wherein the response message is fed back by the DNS server according to the DNS message, and the DNS message is in the active state when being sent to the corresponding DNS server according to the highest sending priority.
7. The method for detecting WIFI network connectivity of a terminal device of claim 1, wherein the sending the DNS packet to a corresponding DNS server according to the highest sending priority includes:
and sending the DNS message to a corresponding DNS server according to the highest sending priority by adopting the lowest basic rate supported by the terminal equipment.
8. The method for detecting WIFI network connectivity of a terminal device of claim 1, wherein the DNS packet is generated as follows:
when detecting that WIFI network connectivity detection is triggered, acquiring a preset domain name list, wherein a plurality of different domain names are recorded in the domain name list;
inquiring the domain name from the domain name list, and taking the inquired domain name as the domain name to be inquired;
and generating the DNS message according to the domain name to be queried.
9. The method for detecting WIFI network connectivity of a terminal device of claim 8, further comprising:
when the response message corresponding to the DNS message is not received within the set duration, judging that the network connectivity detection aiming at the DNS message fails, continuing to inquire the domain name from the domain name list, taking the inquired domain name as the domain name to be inquired, generating the corresponding DNS message according to the domain name to be inquired, and continuing to carry out WIFI network connectivity detection until the corresponding message corresponding to one DNS message is received within the set duration or all domain names in the domain name list are inquired.
10. The method for detecting WIFI network connectivity of a terminal device of claim 9, further comprising:
when the response message of the DNS message corresponding to the last domain name in the domain name list is not received within the set duration, judging that the WIFI network connectivity detection fails;
and when the WIFI network connectivity detection fails, setting an internet access unavailable identifier.
11. The method for detecting WIFI network connectivity of a terminal device of claim 10, further comprising:
and responding to the received network detection ending instruction, and ending the analysis of the data packet.
12. The method of claim 8, wherein querying the domain name from the domain name list comprises:
and acquiring the current position of the terminal equipment, inquiring the domain name corresponding to the current position from the domain name list according to the current position, and taking the domain name corresponding to the current position as the domain name to be inquired.
13. The method for detecting WIFI network connectivity of a terminal device of claim 8, further comprising: and updating the domain names in the domain name list periodically.
14. A WIFI network connectivity detection device of a terminal device is characterized by comprising:
the analysis unit is used for responding to the received network detection starting instruction and analyzing the data packet;
the adjusting unit is used for increasing the transmission priority of the DNS message to the highest sending priority when the analysis result shows that the data packet is the DNS message;
and the sending unit is used for sending the DNS message to a corresponding DNS server according to the highest sending priority.
15. A storage medium, which is a non-volatile storage medium or a non-transitory storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the method for detecting WIFI network connectivity of a terminal device according to any one of claims 1 to 13.
16. A terminal comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, wherein the processor, when executing the computer program, performs the steps of the method for WIFI network connectivity detection for a terminal device of any of claims 1 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011180482.5A CN112187588B (en) | 2020-10-29 | 2020-10-29 | WIFI network connectivity detection method and device of terminal equipment, medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011180482.5A CN112187588B (en) | 2020-10-29 | 2020-10-29 | WIFI network connectivity detection method and device of terminal equipment, medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112187588A true CN112187588A (en) | 2021-01-05 |
CN112187588B CN112187588B (en) | 2022-05-20 |
Family
ID=73917916
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011180482.5A Active CN112187588B (en) | 2020-10-29 | 2020-10-29 | WIFI network connectivity detection method and device of terminal equipment, medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112187588B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113207144A (en) * | 2021-05-06 | 2021-08-03 | 北京字跳网络技术有限公司 | Wireless network detection method and device for screen projection equipment, medium and screen projection equipment |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040215707A1 (en) * | 2003-02-28 | 2004-10-28 | Nec Corporation | Name resolution server and packet transfer device |
CN101141323A (en) * | 2007-09-29 | 2008-03-12 | 华为技术有限公司 | Method, system and equipment for controlling connectivity detection |
CN101640896A (en) * | 2009-09-02 | 2010-02-03 | 杭州华三通信技术有限公司 | Method and device for controlling service quality in wireless local area network |
CN102790719A (en) * | 2012-07-31 | 2012-11-21 | 福建星网锐捷网络有限公司 | Message sending method and device capable of improving data transmission quality, and wireless access point |
CN103138888A (en) * | 2011-12-05 | 2013-06-05 | 中国移动通信集团广东有限公司 | Data transmission method and data transmission device |
US20140359041A1 (en) * | 2012-03-07 | 2014-12-04 | Huawei Device Co., Ltd. | Message Processing Method, Apparatus, and System |
US9491084B2 (en) * | 2004-06-17 | 2016-11-08 | Hewlett Packard Enterprise Development Lp | Monitoring path connectivity between teamed network resources of a computer system and a core network |
CN108881515A (en) * | 2018-07-09 | 2018-11-23 | 迈普通信技术股份有限公司 | Domain name analytic method, device and the network equipment |
-
2020
- 2020-10-29 CN CN202011180482.5A patent/CN112187588B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040215707A1 (en) * | 2003-02-28 | 2004-10-28 | Nec Corporation | Name resolution server and packet transfer device |
US9491084B2 (en) * | 2004-06-17 | 2016-11-08 | Hewlett Packard Enterprise Development Lp | Monitoring path connectivity between teamed network resources of a computer system and a core network |
CN101141323A (en) * | 2007-09-29 | 2008-03-12 | 华为技术有限公司 | Method, system and equipment for controlling connectivity detection |
CN101640896A (en) * | 2009-09-02 | 2010-02-03 | 杭州华三通信技术有限公司 | Method and device for controlling service quality in wireless local area network |
CN103138888A (en) * | 2011-12-05 | 2013-06-05 | 中国移动通信集团广东有限公司 | Data transmission method and data transmission device |
US20140359041A1 (en) * | 2012-03-07 | 2014-12-04 | Huawei Device Co., Ltd. | Message Processing Method, Apparatus, and System |
CN102790719A (en) * | 2012-07-31 | 2012-11-21 | 福建星网锐捷网络有限公司 | Message sending method and device capable of improving data transmission quality, and wireless access point |
CN108881515A (en) * | 2018-07-09 | 2018-11-23 | 迈普通信技术股份有限公司 | Domain name analytic method, device and the network equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113207144A (en) * | 2021-05-06 | 2021-08-03 | 北京字跳网络技术有限公司 | Wireless network detection method and device for screen projection equipment, medium and screen projection equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112187588B (en) | 2022-05-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102932785B (en) | Rapid authentication method, system and equipment of wireless local area network | |
CN103067199B (en) | Depth message detection result diffusion method and device | |
CN109067571B (en) | Electronic device, network configuration method thereof and storage medium | |
CN111756487B (en) | Resource reselection method, node equipment and resource reselection device | |
EP3123762B1 (en) | Wlan access point which approves internet access only if quality of the radio link is sufficiently good | |
KR102058876B1 (en) | Method and apparatus for solving congestion situation in device to device communication | |
CN109040295B (en) | Method and device for determining abnormal disconnection, terminal and storage medium | |
CN113692753B (en) | Network device and method for searching edge service implemented in network device | |
CN102368789A (en) | Method and system for connecting dual-stack terminal to network | |
CN111935277A (en) | Router connection method, router connection device, computer equipment and storage medium | |
CN112187588B (en) | WIFI network connectivity detection method and device of terminal equipment, medium and terminal | |
CN111601335B (en) | Wireless network performance test method and wireless AP | |
US20230353323A1 (en) | Communication method and apparatus | |
CN103475596B (en) | The data transmission method of middleware based on MTU value and mobile terminal and system | |
WO2011143987A1 (en) | Access method and system for machine-type communication terminal and machine-type communication terminal | |
EP2768197A1 (en) | Deep packet inspection result dissemination method and device | |
CN114697269A (en) | Data communication method, apparatus, device and medium | |
CN111432441A (en) | Audio data transmitting method and device and computer readable storage medium | |
CN106817193B (en) | Access point communication method and access point | |
CN118524576B (en) | Communication method in vehicle, electronic equipment, medium and vehicle | |
CN117998659A (en) | Data transmission method, device, communication equipment and computer storage medium | |
CN114925059B (en) | Dirty data processing method, core network, device and storage medium | |
CN109842496B (en) | Method and device for determining multicast sending rate and wireless access point | |
KR102404384B1 (en) | System for controlling dynamic access for group paging | |
CN117460006A (en) | Session establishment method, terminal device, network device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |