CN102456063A - Method and system for correcting webpage access error - Google Patents
Method and system for correcting webpage access error Download PDFInfo
- Publication number
- CN102456063A CN102456063A CN2011100500403A CN201110050040A CN102456063A CN 102456063 A CN102456063 A CN 102456063A CN 2011100500403 A CN2011100500403 A CN 2011100500403A CN 201110050040 A CN201110050040 A CN 201110050040A CN 102456063 A CN102456063 A CN 102456063A
- Authority
- CN
- China
- Prior art keywords
- web page
- webpage
- domain name
- character string
- 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.)
- Pending
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种网页访问错误修正的方法及其系统。所述方法包括以下步骤:获取浏览器输入栏中的字符串;检查以所述字符串访问网页是否会产生相关网页访问错误的结果;如果以所述字符串访问网页会产生相关网页访问错误的结果,则按照预定策略对网页访问错误进行修正。所述系统包括:获取模块,用于获取浏览器输入栏中的字符串;判断模块,用于判断字符串信息是否符合域名规范;检测模块,用于检测网页访问是否错误;修正模块,用于纠正不规范的域名以及当网页访问错误时按照预定策略对网页访问错误进行修正。
The present invention discloses a method and system for correcting web page access errors. The method comprises the following steps: obtaining a character string in a browser input bar; checking whether accessing a web page with the character string will result in a related web page access error; if accessing a web page with the character string will result in a related web page access error, correcting the web page access error according to a predetermined strategy. The system comprises: an acquisition module for obtaining a character string in a browser input bar; a judgment module for judging whether the character string information complies with domain name specifications; a detection module for detecting whether a web page access is wrong; and a correction module for correcting an irregular domain name and correcting the web page access error according to a predetermined strategy when a web page access error occurs.
Description
技术领域 technical field
本发明涉及一种计算机网络技术,更准确地说是涉及一种网页访问错误修正的方法及其系统。The invention relates to a computer network technology, and more precisely relates to a method and system for correcting web page access errors.
背景技术 Background technique
在当今的互联网应用中,要访问一个网站的时候,则启动浏览器程序,在地址栏输入相应的统一资源定位地址(域名),实际上就是向特定的服务器端发送一个连接请求,然后等待服务器的响应,接收相应的文件。In today's Internet applications, when you want to visit a website, start the browser program, enter the corresponding URL (domain name) in the address bar, in fact, send a connection request to a specific server, and then wait for the server to In response, the corresponding file is received.
统一资源定位地址(域名)是对可以从万维网(WWW)上用到的资源的位置和访问方法的一种简洁的表示,域名给资源的位置提供一种抽象的识别方法,并利用这种方法给资源定位。Uniform resource location address (domain name) is a concise representation of the location and access method of resources that can be used from the World Wide Web (WWW). The domain name provides an abstract identification method for the location of resources, and uses this method Locate resources.
举例而言,用户访问的URL可能为“协议名://主机地址:端口/路径/文件名”,其中协议名可以是常用的应用层协议中的任何一种;“:”和“//”是域名的分隔符;主机地址是存放WWW资源的主机地址,可以是域名,也可以是IP地址;“:”同前面一样是分隔符;端口指访问该资源时应该使用的端口,一般来讲,每一种常用服务都有自己特定的端口号;路径指资源在主机中的存取路径;文件名就是该资源在主机中的名字。For example, the URL accessed by the user may be "protocol name: //host address: port/path/file name", where the protocol name can be any of the commonly used application layer protocols; ":" and "// " is the delimiter of the domain name; the host address is the host address of the WWW resource, which can be a domain name or an IP address; ":" is the same delimiter as before; the port refers to the port that should be used when accessing the resource. In other words, each commonly used service has its own specific port number; the path refers to the access path of the resource in the host; the file name is the name of the resource in the host.
通常情况下在浏览器地址栏输入域名地址时,协议名的输入可以省略,因为客户程序可以提取主机中包含的协议名,例如主机名中的WWW就是协议的名字。Usually, when entering the domain name address in the browser address bar, the input of the protocol name can be omitted, because the client program can extract the protocol name contained in the host, for example, the WWW in the host name is the name of the protocol.
然而在实际应用中,用户往往会由于一些疏忽而在地址栏中输入了不规范的域名而不能正常访问网络资源,不规范的域名包括用户将分隔符“//”写成了“\\”、将分隔符“:”写成“;”或者将“.”写成“。”等,例如不规范的域名(http;\\www。360。com)。However, in practical applications, users often enter non-standard domain names in the address bar due to some negligence and cannot access network resources normally. Write the separator ":" as ";" or "." as ".", etc., such as an irregular domain name (http;\\www.360.com).
实际应用中还会遇到域名所指向的网页内容不存在、网页内容没有权限访问或者由于本地网络的设置错误问题导致不能链接到网页,这些都是上网时候用户经常碰见的问题。In practical applications, the content of the webpage pointed to by the domain name does not exist, the content of the webpage does not have permission to access, or the webpage cannot be linked to due to the wrong setting of the local network. These are problems that users often encounter when surfing the Internet.
现有的浏览器程序只能提示所访问的网页不存在,导致用户不能正常打开所要访问的网站,显然这样的处理方式不能满足用户需求。Existing browser programs can only prompt that the visited webpage does not exist, causing the user to fail to normally open the website to be visited. Obviously, such a processing method cannot meet the needs of the user.
发明内容 Contents of the invention
本发明的目的是提供一种快速、有效的网页访问错误修正的方法及其系统。The purpose of the present invention is to provide a fast and effective method and system for correcting web page access errors.
一方面,本发明提供了一种网页访问错误修正的方法,其特征在于包括以下步骤:获取浏览器输入栏中的字符串,其中字符串包括中文汉字、汉语拼音或编码、外文字母、数字、符号等,例如用户通常在浏览器地址栏中输入的中英文域名、IP地址和在搜索栏中输入的搜索关键字等;检查以所述字符串访问网页是否会产生相关网页访问错误的结果;如果以上述字符串访问网页会产生相关网页访问错误的结果,则按照预定策略对网页访问错误进行修正。On the one hand, the present invention provides a kind of method of webpage access error correction, it is characterized in that comprising the following steps: obtain the character string in the input field of browser, wherein character string comprises Chinese character, Chinese pinyin or code, foreign language letter, number, Symbols, etc., such as Chinese and English domain names, IP addresses, and search keywords entered in the search bar that users usually enter in the browser address bar; check whether accessing web pages with the strings mentioned will produce related web page access errors; If accessing the webpage with the above-mentioned string results in a related webpage access error, the webpage access error is corrected according to a predetermined strategy.
优选地,浏览器输入栏包括浏览器地址栏、搜索栏和搜索工具条中的输入栏,用户通过在浏览器地址栏中输入网址访问网站,通过在搜索栏或者工具条中的输入栏输入搜索关键字以访问关键字相关网页。Preferably, the browser input bar includes the input bar in the browser address bar, the search bar and the search tool bar, and the user visits the website by inputting the website address in the browser address bar, and searches through the input bar in the search bar or the tool bar. keywords to visit keyword-related pages.
当浏览器输入栏为浏览器地址栏时,网页访问错误包括字符串不符合域名规范导致的错误。When the browser input field is the browser address field, web page access errors include errors caused by character strings that do not conform to domain name specifications.
字符串不符合域名规范是指字符串中存在除域名约定中允许的文字、符号以外的字符,包括“、”符号和/或“\”符号时,上述预定策略包括将字符串中的符号“、”和/或“\”纠正为规范域名的符号“/”;或者字符串中存在“;”符号和/或“’”符号时,上述预定策略包括将字符串中的符号“;”和/或“’”纠正为规范域名的符号“:”;或者字符串中包括存在“,”符号和/或“。”符号时,上述预定策略包括将字符串中的符号“,”和/或“。”纠正为规范域名的符号“.”。A string that does not conform to the domain name specification means that there are characters in the string other than the words and symbols allowed in the domain name convention, including the "," symbol and/or the "\" symbol, the above predetermined policy includes the character "" in the string ," and/or "\" are corrected to the symbol "/" of the canonical domain name; or when there are ";" symbols and/or "'" symbols in the string, the above predetermined strategy includes converting the symbols ";" and / or "'" is corrected to the symbol ":" of the canonical domain name; or when the character string contains the "," symbol and/or "." symbol, the above predetermined strategy includes the symbol "," and/or in the string "." is corrected to the symbol "." of the canonical domain name.
优选地,网页访问错误包括与所述字符串对应的网页不存在导致的错误。Preferably, the web page access error includes an error caused by the non-existence of the web page corresponding to the character string.
优选地,按照预定策略对网页访问错误进行修正的步骤包括判断域名是否存在网页内容,当域名不存在网页内容并且上述字符串访问的网页存在上一级网页目录时,则跳至所述上一级网页目录。Preferably, the step of correcting web page access errors according to a predetermined strategy includes judging whether there is web page content in the domain name, and when there is no web page content in the domain name and the web page accessed by the above-mentioned string exists in the upper-level web page directory, then jump to the previous web page directory. level web directory.
优选地,按照预定策略对网页访问错误进行修正的步骤包括:当域名解析失效导致网页访问错误时,切换连接到该域名的备用IP地址,并获取网页内容。Preferably, the step of correcting the webpage access error according to a predetermined strategy includes: when the domain name resolution failure causes the webpage access error, switching the standby IP address connected to the domain name, and obtaining the webpage content.
优选地,按照预定策略对网页访问错误进行修正的步骤包括判断域名是否存在网页内容,当域名不存在网页内容并且上述字符串访问的网页存在网页快照内容时,则返回上述网页快照内容。Preferably, the step of correcting webpage access errors according to a predetermined policy includes judging whether there is webpage content in the domain name, and when there is no webpage content in the domain name and there is webpage snapshot content in the webpage accessed by the above-mentioned character string, then returning the above-mentioned webpage snapshot content.
优选地,按照预定策略对网页访问错误进行修正的步骤包括判断字符串访问的网页是否有权限设置,当上述字符串访问的网页有权限设置,则连接至上述网页的账户登陆页面。Preferably, the step of correcting webpage access errors according to a predetermined policy includes judging whether the webpage accessed by the character string has permission settings, and if the webpage accessed by the above-mentioned character string has permission settings, then connect to the account login page of the above-mentioned webpage.
优选地,按照预定策略对网页访问错误进行修正的步骤包括判断本地网络设置是否出错,当本地网络设置出错导致网页访问错误的结果时,修正本地网络设置。Preferably, the step of correcting the web page access error according to the predetermined strategy includes judging whether the local network setting is wrong, and correcting the local network setting when the local network setting error results in a web page access error.
另一方面,本发明还提供了一种网页访问错误修正的系统,包括:获取模块,用于获取浏览器输入栏中的字符串;判断模块,用于判断字符串信息是否符合域名规范;检测模块,用于检测字符串访问的网页是否存在;修正模块,用于纠正不规范的域名以及当网页访问错误时按照预定策略对网页访问错误进行修正。On the other hand, the present invention also provides a system for correcting errors in web page access, including: an acquisition module for acquiring character strings in the input column of the browser; a judging module for judging whether the character string information conforms to the domain name specification; detecting The module is used to detect whether the webpage accessed by the character string exists; the correction module is used to correct the non-standard domain name and correct the webpage access error according to a predetermined strategy when the webpage access error occurs.
优选地,获取浏览器输入栏为浏览器地址栏时,上述网页访问错误包括字符串不符合域名规范导致的错误。Preferably, when the browser input field is obtained as the browser address field, the above-mentioned webpage access errors include errors caused by character strings not conforming to domain name specifications.
优选地,网页访问错误包括与上述字符串对应的网页不存在导致的错误。Preferably, the web page access error includes an error caused by the non-existence of the web page corresponding to the above character string.
优选地,检测模块判断域名是否存在网页内容,当该域名访问的网页存在上一级网页目录时,则由修正模块将该网页的上一级网页作为修正结果提供给用户。Preferably, the detection module judges whether there is webpage content in the domain name, and when the webpage accessed by the domain name exists in the upper-level webpage directory, the correction module provides the upper-level webpage of the webpage as the correction result to the user.
优选地,由检测模块判断域名是否存在网页内容,当域名不存在网页内容并且该域名访问的网页存在网页快照内容时,则由修正模块返回所述网页快照内容。Preferably, the detection module judges whether there is webpage content in the domain name, and when there is no webpage content in the domain name and there is webpage snapshot content in the webpage accessed by the domain name, the correction module returns the webpage snapshot content.
优选地,由检测模块判断字符串访问的网页是否有权限设置,当字符串访问的网页有权限设置时,则由修正模块连接至该网页的账户登陆页面作为修正结果提供给用户。Preferably, the detection module judges whether the webpage accessed by the character string has permission settings, and when the webpage accessed by the character string has permission settings, the account login page connected to the webpage by the correction module is provided to the user as a correction result.
优选地,由检测模块判断本地网络设置是否出错,当本地网络设置出错导致网页访问错误的结果时,由修正模块修正本地网络设置。Preferably, the detection module judges whether the local network settings are wrong, and when the wrong local network settings result in a web page access error, the correction module corrects the local network settings.
优选地,由检测模块判断域名是否存在网页内容,当域名解析失效导致网页访问错误时,则由修正模块切换连接到该域名的备用IP地址,获取网页内容。Preferably, the detection module judges whether there is webpage content in the domain name, and when the domain name resolution fails to cause a webpage access error, the correction module switches the standby IP address connected to the domain name to obtain the webpage content.
根据本发明的方法及其系统能够快速检查用户在进行网页访问时所出现的网页访问错误的原因,并针对网页访问错误的原因进行灵活、准确的修正。本发明用途广泛,可以以浏览器、第三方软件或浏览器插件的方式在具有浏览器应用的PC机、手机、掌上电脑、或数字电视中使用,帮助用户修正网页访问错误,提高用户体验。According to the method and system of the present invention, it can quickly check the cause of the webpage access error that occurs when the user accesses the webpage, and make flexible and accurate corrections to the cause of the webpage access error. The invention has a wide range of uses, and can be used in PCs, mobile phones, palmtop computers or digital TVs with browser applications in the form of browsers, third-party software or browser plug-ins to help users correct web page access errors and improve user experience.
附图说明 Description of drawings
通过以下结合附图以举例方式对本发明的具体实施方案进行详细描述后,本发明的其他特征、特点和优点将会更加明显。Other characteristics, characteristics and advantages of the present invention will be more apparent after the specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings by way of example.
附图中:In the attached picture:
图1为本发明一实施例的网页访问错误修正的方法流程图;FIG. 1 is a flowchart of a method for correcting web page access errors according to an embodiment of the present invention;
图2为本发明一实施例的域名不规范纠正的方法流程图;Fig. 2 is a flow chart of a method for correcting an irregular domain name according to an embodiment of the present invention;
图3为本发明一实施例的网页访问错误修正的系统结构图。FIG. 3 is a system structure diagram of a web page access error correction system according to an embodiment of the present invention.
具体实施方式 Detailed ways
图1为本发明一实施例的网页访问错误修正的方法流程图。FIG. 1 is a flowchart of a method for correcting web page access errors according to an embodiment of the present invention.
步骤S100,获取浏览器输入栏中的字符串。例如,浏览器输入栏包括浏览器的地址栏、搜索引擎网站的搜索栏或者搜索工具条中的输入栏,则步骤S100中所获取的字符串为通过浏览器地址栏中输入的URL、通过搜索引擎网站的搜索栏输入的搜索关键词,或者通过搜索工具条中的输入栏输入的搜索关键词。Step S100, acquiring the character string in the input field of the browser. For example, the browser input bar includes the address bar of the browser, the search bar of the search engine website or the input bar in the search tool bar, then the character string obtained in step S100 is the URL inputted in the browser address bar, the search bar through the search bar. The search keyword entered in the search bar of the engine website, or the search keyword entered through the input field in the search tool bar.
步骤S101,判断步骤S100中获取的字符串能否正常访问网页,如果不能正常访问网页,则执行S102步骤。Step S101, judging whether the character string acquired in step S100 can access the webpage normally, and if the webpage cannot be accessed normally, execute step S102.
步骤S102,判断字符串是否符合域名规范,当字符串不符合域名规范则执行步骤S103步骤进行不规范域名纠正处理,当字符串符合域名规范时选择执行步骤S104-S107。其中,字符串不符合域名规范是指字符串中存在除域名约定中允许的文字、符号以外的字符。Step S102, judging whether the string conforms to the domain name specification, if the string does not conform to the domain name specification, execute step S103 to correct the irregular domain name, and if the string conforms to the domain name specification, select to execute steps S104-S107. Among them, the string does not conform to the domain name specification means that there are characters in the string other than the characters and symbols allowed in the domain name convention.
步骤S103,纠正不规范域名。上述不规范的域名包括域名中存在一个或多个符号“、”、符号“\”、符号“;”、符号“’”、符号“,”和符合“。”等。Step S103, correcting the non-standard domain name. The above-mentioned irregular domain names include one or more symbols ",", symbol "\", symbol ";", symbol "'", symbol "," and symbols "." etc. in the domain name.
一个例子中,将域名中出现的符号“、”、符号“\”自动纠正为符号“/”;将字符串中出现的符号“;”、符号“’”自动纠正为符号“:”;将字符串中出现的符号“,”、符号“。”自动纠正为符号“.”。In one example, the symbols "," and "\" appearing in the domain name are automatically corrected to the symbol "/"; the symbols ";" and "'" appearing in the string are automatically corrected to the symbol ":"; The symbols "," and "." appearing in the string are automatically corrected to the symbol ".".
步骤S104,当字符串符合域名规范时,客户端则向服务器发送请求报文,服务器则根据请求报文返回应答报文,根据服务器的应答报文判断当前域名所指向的网页内容是否正常存在,如果不存在则执行步骤S108或步骤S109。Step S104, when the character string conforms to the domain name specification, the client sends a request message to the server, and the server returns a response message according to the request message, and judges whether the content of the webpage pointed to by the current domain name exists normally according to the response message from the server. If not, execute step S108 or step S109.
一个例子中,用户要访问360公司网站的杀毒页面,则浏览器向服务器发送请求连接报文GET http://avc.360.cn/index.html?a=6072HTTP 1.1,如果360公司网站的杀毒网页存在,则服务器会向浏览器返回应答报文,其中应答报文中的状态码显示200,表示处理成功;如果360公司网站的杀毒页面不存在,则服务器会向浏览器返回应答报文,其中应答报文中的状态码则会显示404,浏览器根据返回应答报文中的状态码信息判断域名所访问的页面是否存在。In an example, if the user wants to visit the antivirus page of the 360 company website, the browser sends a connection request message GET http://avc.360.cn/index.html?to the server? a=6072HTTP 1.1, if the anti-virus web page of the 360 company website exists, the server will return a response message to the browser, and the status code in the response message shows 200, indicating that the processing is successful; if the anti-virus page of the 360 company website does not exist, Then the server will return a response message to the browser, and the status code in the response message will display 404, and the browser will judge whether the page accessed by the domain name exists according to the status code information in the response message.
步骤S105,当字符串符合域名规范时,客户端则向服务器发送请求报文,服务器则根据请求报文返回应答报文,根据服务器的应答报文判断当前域名所指向的网页内容是否有权限的设置,如果有权限设置则执行步骤S110。Step S105, when the character string conforms to the domain name specification, the client sends a request message to the server, and the server returns a response message according to the request message, and judges whether the content of the web page pointed to by the current domain name has authority according to the response message from the server If there is permission setting, execute step S110.
一个例子中,某些网站会用JavaScript代码给自己的网页设置浏览权限,无授权访问者根本无法进入。In one example, some websites use JavaScript codes to set browsing permissions for their web pages, so that unauthorized visitors cannot enter at all.
步骤S106,当字符串符合域名规范时,客户端则向服务器发送请求报文,根据返回结果判断是否由于本地网络设置出错而导致不能正常访问网页,如果有网络设置出错,则执行步骤S111。Step S106, when the character string conforms to the domain name specification, the client sends a request message to the server, and judges according to the returned result whether the web page cannot be accessed normally due to an error in the local network setting, and if there is an error in the network setting, then execute step S111.
步骤S107,当字符串符合域名规范时,客户端则向服务器发送请求报文,根据返回结果判断是否由于域名解析失效导致不能正常访问网页,如果是域名解析失效则执行步骤S112。Step S107, when the character string conforms to the domain name specification, the client sends a request message to the server, and judges according to the returned result whether the web page cannot be accessed normally due to domain name resolution failure, and if it is domain name resolution failure, execute step S112.
步骤S108,根据步骤S104的判断结果,当所述域名所指向的网页被删除或死链等原因导致页面不存在时,浏览器或其它功能软件可以通过在搜索引擎中查找该网页的网页快照内容,并将搜索到的相应网页快照内容返回给浏览器展示给用户,实现对网页访问错误的修正,也可以将用户输入的字符串作为搜索引擎的搜索关键词发送至搜索引擎,并将搜索引擎返回的搜索结果展示给用户,实现对网页访问错误的修正,例如用户在地址栏或搜索栏输入了“360安全卫士”但网页访问失败,则可以将字符串发送至搜索引擎,以搜索引擎对该字符串的搜索结果展示给用户。Step S108, according to the judgment result of step S104, when the webpage pointed to by the domain name is deleted or the page does not exist due to reasons such as dead links, the browser or other functional software can search the webpage snapshot content of the webpage in the search engine , and return the corresponding searched web page snapshot content to the browser to display to the user, so as to correct the web page access error, or send the string entered by the user as the search keyword of the search engine to the search engine, and the search engine The returned search results are displayed to the user to correct webpage access errors. For example, if the user enters "360 Security Guard" in the address bar or search bar but the webpage access fails, the string can be sent to the search engine for the search engine to correct The search results for this string are displayed to the user.
步骤S109,根据步骤S104的判断结果,当所述域名所指向的网页不存在时,检测当前网页是否存在上一级目录,如果有则返回到上一级网页目录或者该网页所在网站的首页。Step S109, according to the judgment result of step S104, when the webpage pointed to by the domain name does not exist, check whether the current webpage has an upper-level directory, and if so, return to the upper-level webpage directory or the homepage of the website where the webpage is located.
一个例子中,用户要下载360安全浏览器程序,用户则访问程序下载页面的域名http://se.360.cn/v3/download.htm,其中域名http://se.360.cn/是域名http://se.360.cn/v3/download.htm的上一级网页目录。当360安全浏览器程序下载页面不存在或者存在权限设置时,返回360安全浏览器程序下载页面的上一级网页目录http://se.360.cn/。In one example, the user wants to download the 360 security browser program, and the user visits the domain name http://se.360.cn/v3/download.htm of the program download page, where the domain name http://se.360.cn/ is The upper-level web directory of the domain name http://se.360.cn/v3/download.htm. When the 360 security browser program download page does not exist or there is a permission setting, return to the upper-level web directory http://se.360.cn/ of the 360 security browser program download page.
步骤S110,根据步骤S105的判断结果,当所述域名所指向的网页内容是有权限设置时,可链接至所述网页的账户登陆页面,在用户登陆后即可访问该网页。Step S110, according to the judgment result of step S105, when the content of the web page pointed to by the domain name is authorized, it can be linked to the account login page of the web page, and the user can access the web page after logging in.
步骤S111,根据步骤S106的判断结果,当所述本地网络设置出错导致网页访问错误的结果时,则提示用户本地网络配置出错需要重新配置或者根据预先设置的本地网络设置表自动修正。Step S111, according to the judgment result of step S106, when the error in the local network setting results in a web page access error, the user is prompted that the local network configuration error needs to be reconfigured or automatically corrected according to the preset local network setting table.
一个例子中,由于本地计算机的IP设置出错导致域名不能正常访问网页,浏览器提示用户设置正确的IP。In one example, the domain name cannot normally access the webpage due to an error in the IP setting of the local computer, and the browser prompts the user to set the correct IP.
另一个例子中,当手机wap配置出错时会导致手机不能正常访问网络时,则依本发明自动填入预先设置的正确wap配置信息。In another example, when the mobile phone's wap configuration is wrong and the mobile phone cannot access the network normally, the preset correct wap configuration information is automatically filled in according to the present invention.
步骤S112,根据步骤S107的判断结果,当所述域名解析失效导致网页访问错误的结果时,则切换到该域名的备用IP地址。Step S112, according to the judgment result of step S107, when the failure of the domain name resolution results in a web page access error, switch to the standby IP address of the domain name.
一个例子中,如360公司的域名是www.360.cn,该域名通过域名解析后的IP地址是192.168.1.1,该IP地址对应的网站空间存放着360公司的网站内容。同时360公司的网站内容又分别存放在备用IP地址为192.168.1.2和192.168.1.3对应的网站空间里。In one example, if the domain name of 360 Company is www.360.cn, the IP address of this domain name after domain name resolution is 192.168.1.1, and the website space corresponding to this IP address stores the website content of 360 Company. At the same time, the website content of Qihoo 360 is stored in the website space corresponding to the backup IP addresses 192.168.1.2 and 192.168.1.3 respectively.
根据上一个例子,预先存储域名www.360.cn的备用IP地址192.168.1.2和192.168.1.3,当客户端向域名解析系统发送请求解析域名www.360.cn并访问网站时,如果域名wwww.360.cn解析后的IP地址所访问的网站因某种原因不能被正常访问,则浏览器根据预先存储的IP地址192.168.1.2或192.168.1.3来访问360公司网站。According to the previous example, the backup IP addresses 192.168.1.2 and 192.168.1.3 of the domain name www.360.cn are stored in advance. When the client sends a request to the domain name resolution system to resolve the domain name www.360.cn and access the website, if the domain name www. If the website accessed by the resolved IP address of 360.cn cannot be accessed normally for some reason, the browser will access the 360 company website according to the pre-stored IP address 192.168.1.2 or 192.168.1.3.
本发明上述步骤顺序仅为方便说明,检查网页是否存在、检查本地网络设置是否有错误、检查网页是否有权限设置、检查域名解析是否失效的顺序可根据软件需求安排,也可只使用其中一种。The order of the above steps in the present invention is only for convenience. The order of checking whether the webpage exists, checking whether there is an error in the local network setting, checking whether the webpage has authority settings, and checking whether the domain name resolution is invalid can be arranged according to the software requirements, and only one of them can be used. .
图2为本发明一实施例的域名不规范纠正的方法流程图。FIG. 2 is a flowchart of a method for correcting domain name irregularities according to an embodiment of the present invention.
在步骤S201,根据域名判定规则针对地址栏中输入的字符串是否存在不规范的域名字符进行判定;In step S201, according to the domain name determination rules, it is determined whether there are irregular domain name characters in the character string input in the address bar;
在步骤S202,判断地址栏中输入的字符串是否存在“\”和/或“、”符号,如果存在则跳至S203的步骤将“\”和/或“、”符号更正为“/”符号。In step S202, it is determined whether there are "\" and/or "," symbols in the character string input in the address bar, and if so, skip to the step of S203 and correct the "\" and/or "," symbols to "/" symbols .
在步骤S204,进一步判断地址栏中输入的字符串是否存在“;”和/或“’”符号,如果存在则跳至S205的步骤将“;”和/或“’”符号更正为“:”符号。In step S204, it is further judged whether there are ";" and/or "'" symbols in the character string input in the address bar, and if so, then skip to step S205 and correct the ";" and/or "'" symbols to ":" symbol.
在步骤S206,进一步判断地址栏中输入的字符串是否存在“,”和/或“。”符号,如果存在则跳至S207的步骤将“,”和/或“。”符号更正为“.”符号。In step S206, it is further judged whether there are "," and/or "." symbols in the character string input in the address bar, and if so, jump to step S207 and correct the "," and/or "." symbols to "." symbol.
在步骤S208,浏览器根据纠正后的域名向服务器发送连接请求。In step S208, the browser sends a connection request to the server according to the corrected domain name.
图3为本发明一实施例的网页访问错误修正的系统结构图。301表示获取模块302表示判断模块,303表示检测模块,304表示修正模块。FIG. 3 is a system structure diagram of a web page access error correction system according to an embodiment of the present invention. 301 represents an acquisition module, 302 represents a judgment module, 303 represents a detection module, and 304 represents a correction module.
获取模块301用于获取浏览器输入栏中的字符串,其中浏览器输入栏包括浏览器地址栏、搜索栏和搜索工具条中的输入栏,用户通过在浏览器地址栏中输入网址访问网站,通过在搜索栏或者搜索工具条中的输入栏输入搜索关键字以访问关键字相关网页。Obtaining module 301 is used to obtain the character string in the browser input column, wherein the browser input column includes the input column in the browser address bar, search bar and search tool bar, the user visits the website by inputting the URL in the browser address bar, Enter search keywords in the search bar or the input field in the search tool bar to access keyword-related web pages.
判断模块302用于判断获取模块301获取浏览器输入栏的字符串信息是否符合域名规范,当获取模块301获取浏览器的输入栏为浏览器地址栏时,则判断网页访问错误是否由于字符串不符合域名规范导致的错误;Judgment module 302 is used for judging whether the character string information that acquisition module 301 acquires the browser input column conforms to the domain name specification; Errors caused by compliance with domain name specifications;
检测模块303用于检测以获取模块301获取的字符串来进行网页访问时是否会出现网页访问错误的情况,包括字符串访问的网页本身内容不存在导致的错误、字符串访问的网页是存在权限设置导致的错误、由于本地网络设置出错导致的错误或由于域名解析失效导致网页访问错误。The detection module 303 is used to detect whether there will be a webpage access error when the string obtained by the acquisition module 301 is used to access the webpage, including errors caused by the absence of the content of the webpage itself accessed by the string, and the presence of the webpage accessed by the string. Errors caused by settings, errors caused by errors in local network settings, or errors in web page access due to failure of domain name resolution.
修正模块304用于当判断模块302判断的字符串不符合域名规范时按照预定策略对不规范的域名进行纠正;以及当检测模块303检测出字符串访问的网页本身内容不存在导致的错误,则按照预定策略当字符串所访问的网页存在上一级网页目录时,则跳至所述上一级网页目录;或者检测模块303检测出字符串访问的网页本身内容不存在导致的错误,则按照预定策略当字符串访问的网页存在网页快照内容时,则返回网页快照内容;或者当检测模块303检测出字符串访问的网页是存在权限设置导致的错误,则按照预定策略连接至所述网页的账户登陆页面;或者当检测模块303检测由于本地网络设置出错导致网页访问出错,则按照预定策略修正本地网络设置;或者当检测模块303检测由于域名解析失效导致网页访问错误,则按照预定策略由修正模块304切换到该域名的备用IP地址。The correction module 304 is used to correct the non-standard domain name according to a predetermined strategy when the character string judged by the judgment module 302 does not conform to the domain name specification; When the webpage accessed by the character string exists the upper-level webpage directory according to the predetermined policy, then jump to the upper-level webpage directory; or the detection module 303 detects that the content of the webpage itself accessed by the character string does not exist. Predetermined strategy When there is a webpage snapshot content in the webpage accessed by the character string, then return the webpage snapshot content; or when the detection module 303 detects that the webpage accessed by the character string has an error caused by permission settings, then connect to the webpage according to the predetermined strategy Account login page; or when the detection module 303 detects that the webpage access error is caused by a local network setting error, the local network setting is corrected according to a predetermined strategy; Module 304 switches to the alternate IP address for the domain name.
本发明包括以一种插件的方式安装在具有浏览器应用程序的PC机、手机、掌上电脑、或电视网络中。例如,手机上网是指利用支持网络浏览器的手机通过WAP协议,同互联网相连,由于手机中的浏览器可以在手机上实现浏览WAP、WWW网页,适合安装本发明;例如,掌上电脑即PDA(Personal Digital Assistant),就是个人数字助理的意思。主要提供记事、通讯录、名片交换及行程安排等功能,但同样具备浏览网页功能适合安装本发明;例如,网络电视IPTV,它将电视机、个人电脑及手持设备作为终端,通过机顶盒或计算机接入宽带网络,实现数字电视、时移电视、互动电视等服务,它也同样具备浏览网页的功能同样适合安装本发明。The present invention includes being installed in a PC, a mobile phone, a palm computer, or a TV network with a browser application program in the form of a plug-in. For example, surfing the Internet with a mobile phone refers to utilizing a mobile phone supporting a web browser to be connected with the Internet through the WAP protocol. Because the browser in the mobile phone can browse WAP and WWW webpages on the mobile phone, it is suitable for installing the present invention; for example, a handheld computer is a PDA ( Personal Digital Assistant), is the meaning of personal digital assistant. Mainly provide functions such as memorandum, address book, business card exchange and itinerary arrangement, but also possess the function of browsing the webpage and be suitable for installing the present invention; Access to the broadband network to realize services such as digital TV, time-shifted TV, and interactive TV. It also has the function of browsing web pages and is suitable for installing the present invention.
显而易见,在不偏离本发明专利的真实精神和范围的前提下,在此描述的本发明专利可以有许多变化。因此,所有对于本领域技术人员来说显而易见的改变,都应包括在本权利要求书所涵盖的范围之内。本发明专利所要求保护的范围仅由所述的权利要求书进行限定。It will be apparent that many changes may be made to the invention described herein without departing from the true spirit and scope of the invention. Therefore, all changes obvious to those skilled in the art shall be included within the scope covered by the claims. The scope of protection required by the patent of the present invention is limited only by the claims.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100500403A CN102456063A (en) | 2011-03-02 | 2011-03-02 | Method and system for correcting webpage access error |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011100500403A CN102456063A (en) | 2011-03-02 | 2011-03-02 | Method and system for correcting webpage access error |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102456063A true CN102456063A (en) | 2012-05-16 |
Family
ID=46039258
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011100500403A Pending CN102456063A (en) | 2011-03-02 | 2011-03-02 | Method and system for correcting webpage access error |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102456063A (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102801814A (en) * | 2012-08-29 | 2012-11-28 | 易莲无限(北京)科技发展有限责任公司 | Internet access method, device and system |
CN104123125A (en) * | 2013-04-26 | 2014-10-29 | 腾讯科技(深圳)有限公司 | Webpage resource acquisition method and device |
CN104750700A (en) * | 2013-12-26 | 2015-07-01 | 珠海金山办公软件有限公司 | Document providing method and device |
CN104933061A (en) * | 2014-03-19 | 2015-09-23 | 腾讯科技(深圳)有限公司 | String detection method and apparatus and electronic device |
CN104965831A (en) * | 2014-06-11 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method, server, terminal and system for correcting website addresses |
CN106850813A (en) * | 2017-02-14 | 2017-06-13 | 合网络技术(北京)有限公司 | Network service address changing method and device |
CN107784011A (en) * | 2016-08-30 | 2018-03-09 | 广州市动景计算机科技有限公司 | Web access method, client, web page server and programmable device |
CN108040014A (en) * | 2017-10-30 | 2018-05-15 | 维沃移动通信有限公司 | A kind of flow control methods and device |
TWI644230B (en) * | 2017-11-06 | 2018-12-11 | 系微股份有限公司 | Safety management method and safety management system |
CN110020244A (en) * | 2017-11-03 | 2019-07-16 | 北京搜狗科技发展有限公司 | A kind of pair of website information carries out the method and device of error correction |
CN111131370A (en) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | Method, device and system for detecting whether service call is correct |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6134588A (en) * | 1997-11-12 | 2000-10-17 | International Business Machines Corporation | High availability web browser access to servers |
CN1997997A (en) * | 2004-07-22 | 2007-07-11 | 巴瑞弗鲁特有限公司 | Improved user interface |
US7325045B1 (en) * | 2003-08-05 | 2008-01-29 | A9.Com, Inc. | Error processing methods for providing responsive content to a user when a page load error occurs |
CN101212457A (en) * | 2006-12-27 | 2008-07-02 | 鸿富锦精密工业(深圳)有限公司 | Web page authority control system and method |
CN101477540A (en) * | 2009-01-21 | 2009-07-08 | 佛朗索瓦·卢克·科利侬 | Method and equipment for rewriting URL (Uniform resource locator) |
-
2011
- 2011-03-02 CN CN2011100500403A patent/CN102456063A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6134588A (en) * | 1997-11-12 | 2000-10-17 | International Business Machines Corporation | High availability web browser access to servers |
US7325045B1 (en) * | 2003-08-05 | 2008-01-29 | A9.Com, Inc. | Error processing methods for providing responsive content to a user when a page load error occurs |
CN1997997A (en) * | 2004-07-22 | 2007-07-11 | 巴瑞弗鲁特有限公司 | Improved user interface |
CN101212457A (en) * | 2006-12-27 | 2008-07-02 | 鸿富锦精密工业(深圳)有限公司 | Web page authority control system and method |
CN101477540A (en) * | 2009-01-21 | 2009-07-08 | 佛朗索瓦·卢克·科利侬 | Method and equipment for rewriting URL (Uniform resource locator) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102801814A (en) * | 2012-08-29 | 2012-11-28 | 易莲无限(北京)科技发展有限责任公司 | Internet access method, device and system |
CN104123125A (en) * | 2013-04-26 | 2014-10-29 | 腾讯科技(深圳)有限公司 | Webpage resource acquisition method and device |
US10110659B2 (en) | 2013-04-26 | 2018-10-23 | Tencent Technology (Shenzhen) Company Limited | Method and apparatus for obtaining webpages |
CN104750700A (en) * | 2013-12-26 | 2015-07-01 | 珠海金山办公软件有限公司 | Document providing method and device |
CN104933061A (en) * | 2014-03-19 | 2015-09-23 | 腾讯科技(深圳)有限公司 | String detection method and apparatus and electronic device |
US10621259B2 (en) | 2014-06-11 | 2020-04-14 | Tencent Technology (Shenzhen) Company Limited | URL error-correcting method, server, terminal and system |
CN104965831A (en) * | 2014-06-11 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method, server, terminal and system for correcting website addresses |
WO2015188765A1 (en) * | 2014-06-11 | 2015-12-17 | Tencent Technology (Shenzhen) Company Limited | Url error-correcting method, server, terminal and system |
CN104965831B (en) * | 2014-06-11 | 2018-09-07 | 腾讯科技(深圳)有限公司 | A kind of network address error correction method, server, terminal and system |
CN107784011A (en) * | 2016-08-30 | 2018-03-09 | 广州市动景计算机科技有限公司 | Web access method, client, web page server and programmable device |
CN106850813A (en) * | 2017-02-14 | 2017-06-13 | 合网络技术(北京)有限公司 | Network service address changing method and device |
CN108040014A (en) * | 2017-10-30 | 2018-05-15 | 维沃移动通信有限公司 | A kind of flow control methods and device |
CN110020244A (en) * | 2017-11-03 | 2019-07-16 | 北京搜狗科技发展有限公司 | A kind of pair of website information carries out the method and device of error correction |
TWI644230B (en) * | 2017-11-06 | 2018-12-11 | 系微股份有限公司 | Safety management method and safety management system |
CN111131370A (en) * | 2018-11-01 | 2020-05-08 | 百度在线网络技术(北京)有限公司 | Method, device and system for detecting whether service call is correct |
CN111131370B (en) * | 2018-11-01 | 2022-09-27 | 百度在线网络技术(北京)有限公司 | Method, device and system for detecting whether service call is correct |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102456063A (en) | Method and system for correcting webpage access error | |
CN102647417B (en) | The implementation method of network access, device and system and network system | |
US8782277B2 (en) | System and method for time-sensitive URI mapping | |
CN109768992B (en) | Webpage malicious scanning processing method and device, terminal device and readable storage medium | |
US8180759B2 (en) | Spell checking URLs in a resource | |
CN100517324C (en) | Method and system for generating unique valid keywords | |
US8527576B2 (en) | Data access control system and method according to position information of mobile terminal | |
US9251223B2 (en) | Alternative web pages suggestion based on language | |
WO2015090246A1 (en) | Short url query response method and apparatus | |
CN106302512B (en) | Method, equipment and system for controlling access | |
US9754028B2 (en) | Automatic crawling of encoded dynamic URLs | |
WO2015000320A1 (en) | Mobile terminal cross-browser login method and device | |
US20060195609A1 (en) | Internal natural domain service system with local name servers for flexible top-level domains | |
WO2015109928A1 (en) | Method, device and system for loading recommendation information and detecting url | |
US8271829B2 (en) | Network connection device and method for detecting network errors | |
CN103618742B (en) | Webmaster's method for verifying authority | |
CN102801814A (en) | Internet access method, device and system | |
CN104142925A (en) | Association method and device for input contents in address bar of browser | |
US20140280335A1 (en) | System and method to allow a domain name server to process a natural language query and determine context | |
CN101158974A (en) | Method and device for quoting resource | |
JP7138279B1 (en) | Communication system, gateway device, terminal device and program | |
KR102514214B1 (en) | Method and system for preventing network pharming using big data and artificial intelligence | |
JP4754348B2 (en) | Information communication system and unauthorized site detection method | |
CN103413092A (en) | Method for forbidding malicious codes from being injected into network terminal | |
JP4542122B2 (en) | An apparatus for performing URL filtering by acquiring an original URL of content stored in a cache server or the like |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20120516 |