CN108541000B - Method, medium and device for detecting network connection - Google Patents

Method, medium and device for detecting network connection Download PDF

Info

Publication number
CN108541000B
CN108541000B CN201810183132.0A CN201810183132A CN108541000B CN 108541000 B CN108541000 B CN 108541000B CN 201810183132 A CN201810183132 A CN 201810183132A CN 108541000 B CN108541000 B CN 108541000B
Authority
CN
China
Prior art keywords
access result
wifi hotspot
access
result
hotspot
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
CN201810183132.0A
Other languages
Chinese (zh)
Other versions
CN108541000A (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.)
Shanghai Shangxiang Network Technology Co.,Ltd.
Original Assignee
Shanghai Shangxiang Network Technology 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 Shanghai Shangxiang Network Technology Co ltd filed Critical Shanghai Shangxiang Network Technology Co ltd
Priority to CN201810183132.0A priority Critical patent/CN108541000B/en
Publication of CN108541000A publication Critical patent/CN108541000A/en
Application granted granted Critical
Publication of CN108541000B publication Critical patent/CN108541000B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Abstract

The application discloses a method, medium and equipment for detecting network connection at a terminal, wherein after the terminal is determined to establish communication connection with a WiFi hotspot, access requests can be respectively sent to a plurality of domain names through the WiFi hotspot. And when the type of the WiFi hotspot and the first access result meet the preset conditions, waiting for a second access result, and determining the detection result of the network connection of the WiFi hotspot according to the second access result.

Description

Method, medium and device for detecting network connection
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, medium, and device for detecting a network connection.
Background
Wireless Fidelity (WiFi) is a short-range Wireless communication technology. The terminal integrated with the WiFi module can connect to the network by accessing a wireless local area network hotspot (WiFi hotspot) using WiFi technology. Since the access speed of the WiFi hotspot connection network is generally fast and the traffic consumption of the mobile network can be saved, it is gradually becoming a way for most users to select to access the wireless network.
Specifically, when a terminal (for example, a personal computer, a mobile phone, a tablet computer, or other devices) integrated with a WiFi module connects to a network through a WiFi hotspot, a communication connection needs to be established with the WiFi hotspot first, and then the terminal connects to the network through the WiFi hotspot, as shown in fig. 1. In fig. 1, the handset and the wireless router establish a communication connection through WiFi technology, and the wireless router accesses the network through wired communication technology. Existing WiFi hotspots can be divided into different types according to the way of establishing a connection: encrypted hotspots and open hotspots. When the connection with the encryption hotspot is established, the communication connection with the WiFi hotspot can be established only by acquiring the address of the WiFi hotspot and the login password thereof. The open hotspot can be divided into a non-verification hotspot and a verification hotspot, and the non-verification hotspot can establish communication connection with the WiFi hotspot only by determining the address of the WiFi hotspot. Similarly, for an open hotspot with authentication, although a communication connection can be established without a login password of a WiFi hotspot, authentication is usually performed on a portal (portal) page, and then the network is accessed after the authentication is passed.
However, the terminal establishes a connection with the WiFi hotspot does not mean that the terminal has access to the network. When the WiFi hotspot cannot access the network, the terminal does not access the network even if the terminal establishes connection with the WiFi hotspot. Therefore, a detection method is needed to detect whether the terminal accesses the network.
Disclosure of Invention
Some embodiments of the present application provide methods, media, and devices to detect network connections.
Some embodiments of the present application employ the following technical solutions: a method for detecting a network connection at a terminal, comprising: establishing communication connection with a WiFi hotspot; respectively sending access requests to a plurality of domain names through the WiFi hotspot; when the type of the WiFi hotspot and the received first access result meet the preset conditions, waiting for a second access result, and determining a detection result of the network connection of the WiFi hotspot according to the second access result; the first access result is the first access result received after the access requests are respectively sent to the domain names, the receiving time of the second access result is later than that of the first access result, and the domain name corresponding to the second access result is different from the domain name corresponding to the first access result.
A computer readable medium having computer readable instructions stored thereon which are executable by a processor to implement the foregoing method.
A network device for detecting network connections, wherein the network device comprises: one or more processors; and a memory storing computer readable instructions that, when executed, cause the processor to perform operations of the method as previously described.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: when detecting the network connection of the WiFi hotspot establishing communication connection, the detection result can be determined according to each returned access result in a mode of respectively sending access to a plurality of domain names. In order to improve the accuracy of the detection result and reduce the detection time, when the type of the WiFi hotspot and the first access result (i.e., the access result received first after each access request is sent) meet the predetermined condition, the second access result may be waited, and the detection result of the network connection of the WiFi hotspot may be determined according to the second access result. In the application, whether the network connection of the WiFi hotspot is available or not is determined according to the returned access result. Determining whether to determine the detection result according to the second access result according to the type of the WiFi hotspot and whether the first access result meets the preset condition, so that the detection result error caused by detection according to a single domain name can be reduced, and the detection accuracy is improved; if the preset condition is not met, the detection can be performed based on the first access result only, so that the time consumed by the detection process is reduced. The scheme of this application can compromise and detect accuracy and detection efficiency.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic diagram of a network connected via a WiFi hotspot;
fig. 2 is a schematic flow chart illustrating a method for detecting network connection according to some embodiments of the present application;
FIG. 3 is a schematic diagram of a timeline provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart of some embodiments of step S104 of the embodiment shown in FIG. 2;
fig. 5 is a schematic diagram of a network device for detecting a network connection according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
The flowchart of fig. 2 for detecting network connection at a terminal according to some embodiments of the present application may include the following steps:
s100: and establishing a communication connection with the WiFi hotspot.
Since it is the case of a network connection that is detected, it is first necessary to establish a network connection. In the embodiment of the application, after the terminal establishes a communication connection with the WiFi hotspot, the detection process performs the following operations to determine the network connection condition of the WiFi hotspot.
The detection process of some embodiments of the present application may specifically be performed by a terminal. The terminal may specifically be a mobile terminal in an equipment level, such as a mobile phone, a tablet computer, and the like, and may specifically be software installed in the above equipment or a client in a software level. Of course, the present application does not limit what kind of specific devices of the terminal are.
In addition, in the present application, as described above, the establishment of the terminal and the WiFi hotspot is a basis for implementing the detection process provided in the embodiment of the present application, and therefore, operations of subsequent steps can be continuously performed as long as it is determined that the terminal and the WiFi hotspot establish a communication connection, and the process of specifically establishing a communication connection and the method adopted in the present application are not limited. For example, the terminal and the WiFi hotspot may be automatically connected according to a history, may be manually connected according to a user operation, or may be automatically connected after the device scans an open WiFi hotspot.
Further, in some embodiments of the present application, the WiFi hotspots are classified into different types according to a manner of establishing a connection: encrypted hotspots and open hotspots. And the terminal can determine the type of the WiFi hotspot through communication with the WiFi hotspot. For example, if a WiFi hotspot requires a terminal to send a login password to the WiFi hotspot to complete connection between the terminal and the WiFi hotspot, it may be determined that the WiFi hotspot is an encrypted hotspot. If the terminal can complete the connection with the WiFi hotspot without sending a login password to the WiFi hotspot, the WiFi hotspot can be determined to be an open hotspot.
S102: and respectively sending access requests to a plurality of domain names through the WiFi hotspot.
Since the WiFi hotspot usually does not provide the network connection state of the WiFi hotspot, in some embodiments of the present application, the terminal may respectively send access requests to the plurality of domain names, and determine the detection result of the network connection of the WiFi hotspot according to the returned access result.
Specifically, in some embodiments of the present application, a plurality of domain names may be preconfigured in the terminal. The domain names can point to servers with stable running states and network connection states. Of course, each domain name may be specifically configured as desired.
In addition, since the WiFi hotspot is usually a network device of a third party, it is difficult for the terminal to determine whether the WiFi hotspot is configured with a blacklist or a whitelist. If a black list or a white list is configured in the WiFi hotspot, when a single domain name is configured in the terminal for detecting network connection, a situation that the configured domain name falls into the white list or the black list may occur. The result of detecting the network connection according to the domain name falling into the WiFi hotspot blacklist or whitelist cannot indicate the real network connection state of the WiFi hotspot.
In the application, a plurality of domain names are configured in the terminal in advance, and the probability that the domain names all fall into a white list or a black list of a WiFi hotspot is relatively low, so that the problem of inaccurate detection result when detection is performed according to a single domain name can be avoided.
Of course, the number of the domain name in the present application is only required to be greater than two, and how many domain names are specifically configured may be configured according to needs. It should be noted that, in the present application, the terminal does not need to perform operations in the process of sending the access request and determining the detection result according to the access request. The terminal does not need to send the sending access request to the plurality of domain names according to the operation of the user.
S104: and when the type of the WiFi hotspot and the received first access result meet the preset conditions, waiting for a second access result, and determining the detection result of the network connection of the WiFi hotspot according to the second access result.
In some embodiments of the present application, since the terminal sends the access request to the preset domain names through the WiFi hotspot in step S102, the terminal may also receive multiple access results. In some embodiments, the WiFi hotspot does not redirect the access request, and the access result received by the terminal may be used to indicate that a domain name corresponding to the access result may be accessible or inaccessible. In some embodiments, if the WiFi hotspot is an open hotspot that needs to be verified, the WiFi hotspot may redirect an access request sent by an unverified terminal to guide the terminal to perform verification operation; in this case, the access result received by the terminal may be used to indicate that the WiFi hotspot needs authentication.
Specifically, in step S102, the terminal sends the access request to a plurality of preset domain names, and the servers (or server clusters) corresponding to each domain name are usually not identical, so that the routes of the access requests sent to the domain names are usually not identical. Similarly, when the server corresponding to each domain name returns the access result to the terminal according to the access request, the routing paths for transmitting the access result are not completely the same. If the access result is provided by the WiFi hotspot, the routing path of the access result provided by the server corresponding to the domain name is also different. Therefore, the time sequence of receiving the access results by the terminal through the WiFi hotspot generally differs, and for convenience of description, in the present application, an access result received first after sending an access request to each of the plurality of domain names is taken as a first access result, and an access result received after the first access result is taken as a second access result, as shown in fig. 3. It should be noted that, since the WiFi hotspot needing to be verified may pass through the access request that it receives for the first time, and require verification after receiving a subsequent access request; therefore, in the present application, there may be a case where the first access result is used to indicate that the domain name corresponding to the first access result is accessible or inaccessible, and the second access result is used to indicate that the WiFi hotspot needs to be authenticated.
Fig. 3 is a schematic diagram of determining a first access result and a second access result according to a time sequence of receiving access results by a terminal according to some embodiments of the present application. The horizontal axis represents time axis, and the arrow direction represents time sequence. Point a is a time point when the terminal transmits each access request, point B is a time point when the access result (i.e., the first access result) is received first, and point C is a time point when the terminal receives the second access result.
In some embodiments provided by the application, when receiving the first access result, the terminal may wait for the second access result when determining that the type of the WiFi hotspot and the first access result meet the predetermined condition, and further determine a detection result of the network connection of the WiFi hotspot according to the second access result; in some embodiments, the detection result of the network connection of the WiFi hotspot includes that the network connection of the WiFi hotspot is available, and the network connection of the WiFi hotspot is unavailable; in some embodiments, the detection of the network connection of the WiFi hotspot may also include pulling a verification page, or the like.
In some embodiments of the present application, since the WiFi hotspot may be divided into an encrypted hotspot and an open hotspot, the predetermined condition may also correspond to the encrypted hotspot and the open hotspot, respectively. Specifically, in some embodiments of the present application, the predetermined condition may include:
the type of the WiFi hotspot is an encrypted hotspot, and the first access result indicates that a domain name corresponding to the first access result is not accessible; and/or
The type of the WiFi hotspot is an open hotspot, and the first access result indicates that a domain name corresponding to the first access result can be accessed or not accessed.
The specific steps of some embodiments of step S104 are described below with reference to fig. 4.
S141: and if the type of the WiFi hotspot is an encryption hotspot and the first access result indicates that the domain name corresponding to the first access result is not accessible, or if the type of the WiFi hotspot is an open hotspot and the first access result indicates that the domain name corresponding to the first access result is accessible or inaccessible, waiting for a second access result. In a case that the WiFi hotspot is an open hotspot, the first access result indicates that a domain name corresponding to the first access result may be accessible or inaccessible, and it may be considered that the first access result does not indicate that the WiFi hotspot needs to be authenticated.
In some embodiments, the indication of the access result may be determined in a variety of ways. For example, a socket communication method based on Transmission Control Protocol (TCP) may be used to determine whether the corresponding domain name is accessible according to the content of the returned access result. Or, determining whether the corresponding domain name is accessible according to a ping value by using a method for determining the ping value based on an Internet Control Message Protocol (ICMP). Alternatively, it is determined whether the corresponding domain name is accessible based on the content of a network request of hypertext transfer protocol (HTTP). Of course, since the above methods are all mature, the content of this application is not described in detail. For example, for determining whether to access the corresponding domain name through the content requested by the http network, assuming that the value of the access result returned by the server when connected is 1 and the value of the access result returned by the unconnected server is 0, the terminal may determine whether to access the corresponding domain name according to the content of the access result.
S143: and determining the detection result of the network connection of the WiFi hotspot according to the second access result.
In some embodiments, the second access result received by the terminal may have the following three cases: 1) the second access result indicates that a domain name corresponding to the second access result can be accessed, and the terminal can receive the second access result under the condition of connecting any type of WiFi hotspot; 2) the second access result indicates that the domain name corresponding to the second access result cannot be accessed, and the terminal can receive the second access result under the condition of connecting any type of WiFi hotspot; 3) the second access result indicates that the WiFi hotspot needs to be verified, and the terminal may receive such second access result under the condition of connecting to the open hotspot that needs to be verified.
In some embodiments, if the second access result indicates that the domain name corresponding to the second access result can be accessed, determining that the detection result of the network connection of the WiFi hotspot is available; if the second access result indicates that the domain name corresponding to the second access result is not accessible, determining that the detection result of the network connection of the WiFi hotspot is unavailable; and if the second access result indicates that the WiFi hotspot needs to be verified, displaying a verification page of the WiFi hotspot.
As the WiFi hotspot may set a part of domain names as a black list, or only allow access to domain names in a white list, the network connection of the WiFi hotspot may be unavailable, or the domain name corresponding to the first access result falls into the black list or is not in the white list of the WiFi hotspot, or the like, which may cause the first access result to indicate that the first access is not accessible; in addition, since the open hotspot may only release the first access initiated by the terminal, and the subsequent access is intercepted or released after requiring authentication, even if the first access result indicates accessibility, there is a case that the open hotspot is not actually available. In this embodiment, when the first access result obtained by the encrypted WiFi hotspot is unavailable, whether the WiFi hotspot is available may be determined according to the second access result, thereby reducing interference caused by the foregoing various conditions and improving the detection accuracy. In addition, in this embodiment, the terminal can determine the detection result only according to the two returned access results at most, so that the time for the terminal to wait for the return of the access result is effectively controlled. Compared with the prior art, the accuracy is improved, and meanwhile, the detection time is controlled.
Please return to fig. 2. In some embodiments, the method shown in fig. 2 may further include step S160: and when the type of the WiFi hotspot is an encrypted hotspot and the first access result indicates that the domain name corresponding to the first access result can be accessed, determining that the detection result of the network connection of the WiFi hotspot is available. The encrypted hotspot is generally more stable, and therefore, if the first access result obtained through the encrypted hotspot indicates that the domain name corresponding to the first access result can be accessed, it can be directly determined that the network connection result of the encrypted hotspot is available, so as to further reduce detection time consumption and better achieve balance between detection time consumption and detection accuracy.
In some embodiments, the method shown in fig. 2 may further include step S180: and when the type of the WiFi hotspot is an open hotspot and the first access result comprises an indication that the WiFi hotspot needs to be verified, displaying a verification page of the WiFi hotspot. When the type of the WiFi hotspot is an open hotspot, if the first access result indicates that the WiFi hotspot needs to be verified, the terminal can determine that the open hotspot is a verification hotspot. For the verification hotspot, the terminal cannot determine the detection result according to the access result before the user completes verification, so that the verification page can be directly displayed. So that the user can complete the verification operation through the verification page, thereby obtaining the authority of accessing other domain names. Since the process of performing verification through the verification page is a relatively mature technology and there are various ways, how a specific user performs verification through the verification page is not limited in the present application.
In addition, when a white list is configured in the verification hotspot, if the domain name corresponding to the terminal access request falls into the white list, the terminal can acquire the webpage corresponding to the domain name without verification; in addition, when the terminal sends an access request for the first time, the WiFi hotspot may try to release the access request; thus, for an open hotspot, detection accuracy may be improved based on at least 2 access results.
The above-described embodiments of the present application are intended to be illustrative, and not restrictive. Variations of various embodiments that may be realized based on the teachings of this application are intended to be within the scope of this invention. For example, steps S102 and S104 of the foregoing embodiment are performed only when the WiFi hotspot is an open hotspot; when the WiFi hotspot is an encrypted hotspot, an access request is sent to only one domain name and the detection result of the WiFi hotspot is determined based on the access result of the domain name, or although the access requests are sent to a plurality of domain names, the detection result of the WiFi hotspot is determined based on the first access result, and the like.
It should be noted that all execution subjects of the steps of the method provided in the embodiments of the present specification may be the same apparatus, or different apparatuses may also be used as execution subjects of the method. For example, the execution subject of steps S100 and S102 may be device 1, and the execution subject of step S102 may be device 2; alternatively, the execution subject of step S100 may be device 1, and the execution subjects of step S102 and step S104 may be device 2; and so on. The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same idea, the embodiment of the application also provides corresponding equipment, a nonvolatile computer storage medium and a device.
Fig. 5 is a schematic structural diagram of a network device for detecting a network connection, corresponding to fig. 2, provided in an embodiment of the present application, where the structure includes:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the process of detecting a network connection shown in fig. 2.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and media embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The device and the medium provided by the embodiment of the application correspond to the method one to one, so the device and the medium also have the similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the method are explained in detail above, so the beneficial technical effects of the device and the medium are not repeated herein.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for detecting a network connection at a terminal, comprising:
establishing communication connection with a WiFi hotspot;
respectively sending access requests to a plurality of domain names through the WiFi hotspot;
when the type of the WiFi hotspot and the received first access result meet the preset conditions, waiting for a second access result, and determining a detection result of the network connection of the WiFi hotspot according to the second access result; the first access result is the first access result received after the access requests are respectively sent to the domain names, the receiving time of the second access result is later than that of the first access result, and the domain name corresponding to the second access result is different from the domain name corresponding to the first access result;
the WiFi hotspot and the first access result meet a predetermined condition, and the method comprises the following steps: the type of the WiFi hotspot is an open hotspot, and the first access result indicates that a domain name corresponding to the first access result can be accessed or not accessed; the first access result indicates that a domain name corresponding to the first access result is accessible or not accessible, and the first access result does not indicate that the WiFi hotspot needs to be verified.
2. The method of claim 1, wherein the types of WiFi hotspots comprise at least: encrypted hotspots and open hotspots.
3. The method of claim 1, wherein the WiFi hotspot and the first access result meet a predetermined condition, comprising:
the type of the WiFi hotspot is an encryption hotspot, and the first access result indicates that a domain name corresponding to the first access result is not accessible.
4. The method of claim 3, wherein determining the detection result of the network connection of the WiFi hotspot according to the second access result comprises:
if the second access result indicates that the domain name corresponding to the second access result can be accessed, determining that the detection result of the network connection of the WiFi hotspot is available;
and if the second access result indicates that the domain name corresponding to the second access result is not accessible, determining that the detection result of the network connection of the WiFi hotspot is unavailable.
5. The method of claim 1, further comprising:
and when the type of the WiFi hotspot is an encrypted hotspot and the first access result indicates that the domain name corresponding to the first access result can be accessed, determining that the detection result of the network connection of the WiFi hotspot is available.
6. The method of claim 1, wherein determining the detection result of the network connection of the WiFi hotspot according to the second access result comprises:
if the second access result indicates that the domain name corresponding to the second access result is not accessible, determining that the detection result of the network connection of the WiFi hotspot is unavailable;
and if the second access result indicates that the domain name corresponding to the first access result can be accessed, determining that the detection result of the network connection of the WiFi hotspot is available.
7. The method of claim 1, wherein determining the detection result of the network connection of the WiFi hotspot according to the second access result comprises:
and if the second access result indicates that the WiFi hotspot needs to be verified, displaying a verification page of the WiFi hotspot.
8. The method of claim 1, further comprising:
and when the type of the WiFi hotspot is an open hotspot and the first access result comprises an indication that the WiFi hotspot needs to be verified, displaying a verification page of the WiFi hotspot.
9. A computer readable medium having computer readable instructions stored thereon which are executable by a processor to implement the method of any one of claims 1 to 8.
10. A network device for detecting network connections, wherein the network device comprises:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method of any of claims 1 to 8.
CN201810183132.0A 2018-03-06 2018-03-06 Method, medium and device for detecting network connection Active CN108541000B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810183132.0A CN108541000B (en) 2018-03-06 2018-03-06 Method, medium and device for detecting network connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810183132.0A CN108541000B (en) 2018-03-06 2018-03-06 Method, medium and device for detecting network connection

Publications (2)

Publication Number Publication Date
CN108541000A CN108541000A (en) 2018-09-14
CN108541000B true CN108541000B (en) 2021-08-13

Family

ID=63486623

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810183132.0A Active CN108541000B (en) 2018-03-06 2018-03-06 Method, medium and device for detecting network connection

Country Status (1)

Country Link
CN (1) CN108541000B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109327517B (en) * 2018-10-09 2022-05-20 上海尚往网络科技有限公司 Method and equipment for acquiring network state of wireless access point
CN109474930B (en) * 2018-11-02 2024-04-05 西安闻泰电子科技有限公司 Wi-Fi hotspot connection method and system
CN109618023A (en) * 2019-01-11 2019-04-12 福建天泉教育科技有限公司 A kind of method and terminal detecting cell phone network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493206B (en) * 2017-08-16 2019-04-23 Oppo广东移动通信有限公司 A kind of network detecting method, network detection device and intelligent terminal

Also Published As

Publication number Publication date
CN108541000A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
WO2020057163A1 (en) Mec platform deployment method and device
US10945130B2 (en) Method for establishing wireless connection for application of user equipment
CN108541000B (en) Method, medium and device for detecting network connection
TW202007221A (en) Network access method and apparatus
KR20170121242A (en) Identity authentication methods, devices and systems
US11163499B2 (en) Method, apparatus and system for controlling mounting of file system
US10623469B2 (en) Methods and apparatuses for information transmission
KR20190069574A (en) Wireless network type detection method and apparatus, and electronic device
CN106888461B (en) Method and equipment for constructing weak network environment
WO2019047708A1 (en) Resource configuration method and related product
WO2017088294A1 (en) Method and device for establishing wireless connection
US11411887B2 (en) Method and device for performing traffic control on user equipment
WO2016165674A1 (en) Trusted environment operating method and device for terminal
CN111262779A (en) Method, device, server and system for acquiring data in instant messaging
CN112448978A (en) Data management method and system
CN106899652B (en) Method and device for pushing service processing result
CN115021831A (en) Weak network testing method, device, system, equipment and storage medium
CN109327517B (en) Method and equipment for acquiring network state of wireless access point
US10742802B2 (en) Methods and devices for verifying a communication number
CN109890027B (en) Method and apparatus for determining security risk information of target wireless access point
CN111064675A (en) Access flow control method, device, network equipment and storage medium
KR20130123149A (en) Method for data network access authentication and an electronic device thereof
CN114528264A (en) Data synchronization method and system
CN107566211B (en) Method, device and system for accessing test equipment
WO2015192497A1 (en) Communication link sending method and apparatus, and terminal

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
TA01 Transfer of patent application right

Effective date of registration: 20210419

Address after: 200131 Zone E, 9th floor, No.1 Lane 666, zhangheng Road, China (Shanghai) pilot Free Trade Zone, Pudong New Area, Shanghai

Applicant after: Shanghai Shangxiang Network Technology Co.,Ltd.

Address before: 200120 2nd floor, no.979 Yunhan Road, Nicheng Town, Pudong New Area, Shanghai

Applicant before: SHANGHAI LIANSHANG NETWORK TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant