CN106714206A - Method and device for detecting network connection by wireless network access point - Google Patents

Method and device for detecting network connection by wireless network access point Download PDF

Info

Publication number
CN106714206A
CN106714206A CN201610872355.9A CN201610872355A CN106714206A CN 106714206 A CN106714206 A CN 106714206A CN 201610872355 A CN201610872355 A CN 201610872355A CN 106714206 A CN106714206 A CN 106714206A
Authority
CN
China
Prior art keywords
web page
response data
wireless network
access point
content
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
Application number
CN201610872355.9A
Other languages
Chinese (zh)
Other versions
CN106714206B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201610872355.9A priority Critical patent/CN106714206B/en
Publication of CN106714206A publication Critical patent/CN106714206A/en
Application granted granted Critical
Publication of CN106714206B publication Critical patent/CN106714206B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a method and a device for detecting network connection by a wireless network access point. The method comprises steps: a selected wireless network access point is acquired, the wireless network access point is connected, and through the wireless network access point, an access request is initiated to a first specified web page; first response data returned according to the access request by the first specified web page are received; and whether the first response data are matched with the content of the first specified web page is judged, and if yes, network connection by the wireless network access point is prompted to be successful. According to the above method and the device for detecting network connection by the wireless network access point, detection on the network connection by the wireless network access point is realized, ping operation is not needed, the method and the device are applied to detection on network connection by various wireless network access points, and the detection universality is improved.

Description

The method and apparatus that detection wireless network access point connects network
Technical field
It is more particularly to a kind of to detect the method that wireless network access point connects network the present invention relates to network application field And device.
Background technology
WiFi is a kind of technology that can be interconnected the terminals such as mobile terminal, personal computer.With the hair of WiFi technology Exhibition, Wi-Fi hotspot (wireless network access point) is provided with many public situations, and user can be by these wireless network access points Access network is surfed the Net.But the quality of Wi-Fi hotspot is uneven, what is had cannot even surf the Net, user input the need for having Phone number carries out checking and could connect network, and user cannot understand whether connected Wi-Fi hotspot can connect network.
In order to detect whether Wi-Fi hotspot can connect network, traditional mode is to send ICMP to server (Internet Control Message Protocol, ICMP) bag carries out ping operations, and analyzes back Wrap to be judged, however, some Wi-Fi hotspots forbid ping to operate, lead to not detection wireless network access point and whether can Connection network.
The content of the invention
Based on this, it is necessary to for cannot detection part wireless network access point whether can connect the problem of network, carry The method and apparatus that wireless network access point connects network are detected for a kind of, can detect that whether various wireless network access points can Network is enough connected, the versatility of detection is improve.
A kind of method for detecting wireless network access point connection network, including:
Selected wireless network access point is obtained, the wireless network access point is connected, and connect by the wireless network Access point initiates access request to the first named web page;
Receive the first response data that first named web page is returned according to the access request;
Judge whether first response data matches with the content of first named web page, if matching, carry Show the wireless network access point connection network success.
A kind of device for detecting wireless network access point connection network, including:
Request initiation module, for obtaining selected wireless network access point, connects the wireless network access point, and lead to Cross the wireless network access point and initiate access request to the first named web page;
Response receiver module, for receiving the first number of responses that first named web page is returned according to the access request According to;
Judge module, for judging whether first response data matches with the content of first named web page;
Reminding module, if for judging that first response data matches with the content of first named web page, Point out the wireless network access point connection network success.
The method and apparatus that above-mentioned detection wireless network access point connects network, get selected wireless network and access Point, connects the wireless network access point, and initiates access request to the first named web page by the wireless network access point, and connects The first response data is received, the first response data is compared with the content of the first named web page, judge the first response data Content with the first named web page matches, then point out the wireless network access point to connect network success, realizes to wireless network Network access point can connect the detection of network, it is not necessary to carry out ping operations, it is adaptable to which various wireless network access points connect net The detection of network, improves the versatility of detection.
Brief description of the drawings
Fig. 1 is the applied environment schematic diagram of the method for detection wireless network access point connection network in one embodiment;
Fig. 2 is the internal structure schematic diagram of terminal in one embodiment;
Fig. 3 is the flow chart of the method for detection wireless network access point connection network in one embodiment;
Fig. 4 is the flow chart of the method for detection wireless network access point connection network in another embodiment;
Fig. 5 is the flow chart of the method for detection wireless network access point connection network in another embodiment;
Fig. 6 is the structured flowchart of the device of detection wireless network access point connection network in one embodiment;
Fig. 7 is the structured flowchart of the device of detection wireless network access point connection network in another embodiment.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
It is appreciated that term " first " used in the present invention, " second " etc. can be used to describe various elements herein, But these elements should not be limited by these terms.These terms are only used for distinguishing first element and another element.Citing comes Say, without departing from the scope of the invention, the first named web page can be referred to as the second named web page, and similarly, Second named web page can be referred to as the first named web page.First named web page and the second named web page both named web page, But it is not same named web page.
Fig. 1 is the applied environment schematic diagram of the method for detection wireless network access point connection network in one embodiment.Such as Shown in Fig. 1, the applied environment includes terminal 110, wireless network access point 120 and server 130.It is provided with terminal 110 House keeper's WiFi application program etc., obtains the wireless network of the wireless network access point selection that user searches for from house keeper's WiFi application program Network access point 120, and access request is initiated to the named web page on server 130 by the wireless network access point 120, receive To server 130 to the response data of access request, response data is compared with the content of named web page, judges that this is wireless Whether Network Access Point 120 can connect network.
Fig. 2 is the internal structure schematic diagram of terminal (or electronic equipment etc.) in one embodiment.As shown in Fig. 2 the terminal Including the processor, non-volatile memory medium, built-in storage, network interface, display screen and the input that are connected by system bus Device.Wherein, the non-volatile memory medium of terminal is stored with operating system, also connects including one kind detection wireless network access point The device of network is connect, the device of detection wireless network access point connection network is used to realize a kind of detection wireless network access point The method for connecting network.The processor is used to provide calculating and control ability, supports the operation of whole terminal.Internal memory in terminal Reservoir provides environment for the operation of the device of the detection wireless network access point connection network in non-volatile memory medium, and this is interior Computer-readable instruction can be stored in memory, when the computer-readable instruction is by the computing device, be may be such that described Computing device is a kind of to detect the method that wireless network access point connects network.Network interface leads to for carrying out network with server Letter, such as sends access request to server, response data that the reception server is returned etc..The display screen of terminal can be liquid crystal Display screen or electric ink display screen etc., input unit can be the touch layer, or terminal enclosure covered on display screen The button of upper setting, trace ball or Trackpad, or external keyboard, Trackpad or mouse etc..The terminal can be hand Machine, panel computer or personal digital assistant or Wearable etc..It will be understood by those skilled in the art that shown in Fig. 2 Structure, only the block diagram of the part-structure related to application scheme, does not constitute and application scheme is applied thereon Terminal restriction, specific terminal can include than more or less part shown in figure, or combine some parts, or There are person different parts to arrange.
Fig. 3 is the flow chart of the method for detection wireless network access point connection network in one embodiment.As shown in figure 3, A kind of method for detecting wireless network access point connection network, including:
Step 302, obtains selected wireless network access point, connects the wireless network access point, and by the nothing Line Network Access Point initiates access request to the first named web page.
In the present embodiment, the application program of house keeper's WiFi class is opened in terminal, show on the Application Program Interface and search To the SSID (Service Set Identifier, service set) of the wireless network access point of surrounding, terminal is obtained to be used rope The SSID of the selected wireless network access point from the SSID of the wireless network access point for searching in family, connects the wireless network Access point, access request is initiated by the wireless network access point to the first named web page on server.Journey can be applied at this The network address of preset first named web page in sequence, gets user and selects wireless network access point by touch-control or click mode Afterwards, the network address of the first preset named web page is obtained automatically, by the network address of the first named web page to corresponding One named web page initiates access request.
Wherein, refer to around apart from terminal position in the range of predeterminable range.First named web page refers to match somebody with somebody in advance The access webpage put.First named web page can be built on the server in advance, and first named web page can be static Web page.This One named web page can be HTTP (Hyper Text Transfer Protocol, HTTP) webpage, Flash webpages Or JavaScript webpages etc., it is constant webpage.The access request can be HTTP request.
For IOS systems, the Reachability that can be increased income using Apple judges whether is terminal where application program Wireless network access point in connection.
Step 304, receives the first response data that first named web page is returned according to the access request.
In the present embodiment, the first named web page on server is responded according to the access request, and generation first is responded Data, and the first response data is returned to the terminal for initiating access request.May include that first specifies net in first response data Interior perhaps key content of the first named web page etc. of page.Key content refers to the feature letter that can represent first named web page Breath, such as the first named web page is " house keeper abc ", then key content can be " house keeper abc " etc..In other embodiments, first Response data may also include conditional code, Redirect Address etc..
In one embodiment, can configure Preset Time.The Preset Time can be configured as needed, such as 3 seconds, 5 seconds.If Detect the first response data that the return of the first named web page is not received in Preset Time, then it represents that access request fails, Think that this judged result cannot connect network for the wireless network access point.
In one embodiment, if receiving the prompt message of access request error, the wireless network access point is pointed out Network cannot be connected.
Step 306, judges whether first response data matches with the content of first named web page, if phase Match somebody with somebody, then perform step 308, if mismatching, perform step 310.
In the present embodiment, the first response data is identical with the content of the first named web page, then the first response data and first The content of named web page matches;First response data is different from the content of the first named web page, then the first response data and the The content of one named web page is mismatched.
In one embodiment, the first response data includes the key content of the first named web page, then the first response data Content with the first named web page matches;First response data does not include the key content of the first named web page, then the first sound Data are answered to be mismatched with the content of the first named web page.
Step 308, points out the wireless network access point connection network success.
In the present embodiment, the first response data matches with the content of the first named web page, then point out the wireless network to connect Access point has been successfully connected network.Wireless network access point connection network refers to be connectable on internet, is accessed on internet Data.
Step 310, points out the wireless network access point to connect network.
In the present embodiment, the first response data matches with the content of the first named web page, then point out the wireless network to connect Access point cannot connect to network.It refers to that not can connect on internet that wireless network access point cannot connect network, is accessed because of spy Online data.
The method that above-mentioned detection wireless network access point connects network, gets selected wireless network access point, connection The wireless network access point, and access request is initiated to the first named web page by the wireless network access point, and receive first Response data, the first response data is compared with the content of the first named web page, judges the first response data and first The content of named web page matches, then point out the wireless network access point to connect network success, realizes and wireless network is accessed Point can connect the detection of network, it is not necessary to carry out ping operations, it is adaptable to which various wireless network access points connect the inspection of network Survey, improve the versatility of detection.
In one embodiment, the content for judging first response data and first named web page whether phase Matching, including:Whether judge in first response data comprising the key content in first named web page, if described The key content is included in one response data, then the content phase of first response data and first named web page Match somebody with somebody, if not including the key content in first response data, first response data specifies net with described first The content of page is mismatched.
In the present embodiment, key content refers to the characteristic information that can represent first named web page, and such as first specifies net Page is " house keeper abc ", then key content can be " house keeper abc " etc..
By detecting whether the first response data includes key content, if comprising key content, then it represents that the first number of responses Match according to the content with the first named web page, reduce data and compare content, save amount of calculation, and avoid some operators The content of operator is added in each requests for page by network, causes the content of the first response data and the first specified page Difference, and being mistaken as the wireless network access point cannot access the situation of network, improve the accuracy of detection.
Fig. 4 is the flow chart of the method for detection wireless network access point connection network in another embodiment.Such as Fig. 4 institutes Show, a kind of method for detecting wireless network access point connection network, including:
Step 402, obtains selected wireless network access point, connects the wireless network access point, and by the nothing Line Network Access Point initiates access request to the first named web page.
In the present embodiment, the application program of house keeper's WiFi class is opened in terminal, show on the Application Program Interface and search To the SSID of the wireless network access point of surrounding, terminal obtains user institute from the SSID of the wireless network access point for searching to rope The SSID of the wireless network access point of selection, connects the wireless network access point, by the wireless network access point to server On the first named web page initiate access request.Can in the application program preset first named web page the network address, obtain To user after touch-control or click mode select wireless network access point, the network of the first preset named web page is obtained automatically Address, access request is initiated by the network address of the first named web page to corresponding first named web page.
In one embodiment, can configure Preset Time.The Preset Time can be configured as needed, such as 3 seconds, 5 seconds.If Detect the first response data that the return of the first named web page is not received in Preset Time, then it represents that access request fails, Think that this judged result cannot connect network for the wireless network access point.
Step 404, receives the first response data that first named web page is returned according to the access request.
In the present embodiment, the key of interior perhaps first named web page of the first named web page is may include in the first response data Content etc..Key content refers to the characteristic information that can represent first named web page, and such as the first named web page is for " abc is managed Family ", then key content can be " house keeper abc " etc..In other embodiments, the first response data may also include conditional code, reset To address etc..
Step 406, judges whether first response data matches with the content of first named web page, if phase Match somebody with somebody, then perform step 408, if mismatching, perform step 410.
In the present embodiment, the first response data is identical with the content of the first named web page, then the first response data and first The content of named web page matches;First response data is different from the content of the first named web page, then the first response data and the The content of one named web page is mismatched.
In one embodiment, the first response data includes the key content of the first named web page, then the first response data Content with the first named web page matches;First response data does not include the key content of the first named web page, then the first sound Data are answered to be mismatched with the content of the first named web page.
Step 408, points out the wireless network access point connection network success.
In the present embodiment, the first response data matches with the content of the first named web page, then point out the wireless network to connect Access point has been successfully connected network.Wireless network access point connection network refers to be connectable on internet, is accessed on internet Data.
Step 410, judges whether the conditional code of first response data is 3 divided by 100 business, and Redirect Address The value of Location is not sky, if so, step 412 is performed, if it is not, then performing step 414.
In the present embodiment, the first response data can be http response data.Judge the status code of http response data (conditional code) is 30x, i.e. whether status code are 3 divided by 100 business, if conditional code divided by 100 business for 3 and The value of the Location (Redirect Address) in the header of http response data is not sky, then it represents that this testing result is should Wireless network access point (WiFi) is the wireless network access point for needing checking.30x can for 300,301,302,303,304, 305th, 306,307 etc..Such as 300multiple choices, requested resource has a series of alternative feedback informations. 301moved permanently, requested resource forever moves on to new position, and any reference to this resource in the future One of several URL (Uniform Resource Locator, URL) of this response return should be all used, New permanent URL should be returned in the Location domains of response.302move temporarily, the resource of request is faced When from different URL respond requests.303see other, represent correspondence current request response can on another URL quilt Find.304not modified, represent if client have sent a GET request for SNNP and the request has been allowed to, And the content of document does not change, then server should return to this conditional code.305Use proxy, represent requested money Source must could be accessed by specified agency, the URL information where the agency for specifying will be given in Location domains, be received Person is needed to repeat to send an individually request, and respective resources could be accessed by this agency.307, temporary Redirect, represents that the resource of request is interim from different URL respond requests.
Step 412, if business is not sky for the value of 3 and Location Redirect Address, then it represents that this judged result is institute It is the wireless network access point for needing checking to state wireless network access point.
Step 414, judges whether the conditional code of first response data is 2 divided by 100 business, and example body's is interior It is not sky to hold, if so, step 416 is performed, if it is not, performing step 418.
In the present embodiment, the status code (conditional code) for judging http response data are 20x, i.e. status Whether code is 2 divided by 100 business, if conditional code divided by 100 business for 2 and http response data body (example) content It is not sky, then points out wireless network access point of this testing result for the wireless network access point (WiFi) is needs checking.
Step 416, if business is not sky for the content of 2 and body, points out this judged result to be connect for the wireless network Access point is the wireless network access point for needing checking.
Step 418, points out the wireless network access point to connect network.
The method that above-mentioned detection wireless network access point connects network, gets selected wireless network access point, connection The wireless network access point, and access request is initiated to the first named web page by the wireless network access point, and receive first Response data, the first response data is compared with the content of the first named web page, judges the first response data and first The content of named web page matches, then point out the wireless network access point to connect network success, realizes and wireless network is accessed Point can connect the detection of network, if judging, the first response data is mismatched with the content of the first named web page, is further sentenced Disconnected conditional code and Redirect Address or body contents etc. verify whether the wireless network access point is the wireless network for needing checking Access point, it is not necessary to carry out ping operations, it is adaptable to which various wireless network access points connect the detection of network, improve detection Versatility.
In one embodiment, as shown in figure 5, the method for above-mentioned detection wireless network access point connection network also includes:
Step 502, when judged result is the wireless network access point connec-tionless network, by the wireless network Access point initiates access request to the second named web page.
Specifically, the second named web page can be built on the server in advance, and second named web page can be static Web page.Should Second named web page can be HTTP webpages, Flash webpages or JavaScript webpages etc., be constant webpage.The access request It can be HTTP request.Second named web page is different webpages from the first named web page.
Step 504, receives the second response data that second named web page is returned according to the access request.
Step 506, judges whether second response data matches with the content of second named web page, if phase Match somebody with somebody, if mismatching, perform step 510.
Step 508, points out the wireless network access point connection network success.
Step 510, points out the wireless network access point to connect network.
In the present embodiment, the content for judging second response data and second named web page whether phase Match somebody with somebody, including:Whether judge in second response data comprising the key content in second named web page, if described second The key content is included in response data, then second response data matches with the content of second named web page, If not including the key content, second response data and second named web page in second response data Content is mismatched.
In other embodiments, the first response data is identical with the content of the first named web page, then the first response data with The content of the first named web page matches;First response data is different from the content of the first named web page, then the first response data Content with the first named web page is mismatched.
The present embodiment to the first named web page after initiating access request failure, then initiates to access to the second named web page Request, receives the second response data of the second named web page feedback, if the content phase of the second response data and the second named web page Matching, then point out wireless network access point connection network success, detects wireless by initiating access request to the second named web page Network Access Point whether successful connection, it is to avoid the first named web page itself goes wrong and causes to be mistaken as wireless network to connect Access point cannot connect the mistake of network, and multiple named web pages are detected, can reach the effect of disaster tolerance, improve the accurate of detection Property.
In one embodiment, step 502 to step 510 can judge within step 306 the first response data with it is described Performed when the content of the first named web page is mismatched, or, step 502 to step 510 can in step 414 judge described first The conditional code of response data divided by 100 business for 2 or example body content be space-time perform.By the first response data Content with the first named web page compares, and the content of the second response data and the second named web page compares, and judges wireless network Whether network access point connection network succeeds, more accurately.
In one embodiment, the method for above-mentioned detection wireless network access point connection network also includes:Judging When the content for stating the second response data and second named web page is mismatched, detect whether to exceed maximum reattempt times, if so, Then terminate, if it is not, then initiating access request to the first named web page again through the wireless network access point detects the nothing Whether line Network Access Point connects network.
In the present embodiment, maximum reattempt times can set as needed, such as 3 times, 5 times, 10 inferior, not limited to this.Work as inspection Survey during not less than maximum reattempt times, step 302 can be re-executed to 306, step 502 to 510, or, re-execute step 402 to step 414, step 502 to step 510.
In one embodiment, after procedure 506, also include:Judge the conditional code of second response data divided by Whether 100 business is 3, and whether the value of Redirect Address Location is empty, if business is 3 and Location Redirect Address Value not for sky, then point out this judged result be the wireless network access point be need checking wireless network access point, If it is not, then determine whether whether the conditional code of second response data is 2 divided by 100 business, and example body's is interior Whether be empty, if business is not sky for the content of 2 and body, point out this judged result to be for the wireless network access point if holding The wireless network access point of checking is needed, if it is not, then pointing out the wireless network access point cannot to connect network.Determine whether Conditional code and Redirect Address or body contents etc. verify whether the wireless network access point is that the wireless network for needing checking connects Access point, it is not necessary to carry out ping operations, it is adaptable to which various wireless network access points connect the detection of network, improves the logical of detection The property used.
In one embodiment, a kind of method for detecting wireless network access point connection network includes:Obtain selected nothing Line Network Access Point, connects the wireless network access point, and sent out to the first named web page by the wireless network access point Play access request;Receive the first response data that first named web page is returned according to the access request;Judge the first sound Answer whether the conditional code in data is the first preset state code, if so, then point out the wireless network access point to connect network success, If it is not, then pointing out the wireless network access point cannot to connect network.
Wherein, judge whether the conditional code in the first response data is that the first preset state code can be to judge first sound Whether the specific steps for answering data to match with the content of first named web page, conditional code in the first response data is the One preset state code, then it represents that the first response data matches with the content of the first named web page;Shape in first response data State code is not the first preset state code, then it represents that the first response data is mismatched with the content of the first named web page.
In the present embodiment, the first preset state code can be set as needed, and usual first preset state code is serviced for expression Device has been successfully processed the conditional code of request, such as 200,204 etc..By judging whether the conditional code in the first response data is One preset state code, compares amount of calculation small, it is to avoid some operators by network add operator in each requests for page Content, cause the first response data different from the content of the first specified page, and be mistaken as the wireless network access point without Method accesses the situation of network, improves the accuracy of detection.
In one embodiment, a kind of method for detecting wireless network access point connection network includes:Obtain selected nothing Line Network Access Point, connects the wireless network access point, and sent out to the first named web page by the wireless network access point Play access request;Receive the first response data that first named web page is returned according to the access request;Judge the first sound Whether the conditional code for answering data is the first preset state code, if so, then point out the wireless network access point to connect network success, if It is no, then access request is initiated to the second named web page by the wireless network access point;Receive the second named web page root According to the second response data that the access request is returned;Whether the key comprising the second named web page is interior to judge the second response data Hold, if so, then point out the wireless network access point to connect network success, if it is not, pointing out the wireless network access point cannot to connect Network.
Specifically, the conditional code in the first response data is the first preset state code, then point out the first response data and the The content of one named web page matches;Conditional code in first response data is not the first preset state code, then point out the first sound Data are answered to be mismatched with the content of the first named web page.
By judging whether the conditional code in the first response data is the first preset state code, or by the second response data In whether the key content comprising the second named web page, it is to avoid some operators are added by network in each requests for page The content of operator, causes the first response data different from the content of the first specified page, and is mistaken as the wireless network and connects Access point cannot access the situation of network, improve the accuracy of detection.Meanwhile, use different inspections by for different webpages Survey mode, improves the accuracy of detection.
When judging that second response data is mismatched with the content of second named web page, detect whether to exceed Maximum reattempt times, if so, then terminate, if it is not, then being initiated to the first named web page again through the wireless network access point Access request detects whether the wireless network access point connects network.
In the present embodiment, maximum reattempt times can set as needed, such as 3 times, 5 times, 10 inferior, not limited to this.
In one embodiment, a kind of method for detecting wireless network access point connection network includes:Obtain selected nothing Line Network Access Point, connects the wireless network access point, and sent out to the first named web page by the wireless network access point Play access request;Receive the first response data that first named web page is returned according to the access request;Judge the first sound Answer whether the conditional code in data is the first preset state code, if so, then point out the wireless network access point to connect network success, If it is not, then initiating access request to the second named web page by the wireless network access point;Receive second named web page According to the second response data that the access request is returned;Judge whether the conditional code in second response data is second default Conditional code, if so, then point out the wireless network access point connect network success, if it is not, then point out the wireless network access point without Method connects network.
In the present embodiment, the second preset state code can be set as needed, and usual second preset state code is serviced for prompting Device has been successfully processed the conditional code of request, such as 200,204 etc..
Specifically, the conditional code in the first response data is the first preset state code, then point out the first response data and the The content of one named web page matches;Conditional code in first response data is not the first preset state code, then point out the first sound Data are answered to be mismatched with the content of the first named web page.Conditional code in second response data is the second preset state code, then carry Show that the second response data matches with the content of the second named web page;Conditional code in second response data is not the second default shape State code, then point out the second response data to be mismatched with the content of the second named web page.
When judging that second response data is mismatched with the content of second named web page, detect whether to exceed Maximum reattempt times, if so, then terminate, if it is not, then being initiated to the first named web page again through the wireless network access point Access request detects whether the wireless network access point connects network.
In the present embodiment, maximum reattempt times can set as needed, such as 3 times, 5 times, 10 inferior, not limited to this.
In one embodiment, a kind of method for detecting wireless network access point connection network includes:Obtain selected nothing Line Network Access Point, connects the wireless network access point, and sent out to the first named web page by the wireless network access point Play access request;Receive the first response data that first named web page is returned according to the access request;Judge the first sound Answer data whether the key content comprising the first named web page, if so, then point out the wireless network access point connect network success, If it is not, then initiating access request to the second named web page by the wireless network access point;Receive second named web page According to the second response data that the access request is returned;Judge whether the conditional code in second response data is second default Conditional code, if so, then point out the wireless network access point connect network success, if it is not, then point out the wireless network access point without Method connects network.
Specifically, the conditional code in the second response data is the second preset state code, then it represents that the second response data and the The content of two named web pages matches;Conditional code in second response data is not the second preset state code, then it represents that the second sound Data are answered to be mismatched with the content of the second named web page.
When judging that second response data is mismatched with the content of second named web page, detect whether to exceed Maximum reattempt times, if so, then terminate, if it is not, then being initiated to the first named web page again through the wireless network access point Access request detects whether the wireless network access point connects network.
In the present embodiment, maximum reattempt times can set as needed, such as 3 times, 5 times, 10 inferior, not limited to this.
Fig. 6 is the structured flowchart of the device of detection wireless network access point connection network in one embodiment.Such as Fig. 6 institutes Show, it is a kind of to detect the device that wireless network access point connects network, run in terminal, including request initiation module 602, response Data reception module 604, judge module 606 and reminding module 608.Wherein:
Request initiation module 602 is used to obtain selected wireless network access point, connects the wireless network access point, and Access request is initiated to the first named web page by the wireless network access point;
Response receiver module 604 is used to receive the first response that first named web page is returned according to the access request Data.
Judge module 606 be used to judging first response data and first named web page content whether phase Match somebody with somebody.
If reminding module 608 is used to judge that first response data matches with the content of first named web page, Then point out the wireless network access point connection network success.
Above-mentioned detection wireless network access point connects the device of network, gets selected wireless network access point, connection The wireless network access point, and access request is initiated to the first named web page by the wireless network access point, and receive first Response data, the first response data is compared with the content of the first named web page, judges the first response data and first The content of named web page matches, then point out the wireless network access point to connect network success, realizes and wireless network is accessed Point can connect the detection of network, it is not necessary to carry out ping operations, it is adaptable to which various wireless network access points connect the inspection of network Survey, improve the versatility of detection.
In one embodiment, whether judge module 606 is additionally operable to judge in first response data comprising described Key content in one named web page, if including the key content, first number of responses in first response data Match according to the content with first named web page, if not including the key content, institute in first response data The first response data is stated to be mismatched with the content of first named web page.
In one embodiment, judge module 606 be additionally operable to judge conditional code in first response data whether be First preset state code, if so, then first response data matches with the content of first named web page, if it is not, then First response data is mismatched with the content of first named web page.
In one embodiment, judge module 606 is additionally operable to judging first response data with the described first finger When the content for determining webpage is mismatched, determine whether whether the conditional code of first response data is 3 divided by 100 business, with And whether the value of Redirect Address Location is empty, if business is not sky for the value of 3 and Location Redirect Address, is pointed out This judged result is that the wireless network access point is the wireless network access point for needing checking, if it is not, then determining whether Whether the conditional code of first response data is 2 divided by 100 business, and whether the content of example body is empty, if business is 2 And the content of body is not sky, then it is that the wireless network access point is the wireless network for needing checking to point out this judged result Access point, if it is not, then pointing out the wireless network access point cannot to connect network.
In one embodiment, request initiation module 602 be additionally operable to judged result be the wireless network access point without During line connection network, access request is initiated to the second named web page by the wireless network access point;
The response receiver module 604 is additionally operable to receive that second named web page is returned according to the access request Two response datas;
The judge module 606 be additionally operable to judge second response data and second named web page content whether Match, if matching, the reminding module 608 is additionally operable to point out the wireless network access point connection network success, if Mismatch, then the reminding module 608 is additionally operable to point out the wireless network access point cannot connect network.
In one embodiment, whether judge module 606 is additionally operable to judge in second response data comprising described Key content in two named web pages, if including the key content, second number of responses in second response data Match according to the content with second named web page, if not including the key content, institute in second response data The second response data is stated to be mismatched with the content of second named web page.
In one embodiment, judge module 606 be additionally operable to judge conditional code in second response data whether be Second preset state code, if so, then second response data matches with the content of second named web page, if it is not, then Second response data is mismatched with the content of second named web page.
Fig. 7 is the structured flowchart of the device of detection wireless network access point connection network in another embodiment.Such as Fig. 7 institutes Show, it is a kind of detect wireless network access point connect network device, run in terminal, except including request initiation module 602, Response data receiver module 604, judge module 606 and reminding module 608, also including number of times detection module 610.
Number of times detection module 610 is used in the content for judging second response data and second named web page not During matching, detect whether to exceed maximum reattempt times, if so, then terminate, if it is not, then by the request initiation module again through The wireless network access point is initiated access request and detects whether the wireless network access point connects net to the first named web page Network.
One of ordinary skill in the art will appreciate that all or part of flow in realizing above-described embodiment method, can be The hardware of correlation is instructed to complete by computer program, described program can be stored in a non-volatile computer and can read In storage medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage is situated between Matter can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Embodiment described above only expresses several embodiments of the invention, and its description is more specific and detailed, but simultaneously Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to guarantor of the invention Shield scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (16)

1. a kind of method that detection wireless network access point connects network, including:
Selected wireless network access point is obtained, the wireless network access point is connected, and by the wireless network access point Access request is initiated to the first named web page;
Receive the first response data that first named web page is returned according to the access request;
Judge whether first response data matches with the content of first named web page, if matching, point out institute State wireless network access point connection network success.
2. method according to claim 1, it is characterised in that judgement first response data and described first refers to Whether the content for determining webpage matches, including:
Judge whether comprising the key content in first named web page in first response data, if first response The key content is included in data, then first response data matches with the content of first named web page, if institute State in the first response data not comprising the key content in first named web page, then first response data and described the The content of one named web page is mismatched.
3. method according to claim 1, it is characterised in that judgement first response data and described first refers to Whether the content for determining webpage matches, including:
Judge whether the conditional code in first response data is the first preset state code, if so, then first number of responses Match according to the content with first named web page, if it is not, then first response data and first named web page Content is mismatched.
4. the method according to claim 1 or 2, it is characterised in that methods described also includes:
When the content for judging first response data and first named web page is mismatched, described the is determined whether Whether the conditional code of one response data is 3 divided by 100 business, and whether the value of Redirect Address Location is empty, if business For the value of 3 and Location Redirect Address is not sky, then this judged result is pointed out for the wireless network access point to need The wireless network access point to be verified, if it is not, then determining whether that the conditional code of first response data is divided by 100 business No is 2, and the content of example body is not sky, if business is not sky for the content of 2 and body, points out this judged result to be The wireless network access point be need checking wireless network access point, if it is not, then point out the wireless network access point without Method connects network.
5. according to the method in any one of claims 1 to 3, it is characterised in that methods described also includes:
When judged result is the wireless network access point connec-tionless network, by the wireless network access point to second Named web page initiates access request;
Receive the second response data that second named web page is returned according to the access request;
Judge whether second response data matches with the content of second named web page, if matching, point out institute Wireless network access point connection network success is stated, if mismatching, points out the wireless network access point to connect network.
6. method according to claim 5, it is characterised in that judgement second response data and described second refers to Whether the content for determining webpage matches, including:
Judge whether comprising the key content in second named web page in second response data, if second response The key content is included in data, then second response data matches with the content of second named web page, if institute State in the second response data not comprising the key content in second named web page, then second response data and described the The content of two named web pages is mismatched.
7. method according to claim 5, it is characterised in that judgement second response data and described second refers to Whether the content for determining webpage matches, including:
Judge whether the conditional code in second response data is the second preset state code, if so, then second number of responses Match according to the content with second named web page, if it is not, then second response data and second named web page Content is mismatched.
8. method according to claim 5, it is characterised in that methods described also includes:
When judging that second response data is mismatched with the content of second named web page, detect whether to exceed maximum Number of retries, if so, then terminate, if it is not, then initiating to access to the first named web page again through the wireless network access point Whether wireless network access point described in request detection connects network.
9. it is a kind of to detect the device that wireless network access point connects network, it is characterised in that including:
Request initiation module, for obtaining selected wireless network access point, connects the wireless network access point, and by institute State wireless network access point and initiate access request to the first named web page;
Response receiver module, for receiving the first response data that first named web page is returned according to the access request;
Judge module, for judging whether first response data matches with the content of first named web page;
Reminding module, if for judging that first response data matches with the content of first named web page, pointing out The wireless network access point connection network success.
10. device according to claim 9, it is characterised in that the judge module is additionally operable to judge first response Whether comprising the key content in first named web page in data, if comprising described crucial interior in first response data Hold, then first response data matches with the content of first named web page, if not wrapped in first response data Containing the key content, then first response data is mismatched with the content of first named web page.
11. devices according to claim 9, it is characterised in that the judge module is additionally operable to judge first response Whether the conditional code in data is the first preset state code, if so, then first response data and first named web page Content match, if it is not, then the content of first response data and first named web page is mismatched.
12. device according to claim 9 or 10, it is characterised in that the judge module be additionally operable to judge it is described When first response data is mismatched with the content of first named web page, the state of first response data is determined whether Whether code is 3 divided by 100 business, and whether the value of Redirect Address Location is empty, if business resets for 3 and Location It is not sky to the value of address, then it is that the wireless network access point is that the wireless network for needing checking connects to point out this judged result Access point, if it is not, then determine whether whether the conditional code of first response data is 2 divided by 100 business, and example body Content whether be empty, if business is not sky for the content of 2 and body, it is wireless network access to point out this judged result Point is to need the wireless network access point of checking, if it is not, then pointing out the wireless network access point cannot to connect network.
13. device according to any one of claim 9 to 11, it is characterised in that the request initiation module is additionally operable to When judged result is the wireless network access point connec-tionless network, specified to second by the wireless network access point Webpage initiates access request;
The response receiver module is additionally operable to receive the second response that second named web page is returned according to the access request Data;
The judge module is additionally operable to judge whether second response data matches with the content of second named web page, If matching, the reminding module is additionally operable to point out the wireless network access point connection network success, if mismatching, institute Stating reminding module is additionally operable to point out the wireless network access point cannot connect network.
14. devices according to claim 13, it is characterised in that the judge module is additionally operable to judge second response Whether comprising the key content in second named web page in data, if comprising described crucial interior in second response data Hold, then second response data matches with the content of second named web page, if not wrapped in second response data Containing the key content, then second response data is mismatched with the content of second named web page.
15. devices according to claim 13, it is characterised in that the judge module is additionally operable to judge second response Whether the conditional code in data is the second preset state code, if so, then second response data and second named web page Content match, if it is not, then the content of second response data and second named web page is mismatched.
16. devices according to claim 13, it is characterised in that described device also includes:
Number of times detection module, for judging the content mismatch of second response data and second named web page When, detect whether to exceed maximum reattempt times, if so, then terminate, if it is not, then by the request initiation module again through described Wireless network access point is initiated access request and detects whether the wireless network access point connects network to the first named web page.
CN201610872355.9A 2016-09-29 2016-09-29 Method and device for detecting wireless network access point connecting network Active CN106714206B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610872355.9A CN106714206B (en) 2016-09-29 2016-09-29 Method and device for detecting wireless network access point connecting network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610872355.9A CN106714206B (en) 2016-09-29 2016-09-29 Method and device for detecting wireless network access point connecting network

Publications (2)

Publication Number Publication Date
CN106714206A true CN106714206A (en) 2017-05-24
CN106714206B CN106714206B (en) 2020-06-16

Family

ID=58940375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610872355.9A Active CN106714206B (en) 2016-09-29 2016-09-29 Method and device for detecting wireless network access point connecting network

Country Status (1)

Country Link
CN (1) CN106714206B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332741A (en) * 2017-08-25 2017-11-07 广东欧珀移动通信有限公司 A kind of network detecting method, network detection means and intelligent terminal
CN107360059A (en) * 2017-07-28 2017-11-17 广东欧珀移动通信有限公司 Network detecting method, network detection means and intelligent terminal
CN107395633A (en) * 2017-08-25 2017-11-24 广东欧珀移动通信有限公司 A kind of network detecting method, network detection means and intelligent terminal
CN107493206A (en) * 2017-08-16 2017-12-19 广东欧珀移动通信有限公司 A kind of network detecting method, network detection means and intelligent terminal
CN109005084A (en) * 2018-08-14 2018-12-14 连尚(新昌)网络科技有限公司 Verify method, electronic equipment and the computer-readable medium of network connection
CN109862605A (en) * 2019-01-22 2019-06-07 上海连尚网络科技有限公司 A kind of networking methods and equipment for terminal device
CN110113744A (en) * 2019-04-18 2019-08-09 杭州涂鸦信息技术有限公司 Communication means, device, equipment and storage medium
CN111953761A (en) * 2020-08-04 2020-11-17 Oppo广东移动通信有限公司 Data processing method and device, electronic equipment and storage medium
CN113709086A (en) * 2020-05-22 2021-11-26 深圳市万普拉斯科技有限公司 Network detection method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204349A (en) * 2008-09-29 2011-09-28 株式会社东芝 Pre-evaluation of multiple network access points
US20110276716A1 (en) * 2010-05-06 2011-11-10 Desvio, Inc. Method and system for monitoring and redirecting http requests away from unintended web sites
CN103517377A (en) * 2012-06-30 2014-01-15 华为终端有限公司 Wireless network access method, Wifi access point and terminal
CN103634304A (en) * 2013-11-18 2014-03-12 四川长虹电器股份有限公司 Method for realizing quick WEB authentication on smart television
CN104243320A (en) * 2014-09-10 2014-12-24 珠海市君天电子科技有限公司 Method and device for optimizing network access paths
CN104268266A (en) * 2014-10-11 2015-01-07 北京国双科技有限公司 Webpage access request sending method and device
CN104735736A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Network access method and user terminal
CN105263196A (en) * 2015-08-31 2016-01-20 小米科技有限责任公司 Connection state prompting method and device
CN105871853A (en) * 2016-04-11 2016-08-17 上海斐讯数据通信技术有限公司 Portal authenticating method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102204349A (en) * 2008-09-29 2011-09-28 株式会社东芝 Pre-evaluation of multiple network access points
US20110276716A1 (en) * 2010-05-06 2011-11-10 Desvio, Inc. Method and system for monitoring and redirecting http requests away from unintended web sites
CN103517377A (en) * 2012-06-30 2014-01-15 华为终端有限公司 Wireless network access method, Wifi access point and terminal
CN103634304A (en) * 2013-11-18 2014-03-12 四川长虹电器股份有限公司 Method for realizing quick WEB authentication on smart television
CN104735736A (en) * 2013-12-24 2015-06-24 中国移动通信集团公司 Network access method and user terminal
CN104243320A (en) * 2014-09-10 2014-12-24 珠海市君天电子科技有限公司 Method and device for optimizing network access paths
CN104268266A (en) * 2014-10-11 2015-01-07 北京国双科技有限公司 Webpage access request sending method and device
CN105263196A (en) * 2015-08-31 2016-01-20 小米科技有限责任公司 Connection state prompting method and device
CN105871853A (en) * 2016-04-11 2016-08-17 上海斐讯数据通信技术有限公司 Portal authenticating method and system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360059A (en) * 2017-07-28 2017-11-17 广东欧珀移动通信有限公司 Network detecting method, network detection means and intelligent terminal
CN107493206A (en) * 2017-08-16 2017-12-19 广东欧珀移动通信有限公司 A kind of network detecting method, network detection means and intelligent terminal
CN107493206B (en) * 2017-08-16 2019-04-23 Oppo广东移动通信有限公司 A kind of network detecting method, network detection device and intelligent terminal
CN107332741A (en) * 2017-08-25 2017-11-07 广东欧珀移动通信有限公司 A kind of network detecting method, network detection means and intelligent terminal
CN107395633A (en) * 2017-08-25 2017-11-24 广东欧珀移动通信有限公司 A kind of network detecting method, network detection means and intelligent terminal
CN107332741B (en) * 2017-08-25 2019-03-29 Oppo广东移动通信有限公司 A kind of network detecting method, network detection device and intelligent terminal
CN109005084A (en) * 2018-08-14 2018-12-14 连尚(新昌)网络科技有限公司 Verify method, electronic equipment and the computer-readable medium of network connection
CN109862605A (en) * 2019-01-22 2019-06-07 上海连尚网络科技有限公司 A kind of networking methods and equipment for terminal device
CN110113744A (en) * 2019-04-18 2019-08-09 杭州涂鸦信息技术有限公司 Communication means, device, equipment and storage medium
CN113709086A (en) * 2020-05-22 2021-11-26 深圳市万普拉斯科技有限公司 Network detection method and device, electronic equipment and storage medium
CN111953761A (en) * 2020-08-04 2020-11-17 Oppo广东移动通信有限公司 Data processing method and device, electronic equipment and storage medium
CN111953761B (en) * 2020-08-04 2023-07-25 Oppo广东移动通信有限公司 Data processing method, device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106714206B (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN106714206A (en) Method and device for detecting network connection by wireless network access point
CN105940654B (en) Franchise static web application in trust
US9584504B2 (en) Auto login method and device
CN104093141B (en) The login method of terminal applies, device, client and electronic equipment
US20150278033A1 (en) Terminal and application restoring method
US20190327287A1 (en) Data acquisition method and device
US8560702B2 (en) Saving and retrieval of browser sessions
US20120185947A1 (en) Triggering a private browsing function of a web browser application program
CN107197462B (en) Wireless network type detection method and device and electronic equipment
CN104579830B (en) service monitoring method and device
US10437577B2 (en) Systems and methods for mobile application installation
US9137094B1 (en) Method for setting DNS records
CN108574721B (en) Login method, device, server, user terminal and readable storage medium
US20200382495A1 (en) Systems and methods of application single sign on
CN106534280B (en) Data sharing method and device
CN103838799A (en) Method, terminal device, cloud server and system for recommending installing software
CN106034319A (en) Connection method and device of wireless access point
WO2013054248A1 (en) Generating a predictive data structure
CN104991857A (en) Method and apparatus for trace debugging
CN106294702A (en) A kind of information query method and device
CN106302002B (en) Test method and device
CN106202289B (en) Webpage positioning method and electronic equipment
CN110427745B (en) Verification code obtaining method and device, electronic equipment and computer readable medium
JP6021723B2 (en) Management server, communication terminal, user registration system, and user registration method
KR102115908B1 (en) User equipment and control method thereof

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